{ "openapi": "3.0.0", "info": { "description": "API for [Aeternity Middleware](https://github.com/aeternity/ae_mdw)", "title": "Aeternity Middleware", "version": "1.94.0" }, "servers": [ { "url": "/mdw/v3", "description": "V3 version path" } ], "components": { "parameters": { "LimitParam": { "in": "query", "name": "limit", "description": "Limit paginated resources (max 100)", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 } }, "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" ] } } }, "schemas": { "AccountAddress": { "description": "Account address", "type": "string", "example": "ak_psy8tRXPzGxh6975H7K6XQcMFVsdrxJMt7YkzMY8oUTevutzw", "pattern": "^ak_\\w{38,50}$" }, "Activity": { "description": "Activity related to an account", "type": "object", "properties": { "block_hash": { "$ref": "#/components/schemas/MicroBlockHash" }, "block_time": { "description": "The time in which the block happened", "type": "integer", "example": 1587577771376 }, "height": { "description": "The block height", "type": "integer" }, "type": { "description": "The event type", "type": "string", "enum": [ "SpendTxEvent", "OracleRegisterTxEvent", "OracleExtendTxEvent", "OracleQueryTxEvent", "OracleResponseTxEvent", "NamePreclaimTxEvent", "NameClaimTxEvent", "NameTransferTxEvent", "NameUpdateTxEvent", "NameRevokeTxEvent", "ContractCreateTxEvent", "ContractCallTxEvent", "GaAttachTxEvent", "GaMetaTxEvent", "ChannelCreateTxEvent", "ChannelDepositTxEvent", "ChannelWithdrawTxEvent", "ChannelForceProgressTxEvent", "ChannelCloseMutualTxEvent", "ChannelCloseSoloTxEvent", "ChannelSlashTxEvent", "ChannelSettleTxEvent", "ChannelSnapshotSoloTxEvent", "ChannelSetDelegatesTxEvent", "ChannelOffchainTxEvent", "ChannelClientReconnectTxEvent", "PayingForTxEvent" ] }, "payload": { "type": "object", "oneOf": [ { "$ref": "#/components/schemas/Transaction" }, { "$ref": "#/components/schemas/Aex9TransferEvent" }, { "$ref": "#/components/schemas/Aex141TransferEvent" }, { "$ref": "#/components/schemas/InternalContractCallEvent" }, { "$ref": "#/components/schemas/InternalTransferEvent" } ] } }, "required": [ "block_hash", "block_time", "height", "type", "payload" ] }, "Aex141Response": { "description": "Response Schema for AEX141 contract", "example": { "base_url": null, "contract_id": "ct_2oq4kSd4j1VkkbupueXLdHwYEJdY8Ntzvp1FFkMB1gYyXkYPcV", "contract_tx_hash": "th_2Twp3pJeVuwQ7cMSdPQRfpAUWwdMiwx6coVMpRaNSuzFRnDZF", "extensions": [ "mintable_templates", "mintable_templates_limit", "mutable_attributes", "burnable" ], "limits": { "limit_log_idx": 0, "limit_tx_hash": "th_2Twp3pJeVuwQ7cMSdPQRfpAUWwdMiwx6coVMpRaNSuzFRnDZF", "template_limit": 100, "token_limit": null }, "metadata_type": "map", "name": "Apes stepping into the Metaverse - (Template Version)", "nft_owners": 1, "nfts_amount": 36, "symbol": "ASITM-T", "invalid": false, "creation_time": 1587577771376, "block_height": 234208 }, "properties": { "base_url": { "description": "Metadata base url", "type": "string" }, "contract_id": { "description": "NFT contract id", "$ref": "#/components/schemas/ContractAddress" }, "contract_tx_hash": { "description": "Transaction hash of the contract creation", "$ref": "#/components/schemas/TransactionHash" }, "extensions": { "description": "Extensions implemented by the contract", "type": "array", "items": { "type": "string" } }, "limits": { "description": "Limit for amount of tokens or templates", "type": "object" }, "invalid": { "description": "True if the contract is invalid", "type": "boolean" }, "creation_time": { "description": "Creation time of the contract", "type": "integer" }, "block_height": { "description": "Block height of the contract creation", "type": "integer" } }, "required": [ "base_url", "contract_id", "contract_tx_hash", "extensions", "limits", "metadata_type", "name", "nft_owners", "nfts_amount", "symbol", "invalid", "creation_time", "block_height" ], "title": "Aex141Response", "type": "object" }, "Aex141TemplateTokensResponse": { "description": "Response Schema for template tokens of a AEX-141 contract", "example": { "log_idx": 0, "owner_id": "ak_8Ujt76QfpT1DyYsNZKGPGtMZ2C2MFf7CcnpQvJWNsX6szZkYN", "token_id": 29, "tx_hash": "th_ZzPmumNtkYCfrGpVGtQP6em9hgkWQqstddB5ynagrJJa7ua9c" }, "properties": { "owner_id": { "description": "Owner wallet address", "$ref": "#/components/schemas/AccountAddress" }, "log_idx": { "description": "Mint event index", "type": "integer" }, "token_id": { "description": "NFT id", "type": "integer" }, "tx_hash": { "description": "Mint transaction hash", "$ref": "#/components/schemas/TransactionHash" } }, "required": [ "log_idx", "owner_id", "token_id", "tx_hash" ], "title": "Aex141TemplatesResponse", "type": "object" }, "Aex141TemplatesResponse": { "description": "Response Schema for templates of a AEX-141 contract", "example": { "contract_id": "ct_2oq4kSd4j1VkkbupueXLdHwYEJdY8Ntzvp1FFkMB1gYyXkYPcV", "edition": { "limit": 2, "limit_log_idx": 0, "limit_tx_hash": "th_KTTTudTgSAZrHJQVwW4AF6XD1ksQbpyHXWfgmL2kSGvNk14CU", "supply": 1, "supply_log_idx": 0, "supply_tx_hash": "th_erpNZJTuvRfKPafcRvkJ7ddCu9GBSQoY12QVs5pdCTm6eCDwr" }, "log_idx": 0, "template_id": 1, "tx_hash": "th_ojhH9bD7kGRpgZ6rXob2qi5asBKsYTdbSVaKzGdpfP6wiRxz4" }, "properties": { "contract_id": { "description": "NFT contract id", "$ref": "#/components/schemas/ContractAddress" }, "edition": { "description": "Template edition details", "type": "object" }, "log_idx": { "description": "Log index of the TemplateCreation", "type": "integer" }, "template_id": { "description": "Template id of AEX-141 tokens", "type": "integer" }, "tx_hash": { "description": "Transaction hash of the TemplateCreation", "$ref": "#/components/schemas/TransactionHash" } }, "required": [ "contract_id", "log_idx", "template_id", "tx_hash" ], "title": "Aex141TemplatesResponse", "type": "object" }, "Aex141TokenDetailResponse": { "description": "Response schema for AEX-141 token detail", "example": { "contract_id": "ct_2oq4kSd4j1VkkbupueXLdHwYEJdY8Ntzvp1FFkMB1gYyXkYPcV", "owner_id": "ak_vTGaRAuGXPLhvNexrbzmHJ2MDv9JS2Ky7u2v469o6weaZ2Cgw", "token_id": 1, "metadata": { "map": { "description": "CC", "media_type": "IMAGE", "media_url": "https://www.tierfreund.de/wp-content/uploads/2016/09/1.jpg", "minted": "1670241975288", "name": "test" } } }, "properties": { "contract_id": { "description": "NFT contract id", "$ref": "#/components/schemas/ContractAddress" }, "owner_id": { "$ref": "#/components/schemas/AccountAddress" }, "token_id": { "description": "Non-fungible token id", "type": "integer" }, "metadata": { "description": "The metadata associated to this NFT", "type": "object" } }, "required": [ "contract_id", "owner_id", "token_id", "metadata" ], "title": "Aex141OwnedTokenResponse", "type": "object" }, "Aex141TokenResponse": { "description": "Response Schema for owners of AEX-141 tokens", "example": { "contract_id": "ct_2oq4kSd4j1VkkbupueXLdHwYEJdY8Ntzvp1FFkMB1gYyXkYPcV", "owner_id": "ak_vTGaRAuGXPLhvNexrbzmHJ2MDv9JS2Ky7u2v469o6weaZ2Cgw", "token_id": 1 }, "properties": { "contract_id": { "description": "NFT contract id", "$ref": "#/components/schemas/ContractAddress" }, "owner_id": { "$ref": "#/components/schemas/AccountAddress" }, "token_id": { "description": "Non-fungible token id", "type": "integer" } }, "required": [ "contract_id", "account_id", "token_id" ], "title": "Aex141OwnedTokenResponse", "type": "object" }, "Aex141TransferEvent": { "description": "AEx141 Transfer", "type": "object", "required": [ "block_height", "contract_id", "log_idx", "micro_index", "micro_time", "recipient", "sender", "token_id", "tx_hash" ], "properties": { "block_height": { "type": "integer", "example": 653289 }, "contract_id": { "$ref": "#/components/schemas/ContractAddress" }, "log_idx": { "type": "integer", "example": 0 }, "micro_index": { "type": "integer", "example": 125 }, "micro_time": { "type": "integer", "example": 1662654259282 }, "recipient": { "$ref": "#/components/schemas/AccountAddress" }, "sender": { "$ref": "#/components/schemas/AccountAddress" }, "token_id": { "type": "integer", "example": 1 }, "tx_hash": { "$ref": "#/components/schemas/TransactionHash" } } }, "Aex9BalanceResponse": { "description": "Response Schema for AEX9 balance responses", "example": { "amount": 4.999999999990685e+25, "decimals": 18, "block_hash": "kh_2QevaXY7ULF5kTLsddwMzzZmBYWPgfaQbg2Y8maZDLKJaPhwDJ", "contract_id": "ct_RDRJC5EySx4TcLtGRWYrXfNgyWzEDzssThJYPd9kdLeS5ECaA", "height": 351666, "token_name": "BBA", "token_symbol": "BBA", "tx_hash": "th_27V4UmRhyeSuPEDieXVuAdE3v42dDnLzPY6uism1bFhHCPfWKv", "tx_index": 10848881, "tx_type": "contract_create_tx" }, "properties": { "amount": { "description": "Amount of AEX9 token", "type": "integer" }, "block_hash": { "description": "Block hash, indicating a state of a balance for that block", "type": "integer" }, "contract_id": { "description": "Contract id of AEX9 token", "$ref": "#/components/schemas/ContractAddress" }, "decimals": { "description": "Number of decimals of AEX9 token", "type": "integer" }, "height": { "description": "Block height, indicating a state of a balance for that block height", "type": "integer" }, "token_name": { "description": "Name of AEX9 token", "type": "string" }, "token_symbol": { "description": "Symbol of AEX9 token", "type": "string" }, "tx_hash": { "description": "Transaction hash, indicating a state of a balance for that block height", "$ref": "#/components/schemas/TransactionHash" }, "tx_index": { "description": "Transaction index, indicating a state of a balance for that block height", "type": "integer" }, "tx_type": { "description": "Transaction type, indicating a state of a balance for that block height", "type": "string" } }, "required": [ "amount", "block_hash", "contract_id", "decimals", "height", "token_name", "token_symbol", "tx_hash", "tx_index", "tx_type" ], "title": "Response for AEX-9 account balance", "type": "object" }, "Aex9ContractBalanceResponse": { "description": "Response Schema for AEX9 contract balances responses", "example": { "account_id": "ak_2MHJv6JcdcfpNvu4wRDZXWzq8QSxGbhUfhMLR7vUPzRFYsDFw6", "amount": 4050000000000, "contract_id": "ct_RDRJC5EySx4TcLtGRWYrXfNgyWzEDzssThJYPd9kdLeS5ECaA", "block_hash": "kh_bkyFuxj3W9yY8Tmuiq3KSCVHaTP3vMzHt4pZ6y1QcQEzyAf5i", "height": 618127, "last_tx_hash": "th_KTTTudTgSAZrHJQVwW4AF6XD1ksQbpyHXWfgmL2kSGvNk14CU,", "last_log_idx": 1 }, "properties": { "account_id": { "description": "The wallet pubkey", "$ref": "#/components/schemas/AccountAddress" }, "amount": { "description": "The balance amount", "type": "integer" }, "block_hash": { "description": "The block hash, indicating a state of a balance for that block", "type": "integer" }, "contract_id": { "description": "The contract id of given token", "type": "integer" }, "height": { "description": "The block height, indicating a state of a balance for that block height", "type": "integer" }, "last_tx_hash": { "description": "The hash of the last transaction that changed the balance", "$ref": "#/components/schemas/TransactionHash" }, "last_log_idx": { "description": "The index of the event log that changed the balance", "type": "integer" } }, "required": [ "account_id", "amount", "block_hash", "contract_id", "height", "last_tx_hash", "last_log_idx" ], "title": "Response for AEX-9 contract balances", "type": "object" }, "Aex9Response": { "description": "Response Schema for AEX9 contract", "example": { "contract_id": "ct_2TZsPKT5wyahqFrzp8YX7DfXQapQ4Qk65yn3sHbifU9Db9hoav", "contract_tx_hash": "th_rbFNrRDpn6finytCEmHAExtBnRxt14yckvuCWRmXxsRpypHxt", "initial_supply": "1e+28", "event_supply": 0, "decimals": 18, "extensions": [ "mintable", "burnable" ], "holders": 12, "name": "testnetAE", "symbol": "TTAE", "invalid": false }, "properties": { "contract_id": { "description": "Id of the contract of the AEX9 tokens", "$ref": "#/components/schemas/ContractAddress" }, "contract_tx_hash": { "description": "Transaction hash of the contract creation", "$ref": "#/components/schemas/TransactionHash" }, "initial_supply": { "description": "Token supply right after contract's creation", "type": "integer" }, "event_supply": { "description": "Token supply updated on event basis (Mint, Burn, Swap)", "type": "integer" }, "decimals": { "description": "The number of decimals for AEX9 token", "type": "integer" }, "extensions": { "description": "Extensions implemented by the contract", "type": "array", "items": { "type": "string" } }, "holders": { "description": "Count of accounts having balance (nil when contract is not complaint)", "type": "integer" }, "name": { "description": "Name of AEX9 token", "type": "string" }, "symbol": { "description": "Symbol of AEX9 token", "type": "string" }, "invalid": { "description": "True if the contract is invalid", "type": "boolean" } }, "required": [ "contract_id", "contract_tx_hash", "decimals", "symbol", "name", "holders", "initial_supply", "event_supply", "invalid" ], "title": "Aex9Response", "type": "object" }, "Aex9TransferEvent": { "description": "AEx9 Transfer", "type": "object", "required": [ "amount", "block_height", "contract_id", "log_idx", "micro_index", "micro_time", "recipient_id", "sender_id", "tx_hash" ], "properties": { "amount": { "type": "integer", "example": 9975080 }, "block_height": { "type": "integer", "example": 534443 }, "contract_id": { "$ref": "#/components/schemas/ContractAddress" }, "log_idx": { "type": "integer", "example": 0 }, "micro_index": { "type": "integer", "example": 4 }, "micro_time": { "type": "integer", "example": 1640350612991 }, "recipient_id": { "$ref": "#/components/schemas/AccountAddress" }, "sender_id": { "$ref": "#/components/schemas/AccountAddress" }, "tx_hash": { "$ref": "#/components/schemas/TransactionHash" } } }, "Aex9TransferResponse": { "description": "Response Schema for AEX9 transfer responses", "example": { "amount": 2, "block_height": 234208, "call_txi": 9564978, "contract_id": "ct_pqfbS94uUpE8reSwgtaAy5odGi7cPRMAxbjMyEzpTGqwTWyn5", "log_idx": 0, "micro_time": 1585667337719, "recipient": "ak_29GUBTrWTMb3tRUUgbVX1Bgwi2hyVhB8Q1befNsjLnP46Ub1V8", "sender": "ak_2CMNYSgoEjb1GSVJfWXjZ9NFWwnJ9jySBd6YY7uyr5DxvwctZU" }, "properties": { "amount": { "description": "Transfer amount of AEX9 token", "type": "integer" }, "block_height": { "description": "The block height", "type": "integer" }, "call_txi": { "description": "AEX9 token transfer index", "type": "integer" }, "contract_id": { "$ref": "#/components/schemas/ContractAddress" }, "log_idx": { "description": "Log index", "type": "integer" }, "micro_time": { "description": "The unix timestamp", "type": "integer" }, "recipient": { "description": "Recipient of AEX9 transfer", "$ref": "#/components/schemas/AccountAddress" }, "sender": { "description": "Sender of AEX9 transfer", "$ref": "#/components/schemas/AccountAddress" } }, "required": [ "contract_id", "micro_time", "block_height", "sender", "recipient", "log_idx", "call_txi", "amount" ], "title": "Response for AEX9 transfers", "type": "object" }, "Auction": { "description": "Auction", "type": "object", "required": [ "auction_end", "activation_time", "approximate_expire_time", "last_bid", "name", "name_fee", "claims_count" ], "properties": { "auction_end": { "type": "integer", "example": 638002 }, "activation_time": { "type": "integer", "example": 1687575562705 }, "approximate_expire_time": { "type": "integer", "example": 1692935617598 }, "last_bid": { "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": { "type": "integer", "example": 608242 }, "encoded_tx": { "$ref": "#/components/schemas/TransactionEncoded" }, "hash": { "$ref": "#/components/schemas/TransactionHash" }, "micro_index": { "type": "integer", "example": 2 }, "micro_time": { "type": "integer", "example": 1687575562705 }, "signatures": { "type": "array", "items": { "$ref": "#/components/schemas/Signature" } }, "tx": { "type": "object", "example": { "account_id": "ak_2JJNMYcnqPaABiSY5omockmv4cCoZefv4XzStAxKe9gM2xYz2r", "fee": 16540000000000, "name": "1996.chain", "name_fee": 134626900000000000000, "name_id": "nm_aJcPv1zMt3gdvxk6CQocaHq48D5vUyZXTqmwv2yXTTmk8fm2c", "name_salt": 7095609104934055, "nonce": 225, "ttl": 818002, "type": "NameClaimTx", "version": 2 } } } }, "name": { "$ref": "#/components/schemas/NameString" }, "name_fee": { "type": "integer", "example": 134626900000000000000 }, "claims_count": { "type": "integer", "example": 3 } } }, "BlockStateHash": { "description": "Blocks state hash", "type": "string", "example": "bs_2Zfo2ALfRkKQxEaUj3HhcUGyMrTqYpDMgr2u15fPanYD1d55kz", "pattern": "^bs_\\w{38,50}$" }, "Channel": { "type": "object", "required": [ "active", "amount", "channel", "channel_reserve", "delegate_ids", "initiator", "initiator_amount", "last_updated_height", "last_updated_tx_type", "last_updated_time", "last_updated_tx_hash", "lock_period", "locked_until", "responder", "responder_amount", "round", "solo_round", "state_hash", "updates_count" ], "properties": { "active": { "type": "boolean", "description": "Channel is active", "example": true }, "amount": { "type": "integer", "description": "Balance currently left in the channel", "example": 20000000000001 }, "channel": { "$ref": "#/components/schemas/ChannelId" }, "channel_reserve": { "type": "integer", "description": "Minimum amount for sufficient funds", "example": 500000000000000000 }, "delegate_ids": { "type": "object", "description": "Pubkeys of delegated accounts", "example": { "initiator": [], "responder": [] } }, "initiator": { "description": "Channel initiator pubkey", "$ref": "#/components/schemas/AccountAddress" }, "initiator_amount": { "type": "integer", "description": "Amount owned by initiator", "example": 4500000000000000000 }, "last_updated_height": { "type": "integer", "description": "The last height in which the channel was updated on chain", "example": 141956 }, "last_updated_tx_type": { "type": "string", "description": "The transaction type of the last transaction that updated the channel", "example": "ChannelDepositTx" }, "last_updated_time": { "type": "integer", "description": "The block time in which the channel was last updated", "example": 1587577771376 }, "last_updated_tx_hash": { "description": "The hash of the last transaction that updated the channel", "$ref": "#/components/schemas/TransactionHash" }, "lock_period": { "description": "Amount of heights locked after a solo closing", "example": 10, "type": "integer" }, "locked_until": { "description": "Non-inclusive height until which the channel is locked", "example": 712001, "type": "integer" }, "responder": { "description": "The channel responder pubkey", "$ref": "#/components/schemas/AccountAddress" }, "responder_amount": { "type": "integer", "description": "Amount owned by responder", "example": 4500000000000000000 }, "round": { "type": "integer", "description": "Round after last transaction", "example": 1 }, "solo_round": { "type": "integer", "description": "Round of last solo transaction", "example": 0 }, "state_hash": { "type": "string", "description": "The hash of the current channel state", "example": "st_Wwxms0IVM7PPCHpeOXWeeZZm8h5p/SuqZL7IHIbr3CqtlCL+", "pattern": "^st_\\w+$" }, "updates_count": { "type": "integer", "description": "The amount of times the channel's been updated by any of the channel transactions", "example": 2 } } }, "ChannelId": { "description": "Channel ID", "type": "string", "example": "ch_22SfHdnhUQBAHpC5euxHG9qjRWGfHsj47sZqSmXk4cTfJp4aUd", "pattern": "^ch_\\w{38,50}$" }, "Contract": { "description": "Contract creation info", "type": "object", "required": [ "aexn_type", "block_hash", "contract", "source_tx_hash", "source_tx_type", "create_tx" ], "properties": { "aexn_type": { "type": "string", "nullable": true, "example": "aex9" }, "block_hash": { "$ref": "#/components/schemas/MicroBlockHash" }, "contract": { "$ref": "#/components/schemas/ContractAddress" }, "source_tx_hash": { "$ref": "#/components/schemas/TransactionHash" }, "source_tx_type": { "type": "string", "example": "ContractCreateTx" }, "create_tx": { "type": "object", "example": { "abi_version": 3, "amount": 25123, "call_data": "cb_+Q==", "code": "cb_+QrfRgOgbAwsRHU", "deposit": 0, "fee": 13276000000000, "gas": 200000, "gas_price": 1000000000, "nonce": 66, "owner_id": "ak_7wqP18AHzyoqymwGaqQp8G2UpzBCggYiq7CZdJiB71VUsLpR4", "ttl": 0, "vm_version": 5 } } } }, "ContractAddress": { "description": "Contract address", "type": "string", "example": "ct_2t7TnocFw7oCYSS7g2yGutZMpGEJta6dq2DTX38SmuqmwtN6Ch", "pattern": "^ct_\\w{38,50}$" }, "ContractBytearray": { "description": "Contract bytearray", "type": "string", "example": "cb_AAAAAfy4hFE=", "pattern": "^cb_\\w+$" }, "ContractCall": { "description": "ContractCall", "type": "object", "required": [ "block_hash", "call_tx_hash", "contract_id", "contract_tx_hash", "function", "height", "internal_tx", "local_idx", "micro_index" ], "properties": { "block_hash": { "$ref": "#/components/schemas/MicroBlockHash" }, "call_tx_hash": { "$ref": "#/components/schemas/TransactionHash" }, "contract_id": { "$ref": "#/components/schemas/ContractAddress" }, "contract_tx_hash": { "$ref": "#/components/schemas/TransactionHash" }, "function": { "type": "string", "example": "Oracle.query" }, "height": { "type": "integer", "example": 608269 }, "internal_tx": { "type": "object", "example": { "fee": 0, "nonce": 0, "oracle_id": "ok_4HGhEdjeRtpsWzfSEJZnBKNmjgHALAifcBUey8EvRAdDfRsqc", "query": "YWtfdVRXZWdwZk42VWpBNHl6OFg0WlZSaTl4S0VZZVhISkRSWmNScnlUc1JIQUZvQnBMYTtodHRwczovL21haWwuZ29vZ2xlLmNvbS9tYWlsL3UvMC8jaW5ib3g=", "query_fee": 20000000000000, "query_id": "oq_2T4mYmjcyinbfYyHyDq6FfPXHChf5mYPEXgza9vHAukuq2EEHj", "query_ttl": { "type": "delta", "value": 20 }, "response_ttl": { "type": "delta", "value": 20 }, "sender_id": "ak_7wqP18AHzyoqymwGaqQp8G2UpzBCggYiq7CZdJiB71VUsLpR4", "type": "OracleQueryTx", "version": 1 } }, "local_idx": { "type": "integer", "example": 0 }, "micro_index": { "type": "integer", "example": 2 } } }, "ContractLog": { "description": "ContractLog", "type": "object", "required": [ "args", "block_hash", "block_time", "call_tx_hash", "contract_id", "contract_tx_hash", "data", "event_hash", "event_name", "ext_caller_contract_id", "ext_caller_contract_tx_hash", "height", "log_idx", "micro_index", "parent_contract_id" ], "properties": { "args": { "type": "array", "items": { "type": "string" }, "example": [ 57632170077998225994387431184384351560267542170559996321319244663568556637966, 70455690283454580784062717387189552611484838031419336802117080415662207780030, 1050376320000000000 ] }, "block_hash": { "$ref": "#/components/schemas/MicroBlockHash" }, "block_time": { "type": "integer", "example": 1615820000000 }, "call_tx_hash": { "$ref": "#/components/schemas/TransactionHash" }, "contract_id": { "$ref": "#/components/schemas/ContractAddress" }, "contract_tx_hash": { "$ref": "#/components/schemas/TransactionHash" }, "data": { "type": "string", "example": "" }, "event_hash": { "type": "string", "example": "48U3JOKTVTI6FVMTK2BLHM8NG72JEBG93VS6MENPSC8E71IM5FNG====" }, "event_name": { "type": "string", "example": "Transfer", "nullable": true }, "ext_caller_contract_id": { "nullable": true, "$ref": "#/components/schemas/ContractAddress" }, "ext_caller_contract_tx_hash": { "nullable": true, "$ref": "#/components/schemas/TransactionHash" }, "height": { "type": "integer", "example": 609854 }, "log_idx": { "type": "integer", "example": 0 }, "micro_index": { "type": "integer", "example": 15 }, "parent_contract_id": { "type": "integer", "nullable": true, "example": null } } }, "DeltaStat": { "description": "DeltaStat", "type": "object", "required": [ "height", "auctions_started", "block_reward", "burned_in_auctions", "channels_closed", "channels_opened", "contracts_created", "dev_reward", "names_activated", "names_expired", "names_revoked", "oracles_expired", "oracles_registered", "last_tx_hash", "locked_in_auctions", "locked_in_channels" ], "properties": { "height": { "description": "The generation", "type": "integer" }, "auctions_started": { "description": "The number of auctions started", "type": "integer" }, "block_reward": { "description": "The block reward", "type": "integer" }, "burned_in_auctions": { "description": "The amount burned in auctions", "type": "integer" }, "channels_closed": { "description": "The number of channels closed", "type": "integer" }, "channels_opened": { "description": "The number of channels opened", "type": "integer" }, "contracts_created": { "description": "The number of contracts created", "type": "integer" }, "dev_reward": { "description": "The dev reward", "type": "integer" }, "names_activated": { "description": "The number of names activated", "type": "integer" }, "names_expired": { "description": "The number of names expired", "type": "integer" }, "names_revoked": { "description": "The number of names revoked", "type": "integer" }, "oracles_expired": { "description": "The number of oracles expired", "type": "integer" }, "oracles_registered": { "description": "The number of oracles registered", "type": "integer" }, "last_tx_hash": { "description": "The last transaction hash for this height", "$ref": "#/components/schemas/TransactionHash" }, "locked_in_auctions": { "description": "The amount locked in auctions", "type": "integer" }, "locked_in_channels": { "description": "The amount locked in channels", "type": "integer" } }, "example": { "auctions_started": 0, "block_reward": 269973000000000000000, "burned_in_auctions": 0, "channels_closed": 0, "channels_opened": 0, "contracts_created": 0, "dev_reward": 33027000000000000000, "height": 121804, "names_activated": 0, "names_expired": 0, "names_revoked": 0, "oracles_expired": 0, "oracles_registered": 0, "last_tx_hash": "th_2FHxDzpQMRTiRfpYRV3eCcsheHr1sjf9waxk7z6JDTVcgqZRXR", "locked_in_auctions": 0, "locked_in_channels": 0 } }, "DexSwap": { "description": "DEX swap", "type": "object", "properties": { "amounts": { "type": "object", "required": [ "amount0_in", "amount1_in", "amount0_out", "amount1_out" ], "properties": { "amount0_in": { "type": "integer", "example": 1000050 }, "amount1_in": { "type": "integer", "example": 1000060 }, "amount0_out": { "type": "integer", "example": 1000070 }, "amount1_out": { "type": "integer", "example": 1000080 } } }, "action": { "type": "string", "enum": [ "SWAP", "BUY", "SELL" ], "example": "SWAP" }, "caller": { "$ref": "#/components/schemas/AccountAddress" }, "from_token": { "type": "string", "example": "TK1" }, "to_token": { "type": "string", "example": "TK2" }, "log_idx": { "type": "integer", "example": 0 }, "to_account": { "$ref": "#/components/schemas/AccountAddress" }, "tx_hash": { "$ref": "#/components/schemas/TransactionHash" }, "from_contract": { "$ref": "#/components/schemas/ContractAddress" }, "to_contract": { "$ref": "#/components/schemas/ContractAddress" }, "from_amount": { "type": "integer", "example": 1000050 }, "to_amount": { "type": "integer", "example": 1000060 }, "from_decimals": { "type": "integer", "example": 18 }, "to_decimals": { "type": "integer", "example": 18 }, "micro_time": { "type": "integer", "example": 1629820800000 }, "height": { "type": "integer", "example": 123456 } }, "required": [ "amounts", "action", "caller", "from_token", "to_token", "log_idx", "to_account", "tx_hash", "from_contract", "to_contract", "from_amount", "to_amount", "from_decimals", "to_decimals", "micro_time", "height" ] }, "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" }, "InternalContractCallEvent": { "description": "Contract call made inside of a contract call or contract create transaction", "type": "object", "properties": { "contract_tx_hash": { "description": "The contract creation transaction hash", "$ref": "#/components/schemas/TransactionHash" }, "contract_id": { "$ref": "#/components/schemas/ContractAddress" }, "call_tx_hash": { "description": "The contract call transaction hash", "$ref": "#/components/schemas/TransactionHash" }, "function": { "description": "The name of the function", "type": "string" }, "internal_tx": { "description": "The transaction object", "type": "object" }, "height": { "description": "The height in which the internal call happened", "type": "integer" }, "micro_index": { "description": "The micro block index", "type": "integer" }, "block_hash": { "description": "The micro block hash in which the transaction happened", "$ref": "#/components/schemas/MicroBlockHash" } }, "required": [ "contract_tx_hash", "contract_id", "function", "internal_tx", "height", "micro_index", "block_hash" ] }, "InternalTransferEvent": { "description": "Internal transfer", "type": "object", "properties": { "amount": { "description": "The amount of AE tokens", "type": "integer" }, "kind": { "description": "The kind of internal transfer", "type": "string", "enum": [ "accounts_extra_lima", "accounts_fortuna", "accounts_genesis", "accounts_lima", "accounts_minerva", "contracts_lima", "reward_dev", "reward_block", "fee_refund_oracle", "fee_lock_name", "fee_refund_name", "fee_spend_name", "reward_oracle" ] }, "ref_tx_hash": { "description": "The transaction hash of a transaction related to the internal transfer", "$ref": "#/components/schemas/TransactionHash" } }, "required": [ "amount", "kind", "ref_tx_hash" ] }, "KeyBlock": { "example": { "beneficiary": "ak_2MR38Zf355m6JtP13T3WEcUcSLVLCxjGvjk6zG95S2mfKohcSS", "beneficiary_reward": 5000000, "hash": "kh_uoTGwc4HPzEW9qmiQR1zmVVdHmzU6YmnVvdFe6HvybJJRj7V6", "height": 123008, "info": "cb_AAAAAfy4hFE=", "micro_blocks_count": 2, "miner": "ak_Fqnmm5hRAMaVPWk8wzpodMopZgWghMns4mM7kSV1jgT89p9AV", "nonce": 9223756548132686000, "pow": [ 12359907, 21243613, 31370838, 34911479, 39070315, 39375528, 45751339, 49864206, 56785423, 70282271, 89781776, 136985196, 140580763, 142415353, 145306210, 148449813, 156037609, 161568067, 170308922, 185345129, 192805579, 214115188, 220339679, 243288723, 258891016, 283001743, 284306909, 286457285, 326405486, 352963232, 377904500, 378120539, 380987399, 388675008, 447958786, 457602498, 465751225, 466823982, 475416389, 491255227, 530197445, 533633643 ], "prev_hash": "kh_hwin2p8u87mqiK836FixGa1pL9eBkL1Ju37Yi6EUebCgAf8rm", "prev_key_hash": "kh_hwin2p8u87mqiK836FixGa1pL9eBkL1Ju37Yi6EUebCgAf8rm", "state_hash": "bs_9Dg6mTmiJLpbg9dzgjnNFVidQesvZYZG3dEviUCd4oE1hUcna", "target": 504082055, "time": 1565548832164, "transactions_count": 2, "version": 3 }, "required": [ "beneficiary", "hash", "height", "info", "miner", "prev_hash", "prev_key_hash", "state_hash", "target", "time", "version", "micro_blocks_count", "transactions_count" ], "properties": { "beneficiary": { "description": "The beneficiary", "$ref": "#/components/schemas/AccountAddress" }, "beneficiary_reward": { "description": "The beneficiary reward", "type": "integer" }, "hash": { "$ref": "#/components/schemas/KeyBlockHash" }, "height": { "description": "The block height", "type": "integer" }, "info": { "description": "The info", "$ref": "#/components/schemas/ContractBytearray" }, "miner": { "description": "The miner public key", "$ref": "#/components/schemas/AccountAddress" }, "nonce": { "description": "The nonce", "type": "integer" }, "pow": { "description": "The proof of work", "type": "array", "items": { "type": "integer" } }, "prev_hash": { "description": "The previous block hash", "oneOf": [ { "$ref": "#/components/schemas/KeyBlockHash" }, { "$ref": "#/components/schemas/MicroBlockHash" } ] }, "prev_key_hash": { "description": "The previous key block hash", "$ref": "#/components/schemas/KeyBlockHash" }, "state_hash": { "$ref": "#/components/schemas/BlockStateHash" }, "target": { "description": "The target", "type": "integer" }, "time": { "description": "The time", "type": "integer" }, "micro_blocks_count": { "description": "The number of micro blocks", "type": "integer" }, "transactions_count": { "description": "The number of transactions", "type": "integer" }, "version": { "description": "The version", "type": "integer" } }, "title": "Key Block", "type": "object" }, "KeyBlockHash": { "description": "Key block hash", "type": "string", "example": "kh_2Zfo2ALfRkKQxEaUj3HhcUGyMrTqYpDMgr2u15fPanYD1d55kz", "pattern": "^kh_\\w{38,50}$" }, "MicroBlock": { "example": { "micro_block_index": 64, "transactions_count": 1, "hash": "mh_JryFr55GwbEbEJivkvHwBPzqbhu6AvpcZqCiBoXzgZdLmNn2K", "height": 685072, "pof_hash": "no_fraud", "prev_hash": "mh_hH3qADCrnGvuup6JwjtNSacHLd9h3NJzAgr173jS9KUqijfTB", "prev_key_hash": "kh_2rTj3FTZJ6fnuLFDJwAiDQZat2a23Lkp5uZQooxjwXEFhH4Vtw", "signature": "sg_8hhU15cVMbukFj4FbdrFwwYnbzXYPnstu9PDnWZGbfQNpeHcB6tK1F3wvG1MPYySARgDRJYUh3YPJD3HctFwg6Y4rUGSR", "state_hash": "bs_2bNSxvfhsPeAwN3LJU1oZLtUJ6GbeRdJYTEnFLAAazWtwPPqpN", "time": 1668435898477, "txs_hash": "bx_2TAosDwRW2CwxbNiucN8hRfUHQcnJn2u3quDLPE9jAmgX26Qya", "version": 5 }, "required": [ "micro_block_index", "transactions_count", "hash", "height", "pof_hash", "prev_hash", "prev_key_hash", "state_hash", "txs_hash", "signature", "time", "version" ], "properties": { "micro_block_index": { "description": "The index of the micro-block on the micro-block height, starting from 0", "type": "integer" }, "transactions_count": { "description": "The number of transactions", "type": "integer" }, "hash": { "description": "The micro block hash", "$ref": "#/components/schemas/MicroBlockHash" }, "height": { "description": "The block height", "type": "integer" }, "pof_hash": { "description": "\\\"no_fraud\\\" or api encoded Proof of Fraud hash", "type": "string", "pattern": "^no_fraud|bf_\\w{38,50}$", "example": "no_fraud" }, "prev_hash": { "description": "The previous block hash", "oneOf": [ { "$ref": "#/components/schemas/KeyBlockHash" }, { "$ref": "#/components/schemas/MicroBlockHash" } ] }, "prev_key_hash": { "description": "The previous key block hash", "$ref": "#/components/schemas/KeyBlockHash" }, "state_hash": { "$ref": "#/components/schemas/BlockStateHash" }, "txs_hash": { "description": "Transactions hash", "type": "string", "example": "bx_2TAosDwRW2CwxbNiucN8hRfUHQcnJn2u3quDLPE9jAmgX26Qya", "pattern": "^bx_\\w{38,50}$" }, "signature": { "description": "Micro block signature", "$ref": "#/components/schemas/Signature" }, "time": { "description": "The time", "type": "integer" }, "version": { "description": "The version", "type": "integer" } }, "title": "MicroBlock", "type": "object" }, "MicroBlockHash": { "description": "Micro block hash", "type": "string", "example": "mh_2Zfo2ALfRkKQxEaUj3HhcUGyMrTqYpDMgr2u15fPanYD1d55kz", "pattern": "^mh_\\w{38,50}$" }, "Miner": { "type": "object", "description": "Miner", "required": [ "miner", "total_reward" ], "properties": { "miner": { "description": "The miner (beneficiary) address", "$ref": "#/components/schemas/AccountAddress" }, "total_reward": { "description": "The accumulated reward on the miner (beneficiary) address", "type": "integer" } }, "example": { "miner": "ak_2whjDhTTmbN13vU7gAUsRbosBhmycho4h8LqHVqKwyGofDetQ9", "total_reward": 945000000000000000000 } }, "Name": { "description": "Name", "type": "object", "required": [ "active", "hash", "active_from", "approximate_activation_time", "approximate_expire_time", "expire_height", "pointers", "auction", "auction_timeout", "ownership", "name", "name_fee", "revoke" ], "properties": { "active": { "type": "boolean", "example": true }, "hash": { "$ref": "#/components/schemas/NameHash" }, "active_from": { "type": "integer", "example": 163282 }, "approximate_activation_time": { "type": "integer", "example": 1587577771376 }, "approximate_expire_time": { "type": "integer", "example": 1587577781376 }, "expire_height": { "type": "integer", "example": 362026 }, "pointers": { "type": "object", "additionalProperties": true }, "auction": { "$ref": "#/components/schemas/Auction", "nullable": true }, "auction_timeout": { "type": "integer", "example": 1088448 }, "ownership": { "type": "object", "properties": { "current": { "$ref": "#/components/schemas/AccountAddress" }, "original": { "$ref": "#/components/schemas/AccountAddress" } } }, "name": { "$ref": "#/components/schemas/NameString" }, "name_fee": { "type": "integer", "example": 134626900000000000000 }, "revoke": { "$ref": "#/components/schemas/NameTx" }, "claims_count": { "type": "integer", "example": 3 } } }, "NameClaim": { "description": "Name Claim", "type": "object", "required": [ "active_from", "source_tx_hash", "source_tx_type", "block_hash", "height", "tx" ], "properties": { "active_from": { "type": "integer", "example": 163282 }, "source_tx_hash": { "$ref": "#/components/schemas/TransactionHash" }, "source_tx_type": { "type": "string", "example": "NameClaimTx" }, "block_hash": { "$ref": "#/components/schemas/MicroBlockHash" }, "height": { "type": "integer", "example": 45784 }, "tx": { "type": "object", "example": { "account_id": "ak_2JJNMYcnqPaABiSY5omockmv4cCoZefv4XzStAxKe9gM2xYz2r", "fee": 16540000000000, "name": "1996.chain", "name_fee": 134626900000000000000, "name_salt": 7095609104934055, "nonce": 225, "ttl": 818002 } }, "internal_source": { "type": "boolean" } } }, "NameClaimEvent": { "description": "Name claim", "type": "object", "properties": { "tx_hash": { "description": "The hash of the transaction (either a name claim or a contract call transaction)", "$ref": "#/components/schemas/TransactionHash" }, "tx": { "description": "The claim transaction (internal or not)", "type": "object" } }, "required": [ "tx_hash", "tx" ] }, "NameHash": { "description": "AENS name hash", "type": "string", "example": "nm_psy8tRXPzGxh6975H7K6XQcMFVsdrxJMt7YkzMY8oUTevutzw", "pattern": "^nm_\\w{38,50}$" }, "NameString": { "description": "AENS name", "type": "string", "example": "trustwallet.chain", "pattern": "^\\w+\\.chain$" }, "NameTransfer": { "description": "Name Transfer", "type": "object", "required": [ "active_from", "block_hash", "height", "source_tx_hash", "source_tx_type", "tx" ], "properties": { "active_from": { "type": "integer", "example": 163282 }, "block_hash": { "$ref": "#/components/schemas/MicroBlockHash" }, "height": { "type": "integer", "example": 45784 }, "source_tx_hash": { "$ref": "#/components/schemas/TransactionHash" }, "source_tx_type": { "type": "string", "example": "NameTransferTx" }, "tx": { "type": "object", "example": { "account_id": "ak_24jcHLTZQfsou7NvomRJ1hKEnjyNqbYSq2Az7DmyrAyUHPq8uR", "fee": 30000, "name_id": "nm_en1mSKcVPb9gY8UGxPfABw3JouEGZ4ZvdfcBWetmn6czUuVG1", "nonce": 18550, "recipient_id": "ak_2WZoa13VKHCamt2zL9Wid8ovmyvTEUzqBjDNGDNwuqwUQJZG4t", "ttl": 42420 } }, "internal_source": { "type": "boolean" } } }, "NameTx": { "nullable": true, "type": "object", "required": [ "block_hash", "block_height", "hash", "micro_index", "micro_time", "signatures", "tx" ], "properties": { "block_hash": { "$ref": "#/components/schemas/MicroBlockHash" }, "block_height": { "type": "integer" }, "hash": { "$ref": "#/components/schemas/TransactionHash" }, "micro_index": { "type": "integer" }, "micro_time": { "type": "integer" }, "signatures": { "type": "array", "items": { "$ref": "#/components/schemas/Signature" } }, "tx": { "type": "object", "required": [ "account_id", "fee", "name_id", "nonce", "type", "version" ], "properties": { "account_id": { "$ref": "#/components/schemas/AccountAddress" }, "fee": { "type": "integer" }, "name_id": { "$ref": "#/components/schemas/NameHash" }, "nonce": { "type": "integer" }, "ttl": { "type": "integer" }, "type": { "type": "string" }, "version": { "type": "integer" } } } }, "example": { "block_hash": "mh_2Nr1oj3Z3D9sYnEDrNk4SXjboT3otCXQafsNukRcRDg25URKrR", "block_height": 45784, "hash": "th_2FAG7SHx4FkEBwh5dxjd2As3d7xXPZ3AZTQKFxm2sKADYpvDf6", "micro_index": 2, "micro_time": 1687575562705, "signatures": [ "sg_VXb4ipxdLk5PxfoQ6xUv9ma3GGmmMSARsRbXeWdS8cAGZS5SVdkfJgLskSw7rXzZSikGwha23LzsK7LPrDomkohRZTcb8" ], "tx": { "account_id": "ak_X8uq6yXsG9kKrFUChYDrkkxWgNcPnuSsosx7dB1Qt4uC4A4Ao,", "fee": "16660000000000,", "name": "olcobaxn0tkizccs4k4z3dzqxbbt1o.chain,", "name_id": "nm_6oHMk21c4chkF2A7WQ4bx1HhfaoAEQgXZFgofNTLw4yX7b2ff,", "nonce": "4,", "ttl": "2762,", "type": "NameRevokeTx,", "version": 1 } } }, "NameUpdate": { "description": "Name Update", "type": "object", "required": [ "active_from", "block_hash", "height", "source_tx_hash", "source_tx_type", "tx" ], "properties": { "active_from": { "type": "integer", "example": 163282 }, "block_hash": { "$ref": "#/components/schemas/MicroBlockHash" }, "height": { "type": "integer", "example": 45784 }, "source_tx_hash": { "$ref": "#/components/schemas/TransactionHash" }, "source_tx_type": { "type": "string", "example": "NameUpdateTx" }, "tx": { "type": "object", "example": { "account_id": "ak_2CXSVZqVaGuZsmcRs3CN6wb2b9GKtf7Arwej7ahbeAQ1S8qkmM", "client_ttl": 36000, "fee": 20000000000000, "name_id": "nm_2tokSd7X5zeYzAr5icomaVLBYC3TGeCypsPjZALcQcxYZb4YdP", "name_ttl": 50000, "nonce": 3544, "pointers": [ { "id": "ak_M6MNwGLtMQ4j3m8pzQz9uF38nMfjCCVaiQ8fvTAU6DEsCocD5", "key": "account_pubkey" } ], "ttl": 60000 } }, "internal_source": { "type": "boolean" } } }, "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" }, "Oracle": { "example": { "active": false, "active_from": 4660, "approximate_expire_time": 1587577871376, "expire_height": 6894, "format": { "query": "string", "response": "string" }, "oracle": "ok_R7cQfVN15F5ek1wBSYaMRjW2XbMRKx7VDQQmbtwxspjZQvmPM", "query_fee": 20000, "register": { "block_hash": "mh_2JZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN", "block_height": 4660, "encoded_tx": "tx_+JELAfhCuEBX6CvfGClpszz2kg4qjUL8BtvNE0JpCtuwBHbZwGfTd6O6cQ9fr723QhuML50EIzZlFafB6UUi1y5S6RpZH2wJuEn4RxYBoQFtrWD1RJ5rxuHksnEXADAPHPT2jRT6uqVIr8X45BNYqgGFcXVlcnmIcmVzcG9uc2UAAIOYloCHBowmEhDKAIMEauEAmOjXSw==", "hash": "th_2JZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN", "micro_index": 0, "micro_time": 1587577771376, "signatures": [ "sg_2JZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN" ], "tx": { "abi_version": 0, "account_id": "ak_2JZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN", "fee": 20000, "nonce": 1, "oracle_id": "ok_R7cQfVN15F5ek1wBSYaMRjW2XbMRKx7VDQQmbtwxspjZQvmPM", "oracle_ttl": { "type": "delta", "value": 100 }, "query_fee": 20000, "query_format": "query", "response_format": "response", "ttl": 1587577871376, "type": "OracleRegisterTx", "version": 1 }, "tx_hash": "th_2JZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN" }, "register_time": 1587577771376, "register_tx_hash": "th_2JZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN" }, "properties": { "active": { "description": "The oracle active status", "type": "boolean" }, "active_from": { "description": "The block height when the oracle became active", "type": "integer" }, "approximate_expire_time": { "description": "The approximate time when the oracle expires", "type": "integer" }, "expire_height": { "description": "The block height when the oracle expires", "type": "integer" }, "register_time": { "deprecated": true, "description": "The block time in which the oracle was registered, use `register.micro_time` instead", "type": "integer" }, "register_tx_hash": { "deprecated": true, "description": "The transaction hash in which the oracle was registered, use `register.hash` instead", "$ref": "#/components/schemas/TransactionHash" }, "format": { "type": "object", "description": "The oracle's query and response formats", "example": { "query": "string", "response": "string" }, "properties": { "query": { "description": "The query format", "type": "string" }, "response": { "description": "The response format", "type": "string" } }, "required": [ "response", "query" ] }, "oracle": { "$ref": "#/components/schemas/OracleAddress" }, "query_fee": { "description": "The query fee", "type": "integer" }, "register": { "$ref": "#/components/schemas/OracleTx" } }, "required": [ "register", "register_time", "register_tx_hash", "query_fee", "oracle", "format", "extends", "expire_height", "approximate_expire_time", "active_from", "active" ], "type": "object" }, "OracleAddress": { "description": "Oracle address", "type": "string", "example": "ok_2t7TnocFw7oCYSS7g2yGutZMpGEJta6dq2DTX38SmuqmwtN6Ch", "pattern": "^ok_\\w{38,50}$" }, "OracleExtend": { "example": { "height": 961963, "block_hash": "mh_j3kociQVYDLkCsxdPVU8J9qPFLxUzrMnoSMuLp38yubDpuTyR", "tx": { "fee": 16132000000000, "nonce": 4357, "oracle_id": "ok_Gb6cD91w29v8csjAxyyBmfAQmdNo1aUedWkhn9HxqiXeVuGcj", "oracle_ttl": { "type": "delta", "value": 500 }, "ttl": 0 }, "source_tx_hash": "th_NgGUA81Cy2VkwStujdyKQxBW9DTnEVJo3eHh7do3oAn4Zymmu", "source_tx_type": "OracleExtendTx" }, "properties": { "block_hash": { "description": "The hash of the block in which it ocurred", "$ref": "#/components/schemas/MicroBlockHash" }, "height": { "description": "The block height", "type": "integer" }, "source_tx_hash": { "description": "The hash of the transaction in which the extend was done", "$ref": "#/components/schemas/TransactionHash" }, "source_tx_type": { "description": "The type of the transaction in which the extend was done, it can be either via a contract call or an extend transaction", "type": "string" }, "tx": { "type": "object", "required": [ "fee", "nonce", "oracle_id", "oracle_ttl" ], "properties": { "fee": { "description": "The transaction fee", "type": "integer" }, "nonce": { "description": "The nonce", "type": "integer" }, "oracle_id": { "description": "The oracle ID of this query", "$ref": "#/components/schemas/OracleAddress" }, "oracle_ttl": { "description": "Expiration of the oracle", "type": "object", "required": [ "type", "value" ], "properties": { "type": { "enum": [ "delta", "block" ], "type": "string" }, "value": { "type": "integer" } } }, "ttl": { "description": "Transaction TTL", "type": "integer" } } } }, "required": [ "block_hash", "height", "source_tx_hash", "source_tx_type", "tx" ], "type": "object" }, "OracleQuery": { "example": { "block_hash": "mh_211yFeU3yxKgqXAaRyyxrALMDPxxTyYkrs6TwN9hWnxMHQk8Nc", "block_time": 1595571314482, "height": 289005, "query_id\"": "oq_su6wv4MZsnJfopjAhd1Sx7HuBBtqhdHhahkoTPWk7bg24UWNR", "response": { "block_hash": "mh_GWc3YBsoeCtsKW2FScDPAMz4jmK47Zdba4pPstJFJzREpWr9o", "block_time": 1595577843373, "height": 289044, "query_id": "oq_su6wv4MZsnJfopjAhd1Sx7HuBBtqhdHhahkoTPWk7bg24UWNR", "source_tx_hash": "th_GfXNatujAA2Uj73Cys39z9GzKXGHRiRFK1FCoKfDvhkJNWjpr", "source_tx_type": "OracleRespondTx", "fee": 16939000000000, "nonce": 2, "oracle_id": "ok_qJZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN", "response": "5oiQ5Yqf5LqGIQ", "response_ttl": { "type": "delta", "value": 100 }, "ttl": 289541 }, "source_tx_hash": "th_gsaRRLnysE4pFH1DqY731F6LBEjhdDwnzoDyBnZjBUygoSvpJ", "source_tx_type": "OracleQueryTx", "fee": 17199000000000, "nonce": 57, "oracle_id": "ok_qJZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN", "query": "YmFpeGluIHF1ZXJ5", "query_fee": 2000000000000000, "query_ttl": { "type": "delta", "value": 100 }, "response_ttl": { "type": "delta", "value": 100 }, "sender_id": "ak_CNcf2oywqbgmVg3FfKdbHQJfB959wrVwqfzSpdWVKZnep7nj4", "ttl": 289505 }, "properties": { "block_hash": { "description": "The hash of the block in which it ocurred", "$ref": "#/components/schemas/MicroBlockHash" }, "block_time": { "description": "The time of the block", "type": "integer" }, "height": { "description": "The block height", "type": "integer" }, "query_id": { "$ref": "#/components/schemas/OracleQueryId" }, "response": { "$ref": "#/components/schemas/OracleResponse" }, "source_tx_hash": { "description": "The hash of the transaction in which the query was created", "$ref": "#/components/schemas/TransactionHash" }, "source_tx_type": { "description": "The type of the transaction in which the query was created, it can be either via a contract call or a query transaction", "type": "string" }, "fee": { "description": "The transaction fee", "type": "integer" }, "nonce": { "description": "The nonce", "type": "integer" }, "oracle_id": { "description": "The oracle ID of this query", "$ref": "#/components/schemas/OracleAddress" }, "query": { "description": "Base64 encoding of the query", "type": "string" }, "query_fee": { "description": "The query fee", "type": "integer" }, "query_ttl": { "description": "Expiration of the query", "type": "object" }, "response_ttl": { "description": "Expiration of the response", "type": "object" }, "sender_id": { "description": "The creator of the query", "$ref": "#/components/schemas/AccountAddress" }, "ttl": { "description": "Transaction TTL", "type": "integer" } }, "required": [ "block_hash", "block_time", "height", "query_id", "source_tx_hash", "source_tx_type", "fee", "nonce", "oracle_id", "query", "query_fee", "query_ttl", "response_ttl", "sender_id", "ttl" ], "type": "object" }, "OracleQueryId": { "description": "Oracle query ID", "type": "string", "example": "oq_2t7TnocFw7oCYSS7g2yGutZMpGEJta6dq2DTX38SmuqmwtN6Ch", "pattern": "^oq_\\w{38,50}$" }, "OracleResponse": { "example": { "block_hash": "mh_211yFeU3yxKgqXAaRyyxrALMDPxxTyYkrs6TwN9hWnxMHQk8Nc", "block_time": 1595571314482, "height": 289005, "query_id": "oq_su6wv4MZsnJfopjAhd1Sx7HuBBtqhdHhahkoTPWk7bg24UWNR", "query": { "block_hash": "mh_211yFeU3yxKgqXAaRyyxrALMDPxxTyYkrs6TwN9hWnxMHQk8Nc", "block_time": 1595571314482, "height": 289005, "query_id": "oq_su6wv4MZsnJfopjAhd1Sx7HuBBtqhdHhahkoTPWk7bg24UWNR", "source_tx_hash": "th_gsaRRLnysE4pFH1DqY731F6LBEjhdDwnzoDyBnZjBUygoSvpJ", "source_tx_type": "OracleQueryTx", "fee": 17199000000000, "nonce": 57, "oracle_id": "ok_qJZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN", "query": "YmFpeGluIHF1ZXJ5", "query_fee": 2000000000000000, "query_ttl\"": { "type": "delta", "value": 100 }, "response_ttl\"": { "type": "delta", "value": 100 }, "sender_id": "ak_CNcf2oywqbgmVg3FfKdbHQJfB959wrVwqfzSpdWVKZnep7nj4", "ttl": 289505 }, "source_tx_hash": "th_gsaRRLnysE4pFH1DqY731F6LBEjhdDwnzoDyBnZjBUygoSvpJ", "source_tx_type": "OracleRespondTx", "fee": 17199000000000, "nonce": 57, "oracle_id": "ok_qJZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN", "query_fee": 2000000000000000, "response_ttl": { "type": "delta", "value": 100 }, "ttl": 289505 }, "properties": { "block_hash": { "description": "The hash of the block in which it ocurred", "$ref": "#/components/schemas/MicroBlockHash" }, "block_time": { "description": "The time of the block", "type": "integer" }, "height": { "description": "The block height", "type": "integer" }, "query_id": { "$ref": "#/components/schemas/OracleQueryId" }, "query": { "$ref": "#/components/schemas/OracleResponse" }, "source_tx_hash": { "description": "The hash of the transaction in which the response was created", "$ref": "#/components/schemas/TransactionHash" }, "source_tx_type": { "description": "The type of the transaction in which the response was created, it can be either via a contract call or a respond transaction", "type": "string" }, "fee": { "description": "The transaction fee", "type": "integer" }, "nonce": { "description": "The nonce", "type": "integer" }, "oracle_id": { "description": "The oracle ID of this response", "$ref": "#/components/schemas/OracleAddress" }, "response": { "description": "Base64 encoding of the response", "type": "string" }, "response_ttl": { "description": "Expiration of the response", "type": "object" }, "ttl": { "description": "Transaction TTL", "type": "integer" } }, "required": [ "block_hash", "block_time", "height", "query_id", "query", "source_tx_hash", "source_tx_type", "fee", "nonce", "oracle_id", "response", "response_ttl", "ttl" ], "type": "object" }, "OracleTx": { "type": "object", "required": [ "block_hash", "block_height", "hash", "tx_hash", "micro_index", "micro_time", "signatures", "encoded_tx", "tx" ], "properties": { "block_hash": { "$ref": "#/components/schemas/MicroBlockHash" }, "block_height": { "type": "integer" }, "hash": { "$ref": "#/components/schemas/TransactionHash" }, "tx_hash": { "deprecated": true, "description": "use `hash` instead", "$ref": "#/components/schemas/TransactionHash" }, "micro_index": { "type": "integer" }, "micro_time": { "type": "integer" }, "signatures": { "type": "array", "items": { "$ref": "#/components/schemas/Signature" } }, "encoded_tx": { "$ref": "#/components/schemas/TransactionEncoded" }, "tx": { "type": "object", "required": [ "fee", "nonce", "oracle_id", "oracle_ttl", "type", "version", "abi_version", "account_id", "query_fee", "query_format", "response_format" ], "properties": { "fee": { "type": "integer" }, "nonce": { "type": "integer" }, "oracle_id": { "$ref": "#/components/schemas/OracleAddress" }, "oracle_ttl": { "description": "Expiration of the oracle", "type": "object", "required": [ "type", "value" ], "properties": { "type": { "enum": [ "delta", "block" ], "type": "string" }, "value": { "type": "integer" } } }, "ttl": { "type": "integer" }, "type": { "type": "string" }, "version": { "type": "integer" }, "abi_version": { "type": "number" }, "account_id": { "$ref": "#/components/schemas/AccountAddress" }, "query_fee": { "type": "number" }, "query_format": { "type": "string" }, "response_format": { "type": "string" } } } } }, "PaginatedResponse": { "type": "object", "properties": { "next": { "type": "string", "example": "/blocks?cursor=123", "nullable": true }, "prev": { "type": "string", "example": "/blocks?cursor=234", "nullable": true } }, "required": [ "next", "prev" ] }, "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 } } }, "Pointee": { "description": "Pointee", "type": "object", "required": [ "active", "name", "key", "block_hash", "tx", "source_tx_type", "source_tx_hash", "block_height", "block_time" ], "properties": { "active": { "type": "boolean", "example": true }, "name": { "$ref": "#/components/schemas/NameString" }, "key": { "$ref": "#/components/schemas/AccountAddress" }, "block_hash": { "$ref": "#/components/schemas/MicroBlockHash" }, "tx": { "type": "object", "example": { "account_id": "ak_2CXSVZqVaGuZsmcRs3CN6wb2b9GKtf7Arwej7ahbeAQ1S8qkmM", "client_ttl": 36000, "fee": 20000000000000, "name_id": "nm_2tokSd7X5zeYzAr5icomaVLBYC3TGeCypsPjZALcQcxYZb4YdP", "name_ttl": 50000, "nonce": 3544, "pointers": [ { "id": "ak_M6MNwGLtMQ4j3m8pzQz9uF38nMfjCCVaiQ8fvTAU6DEsCocD5", "key": "account_pubkey" } ], "ttl": 60000 } }, "source_tx_type": { "type": "string", "example": "NameUpdateTx" }, "source_tx_hash": { "$ref": "#/components/schemas/TransactionHash" }, "block_height": { "type": "integer", "example": 45784 }, "block_time": { "type": "integer", "example": 1687575562705 } } }, "Signature": { "description": "Signature", "type": "string", "example": "sg_8hhU15cVMbukFj4FbdrFwwYnbzXYPnstu9PDnWZGbfQNpeHcB6tK1F3wvG1MPYySARgDRJYUh3YPJD3HctFwg6Y4rUGSR", "pattern": "^sg_\\w+$" }, "Stat": { "type": "object", "description": "Stat", "required": [ "count", "start_date", "end_date" ], "properties": { "count": { "description": "The statistic count", "type": "integer" }, "start_date": { "description": "The statistic start date", "type": "string" }, "end_date": { "description": "The statistic end date (not taken into account)", "type": "string" } }, "example": { "count": 7701, "end_date": "2024-02-29", "start_date": "2024-02-28" } }, "Stats": { "type": "object", "description": "Stats", "properties": { "miners_count": { "description": "The number of miners", "type": "integer" }, "fees_trend": { "description": "The fees trend", "type": "number" }, "last_24hs_average_transaction_fees": { "description": "The last 24hs average transaction fees", "type": "number" }, "last_24hs_transactions": { "description": "The last 24hs transactions", "type": "integer" }, "max_transactions_per_second": { "description": "The max transactions per second", "type": "number" }, "max_transactions_per_second_block_hash": { "description": "The max transactions per second block hash", "$ref": "#/components/schemas/KeyBlockHash" }, "transactions_trend": { "description": "The transactions trend", "type": "number" } }, "example": { "miners_count": 228, "fees_trend": 0, "last_24hs_average_transaction_fees": 46159816223980.98, "last_24hs_transactions": 11143, "max_transactions_per_second": 147.26, "max_transactions_per_second_block_hash": "kh_27UooKSFP8qYaymFiUvhrMfAsCUeTon48s52gfdmF8iruoi6cS", "transactions_trend": 0 } }, "Status": { "type": "object", "properties": { "mdw_async_tasks": { "type": "object", "properties": { "long_tasks": { "type": "integer", "example": 1 }, "producer_buffer": { "type": "integer", "example": 2 }, "total_pending": { "type": "integer", "example": 3 } }, "required": [ "long_tasks", "producer_buffer", "total_pending" ] }, "mdw_gens_per_minute": { "description": "The approximate number of generations synced per minute on middleware", "type": "number", "example": 54.75 }, "mdw_height": { "description": "The top generation up to which the middleware was synced", "type": "integer", "example": 564291 }, "mdw_last_migration": { "description": "The last middleware migration ran", "type": "integer", "example": 20230519120000 }, "mdw_revision": { "description": "The middleware's git revision of the latest commit applied", "type": "string", "example": "2d3ae3d" }, "mdw_synced": { "description": "true if middleware was synced up to the latest node block", "type": "boolean", "example": true }, "mdw_syncing": { "description": "true if middleware is syncing (i.e. it didn't stop due to an error)", "type": "boolean", "example": true }, "mdw_tx_index": { "description": "index of the latest synced transaction", "type": "integer", "example": 45208121 }, "mdw_version": { "description": "The middleware's version", "type": "string", "example": "1.49.0" }, "node_height": { "description": "The node generation of the last block synced", "type": "integer", "example": 391040 }, "node_progress": { "description": "The percentage of generations synced on the node", "type": "number", "example": 98.67 }, "node_revision": { "description": "The node's git revision of the latest commit applied", "type": "string", "example": "a42c1b1e84dabdad350005213a2a9334113a6832" }, "node_syncing": { "description": "If true, the node is still processing additional blocks to reach the latest one", "type": "boolean", "example": true }, "node_version": { "description": "The node's version", "type": "string", "example": "6.8.1" } }, "required": [ "mdw_async_tasks", "mdw_gens_per_minute", "mdw_height", "mdw_last_migration", "mdw_revision", "mdw_synced", "mdw_syncing", "mdw_tx_index", "mdw_version", "node_height", "node_progress", "node_revision", "node_syncing", "node_version" ] }, "TotalStat": { "type": "object", "description": "TotalStat", "required": [ "height", "contracts", "locked_in_auctions", "burned_in_auctions", "locked_in_channels", "active_auctions", "active_names", "inactive_names", "active_oracles", "inactive_oracles", "open_channels", "sum_block_reward", "sum_dev_reward", "total_token_supply", "last_tx_hash" ], "properties": { "height": { "description": "The generation", "type": "integer" }, "contracts": { "description": "The number of contracts", "type": "integer" }, "locked_in_auctions": { "description": "The amount locked in auctions", "type": "integer" }, "burned_in_auctions": { "description": "The amount burned in auctions", "type": "integer" }, "locked_in_channels": { "description": "The amount locked in channels", "type": "integer" }, "active_auctions": { "description": "The number of active auctions", "type": "integer" }, "active_names": { "description": "The number of active names", "type": "integer" }, "inactive_names": { "description": "The number of inactive names", "type": "integer" }, "active_oracles": { "description": "The number of active oracles", "type": "integer" }, "inactive_oracles": { "description": "The number of inactive oracles", "type": "integer" }, "open_channels": { "description": "The number of open channels", "type": "integer" }, "sum_block_reward": { "description": "The sum of block rewards", "type": "integer" }, "sum_dev_reward": { "description": "The sum of dev rewards", "type": "integer" }, "total_token_supply": { "description": "The total token supply", "type": "integer" }, "last_tx_hash": { "description": "The last transaction hash for this height", "$ref": "#/components/schemas/TransactionHash" } }, "example": { "height": 121804, "contracts": 0, "locked_in_auctions": 0, "burned_in_auctions": 0, "locked_in_channels": 0, "active_auctions": 0, "active_names": 0, "inactive_names": 0, "active_oracles": 0, "inactive_oracles": 0, "open_channels": 0, "sum_block_reward": 269973000000000000000, "sum_dev_reward": 33027000000000000000, "total_token_supply": 10000000000000000000000000000, "last_tx_hash": "th_2FHxDzpQMRTiRfpYRV3eCcsheHr1sjf9waxk7z6JDTVcgqZRXR" } }, "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/Tx" } }, "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 } } }, "TransactionEncoded": { "description": "Encoded transaction", "type": "string", "example": "tx_+E8hAaEB4TK48d23oE5jt/qWR5pUu8UlpTGn8bwM5JISGQMGf7ABoQOvDVCf43V7alNbsUvTarXaCf7rjtWX36YLS4+JTa4jn4YPHaUyOAAAxRZ6Sg==", "pattern": "^tx_\\w+$" }, "TransactionHash": { "description": "Transaction hash", "type": "string", "example": "th_2Zfo2ALfRkKQxEaUj3HhcUGyMrTqYpDMgr2u15fPanYD1d55kz", "pattern": "^th_\\w{38,50}$" }, "Transfer": { "type": "object", "required": [ "account_id", "amount", "height", "kind", "ref_block_hash", "ref_tx_hash", "ref_tx_type" ], "properties": { "account_id": { "$ref": "#/components/schemas/AccountAddress" }, "amount": { "type": "integer", "example": 9592000000000000000 }, "height": { "type": "integer", "example": 610158 }, "kind": { "type": "string", "enum": [ "reward_dev", "reward_block" ] }, "ref_block_hash": { "nullable": true, "$ref": "#/components/schemas/MicroBlockHash" }, "ref_tx_hash": { "nullable": true, "$ref": "#/components/schemas/TransactionHash" }, "ref_tx_type": { "type": "string", "nullable": true, "example": "ChannelDepositTx" } } }, "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" } ] } ] }, "UInt32": { "oneOf": [ { "type": "integer", "minimum": 0, "maximum": 4294967295 }, { "type": "string" } ] }, "SpendTx": { "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": { "$ref": "#/components/schemas/EncodedByteArray" } }, "required": [ "recipient_id", "amount", "fee", "sender_id", "payload" ] }, "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" ] }, "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" ] }, "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" ] }, "ChannelForceProgressTx": { "type": "object", "properties": { "channel_id": { "$ref": "#/components/schemas/EncodedPubkey" }, "from_id": { "$ref": "#/components/schemas/EncodedPubkey" }, "payload": { "$ref": "#/components/schemas/EncodedByteArray" }, "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/EncodedByteArray" } }, "required": [ "channel_id", "from_id", "payload", "round", "update", "state_hash", "fee" ] }, "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" ] }, "ChannelCloseSoloTx": { "type": "object", "properties": { "channel_id": { "$ref": "#/components/schemas/EncodedPubkey" }, "from_id": { "$ref": "#/components/schemas/EncodedPubkey" }, "payload": { "$ref": "#/components/schemas/EncodedByteArray" }, "ttl": { "$ref": "#/components/schemas/UInt64" }, "fee": { "$ref": "#/components/schemas/UInt" }, "nonce": { "$ref": "#/components/schemas/UInt64" }, "poi": { "$ref": "#/components/schemas/EncodedByteArray" } }, "required": [ "channel_id", "from_id", "payload", "fee", "poi" ] }, "ChannelSlashTx": { "type": "object", "properties": { "channel_id": { "$ref": "#/components/schemas/EncodedPubkey" }, "from_id": { "$ref": "#/components/schemas/EncodedPubkey" }, "payload": { "$ref": "#/components/schemas/EncodedByteArray" }, "ttl": { "$ref": "#/components/schemas/UInt64" }, "fee": { "$ref": "#/components/schemas/UInt" }, "nonce": { "$ref": "#/components/schemas/UInt64" }, "poi": { "$ref": "#/components/schemas/EncodedByteArray" } }, "required": [ "channel_id", "from_id", "payload", "fee", "poi" ] }, "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" ] }, "ChannelSnapshotSoloTx": { "type": "object", "properties": { "channel_id": { "$ref": "#/components/schemas/EncodedPubkey" }, "from_id": { "$ref": "#/components/schemas/EncodedPubkey" }, "payload": { "$ref": "#/components/schemas/EncodedByteArray" }, "ttl": { "$ref": "#/components/schemas/UInt64" }, "fee": { "$ref": "#/components/schemas/UInt" }, "nonce": { "$ref": "#/components/schemas/UInt64" } }, "required": [ "channel_id", "from_id", "payload", "fee" ] }, "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": { "$ref": "#/components/schemas/EncodedByteArray" }, "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" ] }, "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" ] }, "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" ] }, "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" ] }, "OracleRespondTx": { "type": "object", "properties": { "query_id": { "$ref": "#/components/schemas/EncodedValue" }, "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" ] }, "NamePreclaimTx": { "type": "object", "properties": { "commitment_id": { "$ref": "#/components/schemas/EncodedValue" }, "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" ] }, "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" ] }, "NameUpdateTx": { "type": "object", "properties": { "name_id": { "$ref": "#/components/schemas/EncodedValue" }, "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" ] }, "NameTransferTx": { "type": "object", "properties": { "name_id": { "$ref": "#/components/schemas/EncodedValue" }, "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" ] }, "NameRevokeTx": { "type": "object", "properties": { "name_id": { "$ref": "#/components/schemas/EncodedValue" }, "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" ] }, "ContractCreateTx": { "type": "object", "properties": { "owner_id": { "$ref": "#/components/schemas/EncodedPubkey" }, "nonce": { "$ref": "#/components/schemas/UInt64" }, "code": { "$ref": "#/components/schemas/EncodedByteArray" }, "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/EncodedByteArray" } }, "required": [ "owner_id", "code", "vm_version", "abi_version", "deposit", "amount", "gas", "gas_price", "fee", "call_data" ] }, "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/EncodedByteArray" } }, "required": [ "caller_id", "contract_id", "abi_version", "fee", "amount", "gas", "gas_price", "call_data" ] }, "GAAttachTx": { "type": "object", "properties": { "owner_id": { "$ref": "#/components/schemas/EncodedPubkey" }, "nonce": { "$ref": "#/components/schemas/UInt64" }, "code": { "$ref": "#/components/schemas/EncodedByteArray" }, "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/EncodedByteArray" }, "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" ] }, "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/EncodedByteArray" }, "tx": { "$ref": "#/components/schemas/SignedTx" } }, "required": [ "ga_id", "abi_version", "gas", "gas_price", "fee", "auth_data", "tx" ] }, "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" ] }, "EncodedPubkey": { "description": "Base58Check encoded tagged pubkey", "type": "string" }, "UInt": { "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "string" } ] }, "UInt64": { "oneOf": [ { "type": "integer", "minimum": 0, "maximum": 18446744073709552000 }, { "type": "string" } ] }, "EncodedByteArray": { "description": "Base64Check encoded tagged byte array", "type": "string" }, "EncodedHash": { "description": "Base58Check encoded tagged hash", "type": "string" }, "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" } } } } ] }, "OffChainUpdate": { "type": "object", "discriminator": { "propertyName": "op" }, "properties": { "op": { "type": "string" } }, "required": [ "op" ] }, "TTL": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "delta", "block" ] }, "value": { "$ref": "#/components/schemas/UInt64" } }, "required": [ "type", "value" ] }, "UInt16": { "oneOf": [ { "type": "integer", "minimum": 0, "maximum": 65535 }, { "type": "string" } ] }, "RelativeTTL": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "delta" ] }, "value": { "$ref": "#/components/schemas/UInt64" } }, "required": [ "type", "value" ] }, "EncodedValue": { "description": "Base58Check encoded tagged value", "type": "string" }, "NamePointer": { "type": "object", "properties": { "key": { "type": "string" }, "encoded_key": { "$ref": "#/components/schemas/EncodedValue" }, "id": { "$ref": "#/components/schemas/EncodedPubkey" } }, "required": [ "key", "id" ] }, "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/EncodedHash" }, "encoded_tx": { "$ref": "#/components/schemas/EncodedByteArray" }, "signatures": { "description": "At least one signature is required unless for Generalized Account Meta transactions", "type": "array", "minItems": 0, "items": { "$ref": "#/components/schemas/EncodedValue" } } }, "required": [ "tx" ] }, "TxBlockHeight": { "oneOf": [ { "type": "integer", "minimum": -1, "maximum": 18446744073709552000 }, { "type": "string" } ] } } }, "paths": { "/accounts/{accountId}/activities": { "get": { "deprecated": false, "description": "Get an account activities.", "operationId": "GetAccountActivities", "parameters": [ { "name": "accountId", "in": "path", "description": "The account address", "required": true, "schema": { "$ref": "#/components/schemas/AccountAddress" } }, { "name": "owned_only", "in": "query", "description": "Indicate to filter only activities initiated by the account", "required": false, "schema": { "type": "boolean", "example": true } }, { "name": "type", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "transactions", "aexn", "aex9", "aex141", "contract", "transfers", "claims", "swaps" ] }, "description": "Filter by activity type. Supported values:\n * `transactions` - Transactions containing the account in any of the transaction fields\n * `aexn` - AExN (aex9 and aex141) activities\n * `aex9` - AEx9 activities\n * `aex141` - AEx141 activities\n * `contract` - Internal and external contract calls\n * `transfers` - Internal (both gen-based and tx-based) transfers\n * `claims` - Name claims related to the name hash\n * `swaps` - Dex swaps related to the name hash\n" }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/ScopeParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated activities", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Activity" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/accounts/{accountId}/aex141/tokens": { "get": { "deprecated": false, "description": "Get tokens owned by an account.", "operationId": "GetAex141OwnedTokens", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" }, { "description": "The account id", "in": "path", "name": "accountId", "required": true, "schema": { "$ref": "#/components/schemas/AccountAddress" } }, { "description": "Collection contract pubkey", "in": "query", "name": "contract", "required": false, "schema": { "$ref": "#/components/schemas/ContractAddress" } } ], "responses": { "200": { "description": "Returns paginated AEX-141 tokens", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Aex141TokenResponse" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/accounts/{accountId}/aex9/balances": { "get": { "deprecated": false, "description": "Get all AEX9 balances for an account on the last block.", "operationId": "GetAex9AccountBalances", "parameters": [ { "description": "Account id", "in": "path", "name": "accountId", "required": true, "schema": { "$ref": "#/components/schemas/AccountAddress" } } ], "responses": { "200": { "description": "Returns all the balances of an account", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/PaginatedResponse" }, { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Aex9BalanceResponse" } } } } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/accounts/{accountId}/dex/swaps": { "get": { "deprecated": false, "description": "Get DEX swap tokens", "operationId": "GetAccountDexSwaps", "parameters": [ { "$ref": "#/components/parameters/DirectionParam" }, { "in": "path", "name": "accountId", "required": true, "description": "The account id", "schema": { "$ref": "#/components/schemas/AccountAddress" } } ], "responses": { "200": { "description": "Returns paginated list of DEX swaps", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/DexSwap" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/accounts/{accountId}/names/pointees": { "get": { "deprecated": false, "description": "Get account pointees", "operationId": "GetAccountPointees", "parameters": [ { "name": "accountId", "in": "path", "description": "The account that names point to", "required": true, "schema": { "$ref": "#/components/schemas/AccountAddress" } } ], "responses": { "200": { "description": "Returns the name the active and inactive name pointees", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Pointee" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundResponse" } } } } } } }, "/accounts/{accountId}/transactions/count": { "get": { "deprecated": false, "description": "Get transactions count and its type for given aeternity ID.", "operationId": "GetAccountTransactionsCount", "parameters": [ { "description": "The ID of the address/name/oracle/etc", "in": "path", "name": "accountId", "required": true, "schema": { "$ref": "#/components/schemas/AccountAddress" } } ], "responses": { "200": { "description": "Response schema for transactions count by id", "content": { "application/json": { "schema": { "type": "object", "required": [ "total" ], "properties": { "contract_create_tx": { "type": "object", "description": "The contract create transactions count", "properties": { "owner_id": { "type": "integer", "description": "The number of times the account was owner id in contract create transaction" } } }, "contract_call_tx": { "type": "object", "description": "The contract call transactions count", "properties": { "contract_id": { "type": "integer", "description": "The number of times the account was contract id in contract call transaction" }, "caller_id": { "type": "integer", "description": "The number of times the account was caller id in contract call transaction" } } }, "ga_attach_tx": { "type": "object", "description": "The ga attach transactions count", "properties": { "owner_id": { "type": "integer", "description": "The number of times the account was owner id in ga attach transaction" } } }, "ga_meta_tx": { "type": "object", "description": "The ga meta transactions count", "properties": { "ga_id": { "type": "integer", "description": "The number of times the account was ga id in ga meta transaction" } } }, "channel_close_mutual_tx": { "type": "object", "description": "The channel close mutual transactions count", "properties": { "channel_id": { "type": "integer", "description": "The number of times the account was channel id in channel close mutual transaction" }, "from_id": { "type": "integer", "description": "The number of times the account was from id in channel close mutual transaction" } } }, "channel_close_solo_tx": { "type": "object", "description": "The channel close solo transactions count", "properties": { "channel_id": { "type": "integer", "description": "The number of times the account was channel id in channel close solo transaction" }, "from_id": { "type": "integer", "description": "The number of times the account was from id in channel close solo transaction" } } }, "channel_create_tx": { "type": "object", "description": "The channel create transactions count", "properties": { "initiator_id": { "type": "integer", "description": "The number of times the account was initiator id in channel create transaction" }, "responder_id": { "type": "integer", "description": "The number of times the account was responder id in channel create transaction" } } }, "channel_deposit_tx": { "type": "object", "description": "The channel deposit transactions count", "properties": { "channel_id": { "type": "integer", "description": "The number of times the account was channel id in channel deposit transaction" }, "from_id": { "type": "integer", "description": "The number of times the account was from id in channel deposit transaction" } } }, "channel_force_progress_tx": { "type": "object", "description": "The channel force progress transactions count", "properties": { "channel_id": { "type": "integer", "description": "The number of times the account was channel id in channel force progress transaction" }, "from_id": { "type": "integer", "description": "The number of times the account was from id in channel force progress transaction" } } }, "channel_set_delegates_tx": { "type": "object", "description": "The channel set delegates transactions count", "properties": { "channel_id": { "type": "integer", "description": "The number of times the account was channel id in channel set delegates transaction" }, "from_id": { "type": "integer", "description": "The number of times the account was from id in channel set delegates transaction" } } }, "channel_settle_tx": { "type": "object", "description": "The channel settle transactions count", "properties": { "channel_id": { "type": "integer", "description": "The number of times the account was channel id in channel settle transaction" }, "from_id": { "type": "integer", "description": "The number of times the account was from id in channel settle transaction" } } }, "channel_slash_tx": { "type": "object", "description": "The channel slash transactions count", "properties": { "channel_id": { "type": "integer", "description": "The number of times the account was channel id in channel slash transaction" }, "from_id": { "type": "integer", "description": "The number of times the account was from id in channel slash transaction" } } }, "channel_snapshot_solo_tx": { "type": "object", "description": "The channel snapshot solo transactions count", "properties": { "channel_id": { "type": "integer", "description": "The number of times the account was channel id in channel snapshot solo transaction" }, "from_id": { "type": "integer", "description": "The number of times the account was from id in channel snapshot solo transaction" } } }, "channel_withdraw_tx": { "type": "object", "description": "The channel withdraw transactions count", "properties": { "channel_id": { "type": "integer", "description": "The number of times the account was channel id in channel withdraw transaction" }, "to_id": { "type": "integer", "description": "The number of times the account was to id in channel withdraw transaction" } } }, "name_claim_tx": { "type": "object", "description": "The name claim transactions count", "properties": { "account_id": { "type": "integer", "description": "The number of times the account was account id in name claim transaction" } } }, "name_preclaim_tx": { "type": "object", "description": "The name preclaim transactions count", "properties": { "account_id": { "type": "integer", "description": "The number of times the account was account id in name preclaim transaction" }, "commitment_id": { "type": "integer", "description": "The number of times the account was commitment id in name preclaim transaction" } } }, "name_revoke_tx": { "type": "object", "description": "The name revoke transactions count", "properties": { "account_id": { "type": "integer", "description": "The number of times the account was account id in name revoke transaction" }, "name_id": { "type": "integer", "description": "The number of times the account was name id in name revoke transaction" } } }, "name_transfer_tx": { "type": "object", "description": "The name transfer transactions count", "properties": { "recipient_id": { "type": "integer", "description": "The number of times the account was recipient id in name transfer transaction" }, "account_id": { "type": "integer", "description": "The number of times the account was account id in name transfer transaction" }, "name_id": { "type": "integer", "description": "The number of times the account was name id in name transfer transaction" } } }, "name_update_tx": { "type": "object", "description": "The name update transactions count", "properties": { "account_id": { "type": "integer", "description": "The number of times the account was account id in name update transaction" }, "name_id": { "type": "integer", "description": "The number of times the account was name id in name update transaction" } } }, "oracle_extend_tx": { "type": "object", "description": "The oracle extend transactions count", "properties": { "oracle_id": { "type": "integer", "description": "The number of times the account was oracle id in oracle extend transaction" } } }, "oracle_query_tx": { "type": "object", "description": "The oracle query transactions count", "properties": { "sender_id": { "type": "integer", "description": "The number of times the account was sender id in oracle query transaction" }, "oracle_id": { "type": "integer", "description": "The number of times the account was oracle id in oracle query transaction" } } }, "oracle_register_tx": { "type": "object", "description": "The oracle register transactions count", "properties": { "account_id": { "type": "integer", "description": "The number of times the account was account id in oracle register transaction" } } }, "oracle_response_tx": { "type": "object", "description": "The oracle response transactions count", "properties": { "oracle_id": { "type": "integer", "description": "The number of times the account was oracle id in oracle response transaction" } } }, "paying_for_tx": { "type": "object", "description": "The paying for transactions count", "properties": { "payer_id": { "type": "integer", "description": "The number of times the account was payer id in paying for transaction" } } }, "spend_tx": { "type": "object", "description": "The spend transactions count", "properties": { "sender_id": { "type": "integer", "description": "The number of times the account was sender id in spend transaction" }, "recipient_id": { "type": "integer", "description": "The number of times the account was recipient id in spend transaction" } } }, "channel_offchain_tx": { "type": "object", "description": "The channel offchain transactions count", "properties": { "channel_id": { "type": "integer", "description": "The number of times the account was channel id in channel offchain transaction" } } }, "total": { "type": "integer", "description": "The total transactions count" } } } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/aex141": { "get": { "deprecated": false, "description": "Get AEX141 contracts sorted by creation time, name or symbol.", "operationId": "GetSortedAex141Contracts", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" }, { "description": "meta info field used on sorting", "in": "query", "name": "by", "required": false, "schema": { "type": "string", "enum": [ "creation", "name", "symbol" ] } }, { "description": "Sorts by name or symbol prefix, this is decided by the 'by' field. If it's name, it will sort by name prefix, if it's symbol, it will sort by symbol prefix.", "in": "query", "name": "prefix", "required": false, "schema": { "type": "string", "example": "mycolle" } }, { "description": "Gets AEX141 contracts with exact name or symbol, this is decided by the 'by' field. If it's name, it will get contracts with exact name, if it's symbol, it will get contracts with exact symbol.", "in": "query", "name": "exact", "required": false, "schema": { "type": "string", "example": "mycollection" } } ], "responses": { "200": { "description": "Returns paginated AEX-141 contracts", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Aex141Response" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/aex141/{contractId}/templates": { "get": { "deprecated": false, "description": "Get templates AEX-141 contract tokens.", "operationId": "GetAex141ContractTemplates", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" }, { "description": "The contract id", "in": "path", "name": "contractId", "required": true, "schema": { "$ref": "#/components/schemas/ContractAddress" } } ], "responses": { "200": { "description": "Returns paginated AEX-141 templates", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Aex141TemplatesResponse" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/aex141/{contractId}/templates/{templateId}/tokens": { "get": { "deprecated": false, "description": "Get AEX-141 template tokens.", "operationId": "GetAex141TemplateTokens", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" }, { "description": "Contract id", "in": "path", "name": "contractId", "required": true, "schema": { "$ref": "#/components/schemas/ContractAddress" } }, { "description": "Template id", "in": "path", "name": "templateId", "required": true, "schema": { "type": "integer", "example": 8 } } ], "responses": { "200": { "description": "Returns paginated AEX-141 template tokens", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Aex141TemplateTokensResponse" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/aex141/{contractId}/tokens": { "get": { "deprecated": false, "description": "Get owners of tokens of a AEX-141 contract.", "operationId": "GetAex141ContractTokens", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" }, { "description": "The contract id", "in": "path", "name": "contractId", "required": true, "schema": { "$ref": "#/components/schemas/ContractAddress" } } ], "responses": { "200": { "description": "Returns paginated AEX-141 contracts", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Aex141TokenResponse" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/aex141/{contractId}/tokens/{tokenId}": { "get": { "deprecated": false, "description": "Get owner of a NFT (AEX-141 token).", "operationId": "GetAex141TokenOwner", "parameters": [ { "description": "The contract id", "in": "path", "name": "contractId", "required": true, "schema": { "$ref": "#/components/schemas/ContractAddress" } }, { "description": "The nft token id", "in": "path", "name": "tokenId", "required": true, "schema": { "type": "integer", "example": 1 } } ], "responses": { "200": { "description": "Owner account of the NFT", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Aex141TokenDetailResponse" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/aex141/{contractId}/transfers": { "get": { "deprecated": false, "description": "Get AEX-141 transfers on a contract.", "operationId": "GetAex141ContractTransfers", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" }, { "description": "Contract id", "in": "path", "name": "contractId", "required": true, "schema": { "$ref": "#/components/schemas/ContractAddress" } }, { "description": "From account", "in": "query", "name": "from", "required": false, "schema": { "$ref": "#/components/schemas/AccountAddress" } }, { "description": "To account", "in": "query", "name": "to", "required": false, "schema": { "$ref": "#/components/schemas/AccountAddress" } } ], "responses": { "200": { "description": "Returns paginated AEX-141 transfers", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Aex141TransferEvent" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/aex141/{id}": { "get": { "deprecated": false, "description": "Get AEX141 contract meta-info, extensions, limits and stats.", "operationId": "GetAex141ByContract", "parameters": [ { "description": "The contract id", "in": "path", "name": "id", "required": true, "schema": { "$ref": "#/components/schemas/ContractAddress" } } ], "responses": { "200": { "description": "Returns AEX-141 information by contract id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Aex141Response" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/aex9": { "get": { "deprecated": false, "description": "Get AEX9 tokens sorted by creation time, name or symbol.", "operationId": "GetSortedAex9Tokens", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" }, { "description": "meta info field used on sorting", "in": "query", "name": "by", "required": false, "schema": { "type": "string", "enum": [ "creation", "name", "symbol" ] } }, { "description": "Sorts by name or symbol prefix, this is decided by the 'by' field. If it's name, it will sort by name prefix, if it's symbol, it will sort by symbol prefix.", "in": "query", "name": "prefix", "required": false, "schema": { "type": "string", "example": "AA" } }, { "description": "Gets AEX9 tokens with exact name or symbol, this is decided by the 'by' field. If it's name, it will get tokens with exact name, if it's symbol, it will get tokens with exact symbol.", "in": "query", "name": "exact", "required": false, "schema": { "type": "string", "example": "AA" } } ], "responses": { "200": { "description": "Returns paginated AEX-9 tokens", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Aex9Response" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/aex9/count": { "get": { "deprecated": false, "description": "Get AEX9 tokens count.", "operationId": "GetAex9TokensCount", "responses": { "200": { "description": "Returns the number of AEX9 contracts created", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "integer" } } } } } } } } }, "/aex9/{contractId}/balances": { "get": { "deprecated": false, "description": "Get AEX9 balances on a contract.", "operationId": "GetAex9ContractBalances", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" }, { "description": "Contract id", "in": "path", "name": "contractId", "required": true, "schema": { "$ref": "#/components/schemas/ContractAddress" } }, { "description": "Order by", "in": "query", "name": "by", "required": false, "schema": { "type": "string", "example": "amount" } }, { "description": "Block hash", "in": "query", "name": "block_hash", "required": false, "schema": { "$ref": "#/components/schemas/MicroBlockHash" } } ], "responses": { "200": { "description": "Returns paginated contract balances", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Aex9ContractBalanceResponse" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/aex9/{contractId}/balances/{accountId}": { "get": { "deprecated": false, "description": "Get AEX9 balance for an account on a contract.", "operationId": "GetAex9ContractAccountBalance", "parameters": [ { "description": "Contract id", "in": "path", "name": "contractId", "required": true, "schema": { "$ref": "#/components/schemas/ContractAddress" } }, { "description": "Account id", "in": "path", "name": "accountId", "required": true, "schema": { "$ref": "#/components/schemas/AccountAddress" } }, { "description": "Block hash", "in": "query", "name": "hash", "required": false, "schema": { "$ref": "#/components/schemas/MicroBlockHash" } } ], "responses": { "200": { "description": "Returns a the balance of an account on a contract", "content": { "application/json": { "schema": { "type": "object", "required": [ "account", "amount", "contract" ], "properties": { "account": { "description": "The account present on a AEX9", "$ref": "#/components/schemas/AccountAddress" }, "amount": { "description": "The amount of AEX9 token", "type": "integer", "example": 4050000000000 }, "contract": { "description": "The contract id of given token", "$ref": "#/components/schemas/ContractAddress" } } } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/aex9/{contractId}/balances/{accountId}/history": { "get": { "deprecated": false, "description": "Get AEX9 account balance on a contract throughout all heights when changed.", "operationId": "GetAex9ContractAccountBalanceHistory", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/ScopeParam" }, { "$ref": "#/components/parameters/DirectionParam" }, { "description": "Contract id", "in": "path", "name": "contractId", "required": true, "schema": { "$ref": "#/components/schemas/ContractAddress" } }, { "description": "Account id", "in": "path", "name": "accountId", "required": true, "schema": { "$ref": "#/components/schemas/AccountAddress" } } ], "responses": { "200": { "description": "Account balance history on a token contract", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/PaginatedResponse" }, { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "account", "amount", "contract", "height" ], "properties": { "account": { "description": "The account present on a AEX9", "$ref": "#/components/schemas/AccountAddress" }, "amount": { "description": "The amount of AEX9 token", "type": "integer", "example": 4050000000000 }, "contract": { "description": "The contract id of given token", "$ref": "#/components/schemas/ContractAddress" }, "height": { "description": "The block height, indicating a state of a balance for that block height", "type": "integer", "example": 618127 } } } } } } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/aex9/{id}": { "get": { "deprecated": false, "description": "Get AEX9 creation and meta_info information by contract id.", "operationId": "GetAex9ByContract", "parameters": [ { "description": "The contract id", "in": "path", "name": "id", "required": true, "schema": { "$ref": "#/components/schemas/ContractAddress" } } ], "responses": { "200": { "description": "Returns AEX-9 information by contract id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Aex9Response" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/channels": { "get": { "deprecated": false, "description": "Get multiple channels.", "operationId": "GetChannels", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/ScopeParam" }, { "$ref": "#/components/parameters/DirectionParam" }, { "name": "state", "in": "query", "description": "Exclusively filter by active/inactive channels.", "required": false, "schema": { "type": "string", "enum": [ "active", "inactive" ], "example": "inactive" } } ], "responses": { "200": { "description": "Returns paginated channels", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Channel" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/channels/{id}": { "get": { "deprecated": false, "description": "Get a single channel.", "operationId": "GetChannel", "parameters": [ { "name": "id", "in": "path", "description": "The channel", "required": true, "schema": { "$ref": "#/components/schemas/ChannelId" } } ], "responses": { "200": { "description": "Returns single channel", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Channel" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundResponse" } } } } } } }, "/contracts/calls": { "get": { "deprecated": false, "description": "Get contract calls.", "operationId": "GetContractCalls", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/ScopeParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated contracts logs", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ContractCall" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/contracts/logs": { "get": { "deprecated": false, "description": "Get contract logs.", "operationId": "GetContractLogs", "parameters": [ { "name": "contract_id", "in": "query", "description": "Contract that emitted the logs", "required": false, "schema": { "$ref": "#/components/schemas/ContractAddress" } }, { "name": "event", "in": "query", "description": "Name of the event", "required": false, "schema": { "type": "string", "example": "Transfer" } }, { "name": "function", "in": "query", "description": "Prefix of the contract called function", "required": false, "schema": { "type": "string", "example": "mint" } }, { "name": "function_prefix", "in": "query", "description": "Prefix of the contract called function", "required": false, "schema": { "type": "string", "example": "put" } }, { "name": "data", "in": "query", "description": "Data prefix from the contract call", "required": false, "schema": { "type": "string", "example": "AB" } }, { "name": "aexn-args", "in": "query", "description": "Indicates to format args when event is AEX-N", "required": false, "schema": { "type": "boolean", "example": true } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/ScopeParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated contracts logs", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ContractLog" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/contracts/{id}": { "get": { "deprecated": false, "description": "Gets contract creation info.", "operationId": "GetContract", "parameters": [ { "name": "id", "in": "path", "description": "Contract that emitted the logs", "required": true, "schema": { "$ref": "#/components/schemas/ContractAddress" } } ], "responses": { "200": { "description": "Returns single contract", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Contract" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundResponse" } } } } } } }, "/dex/swaps": { "get": { "deprecated": false, "description": "Get DEX swap tokens", "operationId": "GetDexSwaps", "parameters": [ { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated list of DEX swaps", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/DexSwap" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/dex/{contract_id}/swaps": { "get": { "deprecated": false, "description": "Get DEX swap tokens", "operationId": "GetDexSwapsByContractId", "parameters": [ { "$ref": "#/components/parameters/DirectionParam" }, { "in": "path", "name": "contract_id", "required": true, "description": "The contract id", "schema": { "$ref": "#/components/schemas/ContractAddress" } } ], "responses": { "200": { "description": "Returns paginated list of DEX swaps", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/DexSwap" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/key-blocks": { "get": { "deprecated": false, "description": "Get multiple key blocks.", "operationId": "GetKeyBlocks", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/ScopeParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated key blocks", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/KeyBlock" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/key-blocks/{hash_or_kbi}": { "get": { "deprecated": false, "description": "Get a single key block.", "operationId": "GetKeyBlock", "parameters": [ { "name": "hash_or_kbi", "in": "path", "description": "The key block encoded hash or key block index", "required": true, "schema": { "oneOf": [ { "$ref": "#/components/schemas/KeyBlockHash" }, { "type": "integer", "example": 123 } ] } } ], "responses": { "200": { "description": "Returns a single key block", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KeyBlock" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundResponse" } } } } } } }, "/key-blocks/{hash_or_kbi}/micro-blocks": { "get": { "deprecated": false, "description": "Get the key block micro blocks.", "operationId": "GetKeyBlockMicroBlocks", "parameters": [ { "name": "hash_or_kbi", "in": "path", "description": "The key block encoded hash or key block index", "required": true, "schema": { "oneOf": [ { "$ref": "#/components/schemas/KeyBlockHash" }, { "type": "integer", "example": 123 } ] } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/ScopeParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated micro blocks", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/MicroBlock" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/micro-blocks/{hash}": { "get": { "deprecated": false, "description": "Get a micro block", "operationId": "GetMicroBlock", "parameters": [ { "name": "hash", "in": "path", "description": "The micro block encoded hash", "required": true, "schema": { "$ref": "#/components/schemas/MicroBlockHash" } } ], "responses": { "200": { "description": "Returns a single micro block", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MicroBlock" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundResponse" } } } } } } }, "/micro-blocks/{hash}/transactions": { "get": { "deprecated": false, "description": "Get a micro block transactions", "operationId": "GetMicroBlockTransactions", "parameters": [ { "name": "hash", "in": "path", "description": "The micro block encoded hash", "required": true, "schema": { "$ref": "#/components/schemas/MicroBlockHash" } } ], "responses": { "200": { "description": "Returns paginated micro blocks", "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" } } } } } } }, "/names": { "get": { "deprecated": false, "description": "Get multiple names.", "operationId": "GetNames", "parameters": [ { "name": "by", "in": "query", "description": "Sorting by deactivation, activation or name", "required": false, "schema": { "type": "string", "example": "activation" } }, { "name": "owned_by", "in": "query", "description": "Account that owns the name", "required": false, "schema": { "$ref": "#/components/schemas/AccountAddress" } }, { "name": "prefix", "in": "query", "description": "Name prefix filter (case insensitive). Requires by=name parameter", "required": false, "schema": { "type": "string" } }, { "name": "state", "in": "query", "description": "Activation state of the name (active or inactive)", "required": false, "schema": { "type": "string", "example": "inactive" } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated names", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Name" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/names/auctions": { "get": { "deprecated": false, "description": "Get multiple names.", "operationId": "GetNamesAuctions", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/ScopeParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated active/inactive names and auctions", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Auction" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/names/auctions/{id}": { "get": { "deprecated": false, "description": "Get name auction", "operationId": "GetNameAuction", "parameters": [ { "name": "id", "in": "path", "description": "The name", "required": true, "schema": { "oneOf": [ { "$ref": "#/components/schemas/NameString" }, { "$ref": "#/components/schemas/NameHash" } ] } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/ScopeParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns the name active auction", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Auction" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundResponse" } } } } } } }, "/names/auctions/{id}/claims": { "get": { "deprecated": false, "description": "Get name auction claims", "operationId": "GetNameAuctionClaims", "parameters": [ { "name": "id", "in": "path", "description": "The name", "required": true, "schema": { "oneOf": [ { "$ref": "#/components/schemas/NameString" }, { "$ref": "#/components/schemas/NameHash" } ] } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/ScopeParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns the name auction claims", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/NameClaim" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundResponse" } } } } } } }, "/names/count": { "get": { "deprecated": false, "description": "Get the total number of active names.", "operationId": "GetNamesCount", "parameters": [ { "name": "owned_by", "in": "query", "description": "Account that owns the name", "required": false, "schema": { "$ref": "#/components/schemas/AccountAddress" } } ], "responses": { "200": { "description": "Returns the total number of active names", "content": { "application/json": { "schema": { "description": "Total number of names", "example": 191145, "type": "integer" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/names/{id}": { "get": { "deprecated": false, "description": "Get a single name.", "operationId": "GetName", "parameters": [ { "name": "id", "in": "path", "description": "The name", "required": true, "schema": { "oneOf": [ { "$ref": "#/components/schemas/NameString" }, { "$ref": "#/components/schemas/NameHash" } ] } } ], "responses": { "200": { "description": "Returns single name", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Name" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundResponse" } } } } } } }, "/oracles": { "get": { "deprecated": false, "description": "Get multiple oracles.", "operationId": "GetOracles", "parameters": [ { "name": "state", "in": "query", "description": "oracle state (active or inactive)", "required": false, "schema": { "type": "string", "example": "active" } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/ScopeParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated oracles", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Oracle" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/oracles/{id}": { "get": { "deprecated": false, "description": "Get a single oracle.", "operationId": "GetOracle", "parameters": [ { "name": "id", "in": "path", "description": "The oracle", "required": true, "schema": { "$ref": "#/components/schemas/OracleAddress" } } ], "responses": { "200": { "description": "Returns single oracle", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Oracle" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundResponse" } } } } } } }, "/oracles/{id}/extends": { "get": { "deprecated": false, "description": "Get an oracle's extensions.", "operationId": "GetOracleExtends", "parameters": [ { "name": "id", "in": "path", "description": "The oracle", "required": true, "schema": { "$ref": "#/components/schemas/OracleAddress" } } ], "responses": { "200": { "description": "Returns paginated oracle extensions", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/OracleExtend" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundResponse" } } } } } } }, "/oracles/{id}/queries": { "get": { "deprecated": false, "description": "Get an oracle's queries.", "operationId": "GetOracleQueries", "parameters": [ { "name": "id", "in": "path", "description": "The oracle", "required": true, "schema": { "$ref": "#/components/schemas/OracleAddress" } } ], "responses": { "200": { "description": "Returns paginated oracle queries", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/OracleQuery" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundResponse" } } } } } } }, "/oracles/{id}/responses": { "get": { "deprecated": false, "description": "Get an oracle's responses.", "operationId": "GetOracleResponses", "parameters": [ { "name": "id", "in": "path", "description": "The oracle", "required": true, "schema": { "$ref": "#/components/schemas/OracleAddress" } } ], "responses": { "200": { "description": "Returns paginated oracle responses", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/OracleResponse" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundResponse" } } } } } } }, "/stats": { "get": { "deprecated": false, "description": "Get stats.", "operationId": "GetStats", "responses": { "200": { "description": "Returns paginated stats per generation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Stats" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/stats/active-accounts": { "get": { "deprecated": false, "description": "Get active accounts stats.", "operationId": "GetActiveAccountsStats", "parameters": [ { "name": "interval_by", "description": "The interval in which to return the stats.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "day", "week", "month" ], "example": "week" } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated active accounts stats", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Stat" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/stats/aex9-transfers": { "get": { "deprecated": false, "description": "Get total AEx9 token transfers.", "operationId": "GetNamesStats", "parameters": [ { "name": "interval_by", "description": "The interval in which to return the stats.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "day", "week", "month" ], "example": "week" } }, { "name": "min_start_date", "description": "The minimum start date in YYYY-MM-DD format.", "in": "query", "required": false, "schema": { "type": "string", "example": "2023-01-01" } }, { "name": "max_start_date", "description": "The maximum start date in YYYY-MM-DD format.", "in": "query", "required": false, "schema": { "type": "string", "example": "2024-01-01" } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated AEx9 transfer stats", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Stat" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/stats/blocks": { "get": { "deprecated": false, "description": "Get total blocks count stats.", "operationId": "GetBlocksStats", "parameters": [ { "name": "interval_by", "description": "The interval in which to return the stats.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "day", "week", "month" ], "example": "week" } }, { "name": "min_start_date", "description": "The minimum start date in YYYY-MM-DD format.", "in": "query", "required": false, "schema": { "type": "string", "example": "2023-01-01" } }, { "name": "max_start_date", "description": "The maximum start date in YYYY-MM-DD format.", "in": "query", "required": false, "schema": { "type": "string", "example": "2024-01-01" } }, { "name": "type", "description": "The type of block.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "key", "micro" ], "example": "micro" } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated total stats per generation", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Stat" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/stats/contracts": { "get": { "deprecated": false, "description": "Get the created contracts count per interval.", "operationId": "GetContractsStats", "parameters": [ { "name": "interval_by", "description": "The interval in which to return the stats.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "day", "week", "month" ], "example": "week" } }, { "name": "min_start_date", "description": "The minimum start date in YYYY-MM-DD format.", "in": "query", "required": false, "schema": { "type": "string", "example": "2023-01-01" } }, { "name": "max_start_date", "description": "The maximum start date in YYYY-MM-DD format.", "in": "query", "required": false, "schema": { "type": "string", "example": "2024-01-01" } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated total stats per generation", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Stat" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/stats/delta": { "get": { "deprecated": false, "description": "Get delta stats.", "operationId": "GetDeltaStats", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/ScopeParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated delta stats per generation", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/DeltaStat" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/stats/difficulty": { "get": { "deprecated": false, "description": "Get total blocks difficulty stats.", "operationId": "GetDifficultyStats", "parameters": [ { "name": "interval_by", "description": "The interval in which to return the stats.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "day", "week", "month" ], "example": "week" } }, { "name": "min_start_date", "description": "The minimum start date in YYYY-MM-DD format.", "in": "query", "required": false, "schema": { "type": "string", "example": "2023-01-01" } }, { "name": "max_start_date", "description": "The maximum start date in YYYY-MM-DD format.", "in": "query", "required": false, "schema": { "type": "string", "example": "2024-01-01" } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated total stats per generation", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Stat" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/stats/hashrate": { "get": { "deprecated": false, "description": "Get total blocks hashrate stats.", "operationId": "GetHashrateStats", "parameters": [ { "name": "interval_by", "description": "The interval in which to return the stats.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "day", "week", "month" ], "example": "week" } }, { "name": "min_start_date", "description": "The minimum start date in YYYY-MM-DD format.", "in": "query", "required": false, "schema": { "type": "string", "example": "2023-01-01" } }, { "name": "max_start_date", "description": "The maximum start date in YYYY-MM-DD format.", "in": "query", "required": false, "schema": { "type": "string", "example": "2024-01-01" } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated total stats per generation", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Stat" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/stats/miners": { "get": { "deprecated": false, "description": "Get miners list with total rewards obtained through mining.", "operationId": "GetMinerStats", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated total stats per generation", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Miner" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/stats/names": { "get": { "deprecated": false, "description": "Get total names count stats.", "operationId": "GetNamesStats", "parameters": [ { "name": "interval_by", "description": "The interval in which to return the stats.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "day", "week", "month" ], "example": "week" } }, { "name": "min_start_date", "description": "The minimum start date in YYYY-MM-DD format.", "in": "query", "required": false, "schema": { "type": "string", "example": "2023-01-01" } }, { "name": "max_start_date", "description": "The maximum start date in YYYY-MM-DD format.", "in": "query", "required": false, "schema": { "type": "string", "example": "2024-01-01" } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated total stats per generation", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Stat" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/stats/total": { "get": { "deprecated": false, "description": "Get total accumulated stats.", "operationId": "GetTotalStats", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/ScopeParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated total stats per generation", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/TotalStat" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/stats/total-accounts": { "get": { "deprecated": false, "description": "Get total accounts created per interval stats.", "operationId": "GetTotalAccountsStats", "parameters": [ { "name": "interval_by", "description": "The interval in which to return the stats.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "day", "week", "month" ], "example": "week" } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated total accounts stats", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Stat" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/stats/transactions": { "get": { "deprecated": false, "description": "Get total transactions count stats.", "operationId": "GetTransactionsStats", "parameters": [ { "name": "interval_by", "description": "The interval in which to return the stats.", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "day", "week", "month" ], "example": "week" } }, { "name": "min_start_date", "description": "The minimum start date in YYYY-MM-DD format.", "in": "query", "required": false, "schema": { "type": "string", "example": "2023-01-01" } }, { "name": "max_start_date", "description": "The maximum start date in YYYY-MM-DD format.", "in": "query", "required": false, "schema": { "type": "string", "example": "2024-01-01" } }, { "name": "tx_type", "description": "The type of the transactions", "in": "query", "required": false, "schema": { "type": "string", "example": "contract_call" } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated total stats per generation", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Stat" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/status": { "get": { "description": "Gets the current syncing status of both middleware and the node", "operationId": "GetStatus", "responses": { "200": { "description": "Returns a map of status items", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Status" } } } } } } }, "/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" } } } } } } }, "/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" } } } } } } }, "/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" } } } } } } }, "/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" } } } } } } }, "/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" } } } } } } }, "/transfers": { "get": { "deprecated": false, "description": "Get multiple transfers.", "operationId": "GetTransfers", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/ScopeParam" }, { "$ref": "#/components/parameters/DirectionParam" } ], "responses": { "200": { "description": "Returns paginated names", "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Transfer" } } } }, { "$ref": "#/components/schemas/PaginatedResponse" } ] } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } } }