diff --git a/api/doc/thor.yaml b/api/doc/thor.yaml index 4deb569b8..bde09e2f8 100644 --- a/api/doc/thor.yaml +++ b/api/doc/thor.yaml @@ -740,6 +740,7 @@ components: schemas: GetAccountResponse: type: object + title: GetAccountResponse properties: balance: type: string @@ -766,6 +767,7 @@ components: ExecuteCodesRequest: type: object + title: ExecuteCodesRequest allOf: - $ref: '#/components/schemas/ExtendedCallData' - $ref: '#/components/schemas/BatchCallData' @@ -793,6 +795,7 @@ components: ExecuteCodesResponse: type: array + title: ExecuteCodesResponse items: $ref: '#/components/schemas/CallResult' example: @@ -833,6 +836,7 @@ components: GetAccountCodeResponse: type: object + title: GetAccountCodeResponse properties: code: type: string @@ -846,6 +850,7 @@ components: GetStorageResponse: type: object + title: GetStorageResponse properties: value: type: string @@ -859,17 +864,20 @@ components: GetTxResponse: type: object + title: GetTxResponse oneOf: - allOf: - $ref: '#/components/schemas/Tx' - properties: meta: $ref: '#/components/schemas/TxMeta' + title: GetTxResponse - allOf: - $ref: '#/components/schemas/RawTx' - properties: meta: $ref: '#/components/schemas/TxMeta' + title: GetRawTxResponse example: id: '0x4de71f2d588aa8a1ea00fe8312d92966da424d9939a511fc0be81e65fad52af8' chainTag: 1 @@ -890,6 +898,7 @@ components: GetTxReceiptResponse: type: object + title: GetTxReceiptResponse allOf: - $ref: '#/components/schemas/Receipt' - properties: @@ -898,32 +907,12 @@ components: GetBlockResponse: type: object - allOf: - - $ref: '#/components/schemas/Block' - - $ref: '#/components/schemas/IsTrunk' - - $ref: '#/components/schemas/IsFinalized' - - oneOf: - - properties: - transactions: - description: An array of transaction IDs - type: array - required: true - nullable: false - minItems: 0 - items: - type: string - example: '0x284bba50ef777889ff1a367ed0b38d5e5626714477c40de38d71cedd6f9fa477' - - properties: - transactions: - description: All included transactions, expanded, to include their receipts - type: array - required: true - nullable: false - minItems: 0 - items: - allOf: - - $ref: '#/components/schemas/Tx' - - $ref: '#/components/schemas/Receipt' + description: | + The response will contain information about the block identified by the provided `revision`. + title: GetBlockResponse + oneOf: + - $ref: '#/components/schemas/CompressedBlockResponse' + - $ref: '#/components/schemas/ExpandedBlockResponse' example: number: 325324 id: '0x0004f6cc88bb4626a92907718e82f255b8fa511453a78e8797eb8cea3393b215' @@ -945,8 +934,52 @@ components: transactions: - '0x284bba50ef777889ff1a367ed0b38d5e5626714477c40de38d71cedd6f9fa477' + CompressedBlockResponse: + title: CompressedBlockResponse + type: object + description: | + The response will contain information about the block identified by the provided `revision`. The `transactions` + field contains an array of transaction IDs. + allOf: + - $ref: '#/components/schemas/Block' + - $ref: '#/components/schemas/IsTrunk' + - $ref: '#/components/schemas/IsFinalized' + - properties: + transactions: + description: An array of transaction IDs + type: array + required: true + nullable: false + minItems: 0 + items: + type: string + example: '0x284bba50ef777889ff1a367ed0b38d5e5626714477c40de38d71cedd6f9fa477' + + ExpandedBlockResponse: + title: ExpandedBlockResponse + type: object + description: | + The response will contain information about the block identified by the provided `revision`. The `transactions` + field contains an array of transactions, expanded to include their receipts. + allOf: + - $ref: '#/components/schemas/Block' + - $ref: '#/components/schemas/IsTrunk' + - $ref: '#/components/schemas/IsFinalized' + - properties: + transactions: + description: All included transactions, expanded, to include their receipts + type: array + required: true + nullable: false + minItems: 0 + items: + allOf: + - $ref: '#/components/schemas/Tx' + - $ref: '#/components/schemas/Receipt' + EventLogFilterRequest: type: object + title: EventLogFilterRequest properties: range: $ref: '#/components/schemas/FilterRange' @@ -973,6 +1006,7 @@ components: EventLogsResponse: type: array + title: EventLogsResponse minItems: 0 nullable: false required: true @@ -985,6 +1019,7 @@ components: TransferLogFilterRequest: type: object + title: TransferLogFilterRequest properties: range: $ref: '#/components/schemas/FilterRange' @@ -1009,6 +1044,7 @@ components: TransferLogsResponse: type: array + title: TransferLogsResponse minItems: 0 nullable: false required: true @@ -1021,6 +1057,7 @@ components: GetPeersResponse: type: array + title: GetPeersResponse minItems: 0 nullable: false required: true @@ -1029,6 +1066,7 @@ components: SubscriptionBlockResponse: type: object + title: SubscriptionBlockResponse allOf: - $ref: '#/components/schemas/Block' - $ref: '#/components/schemas/Obsolete' @@ -1046,6 +1084,7 @@ components: SubscriptionEventResponse: type: object + title: SubscriptionEventResponse allOf: - $ref: '#/components/schemas/Event' - $ref: '#/components/schemas/Obsolete' @@ -1055,6 +1094,7 @@ components: SubscriptionTransferResponse: type: object + title: SubscriptionTransferResponse allOf: - $ref: '#/components/schemas/Transfer' - $ref: '#/components/schemas/Obsolete' @@ -1064,6 +1104,7 @@ components: SubscriptionBeat2Response: type: object + title: SubscriptionBeat2Response allOf: - $ref: '#/components/schemas/SubscriptionBeatResponse' - properties: @@ -1078,6 +1119,7 @@ components: SubscriptionBeatResponse: type: object + title: SubscriptionBeatResponse allOf: - $ref: '#/components/schemas/Obsolete' - properties: @@ -1146,6 +1188,7 @@ components: PostDebugTracerRequest: type: object + title: PostDebugTracerRequest allOf: - $ref: '#/components/schemas/TracerOption' - $ref: '#/components/schemas/ClauseTracerOption' @@ -1155,6 +1198,7 @@ components: config: {} PostDebugTracerCallRequest: + title: PostDebugTracerCallRequest type: object allOf: - $ref: '#/components/schemas/TracerOption' @@ -1173,6 +1217,7 @@ components: blockRef: "0x00000000851caf3c" TxMeta: + title: TxMeta type: object description: Transaction metadata such as block number, block timestamp, etc. properties: @@ -1204,6 +1249,7 @@ components: blockTimestamp: 1533267900 ReceiptMeta: + title: ReceiptMeta type: object description: The transaction receipt metadata such as block number, block timestamp, etc. properties: @@ -1252,6 +1298,7 @@ components: txOrigin: '0xdb4027477b2a8fe4c83c6dafe7f86678bb1b8a8d' LogMeta: + title: LogMeta type: object description: The event or transfer log metadata such as block number, block timestamp, etc. properties: @@ -1301,6 +1348,7 @@ components: nullable: false Block: + title: Block type: object properties: number: @@ -1416,6 +1464,7 @@ components: pattern: '^0x[0-9a-f]{40}$' Clause: + title: Clause type: object properties: to: @@ -1444,6 +1493,7 @@ components: pattern: '^0x[0-9a-f]*$' Tx: + title: Tx type: object properties: id: @@ -1533,6 +1583,7 @@ components: nullable: false RawTx: + title: RawTx type: object properties: raw: @@ -1545,6 +1596,7 @@ components: example: '0xf901854a880104c9cf34b0f5701ef8e7f8e594058d4c951aa24ca012cef3408b259ac1c69d1258890254beb02d1dcc0000b8c469ff936b00000000000000000000000000000000000000000000000000000000ee6c7f95000000000000000000000000167f6cc1e67a615b51b5a2deaba6b9feca7069df000000000000000000000000000000000000000000000000000000000000136a00000000000000000000000000000000000000000000000254beb02d1dcc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080830469978084cb6b32c5c101b88272da83429a49a354f566dd8c85ba288a7c86d1d3161c0aad6a276a7c9f8e69c14df3d76f0d3442a4f4a2a13d016c32c45e82d5010f27386eeb384dee3d8390c0006adead8b8ce8823c583e1ac15facef8f1cc665a707ade82b3c956a53a2b24e0c03d80504bc4b276b5d067b72636d8e88d2ffc65528f868df2cadc716962978a000' Event: + title: Event type: object properties: address: @@ -1579,6 +1631,7 @@ components: pattern: '^0x[0-9a-f]*$' Transfer: + title: Transfer type: object properties: sender: @@ -1607,6 +1660,7 @@ components: pattern: '^0x[0-9a-f]*$' Receipt: + title: Receipt type: object properties: gasUsed: @@ -1679,6 +1733,7 @@ components: CallData: type: object + title: CallData properties: value: type: string @@ -1728,6 +1783,7 @@ components: ExtendedCallData: type: object + title: ExtendedCallData properties: provedWork: type: string @@ -1761,6 +1817,7 @@ components: CallResult: type: object + title: CallResult properties: data: type: string @@ -1812,6 +1869,7 @@ components: BatchCallData: type: object + title: BatchCallData properties: clauses: type: array @@ -1853,6 +1911,7 @@ components: caller: '0x7567d83b7b8d80addcb281a71d54fc7b3364ffed' BatchCallResult: + title: BatchCallResult type: array minItems: 0 nullable: false @@ -1863,6 +1922,7 @@ components: nullable: true required: false type: object + title: FilterOptions properties: offset: type: integer @@ -1903,6 +1963,7 @@ components: nullable: true required: false type: object + title: FilterRange properties: unit: type: string @@ -1950,6 +2011,7 @@ components: EventCriteria: type: object + title: EventCriteria properties: address: type: string @@ -2036,6 +2098,7 @@ components: TransferCriteria: type: object + title: TransferCriteria properties: txOrigin: description: | @@ -2064,6 +2127,7 @@ components: PeerStats: type: object + title: PeerStats properties: name: type: string @@ -2110,6 +2174,7 @@ components: required: true TXID: + title: TXID type: object properties: id: @@ -2125,6 +2190,7 @@ components: id: '0x4de71f2d588aa8a1ea00fe8312d92966da424d9939a511fc0be81e65fad52af8' Obsolete: + title: Obsolete type: object properties: obsolete: @@ -2138,6 +2204,7 @@ components: obsolete: false ClauseTracerOption: + title: ClauseTracerOption type: object properties: target: @@ -2156,6 +2223,7 @@ components: target: '0x010709463c1f0c9aa66a31182fb36d1977d99bfb6526bae0564a0eac4006c31a/0/0' TracerOption: + title: TracerOption type: object properties: name: @@ -2189,6 +2257,7 @@ components: StorageRangeOption: type: object + title: StorageRangeOption properties: address: type: string @@ -2227,6 +2296,7 @@ components: StorageRange: type: object + title: StorageRange properties: nextKey: type: string @@ -2248,6 +2318,7 @@ components: '0x00000000000000000000000000000000000000000000000000000000000000c8' IsTrunk: + title: IsTrunk type: object properties: isTrunk: @@ -2258,6 +2329,7 @@ components: nullable: false IsFinalized: + title: IsFinalized type: object properties: isFinalized: