openapi: 3.2.0 info: description: API for Aeternity Middleware title: Aeternity Middleware Transactions API version: 1.108.2 servers: - url: https://mainnet.aeternity.io/mdw/v3 description: Mainnet middleware - url: https://testnet.aeternity.io/mdw/v3 description: Testnet middleware tags: - name: Transactions paths: /transactions: get: deprecated: false description: Get multiple transactions. operationId: GetTransactions parameters: - name: type description: The transaction type. The query allows providing of multiple type parameters. [More info](https://github.com/aeternity/ae_mdw#types) in: query style: form explode: true schema: type: array items: type: string enum: - channel_close_mutual - channel_close_solo - channel_create - channel_deposit - channel_force_progress - channel_offchain - channel_settle - channel_slash - channel_snapshot_solo - channel_withdraw - contract_call - contract_create - ga_attach - ga_meta - name_claim - name_preclaim - name_revoke - name_transfer - name_update - oracle_extend - oracle_query - oracle_register - oracle_response - paying_for - spend required: false example: channel_create - name: type_group description: The type group. The query allows providing of multiple type group parameters. [More info](https://github.com/aeternity/ae_mdw#types) in: query style: form explode: true schema: type: array items: enum: - channel - contract - ga - name - oracle - paying_for - spend type: string required: false example: channel - name: account description: The account ID. [More info](https://github.com/aeternity/ae_mdw#generic-ids) in: query required: false schema: $ref: '#/components/schemas/AccountAddress' - name: contract description: The contract ID. [More info](https://github.com/aeternity/ae_mdw#generic-ids) in: query required: false schema: $ref: '#/components/schemas/ContractAddress' - name: channel description: The channel ID. [More info](https://github.com/aeternity/ae_mdw#generic-ids) in: query required: false schema: $ref: '#/components/schemas/ChannelId' - name: oracle description: The oracle ID. [More info](https://github.com/aeternity/ae_mdw#generic-ids) in: query required: false schema: $ref: '#/components/schemas/OracleAddress' - name: sender_id description: The sender ID in: query required: false schema: $ref: '#/components/schemas/AccountAddress' - name: recipient_id description: The recipient ID in: query required: false schema: $ref: '#/components/schemas/AccountAddress' - name: entrypoint description: Entrypoint of a contract call example: put_listing in: query required: false schema: type: string - name: scope in: query description: Scopes results in a generation or time(unix timestamp) range schema: type: string pattern: (time|gen):\d+(-\d+)? - $ref: '#/components/parameters/LimitParam' - $ref: '#/components/parameters/DirectionParam' responses: '200': description: Returns paginated transactions content: application/json: schema: allOf: - type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/Transaction' - $ref: '#/components/schemas/PaginatedResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Transactions summary: Get transactions x-summary-source: derived /transactions/count: get: deprecated: false description: Get count of transactions at the latest height. operationId: GetTransactionsCount parameters: - name: tx_type description: Type of a transaction in: query required: false schema: type: string example: contract_call - name: id description: The ID of the address/name/oracle/etc in: query required: false schema: $ref: '#/components/schemas/AccountAddress' - $ref: '#/components/parameters/ScopeParam' responses: '200': description: Returns count of all transactions at the latest height content: application/json: schema: description: The transactions count example: 15479090 type: integer tags: - Transactions summary: Get transactions count x-summary-source: derived /transactions/pending: get: deprecated: false description: Get pending transactions. operationId: GetPendingTransactions parameters: - $ref: '#/components/parameters/LimitParam' - $ref: '#/components/parameters/DirectionParam' responses: '200': description: Returns paginated pending transactions content: application/json: schema: allOf: - type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/PendingTransaction' - $ref: '#/components/schemas/PaginatedResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Transactions summary: Get pending transactions x-summary-source: derived /transactions/pending/count: get: deprecated: false description: Get count of pending transactions. operationId: GetPendingTransactionsCount responses: '200': description: Returns count of pending transactions content: application/json: schema: description: The pending transactions count example: 15479090 type: integer '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' tags: - Transactions summary: Get pending transactions count x-summary-source: derived /transactions/{hash}: get: deprecated: false description: Get a single transaction. operationId: GetTransaction parameters: - name: hash in: path description: The transaction encoded hash required: true schema: $ref: '#/components/schemas/TransactionHash' responses: '200': description: Returns single transaction content: application/json: schema: $ref: '#/components/schemas/Transaction' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' tags: - Transactions summary: Get transaction x-summary-source: derived components: schemas: ChannelSetDelegatesTx: type: object properties: channel_id: $ref: '#/components/schemas/EncodedPubkey' from_id: $ref: '#/components/schemas/EncodedPubkey' initiator_delegate_ids: type: array items: $ref: '#/components/schemas/EncodedPubkey' responder_delegate_ids: type: array items: $ref: '#/components/schemas/EncodedPubkey' state_hash: $ref: '#/components/schemas/EncodedPubkey' round: $ref: '#/components/schemas/UInt64' payload: description: Base64Check encoded byte array. Accepted on input as a plain 'ba_'-prefixed byte array (see aehttp_dispatch_int.erl's produce_tx(channel_set_delegates_tx, ...)), but returned by the node as a 'tx_'-prefixed transaction (see aesc_set_delegates_tx.erl) -- no single prefix pattern covers both. type: string ttl: $ref: '#/components/schemas/UInt64' fee: $ref: '#/components/schemas/UInt' nonce: $ref: '#/components/schemas/UInt64' required: - channel_id - from_id - initiator_delegate_ids - responder_delegate_ids - state_hash - round - payload - fee MdwName: type: object required: - name properties: name: type: string example: test.chain EncodedTxHash: description: Base58Check encoded transaction hash type: string example: th_2Zfo2ALfRkKQxEaUj3HhcUGyMrTqYpDMgr2u15fPanYD1d55kz pattern: ^th_\w+$ OracleAddress: description: Oracle address type: string example: ok_2t7TnocFw7oCYSS7g2yGutZMpGEJta6dq2DTX38SmuqmwtN6Ch pattern: ^ok_\w{38,50}$ SpendTx: allOf: - $ref: '#/components/schemas/SpendTxInput' - required: - nonce MdwContractCreateExtras: type: object required: - args - caller_id - compiler_version - contract_id - return_value - source_hash properties: args: type: array items: type: object properties: type: type: string value: type: string example: - type: int value: 1 - type: string value: hello caller_id: $ref: '#/components/schemas/AccountAddress' compiler_version: type: string example: 8.0.0 contract_id: $ref: '#/components/schemas/ContractAddress' return_value: type: string example: cb_Xfbg4g== source_hash: type: string example: cb_Xfbg4gasdasdasdasdadasdasd== ContractCreateTx: type: object properties: owner_id: $ref: '#/components/schemas/EncodedPubkey' nonce: $ref: '#/components/schemas/UInt64' code: $ref: '#/components/schemas/EncodedContractByteArray' vm_version: $ref: '#/components/schemas/UInt16' abi_version: $ref: '#/components/schemas/UInt16' deposit: $ref: '#/components/schemas/UInt' amount: $ref: '#/components/schemas/UInt' gas: $ref: '#/components/schemas/UInt64' gas_price: $ref: '#/components/schemas/UInt' fee: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' call_data: $ref: '#/components/schemas/EncodedContractByteArray' required: - owner_id - code - vm_version - abi_version - deposit - amount - gas - gas_price - fee - call_data NameUpdateTx: type: object properties: name_id: $ref: '#/components/schemas/EncodedNameId' name_ttl: $ref: '#/components/schemas/UInt64' pointers: type: array items: $ref: '#/components/schemas/NamePointer' client_ttl: $ref: '#/components/schemas/UInt64' fee: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' account_id: $ref: '#/components/schemas/EncodedPubkey' nonce: $ref: '#/components/schemas/UInt64' required: - name_id - name_ttl - client_ttl - pointers - fee - account_id TTL: type: object properties: type: type: string enum: - delta - block value: $ref: '#/components/schemas/UInt64' required: - type - value GAReturnType: type: string example: ok enum: - ok - error NameTransferTx: type: object properties: name_id: $ref: '#/components/schemas/EncodedNameId' recipient_id: $ref: '#/components/schemas/EncodedPubkey' fee: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' account_id: $ref: '#/components/schemas/EncodedPubkey' nonce: $ref: '#/components/schemas/UInt64' required: - name_id - recipient_id - fee - account_id ContractCallTx: type: object properties: caller_id: $ref: '#/components/schemas/EncodedPubkey' nonce: $ref: '#/components/schemas/UInt64' contract_id: $ref: '#/components/schemas/EncodedPubkey' abi_version: $ref: '#/components/schemas/UInt16' fee: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' amount: $ref: '#/components/schemas/UInt' gas: $ref: '#/components/schemas/UInt64' gas_price: $ref: '#/components/schemas/UInt' call_data: $ref: '#/components/schemas/EncodedContractByteArray' required: - caller_id - contract_id - abi_version - fee - amount - gas - gas_price - call_data AccountAddress: description: Account address type: string example: ak_psy8tRXPzGxh6975H7K6XQcMFVsdrxJMt7YkzMY8oUTevutzw pattern: ^ak_\w{38,50}$ OracleExtendTx: type: object properties: fee: $ref: '#/components/schemas/UInt' oracle_ttl: $ref: '#/components/schemas/RelativeTTL' oracle_id: $ref: '#/components/schemas/EncodedPubkey' nonce: $ref: '#/components/schemas/UInt64' ttl: $ref: '#/components/schemas/UInt64' required: - fee - oracle_ttl - oracle_id EncodedProofOfInclusion: description: Base64Check encoded proof of inclusion type: string pattern: ^pi_[0-9A-Za-z+/=]+$ ContractAddress: description: Contract address type: string example: ct_2t7TnocFw7oCYSS7g2yGutZMpGEJta6dq2DTX38SmuqmwtN6Ch pattern: ^ct_\w{38,50}$ MicroBlockHash: description: Micro block hash type: string example: mh_2Zfo2ALfRkKQxEaUj3HhcUGyMrTqYpDMgr2u15fPanYD1d55kz pattern: ^mh_\w{38,50}$ NameHash: description: AENS name hash type: string example: nm_psy8tRXPzGxh6975H7K6XQcMFVsdrxJMt7YkzMY8oUTevutzw pattern: ^nm_\w{38,50}$ EncodedPubkey: description: Base58Check encoded tagged pubkey type: string EncodedStateTrees: description: Base64Check encoded state trees type: string pattern: ^ss_[0-9A-Za-z+/=]+$ EncodedNameId: description: Base58Check encoded AENS name hash type: string example: nm_psy8tRXPzGxh6975H7K6XQcMFVsdrxJMt7YkzMY8oUTevutzw pattern: ^nm_\w+$ ChannelSnapshotSoloTx: type: object properties: channel_id: $ref: '#/components/schemas/EncodedPubkey' from_id: $ref: '#/components/schemas/EncodedPubkey' payload: description: Base64Check encoded byte array. Accepted on input as a plain 'ba_'-prefixed byte array (see aehttp_dispatch_int.erl's produce_tx(channel_snapshot_solo_tx, ...)), but returned by the node as a 'tx_'-prefixed transaction (see aesc_snapshot_solo_tx.erl) -- no single prefix pattern covers both. type: string ttl: $ref: '#/components/schemas/UInt64' fee: $ref: '#/components/schemas/UInt' nonce: $ref: '#/components/schemas/UInt64' required: - channel_id - from_id - payload - fee SignedTx: type: object properties: tx: $ref: '#/components/schemas/Tx' block_height: $ref: '#/components/schemas/TxBlockHeight' block_hash: $ref: '#/components/schemas/EncodedHash' hash: $ref: '#/components/schemas/EncodedTxHash' encoded_tx: $ref: '#/components/schemas/EncodedTxByteArray' signatures: description: At least one signature is required unless for Generalized Account Meta transactions type: array minItems: 0 items: $ref: '#/components/schemas/EncodedSignature' required: - tx Signature: description: Signature type: string example: sg_8hhU15cVMbukFj4FbdrFwwYnbzXYPnstu9PDnWZGbfQNpeHcB6tK1F3wvG1MPYySARgDRJYUh3YPJD3HctFwg6Y4rUGSR pattern: ^sg_\w+$ RelativeTTL: type: object properties: type: type: string enum: - delta value: $ref: '#/components/schemas/UInt64' required: - type - value ChannelWithdrawTx: type: object properties: channel_id: $ref: '#/components/schemas/EncodedPubkey' to_id: $ref: '#/components/schemas/EncodedPubkey' amount: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' fee: $ref: '#/components/schemas/UInt' nonce: $ref: '#/components/schemas/UInt64' state_hash: $ref: '#/components/schemas/EncodedHash' round: $ref: '#/components/schemas/UInt64' required: - channel_id - to_id - amount - fee - nonce - state_hash - round EncodedCommitmentId: description: Base58Check encoded AENS commitment type: string example: cm_psy8tRXPzGxh6975H7K6XQcMFVsdrxJMt7YkzMY8oUTevutzw pattern: ^cm_\w+$ ChannelSlashTx: type: object properties: channel_id: $ref: '#/components/schemas/EncodedPubkey' from_id: $ref: '#/components/schemas/EncodedPubkey' payload: description: Base64Check encoded byte array. Accepted on input as a plain 'ba_'-prefixed byte array (see aehttp_dispatch_int.erl's produce_tx(channel_slash_tx, ...)), but returned by the node as a 'tx_'-prefixed transaction (see aesc_slash_tx.erl) -- no single prefix pattern covers both. type: string ttl: $ref: '#/components/schemas/UInt64' fee: $ref: '#/components/schemas/UInt' nonce: $ref: '#/components/schemas/UInt64' poi: $ref: '#/components/schemas/EncodedProofOfInclusion' required: - channel_id - from_id - payload - fee - poi MdwContractCallExtras: type: object required: - arguments - function - log - result - return properties: arguments: type: array items: type: object required: - type - value properties: type: type: string value: type: string example: - type: int value: 1 - type: string value: hello function: type: string example: main log: type: array items: type: object required: - address - data - topics properties: address: type: string data: type: string topics: type: array items: type: string example: - address: ct_2U1usf3A8ZNUcZLkZe5rEoBTxk7eJvk9fcbRDNqmRiwXCHAYN data: cb_+Jg== topics: - topic1 - topic2 result: type: string example: ok enum: - ok - error - revert return: type: object required: - type - value properties: type: type: string value: type: string example: type: int value: 1 UInt64: oneOf: - type: integer minimum: 0 maximum: 18446744073709552000 - type: string ChannelResponderInitiatorRound: type: object allOf: - $ref: '#/components/schemas/ChannelResponderInitiator' - type: object required: - round properties: round: type: integer NotFoundResponse: description: Resource not found on the API type: object example: error: 'not found: th_2Twp3pJeVuwQ7cMSdPQRfpAUWwdMiwx6coVMpRaNSuzFRnDZF' properties: error: description: The message of the error raised type: string required: - error title: Not found response UInt: oneOf: - type: integer minimum: 0 - type: string EncodedHash: description: Base58Check encoded tagged hash type: string OracleRespondTx: type: object properties: query_id: $ref: '#/components/schemas/EncodedOracleQueryId' response: type: string response_ttl: $ref: '#/components/schemas/RelativeTTL' fee: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' oracle_id: $ref: '#/components/schemas/EncodedPubkey' nonce: $ref: '#/components/schemas/UInt64' required: - query_id - response - response_ttl - fee - oracle_id Transaction: description: Transaction type: object required: - block_hash - block_height - encoded_tx - hash - micro_index - micro_time - signatures - tx properties: block_hash: $ref: '#/components/schemas/MicroBlockHash' block_height: description: The block height type: integer encoded_tx: $ref: '#/components/schemas/TransactionEncoded' hash: $ref: '#/components/schemas/TransactionHash' micro_index: description: The micro block index type: integer micro_time: description: The unix timestamp type: integer signatures: description: The signatures type: array items: $ref: '#/components/schemas/Signature' tx: description: The transaction $ref: '#/components/schemas/MdwTx' example: block_hash: mh_ufiYLdN8am8fBxMnb6xq2K4MQKo4eFSCF5bgixq4EzKMtDUXP block_height: 1 hash: th_2FHxDzpQMRTiRfpYRV3eCcsheHr1sjf9waxk7z6JDTVcgqZRXR encoded_tx: tx_+IQLAfhCuED6AOECECJDXntSS/dj034AJ20Ed+xE4FrgvlEI8PPBziK1VwEBaT73ZlNOiMCC9u7CEUow8YZefEiJ97ppfd8GuDz4OiABoQH+GsB85Crb3bTZQOTQxfR79trkBfFyAvBtzs5utqqbqkCJdmxzYS50ZXN0e4YTGXGKUACCsztl3yJX micro_index: 0 micro_time: 1543375246712 signatures: - sg_Fipyxq5f3JS9CB3AQVCw1v9skqNBw1cdfe5W3h1t2MkviU19GQckERQZkqkaXWKowdTUvr7B1QbtWdHjJHQcZApwVDdP9 tx: amount: 150425 fee: 101014 nonce: 1 payload: ba_NzkwOTIxLTgwMTAxOGSbElc= recipient_id: ak_26dopN3U2zgfJG4Ao4J4ZvLTf5mqr7WAgLAq6WxjxuSapZhQg5 sender_id: ak_26dopN3U2zgfJG4Ao4J4ZvLTf5mqr7WAgLAq6WxjxuSapZhQg5 type: SpendTx version: 1 ttl: 10000 UInt16: oneOf: - type: integer minimum: 0 maximum: 65535 - type: string ChannelCloseSoloTx: type: object properties: channel_id: $ref: '#/components/schemas/EncodedPubkey' from_id: $ref: '#/components/schemas/EncodedPubkey' payload: description: Base64Check encoded byte array. Accepted on input as a plain 'ba_'-prefixed byte array (see aehttp_dispatch_int.erl's produce_tx(channel_close_solo_tx, ...)), but returned by the node as a 'tx_'-prefixed transaction (see aesc_close_solo_tx.erl) -- no single prefix pattern covers both. type: string ttl: $ref: '#/components/schemas/UInt64' fee: $ref: '#/components/schemas/UInt' nonce: $ref: '#/components/schemas/UInt64' poi: $ref: '#/components/schemas/EncodedProofOfInclusion' required: - channel_id - from_id - payload - fee - poi OracleQueryTx: type: object properties: oracle_id: $ref: '#/components/schemas/EncodedPubkey' query: type: string query_fee: $ref: '#/components/schemas/UInt' query_ttl: $ref: '#/components/schemas/TTL' response_ttl: $ref: '#/components/schemas/RelativeTTL' fee: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' sender_id: $ref: '#/components/schemas/EncodedPubkey' nonce: $ref: '#/components/schemas/UInt64' required: - oracle_id - query - query_fee - query_ttl - response_ttl - fee - sender_id Delegates: oneOf: - type: array items: $ref: '#/components/schemas/EncodedPubkey' - type: object properties: initiator: type: array items: $ref: '#/components/schemas/EncodedPubkey' responder: type: array items: $ref: '#/components/schemas/EncodedPubkey' MdwTx: description: The node transaction with the fields added by the mdw allOf: - type: object required: - type - version properties: type: type: string version: type: integer - oneOf: - title: ChannelCloseMutualTx allOf: - $ref: '#/components/schemas/ChannelResponderInitiator' - $ref: '#/components/schemas/ChannelCloseMutualTx' - title: ChannelCloseSoloTx allOf: - $ref: '#/components/schemas/ChannelCloseSoloTx' - $ref: '#/components/schemas/ChannelResponderInitiatorRound' - title: ChannelCreateTx allOf: - $ref: '#/components/schemas/ChannelCreateTx' - type: object required: - channel_id properties: channel_id: $ref: '#/components/schemas/ChannelId' - $ref: '#/components/schemas/ChannelDepositTx' - title: ChannelForceProgressTx allOf: - $ref: '#/components/schemas/ChannelForceProgressTx' - $ref: '#/components/schemas/ChannelResponderInitiator' - title: ChannelSettleTx allOf: - $ref: '#/components/schemas/ChannelSettleTx' - $ref: '#/components/schemas/ChannelResponderInitiator' - title: ChannelSlashTx allOf: - $ref: '#/components/schemas/ChannelSlashTx' - $ref: '#/components/schemas/ChannelResponderInitiatorRound' - title: ChannelSnapshotSoloTx allOf: - $ref: '#/components/schemas/ChannelSnapshotSoloTx' - $ref: '#/components/schemas/ChannelResponderInitiatorRound' - $ref: '#/components/schemas/ChannelWithdrawTx' - title: ContractCallTx allOf: - $ref: '#/components/schemas/ContractCallTx' - $ref: '#/components/schemas/MdwContractCommonExtras' - $ref: '#/components/schemas/MdwContractCallExtras' - title: ContractCreateTx allOf: - $ref: '#/components/schemas/ContractCreateTx' - $ref: '#/components/schemas/MdwContractCommonExtras' - $ref: '#/components/schemas/MdwContractCreateExtras' - title: GAAttachTx allOf: - $ref: '#/components/schemas/GAAttachTx' - type: object required: - args - auth_fun_name - contract_id - gas_used - return_type properties: args: type: array items: type: string auth_fun_name: type: string contract_id: $ref: '#/components/schemas/ContractAddress' gas_used: type: integer return_type: $ref: '#/components/schemas/GAReturnType' - title: GAMetaTx allOf: - $ref: '#/components/schemas/GAMetaTx' - type: object required: - gas_used - return_type properties: gas_used: type: integer return_type: $ref: '#/components/schemas/GAReturnType' - title: NameClaimTx allOf: - $ref: '#/components/schemas/NameClaimTx' - type: object required: - name_id properties: name_id: $ref: '#/components/schemas/NameHash' - $ref: '#/components/schemas/NamePreclaimTx' - title: NameRevokeTx allOf: - $ref: '#/components/schemas/NameRevokeTx' - $ref: '#/components/schemas/MdwName' - title: NameTransferTx allOf: - $ref: '#/components/schemas/NameTransferTx' - $ref: '#/components/schemas/MdwName' - title: NameUpdateTx allOf: - $ref: '#/components/schemas/NameUpdateTx' - $ref: '#/components/schemas/MdwName' - $ref: '#/components/schemas/OracleExtendTx' - title: OracleQueryTx allOf: - $ref: '#/components/schemas/OracleQueryTx' - type: object required: - query_id properties: query_id: $ref: '#/components/schemas/OracleQueryId' - title: OracleRegisterTx allOf: - $ref: '#/components/schemas/OracleRegisterTx' - type: object required: - oracle_id properties: oracle_id: $ref: '#/components/schemas/OracleAddress' - $ref: '#/components/schemas/OracleRespondTx' - $ref: '#/components/schemas/PayingForTx' - $ref: '#/components/schemas/SpendTx' discriminator: propertyName: type mapping: ChannelCloseMutualTx: '#/components/schemas/ChannelCloseMutualTx' ChannelCloseSoloTx: '#/components/schemas/ChannelCloseSoloTx' ChannelCreateTx: '#/components/schemas/ChannelCreateTx' ChannelDepositTx: '#/components/schemas/ChannelDepositTx' ChannelForceProgressTx: '#/components/schemas/ChannelForceProgressTx' ChannelSettleTx: '#/components/schemas/ChannelSettleTx' ChannelSlashTx: '#/components/schemas/ChannelSlashTx' ChannelSnapshotSoloTx: '#/components/schemas/ChannelSnapshotSoloTx' ChannelWithdrawTx: '#/components/schemas/ChannelWithdrawTx' ContractCallTx: '#/components/schemas/ContractCallTx' ContractCreateTx: '#/components/schemas/ContractCreateTx' GAAttachTx: '#/components/schemas/GAAttachTx' GAMetaTx: '#/components/schemas/GAMetaTx' NameClaimTx: '#/components/schemas/NameClaimTx' NamePreclaimTx: '#/components/schemas/NamePreclaimTx' NameRevokeTx: '#/components/schemas/NameRevokeTx' NameTransferTx: '#/components/schemas/NameTransferTx' NameUpdateTx: '#/components/schemas/NameUpdateTx' OracleExtendTx: '#/components/schemas/OracleExtendTx' OracleQueryTx: '#/components/schemas/OracleQueryTx' OracleRegisterTx: '#/components/schemas/OracleRegisterTx' OracleRespondTx: '#/components/schemas/OracleRespondTx' PayingForTx: '#/components/schemas/PayingForTx' SpendTx: '#/components/schemas/SpendTx' type: object ChannelId: type: string pattern: ^ch_\w{38,50}$ example: ch_2VfzXmCRZepB3ichPf3WTt2uf8zMqsyY3cZWg8k1vt3xcu8L8V NamePreclaimTx: type: object properties: commitment_id: $ref: '#/components/schemas/EncodedCommitmentId' fee: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' account_id: $ref: '#/components/schemas/EncodedPubkey' nonce: $ref: '#/components/schemas/UInt64' required: - commitment_id - fee - account_id EncodedTxByteArray: description: Base64Check encoded transaction type: string example: tx_+E8hAaEB4TK48d23oE5jt/qWR5pUu8UlpTGn8bwM5JISGQMGf7ABoQOvDVCf43V7alNbsUvTarXaCf7rjtWX36YLS4+JTa4jn4YPHaUyOAAAxRZ6Sg== pattern: ^tx_[0-9A-Za-z+/=]+$ EncodedSignature: description: Base58Check encoded signature type: string example: sg_8hhU15cVMbukFj4FbdrFwwYnbzXYPnstu9PDnWZGbfQNpeHcB6tK1F3wvG1MPYySARgDRJYUh3YPJD3HctFwg6Y4rUGSR pattern: ^sg_\w+$ MdwContractCommonExtras: type: object required: - aexn_type - gas_used - return_type properties: aexn_type: type: - string - 'null' example: aex9 enum: - aex9 - aex141 gas_used: type: integer example: 1000 return_type: type: string example: ok enum: - ok - error ttl: type: integer example: 1000 ChannelForceProgressTx: type: object properties: channel_id: $ref: '#/components/schemas/EncodedPubkey' from_id: $ref: '#/components/schemas/EncodedPubkey' payload: $ref: '#/components/schemas/EncodedTxByteArray' round: $ref: '#/components/schemas/UInt64' update: $ref: '#/components/schemas/OffChainUpdate' state_hash: $ref: '#/components/schemas/EncodedHash' ttl: $ref: '#/components/schemas/UInt64' fee: $ref: '#/components/schemas/UInt' nonce: $ref: '#/components/schemas/UInt64' offchain_trees: $ref: '#/components/schemas/EncodedStateTrees' required: - channel_id - from_id - payload - round - update - state_hash - fee OracleRegisterTx: type: object properties: query_format: type: string response_format: type: string query_fee: $ref: '#/components/schemas/UInt' oracle_ttl: $ref: '#/components/schemas/TTL' account_id: $ref: '#/components/schemas/EncodedPubkey' nonce: $ref: '#/components/schemas/UInt64' fee: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' abi_version: $ref: '#/components/schemas/UInt16' required: - query_format - response_format - query_fee - fee - oracle_ttl - account_id OffChainUpdate: type: object discriminator: propertyName: op properties: op: type: string required: - op TransactionEncoded: description: Encoded transaction type: string example: tx_+E8hAaEB4TK48d23oE5jt/qWR5pUu8UlpTGn8bwM5JISGQMGf7ABoQOvDVCf43V7alNbsUvTarXaCf7rjtWX36YLS4+JTa4jn4YPHaUyOAAAxRZ6Sg== pattern: ^tx_\w+$ GAAttachTx: type: object properties: owner_id: $ref: '#/components/schemas/EncodedPubkey' nonce: $ref: '#/components/schemas/UInt64' code: $ref: '#/components/schemas/EncodedContractByteArray' vm_version: $ref: '#/components/schemas/UInt16' abi_version: $ref: '#/components/schemas/UInt16' gas: $ref: '#/components/schemas/UInt64' gas_price: $ref: '#/components/schemas/UInt' fee: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' call_data: $ref: '#/components/schemas/EncodedContractByteArray' auth_fun: description: Contract authorization function hash (hex encoded) type: string pattern: ^(0x|0X)?[a-fA-F0-9]+$ required: - owner_id - code - vm_version - abi_version - gas - gas_price - fee - call_data - auth_fun SpendTxInput: type: object properties: recipient_id: $ref: '#/components/schemas/EncodedPubkey' amount: $ref: '#/components/schemas/UInt' fee: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' sender_id: $ref: '#/components/schemas/EncodedPubkey' nonce: $ref: '#/components/schemas/UInt64' payload: description: Base64Check encoded byte array, or a raw string required: - recipient_id - amount - fee - sender_id - payload ChannelSettleTx: type: object properties: channel_id: $ref: '#/components/schemas/EncodedPubkey' from_id: $ref: '#/components/schemas/EncodedPubkey' initiator_amount_final: $ref: '#/components/schemas/UInt' responder_amount_final: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' fee: $ref: '#/components/schemas/UInt' nonce: $ref: '#/components/schemas/UInt64' required: - channel_id - from_id - initiator_amount_final - responder_amount_final - fee - nonce EncodedContractByteArray: description: Base64Check encoded contract byte array type: string example: cb_AAAAAfy4hFE= pattern: ^cb_[0-9A-Za-z+/=]+$ PayingForTx: type: object properties: payer_id: $ref: '#/components/schemas/EncodedPubkey' fee: $ref: '#/components/schemas/UInt' nonce: $ref: '#/components/schemas/UInt64' tx: $ref: '#/components/schemas/SignedTx' required: - payer_id - fee - tx NameRevokeTx: type: object properties: name_id: $ref: '#/components/schemas/EncodedNameId' fee: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' account_id: $ref: '#/components/schemas/EncodedPubkey' nonce: $ref: '#/components/schemas/UInt64' required: - name_id - fee - account_id TransactionHash: description: Transaction hash type: string example: th_2Zfo2ALfRkKQxEaUj3HhcUGyMrTqYpDMgr2u15fPanYD1d55kz pattern: ^th_\w{38,50}$ UInt32: oneOf: - type: integer minimum: 0 maximum: 4294967295 - type: string ChannelCloseMutualTx: type: object properties: channel_id: $ref: '#/components/schemas/EncodedPubkey' from_id: $ref: '#/components/schemas/EncodedPubkey' initiator_amount_final: $ref: '#/components/schemas/UInt' responder_amount_final: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' fee: $ref: '#/components/schemas/UInt64' nonce: $ref: '#/components/schemas/UInt64' required: - channel_id - from_id - initiator_amount_final - responder_amount_final - fee - nonce PendingTransaction: description: Pending Transaction type: object required: - block_hash - block_height - encoded_tx - failures - hash - signatures - tx properties: block_hash: type: string description: The block hash, but since it's pending it's always "none" block_height: type: integer description: The block height, but since it's pending it's always -1 encoded_tx: $ref: '#/components/schemas/TransactionEncoded' failures: description: The failures count type: integer hash: $ref: '#/components/schemas/TransactionHash' signatures: description: The signatures type: array items: $ref: '#/components/schemas/Signature' tx: description: The transaction $ref: '#/components/schemas/Tx' example: block_hash: none block_height: -1 encoded_tx: tx_+IQLAfhCuED6AOECECJDXntSS/dj034AJ20Ed+xE4FrgvlEI8PPBziK1VwEBaT73ZlNOiMCC9u7CEUow8YZefEiJ97ppfd8GuDz4OiABoQH+GsB85Crb3bTZQOTQxfR79trkBfFyAvBtzs5utqqbqkCJdmxzYS50ZXN0e4YTGXGKUACCsztl3yJX failures: 0 hash: th_2FHxDzpQMRTiRfpYRV3eCcsheHr1sjf9waxk7z6JDTVcgqZRXR signatures: - sg_Fipyxq5f3JS9CB3AQVCw1v9skqNBw1cdfe5W3h1t2MkviU19GQckERQZkqkaXWKowdTUvr7B1QbtWdHjJHQcZApwVDdP9 tx: amount: 150425 fee: 101014 nonce: 1 payload: ba_NzkwOTIxLTgwMTAxOGSbElc= recipient_id: ak_26dopN3U2zgfJG4Ao4J4ZvLTf5mqr7WAgLAq6WxjxuSapZhQg5 sender_id: ak_26dopN3U2zgfJG4Ao4J4ZvLTf5mqr7WAgLAq6WxjxuSapZhQg5 type: SpendTx version: 1 ttl: 10000 ChannelResponderInitiator: type: object required: - responder_id - initiator_id properties: initiator_id: $ref: '#/components/schemas/AccountAddress' responder_id: $ref: '#/components/schemas/AccountAddress' NamePointer: type: object properties: key: type: string encoded_key: $ref: '#/components/schemas/EncodedByteArray' id: $ref: '#/components/schemas/EncodedPubkey' required: - key - id OracleQueryId: description: Oracle query ID type: string example: oq_2t7TnocFw7oCYSS7g2yGutZMpGEJta6dq2DTX38SmuqmwtN6Ch pattern: ^oq_\w{38,50}$ EncodedByteArray: description: Base64Check encoded byte array type: string example: ba_AAAAAfy4hFE= pattern: ^ba_[0-9A-Za-z+/=]+$ PaginatedResponse: type: object properties: next: type: - string - 'null' example: /blocks?cursor=123 prev: type: - string - 'null' example: /blocks?cursor=234 required: - next - prev ChannelDepositTx: type: object properties: channel_id: $ref: '#/components/schemas/EncodedPubkey' from_id: $ref: '#/components/schemas/EncodedPubkey' amount: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' fee: $ref: '#/components/schemas/UInt' nonce: $ref: '#/components/schemas/UInt64' state_hash: $ref: '#/components/schemas/EncodedHash' round: $ref: '#/components/schemas/UInt64' required: - channel_id - from_id - amount - fee - nonce - state_hash - round NameClaimTx: type: object properties: name: type: string name_salt: $ref: '#/components/schemas/UInt' name_fee: $ref: '#/components/schemas/UInt' fee: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' account_id: $ref: '#/components/schemas/EncodedPubkey' nonce: $ref: '#/components/schemas/UInt64' required: - name - name_salt - fee - account_id ErrorResponse: description: Error response from the API type: object example: error: 'invalid id: th_2Twp3pJeVuwQ7cMSdPQRfpAUWwdMiwx6coVMpRaNSuzFRnDZF' properties: error: description: The message of the error raised type: string required: - error title: Error response EncodedOracleQueryId: description: Base58Check encoded oracle query id type: string example: oq_psy8tRXPzGxh6975H7K6XQcMFVsdrxJMt7YkzMY8oUTevutzw pattern: ^oq_\w+$ ChannelCreateTx: type: object properties: initiator_id: $ref: '#/components/schemas/EncodedPubkey' initiator_amount: $ref: '#/components/schemas/UInt' responder_id: $ref: '#/components/schemas/EncodedPubkey' responder_amount: $ref: '#/components/schemas/UInt' channel_reserve: $ref: '#/components/schemas/UInt' lock_period: $ref: '#/components/schemas/UInt64' ttl: $ref: '#/components/schemas/UInt64' fee: $ref: '#/components/schemas/UInt' nonce: $ref: '#/components/schemas/UInt64' state_hash: $ref: '#/components/schemas/EncodedHash' delegate_ids: $ref: '#/components/schemas/Delegates' required: - initiator_id - initiator_amount - responder_id - responder_amount - channel_reserve - lock_period - fee - state_hash Tx: allOf: - type: object discriminator: propertyName: type properties: version: $ref: '#/components/schemas/UInt32' type: type: string enum: - SpendTx - ChannelCreateTx - ChannelDepositTx - ChannelWithdrawTx - ChannelForceProgressTx - ChannelCloseMutualTx - ChannelCloseSoloTx - ChannelSlashTx - ChannelSettleTx - ChannelSnapshotSoloTx - ChannelSetDelegatesTx - OracleRegisterTx - OracleExtendTx - OracleQueryTx - OracleRespondTx - NamePreclaimTx - NameClaimTx - NameUpdateTx - NameTransferTx - NameRevokeTx - ContractCreateTx - ContractCallTx - GAAttachTx - GAMetaTx - PayingForTx required: - version - type - anyOf: - $ref: '#/components/schemas/SpendTx' - $ref: '#/components/schemas/ChannelCreateTx' - $ref: '#/components/schemas/ChannelDepositTx' - $ref: '#/components/schemas/ChannelWithdrawTx' - $ref: '#/components/schemas/ChannelForceProgressTx' - $ref: '#/components/schemas/ChannelCloseMutualTx' - $ref: '#/components/schemas/ChannelCloseSoloTx' - $ref: '#/components/schemas/ChannelSlashTx' - $ref: '#/components/schemas/ChannelSettleTx' - $ref: '#/components/schemas/ChannelSnapshotSoloTx' - $ref: '#/components/schemas/ChannelSetDelegatesTx' - $ref: '#/components/schemas/OracleRegisterTx' - $ref: '#/components/schemas/OracleExtendTx' - $ref: '#/components/schemas/OracleQueryTx' - $ref: '#/components/schemas/OracleRespondTx' - $ref: '#/components/schemas/NamePreclaimTx' - $ref: '#/components/schemas/NameClaimTx' - $ref: '#/components/schemas/NameUpdateTx' - $ref: '#/components/schemas/NameTransferTx' - $ref: '#/components/schemas/NameRevokeTx' - $ref: '#/components/schemas/ContractCreateTx' - $ref: '#/components/schemas/ContractCallTx' - $ref: '#/components/schemas/GAAttachTx' - $ref: '#/components/schemas/GAMetaTx' - $ref: '#/components/schemas/PayingForTx' GAMetaTx: type: object properties: ga_id: $ref: '#/components/schemas/EncodedPubkey' abi_version: $ref: '#/components/schemas/UInt16' gas: $ref: '#/components/schemas/UInt64' gas_price: $ref: '#/components/schemas/UInt' fee: $ref: '#/components/schemas/UInt' ttl: $ref: '#/components/schemas/UInt64' auth_data: $ref: '#/components/schemas/EncodedContractByteArray' tx: $ref: '#/components/schemas/SignedTx' required: - ga_id - abi_version - gas - gas_price - fee - auth_data - tx TxBlockHeight: oneOf: - type: integer minimum: -1 maximum: 18446744073709552000 - type: string parameters: ScopeParam: in: query name: scope description: Scopes results in a generation range schema: type: string pattern: (gen):\d+(-\d+)? DirectionParam: in: query name: direction description: Sorts results in forwards or backwards direction schema: type: string enum: - forward - backward LimitParam: in: query name: limit description: Limit paginated resources (max 100) schema: type: integer minimum: 1 maximum: 100 default: 10