diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index 9fece3472..848087d09 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -1,2112 +1,1163 @@ { - "openapi": "3.1.0", + "openapi": "3.1.1", "info": { - "title": "TON HTTP API", - "description": "\nThis API enables HTTP access to TON blockchain - getting accounts and wallets information, looking up blocks and transactions, sending messages to the blockchain, calling get methods of smart contracts, and more.\n\nIn addition to REST API, all methods are available through [JSON-RPC endpoint](#json%20rpc) with `method` equal to method name and `params` passed as a dictionary.\n\nThe response contains a JSON object, which always has a boolean field `ok` and either `error` or `result`. If `ok` equals true, the request was successful and the result of the query can be found in the `result` field. In case of an unsuccessful request, `ok` equals false and the error is explained in the `error`.\n\nAPI Key should be sent either as `api_key` query parameter or `X-API-Key` header.\n", - "version": "2.0.0" + "title": "TON HTTP API C++", + "description": "This API enables HTTP access to TON blockchain - getting accounts and wallets information, looking up blocks and transactions, sending messages to the blockchain, calling get methods of smart contracts, and more.\n\nIn addition to REST API, all methods are available through [JSON-RPC endpoint](#json%20rpc) with `method` equal to method name and `params` passed as a dictionary.\n\nThe response contains a JSON object, which always has a boolean field `ok` and either `error` or `result`. If `ok` equals true, the request was successful and the result of the query can be found in the `result` field. In case of an unsuccessful request, `ok` equals false and the error is explained in the `error`.\n\nAPI Key should be sent either as `api_key` query parameter or `X-API-Key` header\n", + "version": "2.1.1" }, "servers": [ { - "url": "https://toncenter.com/api/v2" + "url": "https://toncenter.com", + "description": "TON Mainnet" }, { - "url": "https://testnet.toncenter.com/api/v2" + "url": "https://testnet.toncenter.com", + "description": "TON Testnet" } ], "paths": { - "/getAddressInformation": { - "get": { + "/api/v2/jsonRPC": { + "post": { "tags": [ - "Accounts" - ], - "summary": "Get account state and balance", - "description": "Get basic information about the address: balance, code, data, last_transaction_id.", - "operationId": "get_address_information_getAddressInformation_get", - "parameters": [ - { - "description": "Identifier of target TON account in any form.", - "required": true, - "schema": { - "type": "string", - "title": "Address", - "description": "Identifier of target TON account in any form." - }, - "name": "address", - "in": "query" - } + "rpc" ], + "summary": "JSON-RPC endpoint", + "description": "All API methods are available through this single endpoint using JSON-RPC 2.0 protocol. Send the method name in the `method` field and parameters as a dictionary in `params`. Useful when you need to call multiple methods in sequence or prefer JSON-RPC over REST.", + "operationId": "jsonRPC_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonRpcRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetAddressInformationResponse" - }, - "examples": { - "sample": { - "summary": "Example", - "value": { - "ok": true, - "result": { - "@type": "raw.fullAccountState", - "balance": "1592521995920473", - "extra_currencies": [], - "code": "te6cckEBAQEAcQAA3v8AIN0gggFMl7ohggEznLqxn3Gw7UTQ0x/THzHXC//jBOCk8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVBC9ba0=", - "data": "te6cckEBAQEAKgAAUAAAAVUpqaMXcsnta2Km4uuhSpO5BGLno2d3e+uKOPsVufM4RNIs4v+Z1A2U", - "last_transaction_id": { - "@type": "internal.transactionId", - "lt": "60294179000005", - "hash": "opzfb6lX3inMMTbyvp8Z/FmrrdgZ4D/NPZvDZOkjd0E=" - }, - "block_id": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 50940162, - "root_hash": "S3S4Otb/vX2ZZDsOAB2a3Deqf3+K3aerm7qodto/nt8=", - "file_hash": "h/bCahzQzEMzwRwnDBpzmN1m1/wjyA0BUy/HTtBbirs=" - }, - "frozen_hash": "", - "sync_utime": 1755281542, - "@extra": "1755281559.4317498:12:0.19337888420712945", - "state": "active" - } - } - } - } - } - } - }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" - } - }, - "security": [] + "$ref": "#/components/schemas/TonlibResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/getExtendedAddressInformation": { + "/api/v2/detectAddress": { "get": { "tags": [ - "Accounts" + "Utils" ], - "summary": "Get detailed account state (extended)", - "description": "Similar to previous one but tries to parse additional information for known contract types. This method is based on tonlib's function *getAccountState*. For detecting wallets we recommend to use *getWalletInformation*.", - "operationId": "get_extended_address_information_getExtendedAddressInformation_get", + "summary": "Detect address", + "description": "Validates an address and returns it in all standard formats. Use this to convert between address formats or to validate user input. Returns raw format (0:abc), base64 bounceable (EQ), base64 non-bounceable (UQ), and URL-safe variants.", + "operationId": "detectAddress_get", "parameters": [ { - "description": "Identifier of target TON account in any form.", - "required": true, - "schema": { - "type": "string", - "title": "Address", - "description": "Identifier of target TON account in any form." - }, - "name": "address", - "in": "query" + "$ref": "#/components/parameters/address" } ], "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetExtendedAddressInformationResponse" - }, - "examples": { - "sample": { - "summary": "Example", - "value": { - "ok": true, - "result": { - "@type": "fullAccountState", - "address": { - "@type": "accountAddress", - "account_address": "EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N" - }, - "balance": "1592521995920473", - "extra_currencies": [], - "last_transaction_id": { - "@type": "internal.transactionId", - "lt": "60294179000005", - "hash": "opzfb6lX3inMMTbyvp8Z/FmrrdgZ4D/NPZvDZOkjd0E=" - }, - "block_id": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 50940791, - "root_hash": "8Zcn3qPdpJY5nBOIOG5h/v3ABrPRQoahCOgbSmmICS0=", - "file_hash": "BLvAHAZGs/Zoozhdsn5VvADALGQc+CoaQBSUqj1tKWo=" - }, - "sync_utime": 1755283118, - "account_state": { - "@type": "wallet.v3.accountState", - "wallet_id": "698983191", - "seqno": 341 - }, - "revision": 2, - "@extra": "1755283135.0102983:6:0.11795169251963" - } - } - } - } - } - } - }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" - } - }, - "security": [] - } - }, - "/getWalletInformation": { - "get": { - "tags": [ - "Accounts" - ], - "summary": "Get wallet information", - "description": "Retrieve wallet information. This method parses contract state and currently supports more wallet types than getExtendedAddressInformation: simple wallet, standard wallet, v3 wallet, v4 wallet.", - "operationId": "get_wallet_information_getWalletInformation_get", - "parameters": [ + "$ref": "#/components/schemas/DetectAddressResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ { - "description": "Identifier of target TON account in any form.", - "required": true, - "schema": { - "type": "string", - "title": "Address", - "description": "Identifier of target TON account in any form." - }, - "name": "address", - "in": "query" + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] } + ] + }, + "post": { + "tags": [ + "rpc" ], + "summary": "Detect address", + "description": "Validates an address and returns it in all standard formats. Use this to convert between address formats or to validate user input. Returns raw format (0:abc...), base64 bounceable (EQ...), base64 non-bounceable (UQ...), and URL-safe variants.", + "operationId": "detectAddress_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DetectAddressRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetWalletInformationResponse" - }, - "examples": { - "sample": { - "summary": "Example", - "value": { - "ok": true, - "result": { - "wallet": true, - "balance": "1592521995920473", - "extra_currencies": [], - "account_state": "active", - "wallet_type": "v3", - "seqno": 341, - "last_transaction_id": { - "lt": "60294179000005", - "hash": "opzfb6lX3inMMTbyvp8Z/FmrrdgZ4D/NPZvDZOkjd0E=" - }, - "wallet_id": "698983191", - "public_key": "0x..." - } - } - } - } - } - } - }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" - } - }, - "security": [] + "$ref": "#/components/schemas/DetectAddressResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/getTransactions": { + "/api/v2/detectHash": { "get": { "tags": [ - "Accounts", - "Transactions" + "Utils" ], - "summary": "List account transactions", - "description": "Get transaction history of a given address.", - "operationId": "get_transactions_getTransactions_get", + "summary": "Detect hash", + "description": "Validates a hash and returns it in all standard formats. Use this to convert between hex (64 chars) and base64 (44 chars) representations. Works with any 256-bit hash including transaction hashes, block hashes, and message hashes.", + "operationId": "detectHash_get", "parameters": [ { - "description": "Identifier of target TON account in any form.", - "required": true, - "schema": { - "type": "string", - "title": "Address", - "description": "Identifier of target TON account in any form." - }, - "name": "address", - "in": "query" - }, - { - "description": "Maximum number of transactions in response.", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "exclusiveMinimum": 0, - "title": "Limit", - "description": "Maximum number of transactions in response.", - "default": 10 - }, - "name": "limit", - "in": "query" - }, - { - "description": "Logical time of transaction to start with, must be sent with *hash*.", - "required": false, - "schema": { - "type": "integer", - "title": "Lt", - "description": "Logical time of transaction to start with, must be sent with *hash*." - }, - "name": "lt", - "in": "query" - }, - { - "description": "Hash of transaction to start with, in *base64* or *hex* encoding , must be sent with *lt*.", - "required": false, - "schema": { - "type": "string", - "title": "Hash", - "description": "Hash of transaction to start with, in *base64* or *hex* encoding , must be sent with *lt*." - }, - "name": "hash", - "in": "query" - }, - { - "description": "Logical time of transaction to finish with (to get tx from *lt* to *to_lt*).", - "required": false, - "schema": { - "type": "integer", - "title": "To Lt", - "description": "Logical time of transaction to finish with (to get tx from *lt* to *to_lt*).", - "default": 0 - }, - "name": "to_lt", - "in": "query" - }, - { - "description": "By default getTransaction request is processed by any available liteserver. If *archival=true* only liteservers with full history are used.", - "required": false, - "schema": { - "type": "boolean", - "title": "Archival", - "description": "By default getTransaction request is processed by any available liteserver. If *archival=true* only liteservers with full history are used.", - "default": false - }, - "name": "archival", - "in": "query" + "$ref": "#/components/parameters/hash" } ], "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TonResponse" + "$ref": "#/components/schemas/DetectHashResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] - } - }, - "/getAddressBalance": { - "get": { - "tags": [ - "Accounts" - ], - "summary": "Get account balance only", - "description": "Get balance (in nanotons) of a given address.", - "operationId": "get_address_balance_getAddressBalance_get", - "parameters": [ + "security": [ { - "description": "Identifier of target TON account in any form.", - "required": true, - "schema": { - "type": "string", - "title": "Address", - "description": "Identifier of target TON account in any form." - }, - "name": "address", - "in": "query" + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] } + ] + }, + "post": { + "tags": [ + "rpc" ], + "summary": "Detect hash", + "description": "Validates a hash and returns it in all standard formats. Use this to convert between hex (64 chars) and base64 (44 chars) representations. Works with any 256-bit hash including transaction hashes, block hashes, and message hashes.", + "operationId": "detectHash_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DetectHashRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StringResultResponse" - }, - "examples": { - "sample": { - "summary": "Example", - "value": { - "ok": true, - "result": "1592521995920473" - } - } + "$ref": "#/components/schemas/DetectHashResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/getAddressState": { + "/api/v2/packAddress": { "get": { "tags": [ - "Accounts" + "Utils" ], - "summary": "Get account lifecycle state", - "description": "Get state of a given address. State can be either *unitialized*, *active* or *frozen*.", - "operationId": "get_address_getAddressState_get", + "summary": "Pack address", + "description": "Converts a raw address to user-friendly base64 format. Raw addresses use the format `workchain:hex` (e.g., `0:abc...`). The packed format is shorter and includes a checksum for error detection.", + "operationId": "packAddress_get", "parameters": [ { - "description": "Identifier of target TON account in any form.", - "required": true, - "schema": { - "type": "string", - "title": "Address", - "description": "Identifier of target TON account in any form." - }, - "name": "address", - "in": "query" + "$ref": "#/components/parameters/address" } ], "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddressStateResponse" - }, - "examples": { - "sample": { - "summary": "Example", - "value": { - "ok": true, - "result": "active" - } - } + "$ref": "#/components/schemas/PackAddressResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] - } - }, - "/packAddress": { - "get": { - "tags": [ - "Accounts" - ], - "summary": "Convert raw address to user-friendly format", - "description": "Convert an address from raw to human-readable format.", - "operationId": "pack_address_packAddress_get", - "parameters": [ + "security": [ { - "description": "Identifier of target TON account in raw form.", - "required": true, - "schema": { - "type": "string", - "title": "Address", - "description": "Identifier of target TON account in raw form." - }, - "example": "0:83DFD552E63729B472FCBCC8C45EBCC6691702558B68EC7527E1BA403A0F31A8", - "name": "address", - "in": "query" + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] } + ] + }, + "post": { + "tags": [ + "rpc" ], + "summary": "Pack address", + "description": "Converts a raw address to user-friendly base64 format. Raw addresses use the format `workchain:hex` (e.g., `0:abc...`). The packed format is shorter and includes a checksum for error detection.", + "operationId": "packAddress_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PackAddressRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StringResultResponse" - }, - "examples": { - "sample": { - "summary": "Example", - "value": { - "ok": true, - "result": "EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N" - } - } + "$ref": "#/components/schemas/PackAddressResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/unpackAddress": { + "/api/v2/unpackAddress": { "get": { "tags": [ - "Accounts" + "Utils" ], - "summary": "Convert user-friendly address to raw format", - "description": "Convert an address from human-readable to raw format.", - "operationId": "unpack_address_unpackAddress_get", + "summary": "Unpack address", + "description": "Converts a user-friendly base64 address back to its raw components. Returns the workchain ID, account hex, and flags indicating if the address is bounceable or testnet-only.", + "operationId": "unpackAddress_get", "parameters": [ { - "description": "Identifier of target TON account in user-friendly form", - "required": true, - "schema": { - "type": "string", - "title": "Address", - "description": "Identifier of target TON account in user-friendly form" - }, - "example": "EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N", - "name": "address", - "in": "query" + "$ref": "#/components/parameters/address" } ], "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StringResultResponse" - }, - "examples": { - "sample": { - "summary": "Example", - "value": { - "ok": true, - "result": "0:83DFD552E63729B472FCBCC8C45EBCC6691702558B68EC7527E1BA403A0F31A8" - } - } + "$ref": "#/components/schemas/UnpackAddressResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] - } - }, - "/getMasterchainInfo": { - "get": { + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { "tags": [ - "Blocks" + "rpc" ], - "summary": "Get latest masterchain info", - "description": "Get up-to-date masterchain state.", - "operationId": "get_masterchain_info_getMasterchainInfo_get", + "summary": "Unpack address", + "description": "Converts a user-friendly base64 address back to its raw components. Returns the workchain ID, account hex, and flags indicating if the address is bounceable or testnet-only.", + "operationId": "unpackAddress_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnpackAddressRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetMasterchainInfoResponse" - }, - "examples": { - "sample1": { - "summary": "Example 1", - "value": { - "ok": true, - "result": { - "@type": "blocks.masterchainInfo", - "last": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 51148696, - "root_hash": "pdEYB4jzhoEFdOMdCgfXJ0z4vylDW27ETqVaSJEDyqs=", - "file_hash": "l3sF5XbGapYGFnma+6dIk0fuZYdJYO4yAkNsjDkyxcc=" - }, - "state_root_hash": "qJ2FQ7fySAnOvgIKI9laL5Mgk8rQWT+Tc/O2xUFzwWs=", - "init": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "0", - "seqno": 0, - "root_hash": "F6OpKZKqvqeFp6CQmFomXNMfMj2EnaUSOXN+Mh+wVWk=", - "file_hash": "XplPz01CXAps5qeSWUtxcyBfdAo5zVb1N979KLSKD24=" - }, - "@extra": "1755812855.1928415:3:0.47373957740114636" - } - } - }, - "sample2": { - "summary": "Example 2", - "value": { - "ok": true, - "result": { - "@type": "blocks.masterchainInfo", - "last": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 34539805, - "root_hash": "z1gmtb/KbcNwHDVLOHphfDcYMfDtRyW5sTDLuNbPd2E=", - "file_hash": "/3zsB+Lr0mONcRGZ+tx2jNC1VkOHCXfmjJ9Wai2iUlQ=" - }, - "state_root_hash": "/WR0k35BrgggvPUVglES3I4wt3SrHvU39T5YQQ0Dd2w=", - "init": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "0", - "seqno": 0, - "root_hash": "gj+B8wb/AmlPk1z1AhVI484rhrUpgSr2oSFIh56VoSg=", - "file_hash": "Z+IKwYS54DmmJmesw/nAD5DzWadnOCMzee+kdgSYDOg=" - } - }, - "@extra": "1755812953:0:0.712" - } - } - } - } - } - }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" - } - }, - "security": [] + "$ref": "#/components/schemas/UnpackAddressResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/getMasterchainBlockSignatures": { + "/api/v2/getAddressInformation": { "get": { "tags": [ - "Blocks" + "accounts" ], - "summary": "Get masterchain block signatures", - "description": "Get up-to-date masterchain state.", - "operationId": "get_masterchain_block_signatures_getMasterchainBlockSignatures_get", + "summary": "Get address information", + "description": "Returns the current state of any account on the TON blockchain. Includes the balance (in nanotons), smart contract code and data (if deployed), account status, and a reference to the last transaction. This is the primary endpoint for checking if an address exists and what's deployed there.", + "operationId": "getAddressInformation_get", "parameters": [ { - "required": true, - "schema": { - "type": "integer", - "title": "Seqno" - }, - "name": "seqno", - "in": "query" + "$ref": "#/components/parameters/address" + }, + { + "$ref": "#/components/parameters/seqnoOptional" } ], "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetMasterchainBlockSignaturesResponse" - }, - "examples": { - "sample": { - "summary": "Block signatures example (truncated)", - "value": { - "ok": true, - "result": { - "@type": "blocks.blockSignatures", - "id": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 51148806, - "root_hash": "I/+MoS7TB7Zuw+g5QH3bPBFMcM5Wf4h1Coig3g2osFQ=", - "file_hash": "BhPAjDTVPDqH8z6DLq9jAjZiZiiIUQW/f667jJgfoyw=" - }, - "signatures": [ - { - "@type": "blocks.signature", - "node_id_short": "axRYlEuV/4Fo94EbDtfpEnqJukpAsNNgmZqQz7e01ew=", - "signature": "xTBbMLBnJau/VxzOln6jW2zwIMx4WY/+hO3IWwqklNnAAzvYY2X/pqutkJNj5E1f4BjKp84sukuTErS0fFZUAA==" - } - ], - "@extra": "1755813145.584844:11:0.877388442408124" - } - } - } - } - } - } - }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" - } - }, - "security": [] - } - }, - "/getShardBlockProof": { - "get": { - "tags": [ - "Blocks" - ], - "summary": "Get shard block proof", - "description": "Get merkle proof of shardchain block.", - "operationId": "get_shard_block_proof_getShardBlockProof_get", - "parameters": [ - { - "description": "Block workchain id", - "required": true, - "schema": { - "type": "integer", - "title": "Workchain", - "description": "Block workchain id" - }, - "name": "workchain", - "in": "query" + "$ref": "#/components/schemas/AddressInformationResponse" + } + } + } }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ { - "description": "Block shard id", - "required": true, - "schema": { - "type": "integer", - "title": "Shard", - "description": "Block shard id" - }, - "name": "shard", - "in": "query" + "APIKeyHeader": [] }, { - "description": "Block seqno", - "required": true, - "schema": { - "type": "integer", - "title": "Seqno", - "description": "Block seqno" - }, - "name": "seqno", - "in": "query" - }, - { - "description": "Seqno of masterchain block starting from which proof is required. If not specified latest masterchain block is used.", - "required": false, - "schema": { - "type": "integer", - "title": "From Seqno", - "description": "Seqno of masterchain block starting from which proof is required. If not specified latest masterchain block is used." - }, - "name": "from_seqno", - "in": "query" + "APIKeyQuery": [] } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetShardBlockProofResponse" - }, - "examples": { - "sample": { - "summary": "Shard block proof example", - "value": { - "ok": true, - "result": { - "@type": "blocks.shardBlockProof", - "from": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 51148869, - "root_hash": "HxogBiV2YA+KrC9cJa5llfvDGNk2hwCqsaCSYo40V00=", - "file_hash": "h7LOaX0cTqc8qKecsNYi32SVu0McCito3P2qzynvdqk=" - }, - "mc_id": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 51148869, - "root_hash": "HxogBiV2YA+KrC9cJa5llfvDGNk2hwCqsaCSYo40V00=", - "file_hash": "h7LOaX0cTqc8qKecsNYi32SVu0McCito3P2qzynvdqk=" - }, - "links": [], - "mc_proof": [], - "@extra": "1755813789.6827312:12:0.9450183392434569" - } - } - } - } - } - } - }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" - } - }, - "security": [] - } - }, - "/getConsensusBlock": { - "get": { + ] + }, + "post": { "tags": [ - "Blocks" + "rpc" ], - "summary": "Get latest consensus block", - "description": "Get consensus block and its update timestamp.", - "operationId": "get_consensus_block_getConsensusBlock_get", + "summary": "Get address information", + "description": "Returns the current state of any account on the TON blockchain. Includes the balance (in nanotons), smart contract code and data (if deployed), account status, and a reference to the last transaction. This is the primary endpoint for checking if an address exists and what's deployed there.", + "operationId": "getAddressInformation_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddressInformationRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetConsensusBlockResponse" - }, - "examples": { - "sample1": { - "summary": "Consensus block example 1", - "value": { - "ok": true, - "result": { - "@type": "blocks.masterchainInfo", - "last": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 51148869, - "root_hash": "HxogBiV2YA+KrC9cJa5llfvDGNk2hwCqsaCSYo40V00=", - "file_hash": "h7LOaX0cTqc8qKecsNYi32SVu0McCito3P2qzynvdqk=" - }, - "state_root_hash": "SU9xlvY1tnXd/E06/9Ls8DOjNcCNpqf4wtJhC0+viok=", - "init": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "0", - "seqno": 0, - "root_hash": "F6OpKZKqvqeFp6CQmFomXNMfMj2EnaUSOXN+Mh+wVWk=", - "file_hash": "XplPz01CXAps5qeSWUtxcyBfdAo5zVb1N979KLSKD24=" - }, - "@extra": "1755813293.2727234:6:0.6121521629223031" - } - } - }, - "sample2": { - "summary": "Consensus block example 2", - "value": { - "ok": true, - "result": { - "@type": "blocks.masterchainInfo", - "last": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 34540013, - "root_hash": "uX5uaK8EVq90YRy3hTgdMzM2bjnXkcqcKOZJPAFv+Dk=", - "file_hash": "68Zd55gJrmESJD6MAqua4yADxYUg6zOhh8BFzl3GRrA=" - }, - "state_root_hash": "FVv5b6iHA/9IBdUtGGCAOWthmqJpwikz4J2UdcbLjEk=", - "init": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "0", - "seqno": 0, - "root_hash": "gj+B8wb/AmlPk1z1AhVI484rhrUpgSr2oSFIh56VoSg=", - "file_hash": "Z+IKwYS54DmmJmesw/nAD5DzWadnOCMzee+kdgSYDOg=" - } - }, - "@extra": "1755813463:11:25.756" - } - } - } - } - } - }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" - } - }, - "security": [] + "$ref": "#/components/schemas/AddressInformationResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/lookupBlock": { + "/api/v2/getExtendedAddressInformation": { "get": { "tags": [ - "Blocks" + "accounts" ], - "summary": "Look up block by height, LT, or timestamp", - "description": "Look up block by either *seqno*, *lt* or *unixtime*.", - "operationId": "lookup_block_lookupBlock_get", + "summary": "Get extended address information", + "description": "Returns detailed account information with parsed contract state. For wallet contracts, identifies the wallet version (v3, v4, v5) and extracts wallet-specific fields like seqno and public key. For other contracts, returns the raw state.", + "operationId": "getExtendedAddressInformation_get", "parameters": [ { - "description": "Workchain id to look up block in", - "required": true, - "schema": { - "type": "integer", - "title": "Workchain", - "description": "Workchain id to look up block in" - }, - "name": "workchain", - "in": "query" - }, - { - "description": "Shard id to look up block in", - "required": true, - "schema": { - "type": "integer", - "title": "Shard", - "description": "Shard id to look up block in" - }, - "name": "shard", - "in": "query" + "$ref": "#/components/parameters/address" }, { - "description": "Block's height", - "required": false, - "schema": { - "type": "integer", - "title": "Seqno", - "description": "Block's height" - }, - "name": "seqno", - "in": "query" + "$ref": "#/components/parameters/seqnoOptional" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedAddressInformationResponse" + } + } + } }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ { - "description": "Block's logical time", - "required": false, - "schema": { - "type": "integer", - "title": "Lt", - "description": "Block's logical time" - }, - "name": "lt", - "in": "query" + "APIKeyHeader": [] }, { - "description": "Block's unixtime", - "required": false, - "schema": { - "type": "integer", - "title": "Unixtime", - "description": "Block's unixtime" - }, - "name": "unixtime", - "in": "query" + "APIKeyQuery": [] } + ] + }, + "post": { + "tags": [ + "rpc" ], + "summary": "Get extended address information", + "description": "Returns detailed account information with parsed contract state. For wallet contracts, identifies the wallet version (v3, v4, v5) and extracts wallet-specific fields like seqno and public key. For other contracts, returns the raw state.", + "operationId": "getExtendedAddressInformation_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedAddressInformationRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LookupBlockResponse" - }, - "examples": { - "sample": { - "summary": "Lookup block example", - "value": { - "ok": true, - "result": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 51148869, - "root_hash": "HxogBiV2YA+KrC9cJa5llfvDGNk2hwCqsaCSYo40V00=", - "file_hash": "h7LOaX0cTqc8qKecsNYi32SVu0McCito3P2qzynvdqk=", - "@extra": "1755814026.5747118:7:0.2443600480097572" - } - } - } + "$ref": "#/components/schemas/ExtendedAddressInformationResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/shards": { + "/api/v2/getWalletInformation": { "get": { "tags": [ - "Blocks" + "accounts" ], - "summary": "Get shards at masterchain seqno", - "description": "Get shards information.", - "operationId": "get_shards_shards_get", + "summary": "Get wallet information", + "description": "Returns wallet-specific information for an address. If the address is a known wallet contract, returns the wallet type, current seqno (needed for sending transactions), and wallet_id. Always check `wallet: true` before using wallet-specific fields. Call this before sending any transaction to get the current seqno.", + "operationId": "getWalletInformation_get", "parameters": [ { - "description": "Masterchain seqno to fetch shards of.", - "required": true, - "schema": { - "type": "integer", - "title": "Seqno", - "description": "Masterchain seqno to fetch shards of." - }, - "name": "seqno", - "in": "query" + "$ref": "#/components/parameters/address" + }, + { + "$ref": "#/components/parameters/seqnoOptional" } ], "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShardsResponse" - }, - "examples": { - "sample": { - "summary": "Shards example", - "value": { - "ok": true, - "result": { - "@type": "blocks.shards", - "shards": [ - { - "@type": "ton.blockIdExt", - "workchain": 0, - "shard": "-9223372036854775808", - "seqno": 56262735, - "root_hash": "02rdYNPA1GWvph+2udLPvddNDvtP/nglA7Q8HR82KMk=", - "file_hash": "Ae/QaLnzAhzr2TCHJWFMb+yAg64roTKDq6qLAA7Pt58=" - } - ], - "@extra": "1755814149.1458454:3:0.786727927934394" - } - } - } - } - } - } - }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" - } - }, - "security": [] - } - }, - "/getBlockTransactions": { - "get": { - "tags": [ - "Blocks", - "Transactions" - ], - "summary": "List block transactions", - "description": "Get transactions of the given block.", - "operationId": "get_block_transactions_getBlockTransactions_get", - "parameters": [ - { - "required": true, - "schema": { - "type": "integer", - "title": "Workchain" - }, - "name": "workchain", - "in": "query" + "$ref": "#/components/schemas/WalletInformationResponse" + } + } + } }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ { - "required": true, - "schema": { - "type": "integer", - "title": "Shard" - }, - "name": "shard", - "in": "query" + "APIKeyHeader": [] }, { - "required": true, - "schema": { - "type": "integer", - "title": "Seqno" - }, - "name": "seqno", - "in": "query" + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "rpc" + ], + "summary": "Get wallet information", + "description": "Returns wallet-specific information for an address. If the address is a known wallet contract, returns the wallet type, current seqno (needed for sending transactions), and wallet_id. Always check `wallet: true` before using wallet-specific fields. Call this before sending any transaction to get the current seqno.", + "operationId": "getWalletInformation_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WalletInformationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WalletInformationResponse" + } + } + } }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ { - "required": false, - "schema": { - "type": "string", - "title": "Root Hash" - }, - "name": "root_hash", - "in": "query" + "APIKeyHeader": [] }, { - "required": false, - "schema": { - "type": "string", - "title": "File Hash" - }, - "name": "file_hash", - "in": "query" + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/getAddressBalance": { + "get": { + "tags": [ + "accounts" + ], + "summary": "Get address balance", + "description": "Returns just the TON balance of an account in nanotons. 1 TON = 1,000,000,000 nanotons. This is a lightweight alternative to getAddressInformation when you only need the balance. Returns \"0\" for addresses that don't exist yet.", + "operationId": "getAddressBalance_get", + "parameters": [ + { + "$ref": "#/components/parameters/address" }, { - "required": false, - "schema": { - "type": "integer", - "title": "After Lt" - }, - "name": "after_lt", - "in": "query" + "$ref": "#/components/parameters/seqnoOptional" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddressBalanceResponse" + } + } + } }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ { - "required": false, - "schema": { - "type": "string", - "title": "After Hash" - }, - "name": "after_hash", - "in": "query" + "APIKeyHeader": [] }, { - "required": false, - "schema": { - "type": "integer", - "title": "Count", - "default": 40 - }, - "name": "count", - "in": "query" + "APIKeyQuery": [] } + ] + }, + "post": { + "tags": [ + "rpc" ], + "summary": "Get address balance", + "description": "Returns just the TON balance of an account in nanotons. 1 TON = 1,000,000,000 nanotons. This is a lightweight alternative to getAddressInformation when you only need the balance. Returns \"0\" for addresses that don't exist yet.", + "operationId": "getAddressBalance_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddressBalanceRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetBlockTransactionsResponse" - }, - "examples": { - "sample": { - "summary": "Block transactions example (truncated)", - "value": { - "ok": true, - "result": { - "@type": "blocks.transactions", - "id": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 2, - "root_hash": "4bzgnFItQjTVEMYL9c/VHshMJttG9gDIXCzsMQdjKSU=", - "file_hash": "2gOSTo8fuMWgA18snVD1RUtTfpU5LvCQWOOQ16Z7w5Y=" - }, - "req_count": 40, - "incomplete": false, - "transactions": [ - { - "@type": "blocks.shortTxId", - "mode": 135, - "account": "-1:0000000000000000000000000000000000000000000000000000000000000000", - "lt": "2000001", - "hash": "LdAqBYfzsG3XSu0fYdYNXqkWCGZ495u/9KGf7BUQTxY=" - } - ], - "@extra": "1755814400.2039871:0:0.4571250134343233" - } - } - } - } - } - } - }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" - } - }, - "security": [] + "$ref": "#/components/schemas/AddressBalanceResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/getBlockTransactionsExt": { + "/api/v2/getAddressState": { "get": { "tags": [ - "Blocks", - "Transactions" + "accounts" ], - "summary": "List block transactions (extended details)", - "description": "Get transactions of the given block.", - "operationId": "get_block_transactions_ext_getBlockTransactionsExt_get", + "summary": "Get address state", + "description": "Returns the lifecycle state of an account. Possible values: `uninitialized` (address has no deployed contract but can receive TON), `active` (contract is deployed and working), `frozen` (contract suspended due to zero balance, send TON to unfreeze). Check this before interacting with a contract.", + "operationId": "getAddressState_get", "parameters": [ { - "required": true, - "schema": { - "type": "integer", - "title": "Workchain" - }, - "name": "workchain", - "in": "query" + "$ref": "#/components/parameters/address" }, { - "required": true, - "schema": { - "type": "integer", - "title": "Shard" - }, - "name": "shard", - "in": "query" + "$ref": "#/components/parameters/seqnoOptional" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddressStateResponse" + } + } + } }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ { - "required": true, - "schema": { - "type": "integer", - "title": "Seqno" - }, - "name": "seqno", - "in": "query" + "APIKeyHeader": [] }, { - "required": false, - "schema": { - "type": "string", - "title": "Root Hash" - }, - "name": "root_hash", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "string", - "title": "File Hash" - }, - "name": "file_hash", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "title": "After Lt" - }, - "name": "after_lt", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "string", - "title": "After Hash" - }, - "name": "after_hash", - "in": "query" - }, - { - "required": false, - "schema": { - "type": "integer", - "title": "Count", - "default": 40 - }, - "name": "count", - "in": "query" + "APIKeyQuery": [] } + ] + }, + "post": { + "tags": [ + "rpc" ], + "summary": "Get address state", + "description": "Returns the lifecycle state of an account. Possible values: `uninitialized` (address has no deployed contract but can receive TON), `active` (contract is deployed and working), `frozen` (contract suspended due to zero balance, send TON to unfreeze). Check this before interacting with a contract.", + "operationId": "getAddressState_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddressStateRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetBlockTransactionsExtResponse" - }, - "examples": { - "sample": { - "summary": "Extended block transactions example (truncated)", - "value": { - "ok": true, - "result": { - "@type": "blocks.transactionsExt", - "id": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 1, - "root_hash": "8GYhhrigd8CwZGrRT59iulLDcgiTYuvOAzFJxugc0Ts=", - "file_hash": "V+XzykEwun4yePZhAEPZk77RbMfMOgS/S4GiJkSKY6s=" - }, - "req_count": 40, - "incomplete": false, - "transactions": [ - { - "@type": "raw.transaction", - "address": { - "@type": "accountAddress", - "account_address": "Ef8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAU" - }, - "utime": 1573822385, - "data": "te6cckECCAEAASUAA69w...", - "transaction_id": { - "@type": "internal.transactionId", - "lt": "1000001", - "hash": "50ctdvRx74CQ4/JW5ziragzoKzYhgxCTjPtrtjD61TU=" - }, - "fee": "0", - "storage_fee": "0", - "other_fee": "0", - "in_msg": { - "@type": "raw.message", - "hash": "5sUeIdwmkqF4ye2/w904xrE2H+Kcg66mZZqT0Dlab8o=", - "source": { - "@type": "accountAddress", - "account_address": "Ef8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAU" - }, - "destination": { - "@type": "accountAddress", - "account_address": "Ef8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAU" - }, - "value": "0", - "extra_currencies": [ - { - "@type": "extraCurrency", - "id": 239, - "amount": "666666666666" - }, - { - "@type": "extraCurrency", - "id": -17, - "amount": "1000000000000" - } - ], - "fwd_fee": "0", - "ihr_fee": "0", - "created_lt": "1000000", - "body_hash": "lqKW0iTyhcZ77pPDD4owkVfw2qNdxbh+QQt4YwoJz8c=", - "msg_data": { - "@type": "msg.dataRaw", - "body": "te6cckEBAQEAAgAAAEysuc0=", - "init_state": "" - } - }, - "out_msgs": [], - "account": "-1:0000000000000000000000000000000000000000000000000000000000000000" - } - ], - "@extra": "1755814593.0613906:1:0.8158701007745434" - } - } - } - } - } - } - }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" - } - }, - "security": [] - } - }, - "/getBlockHeader": { - "get": { - "tags": [ - "Blocks" - ], - "summary": "Get block header metadata", - "description": "Get metadata of a given block.", - "operationId": "get_block_header_getBlockHeader_get", - "parameters": [ - { - "required": true, - "schema": { - "type": "integer", - "title": "Workchain" - }, - "name": "workchain", - "in": "query" - }, - { - "required": true, - "schema": { - "type": "integer", - "title": "Shard" - }, - "name": "shard", - "in": "query" - }, - { - "required": true, - "schema": { - "type": "integer", - "title": "Seqno" - }, - "name": "seqno", - "in": "query" + "$ref": "#/components/schemas/AddressStateResponse" + } + } + } }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ { - "required": false, - "schema": { - "type": "string", - "title": "Root Hash" - }, - "name": "root_hash", - "in": "query" + "APIKeyHeader": [] }, { - "required": false, - "schema": { - "type": "string", - "title": "File Hash" - }, - "name": "file_hash", - "in": "query" + "APIKeyQuery": [] } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBlockHeaderResponse" - }, - "examples": { - "sample": { - "summary": "Block header example", - "value": { - "ok": true, - "result": { - "@type": "blocks.header", - "id": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 1, - "root_hash": "8GYhhrigd8CwZGrRT59iulLDcgiTYuvOAzFJxugc0Ts=", - "file_hash": "V+XzykEwun4yePZhAEPZk77RbMfMOgS/S4GiJkSKY6s=" - }, - "global_id": -239, - "version": 0, - "after_merge": false, - "after_split": false, - "before_split": false, - "want_merge": false, - "want_split": false, - "validator_list_hash_short": -1447544682, - "catchain_seqno": 0, - "min_ref_mc_seqno": 1, - "is_key_block": false, - "prev_key_block_seqno": 0, - "start_lt": "1000000", - "end_lt": "1000012", - "gen_utime": 1573822385, - "prev_blocks": [ - { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 0, - "root_hash": "F6OpKZKqvqeFp6CQmFomXNMfMj2EnaUSOXN+Mh+wVWk=", - "file_hash": "XplPz01CXAps5qeSWUtxcyBfdAo5zVb1N979KLSKD24=" - } - ], - "@extra": "1755814930.1088252:0:0.1467032130574265" - } - } - } - } - } - } - }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" - } - }, - "security": [] + ] } }, - "/getConfigParam": { + "/api/v2/getTokenData": { "get": { "tags": [ - "Config" + "accounts" ], - "summary": "Get single config parameter", - "description": "Get config by id.", - "operationId": "get_config_param_getConfigParam_get", + "summary": "Get token data", + "description": "Returns metadata for Jetton or NFT contracts. Automatically detects the contract type and returns appropriate fields. For Jetton masters: total supply, admin, metadata. For Jetton wallets: balance, owner. For NFT items: collection, owner, content. For NFT collections: item count, metadata.", + "operationId": "getTokenData_get", "parameters": [ { - "description": "Config id", - "required": true, - "schema": { - "type": "integer", - "title": "Config Id", - "description": "Config id" - }, - "name": "config_id", - "in": "query" - }, - { - "description": "Masterchain seqno. If not specified, latest blockchain state will be used.", - "required": false, - "schema": { - "type": "integer", - "title": "Seqno", - "description": "Masterchain seqno. If not specified, latest blockchain state will be used." - }, - "name": "seqno", - "in": "query" + "$ref": "#/components/parameters/address" } ], "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetConfigParamResponse" - }, - "examples": { - "sample1": { - "summary": "Config param example 1", - "value": { - "ok": true, - "result": { - "@type": "configInfo", - "config": { - "@type": "tvm.cell", - "bytes": "te6cckEBAQEAIgAAQFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV+A4W5w==" - }, - "@extra": "1755815155.2328486:7:0.49669713612622723" - } - } - }, - "sample2": { - "summary": "Config param example 2", - "value": { - "ok": true, - "result": { - "@type": "configInfo", - "config": { - "@type": "tvm.cell", - "bytes": "te6cckEBAQEAHgAAN3ARDZMW7AAHI4byb8EAAIAQp0GkYngAAAAwAAhFxfKI" - }, - "@extra": "1755815171.7872128:2:0.12302096281892438" - } - } - } - } - } - } - }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" - } - }, - "security": [] - } - }, - "/getConfigAll": { - "get": { - "tags": [ - "Config" - ], - "summary": "Get all config parameters", - "description": "Get cell with full config.", - "operationId": "get_config_all_getConfigAll_get", - "parameters": [ + "$ref": "#/components/schemas/TokenDataResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ { - "description": "Masterchain seqno. If not specified, latest blockchain state will be used.", - "required": false, - "schema": { - "type": "integer", - "title": "Seqno", - "description": "Masterchain seqno. If not specified, latest blockchain state will be used." - }, - "name": "seqno", - "in": "query" + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] } + ] + }, + "post": { + "tags": [ + "rpc" ], + "summary": "Get token data", + "description": "Returns metadata for Jetton or NFT contracts. Automatically detects the contract type and returns appropriate fields. For Jetton masters: total supply, admin, metadata. For Jetton wallets: balance, owner. For NFT items: collection, owner, content. For NFT collections: item count, metadata.", + "operationId": "getTokenData_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenDataRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetConfigAllResponse" - }, - "examples": { - "sample": { - "summary": "All config parameters example", - "value": { - "ok": true, - "result": { - "@type": "configInfo", - "config": { - "@type": "tvm.cell", - "bytes": "te6cckIDB4wAAQAAARdQAAAACASAAAQAgLgYAAAAAgAAAAAAAQAAAAA=" - }, - "@extra": "1755815324.351419:11:0.2985065689610278" - } - } - } + "$ref": "#/components/schemas/TokenDataResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/getLibraries": { + "/api/v2/getMasterchainInfo": { "get": { "tags": [ - "Blocks" - ], - "summary": "Get smart contract libraries", - "description": "Get libraries codes.", - "operationId": "get_libraries_getLibraries_get", - "parameters": [ - { - "description": "List of base64 encoded libraries hashes", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "title": "Libraries", - "description": "List of base64 encoded libraries hashes" - }, - "name": "libraries", - "in": "query" - } + "blocks" ], + "summary": "Get masterchain info", + "description": "Returns the current state of the TON masterchain. The `last` field contains the latest block, which you'll need for querying current state. The seqno in `last` is the current block height. Call this first to get the latest block reference for other queries.", + "operationId": "getMasterchainInfo_get", + "parameters": [], "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "ok": { - "type": "boolean" - }, - "result": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "example": "smc.libraryResult" - }, - "result": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "example": "smc.libraryEntry" - }, - "hash": { - "type": "string", - "example": "RZuqu83SGYHpN7D/5z+dUoN/hO08EXrRJg1TXsFigAo=" - }, - "data": { - "type": "string", - "description": "Base64-encoded library data" - } - } - } - }, - "@extra": { - "type": "string", - "example": "1758735556.956807:1:0.731451399868406" - } - } - } - }, - "required": ["ok", "result"] - }, - "examples": { - "sample": { - "summary": "Example response", - "value": { - "ok": true, - "result": { - "@type": "smc.libraryResult", - "result": [ - { - "@type": "smc.libraryEntry", - "hash": "RZuqu83SGYHpN7D/5z+dUoN/hO08EXrRJg1TXsFigAo=", - "data": "te6ccgECDQEAA4kAART/APSkE/..." - } - ], - "@extra": "1758735556.956807:1:0.731451399868406" - } - } - } + "$ref": "#/components/schemas/MasterchainInfoResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] - } - }, - "/getOutMsgQueueSizes": { - "get": { + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { "tags": [ - "Blocks" + "rpc" ], - "summary": "Get outgoing message queue sizes", - "description": "Get info with current sizes of messages queues by shards.", - "operationId": "get_out_msg_queue_sizes_getOutMsgQueueSizes_get", + "summary": "Get masterchain info", + "description": "Returns the current state of the TON masterchain. The `last` field contains the latest block, which you'll need for querying current state. The seqno in `last` is the current block height. Call this first to get the latest block reference for other queries.", + "operationId": "getMasterchainInfo_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MasterchainInfoRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetOutMsgQueueSizesResponse" - }, - "examples": { - "sample": { - "summary": "Outgoing message queue sizes example", - "value": { - "ok": true, - "result": { - "@type": "blocks.outMsgQueueSizes", - "shards": [ - { - "@type": "blocks.outMsgQueueSize", - "id": { - "@type": "ton.blockIdExt", - "workchain": -1, - "shard": "-9223372036854775808", - "seqno": 51149550, - "root_hash": "aa5DrbypWLx+3hICy5IOusAsMB8LA+JY41tjUtlYVhQ=", - "file_hash": "Yd96kDamNL490591/O2unVWv9FUrkANnso8ZMwEHtqU=" - }, - "size": 0 - }, - { - "@type": "blocks.outMsgQueueSize", - "id": { - "@type": "ton.blockIdExt", - "workchain": 0, - "shard": "-9223372036854775808", - "seqno": 56263368, - "root_hash": "jdalpRwHiguMp1Vxij4gWAkdzeIN56M0mfrjb9tVvmY=", - "file_hash": "/j8B/o8axBw0DZOlv1WGqvPh/KgJFeV8S4p3Ai2EDzQ=" - }, - "size": 0 - } - ], - "ext_msg_queue_size_limit": 8000, - "@extra": "1755815024.4620872:9:0.8277963175010491" - } - } - } - } - } - } - }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" - } - }, - "security": [] + "$ref": "#/components/schemas/MasterchainInfoResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/getTokenData": { + "/api/v2/getMasterchainBlockSignatures": { "get": { "tags": [ - "Accounts" + "blocks" ], - "summary": "Get NFT or Jetton metadata", - "description": "Get NFT or Jetton information.", - "operationId": "get_token_data_getTokenData_get", + "summary": "Get masterchain block signatures", + "description": "Returns validator signatures for a specific masterchain block. Each signature proves that a validator approved this block. Use this for building cryptographic proofs or verifying block authenticity in trustless applications.", + "operationId": "getMasterchainBlockSignatures_get", "parameters": [ { - "description": "Address of NFT collection/item or Jetton master/wallet smart contract", - "required": true, - "schema": { - "type": "string", - "title": "Address", - "description": "Address of NFT collection/item or Jetton master/wallet smart contract" - }, - "name": "address", - "in": "query" + "$ref": "#/components/parameters/seqno" } ], "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetTokenDataResponse" - }, - "examples": { - "sample": { - "summary": "Example", - "value": { - "ok": true, - "result": { - "@type": "nft.item", - "init": true, - "index": 123, - "owner_address": "EQ...", - "collection_address": "EQ...", - "content": { - "uri": "ipfs://..." - }, - "metadata": { - "name": "Example NFT", - "image": "ipfs://..." - } - } - } - } - } - } - } - }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" - } - }, - "security": [] - } - }, - "/tryLocateTx": { - "get": { - "tags": [ - "Transactions" - ], - "summary": "Locate transaction by incoming message", - "description": "Locate outcoming transaction of *destination* address by incoming message.", - "operationId": "get_try_locate_tx_tryLocateTx_get", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Source" - }, - "name": "source", - "in": "query" + "$ref": "#/components/schemas/MasterchainBlockSignaturesResponse" + } + } + } }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ { - "required": true, - "schema": { - "type": "string", - "title": "Destination" - }, - "name": "destination", - "in": "query" + "APIKeyHeader": [] }, { - "required": true, - "schema": { - "type": "integer", - "title": "Created Lt" - }, - "name": "created_lt", - "in": "query" + "APIKeyQuery": [] } + ] + }, + "post": { + "tags": [ + "rpc" ], + "summary": "Get masterchain block signatures", + "description": "Returns validator signatures for a specific masterchain block. Each signature proves that a validator approved this block. Use this for building cryptographic proofs or verifying block authenticity in trustless applications.", + "operationId": "getMasterchainBlockSignatures_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MasterchainBlockSignaturesRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TonResponse" + "$ref": "#/components/schemas/MasterchainBlockSignaturesResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/tryLocateResultTx": { + "/api/v2/getShardBlockProof": { "get": { "tags": [ - "Transactions" + "blocks" ], - "summary": "Locate result transaction by incoming message", - "description": "Same as previous. Locate outcoming transaction of *destination* address by incoming message", - "operationId": "get_try_locate_result_tx_tryLocateResultTx_get", + "summary": "Get shard block proof", + "description": "Returns a Merkle proof that links a shardchain block to a masterchain block. This proof cryptographically verifies that the shard block is part of the canonical chain. Essential for light clients and cross-chain bridges that need to verify shard data without trusting the API.", + "operationId": "getShardBlockProof_get", "parameters": [ { - "required": true, - "schema": { - "type": "string", - "title": "Source" - }, - "name": "source", - "in": "query" + "$ref": "#/components/parameters/workchain" }, { - "required": true, - "schema": { - "type": "string", - "title": "Destination" - }, - "name": "destination", - "in": "query" + "$ref": "#/components/parameters/shard" }, { - "required": true, + "$ref": "#/components/parameters/seqno" + }, + { + "name": "from_seqno", + "in": "query", + "description": "Seqno of masterchain block starting from which proof is required. If not specified latest masterchain block is used", + "required": false, "schema": { "type": "integer", - "title": "Created Lt" - }, - "name": "created_lt", - "in": "query" + "format": "int32" + } } ], "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TonResponse" + "$ref": "#/components/schemas/ShardBlockProofResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] - } - }, - "/tryLocateSourceTx": { - "get": { - "tags": [ - "Transactions" - ], - "summary": "Locate source transaction by outgoing message", - "description": "Locate incoming transaction of *source* address by outcoming message.", - "operationId": "get_try_locate_source_tx_tryLocateSourceTx_get", - "parameters": [ - { - "required": true, - "schema": { - "type": "string", - "title": "Source" - }, - "name": "source", - "in": "query" - }, + "security": [ { - "required": true, - "schema": { - "type": "string", - "title": "Destination" - }, - "name": "destination", - "in": "query" + "APIKeyHeader": [] }, { - "required": true, - "schema": { - "type": "integer", - "title": "Created Lt" - }, - "name": "created_lt", - "in": "query" + "APIKeyQuery": [] } + ] + }, + "post": { + "tags": [ + "rpc" ], + "summary": "Get shard block proof", + "description": "Returns a Merkle proof that links a shardchain block to a masterchain block. This proof cryptographically verifies that the shard block is part of the canonical chain. Essential for light clients and cross-chain bridges that need to verify shard data without trusting the API.", + "operationId": "getShardBlockProof_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShardBlockProofRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TonResponse" + "$ref": "#/components/schemas/ShardBlockProofResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/detectAddress": { + "/api/v2/getConsensusBlock": { "get": { "tags": [ - "Accounts" - ], - "summary": "Detect all address formats", - "description": "Get all possible address forms.", - "operationId": "detect_address_detectAddress_get", - "parameters": [ - { - "description": "Identifier of target TON account in any form.", - "required": true, - "schema": { - "type": "string", - "title": "Address", - "description": "Identifier of target TON account in any form." - }, - "name": "address", - "in": "query" - } + "blocks" ], + "summary": "Get consensus block", + "description": "Returns the latest block that has reached consensus. Unlike the latest block from getMasterchainInfo, this block is guaranteed to be final and will never be reverted. Use this when you need absolute certainty that a transaction is permanent.", + "operationId": "getConsensusBlock_get", + "parameters": [], "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DetectAddressResponse" - }, - "examples": { - "sample": { - "summary": "Example", - "value": { - "ok": true, - "result": { - "raw_form": "0:83DF...31A8", - "bounceable": "EQCD39VS5jcptHL8v...", - "non_bounceable": "UQCD39VS5jcptHL8v..." - } - } - } + "$ref": "#/components/schemas/ConsensusBlockResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] - } - }, - "/sendBoc": { + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, "post": { "tags": [ - "Messages and transactions" + "rpc" ], - "summary": "Send external message (BoC)", - "description": "Send serialized BoC file: fully packed and serialized external message to blockchain.", - "operationId": "send_boc_sendBoc_post", + "summary": "Get consensus block", + "description": "Returns the latest block that has reached consensus. Unlike the latest block from getMasterchainInfo, this block is guaranteed to be final and will never be reverted. Use this when you need absolute certainty that a transaction is permanent.", + "operationId": "getConsensusBlock_post", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Body_send_boc_sendBoc_post" + "$ref": "#/components/schemas/ConsensusBlockRequest" } } }, @@ -2114,38 +1165,104 @@ }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TonResponse" + "$ref": "#/components/schemas/ConsensusBlockResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/sendBocReturnHash": { + "/api/v2/lookupBlock": { + "get": { + "tags": [ + "blocks" + ], + "summary": "Lookup block", + "description": "Finds a block by position or time. Specify workchain and shard, then provide either: seqno (exact block number), lt (find block containing this logical time), or unixtime (find block closest to this timestamp). Returns the full block ID including hashes needed for verification.", + "operationId": "lookupBlock_get", + "parameters": [ + { + "$ref": "#/components/parameters/workchain" + }, + { + "$ref": "#/components/parameters/shard" + }, + { + "$ref": "#/components/parameters/seqnoOptional" + }, + { + "name": "lt", + "in": "query", + "description": "Logical time of a block", + "required": false, + "schema": { + "type": "string", + "x-usrv-cpp-format": "std::int64_t" + } + }, + { + "name": "unixtime", + "in": "query", + "description": "UNIX timestamp of a block", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LookupBlockResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, "post": { "tags": [ - "Messages and transactions" + "rpc" ], - "summary": "Send external message and return hash", - "description": "Send serialized BoC file: fully packed and serialized external message to blockchain. The method returns message hash.", - "operationId": "send_boc_return_hash_sendBocReturnHash_post", + "summary": "Lookup block", + "description": "Finds a block by position or time. Specify workchain and shard, then provide either: seqno (exact block number), lt (find block containing this logical time), or unixtime (find block closest to this timestamp). Returns the full block ID including hashes needed for verification.", + "operationId": "lookupBlock_post", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Body_send_boc_return_hash_sendBocReturnHash_post" + "$ref": "#/components/schemas/LookupBlockRequest" } } }, @@ -2153,38 +1270,79 @@ }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TonResponse" + "$ref": "#/components/schemas/LookupBlockResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/sendQuery": { + "/api/v2/getShards": { + "get": { + "tags": [ + "blocks" + ], + "summary": "Get Shards", + "description": "Get shards information by given masterchain block seqno", + "operationId": "getShards_get", + "parameters": [ + { + "$ref": "#/components/parameters/seqno", + "description": "Seqno of masterchain block" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TonlibResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, "post": { "tags": [ - "Messages and transactions" + "rpc" ], - "summary": "Send unpacked external query", - "description": "Send query - unpacked external message. This method takes address, body and init-params (if any), packs it to external message and sends to network. All params should be BoC-serialized.", - "operationId": "send_query_sendQuery_post", + "summary": "Get Shards", + "description": "Get shards information", + "operationId": "getShards_post", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Body_send_query_sendQuery_post" + "$ref": "#/components/schemas/ShardsRequest" } } }, @@ -2192,38 +1350,90 @@ }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TonResponse" + "$ref": "#/components/schemas/TonlibResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/estimateFee": { + "/api/v2/getBlockHeader": { + "get": { + "tags": [ + "blocks" + ], + "summary": "Get block header", + "description": "Returns block metadata without the full transaction list. Includes timestamps, validator info, and references to previous blocks. Use this for block explorers or when you need block info but not the transactions inside.", + "operationId": "getBlockHeader_get", + "parameters": [ + { + "$ref": "#/components/parameters/workchain" + }, + { + "$ref": "#/components/parameters/shard" + }, + { + "$ref": "#/components/parameters/seqno" + }, + { + "$ref": "#/components/parameters/rootHashOptional" + }, + { + "$ref": "#/components/parameters/fileHashOptional" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlockHeaderResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, "post": { "tags": [ - "Messages and transactions" + "rpc" ], - "summary": "Estimate transaction fees", - "description": "Estimate fees required for query processing. *body*, *init-code* and *init-data* accepted in serialized format (b64-encoded).", - "operationId": "estimate_fee_estimateFee_post", + "summary": "Get block header", + "description": "Returns block metadata without the full transaction list. Includes timestamps, validator info, and references to previous blocks. Use this for block explorers or when you need block info but not the transactions inside.", + "operationId": "getBlockHeader_post", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Body_estimate_fee_estimateFee_post" + "$ref": "#/components/schemas/BlockHeaderRequest" } } }, @@ -2231,38 +1441,73 @@ }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TonResponse" + "$ref": "#/components/schemas/BlockHeaderResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/runGetMethod": { + "/api/v2/getOutMsgQueueSize": { + "get": { + "tags": [ + "blocks" + ], + "summary": "Get outbound message queue size", + "description": "Returns the current size of the outbound message queue for each shard. A growing queue indicates network congestion. If the queue is large, your transactions may take longer to process. Monitor this to detect network issues.", + "operationId": "getOutMsgQueueSize_get", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OutMsgQueueSizeResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, "post": { "tags": [ - "Smart contracts" + "rpc" ], - "summary": "Run get-method on contract", - "description": "Run get method on smart contract.", - "operationId": "run_get_method_runGetMethod_post", + "summary": "Get outbound message queue size", + "description": "Returns the current size of the outbound message queue for each shard. A growing queue indicates network congestion. If the queue is large, your transactions may take longer to process. Monitor this to detect network issues.", + "operationId": "getOutMsgQueueSize_post", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Body_run_get_method_runGetMethod_post" + "$ref": "#/components/schemas/OutMsgQueueSizeRequest" } } }, @@ -2270,38 +1515,99 @@ }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TonResponse" + "$ref": "#/components/schemas/OutMsgQueueSizeResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] } }, - "/jsonRPC": { + "/api/v2/getBlockTransactions": { + "get": { + "tags": [ + "transactions" + ], + "summary": "Get block transactions", + "description": "Returns a summary of transactions in a specific block. Each item contains the account address and transaction ID, but not full transaction details. Use `count` to limit results and `after_lt`/`after_hash` for pagination. Call getTransactions with each transaction ID to get full details.", + "operationId": "getBlockTransactions_get", + "parameters": [ + { + "$ref": "#/components/parameters/workchain" + }, + { + "$ref": "#/components/parameters/shard" + }, + { + "$ref": "#/components/parameters/seqno" + }, + { + "$ref": "#/components/parameters/rootHashOptional" + }, + { + "$ref": "#/components/parameters/fileHashOptional" + }, + { + "$ref": "#/components/parameters/afterLtOptional" + }, + { + "$ref": "#/components/parameters/afterAccountHashOptional" + }, + { + "$ref": "#/components/parameters/countOptional" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlockTransactionsResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, "post": { "tags": [ - "JSON-RPC" + "rpc" ], - "summary": "JSON-RPC handler", - "description": "All methods in the API are available through JSON-RPC protocol ([spec](https://www.jsonrpc.org/specification)).", - "operationId": "jsonrpc_handler_jsonRPC_post", + "summary": "Get block transactions", + "description": "Returns a summary of transactions in a specific block. Each item contains the account address and transaction ID, but not full transaction details. Use `count` to limit results and `after_lt`/`after_hash` for pagination. Call getTransactions with each transaction ID to get full details.", + "operationId": "getBlockTransactions_post", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TonRequestJsonRPC" + "$ref": "#/components/schemas/BlockTransactionsRequest" } } }, @@ -2309,1464 +1615,6445 @@ }, "responses": { "200": { - "description": "Successful Response", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeprecatedTonResponseJsonRPC" + "$ref": "#/components/schemas/BlockTransactionsResponse" } } } }, - "422": { - "description": "Validation Error" - }, - "504": { - "description": "Lite Server Timeout" + "default": { + "$ref": "#/components/responses/default" } }, - "security": [] - } - } - }, - "components": { - "schemas": { - "Body_estimate_fee_estimateFee_post": { - "properties": { - "address": { - "type": "string", - "title": "Address", - "description": "Address in any format" + "security": [ + { + "APIKeyHeader": [] }, - "body": { + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/getBlockTransactionsExt": { + "get": { + "tags": [ + "transactions" + ], + "summary": "Get block transactions (extended)", + "description": "Returns full transaction details for all transactions in a block. Unlike getBlockTransactions, this includes complete transaction data with messages, fees, and state changes. Useful for block explorers and indexers that need to process entire blocks.", + "operationId": "getBlockTransactionsExt_get", + "parameters": [ + { + "$ref": "#/components/parameters/workchain" + }, + { + "$ref": "#/components/parameters/shard" + }, + { + "$ref": "#/components/parameters/seqno" + }, + { + "$ref": "#/components/parameters/rootHashOptional" + }, + { + "$ref": "#/components/parameters/fileHashOptional" + }, + { + "$ref": "#/components/parameters/afterLtOptional" + }, + { + "$ref": "#/components/parameters/afterAccountHashOptional" + }, + { + "$ref": "#/components/parameters/countOptional" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlockTransactionsExtResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "rpc" + ], + "summary": "Get block transactions (extended)", + "description": "Returns full transaction details for all transactions in a block. Unlike getBlockTransactions, this includes complete transaction data with messages, fees, and state changes. Useful for block explorers and indexers that need to process entire blocks.", + "operationId": "getBlockTransactionsExt_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlockTransactionsExtRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlockTransactionsExtResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/getTransactions": { + "get": { + "tags": [ + "transactions" + ], + "summary": "Get transactions", + "description": "Returns transaction history for an account. Transactions are returned newest-first. Each transaction shows the incoming message that triggered it, all outgoing messages, and fees paid. For pagination: use the `lt` and `hash` from the oldest transaction as the starting point for the next request.", + "operationId": "getTransactions_get", + "parameters": [ + { + "$ref": "#/components/parameters/address" + }, + { + "$ref": "#/components/parameters/limitOptional" + }, + { + "$ref": "#/components/parameters/ltOptional" + }, + { + "$ref": "#/components/parameters/hashOptional", + "description": "Transaction hash to start from" + }, + { + "$ref": "#/components/parameters/toLtOptional" + }, + { + "$ref": "#/components/parameters/archivalOptional" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionsResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "rpc" + ], + "summary": "Get transactions", + "description": "Returns transaction history for an account. Transactions are returned newest-first. Each transaction shows the incoming message that triggered it, all outgoing messages, and fees paid. For pagination: use the `lt` and `hash` from the oldest transaction as the starting point for the next request.", + "operationId": "getTransactions_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionsResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/getTransactionsStd": { + "get": { + "tags": [ + "transactions" + ], + "summary": "Get Transactions Std", + "description": "Standardized version of getTransactions", + "operationId": "getTransactionsStd_get", + "parameters": [ + { + "$ref": "#/components/parameters/address" + }, + { + "$ref": "#/components/parameters/limitOptional" + }, + { + "$ref": "#/components/parameters/ltOptional" + }, + { + "$ref": "#/components/parameters/hashOptional", + "description": "Transaction hash to start from" + }, + { + "$ref": "#/components/parameters/toLtOptional" + }, + { + "$ref": "#/components/parameters/archivalOptional" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TonlibResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "rpc" + ], + "summary": "Get Transactions Std", + "description": "Standardized version of getTransactions", + "operationId": "getTransactionsStd_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionsStdRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TonlibResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/tryLocateTx": { + "get": { + "tags": [ + "transactions" + ], + "summary": "Try locate transaction", + "description": "Finds a transaction by message parameters. Given a source address, destination address, and message creation time (created_lt), returns the transaction that processed this message. Useful when you sent a message and need to find when it was executed.", + "operationId": "tryLocateTx_get", + "parameters": [ + { + "$ref": "#/components/parameters/sourceAddress" + }, + { + "$ref": "#/components/parameters/destinationAddress" + }, + { + "$ref": "#/components/parameters/createdLt" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocateTxResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "rpc" + ], + "summary": "Try locate transaction", + "description": "Finds a transaction by message parameters. Given a source address, destination address, and message creation time (created_lt), returns the transaction that processed this message. Useful when you sent a message and need to find when it was executed.", + "operationId": "tryLocateTx_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TryLocateTxRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocateTxResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/tryLocateResultTx": { + "get": { + "tags": [ + "transactions" + ], + "summary": "Try locate result transaction", + "description": "Finds the transaction that received a specific message. Given message parameters, returns the transaction on the destination account that processed the incoming message. Use this to trace message delivery across accounts.", + "operationId": "tryLocateResultTx_get", + "parameters": [ + { + "$ref": "#/components/parameters/sourceAddress" + }, + { + "$ref": "#/components/parameters/destinationAddress" + }, + { + "$ref": "#/components/parameters/createdLt" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocateResultTxResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "rpc" + ], + "summary": "Try locate result transaction", + "description": "Finds the transaction that received a specific message. Given message parameters, returns the transaction on the destination account that processed the incoming message. Use this to trace message delivery across accounts.", + "operationId": "tryLocateResultTx_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TryLocateResultTxRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocateResultTxResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/tryLocateSourceTx": { + "get": { + "tags": [ + "transactions" + ], + "summary": "Try locate source transaction", + "description": "Finds the transaction that sent a specific message. Given message parameters, returns the transaction on the source account that created this outgoing message. Use this to trace where a message originated from.", + "operationId": "tryLocateSourceTx_get", + "parameters": [ + { + "$ref": "#/components/parameters/sourceAddress" + }, + { + "$ref": "#/components/parameters/destinationAddress" + }, + { + "$ref": "#/components/parameters/createdLt" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocateSourceTxResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "rpc" + ], + "summary": "Try locate source transaction", + "description": "Finds the transaction that sent a specific message. Given message parameters, returns the transaction on the source account that created this outgoing message. Use this to trace where a message originated from.", + "operationId": "tryLocateSourceTx_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TryLocateSourceTxRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocateSourceTxResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/getConfigParam": { + "get": { + "tags": [ + "configuration" + ], + "summary": "Get config parameter", + "description": "Returns a specific blockchain configuration parameter. TON stores all network settings on-chain as numbered parameters. Common ones: 0 (config contract), 1 (elector), 15 (election timing), 17 (stake limits), 20-21 (gas prices), 34 (current validators). Check TON documentation for the full list.", + "operationId": "getConfigParam_get", + "parameters": [ + { + "name": "config_id", + "in": "query", + "description": "Parameter number", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "seqno", + "in": "query", + "description": "Block seqno", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigParamResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "rpc" + ], + "summary": "Get config parameter", + "description": "Returns a specific blockchain configuration parameter. TON stores all network settings on-chain as numbered parameters. Common ones: 0 (config contract), 1 (elector), 15 (election timing), 17 (stake limits), 20-21 (gas prices), 34 (current validators). Check TON documentation for the full list.", + "operationId": "getConfigParam_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigParamRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigParamResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/getConfigAll": { + "get": { + "tags": [ + "configuration" + ], + "summary": "Get all config parameters", + "description": "Returns all blockchain configuration parameters at once. Includes gas prices, validator settings, workchain configs, and governance rules. Use the optional seqno to get historical configuration at a specific block height.", + "operationId": "getConfigAll_get", + "parameters": [ + { + "name": "seqno", + "in": "query", + "description": "Block seqno", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigAllResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "rpc" + ], + "summary": "Get all config parameters", + "description": "Returns all blockchain configuration parameters at once. Includes gas prices, validator settings, workchain configs, and governance rules. Use the optional seqno to get historical configuration at a specific block height.", + "operationId": "getConfigAll_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigAllRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigAllResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/getLibraries": { + "get": { + "tags": [ + "configuration" + ], + "summary": "Get libraries", + "description": "Returns smart contract library code by hash. Some contracts reference shared libraries instead of including all code directly. When you encounter a library reference in contract code, use this endpoint to fetch the actual library implementation.", + "operationId": "getLibraries_get", + "parameters": [ + { + "name": "libraries", + "in": "query", + "description": "Hashes of libraries", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "#/components/schemas/TonHash" + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LibrariesResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + }, + "post": { + "tags": [ + "rpc" + ], + "summary": "Get libraries", + "description": "Returns smart contract library code by hash. Some contracts reference shared libraries instead of including all code directly. When you encounter a library reference in contract code, use this endpoint to fetch the actual library implementation.", + "operationId": "getLibraries_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LibrariesRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LibrariesResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/runGetMethod": { + "post": { + "tags": [ + "run method", + "rpc" + ], + "summary": "Run get method", + "description": "Executes a read-only method on a smart contract. Get methods let you query contract state without sending a transaction. Common methods: `seqno` (wallet sequence number), `get_wallet_data` (wallet info), `get_jetton_data` (token info). Pass method arguments in the `stack` array.", + "operationId": "runGetMethod_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunGetMethodRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunGetMethodResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/runGetMethodStd": { + "post": { + "tags": [ + "run method", + "rpc" + ], + "summary": "Run get method (standard)", + "description": "Executes a get method with typed stack entries. Unlike runGetMethod which uses arrays, this endpoint uses explicit types (TvmStackEntryNumber, TvmStackEntryCell, etc.) for clearer input/output handling. Recommended for complex method calls.", + "operationId": "runGetMethodStd_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunGetMethodStdRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunGetMethodStdResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/sendBoc": { + "post": { + "tags": [ + "send", + "rpc" + ], + "summary": "Send BOC", + "description": "Broadcasts a signed message to the TON network. The `boc` parameter must contain a complete, signed external message in base64 format. The API validates the message and forwards it to validators. Returns immediately after acceptance; use getTransactions to confirm the transaction was processed.", + "operationId": "sendBoc_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendBocRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendBocResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/sendBocReturnHash": { + "post": { + "tags": [ + "send", + "rpc" + ], + "summary": "Send BOC (return hash)", + "description": "Broadcasts a signed message and returns its hash. Same as sendBoc, but also returns the message hash which you can use to track the message status. Use tryLocateTx with this hash to find when the message was processed.", + "operationId": "sendBocReturnHash_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendBocRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendBocReturnHashResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + }, + "/api/v2/estimateFee": { + "post": { + "tags": [ + "send", + "rpc" + ], + "summary": "Estimate fee", + "description": "Calculates the fees required to send a message. Provide the destination address and message body. For new contract deployments, also include init_code and init_data. Set ignore_chksig to true since you're estimating before signing. Returns a breakdown of storage, gas, and forwarding fees.", + "operationId": "estimateFee_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EstimateFeeRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EstimateFeeResponse" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "APIKeyHeader": [] + }, + { + "APIKeyQuery": [] + } + ] + } + } + }, + "tags": [ + { + "name": "Utils", + "description": "Some useful methods" + }, + { + "name": "accounts", + "description": "Information about accounts" + }, + { + "name": "blocks", + "description": "Information about blocks" + }, + { + "name": "transactions", + "description": "Fetching and locating transactions" + }, + { + "name": "configuration", + "description": "Information about blockchain config" + }, + { + "name": "run method", + "description": "Run get-method of smart contracts" + }, + { + "name": "send", + "description": "Send data to blockchain" + }, + { + "name": "rpc", + "description": "JSON-RPC and POST endpoints" + } + ], + "components": { + "parameters": { + "address": { + "name": "address", + "in": "query", + "description": "The account address to query. You can use any format: raw (0:abcd), base64 (EQ), or base64url (UQ). The API automatically detects and converts the format.", + "required": true, + "schema": { + "$ref": "#/components/schemas/TonAddr" + } + }, + "hash": { + "name": "hash", + "in": "query", + "description": "A 256-bit hash in hex (64 chars) or base64 (44 chars) format. Used to identify blocks, transactions, and messages uniquely.", + "required": true, + "schema": { + "$ref": "#/components/schemas/TonHash" + } + }, + "hashOptional": { + "name": "hash", + "in": "query", + "description": "A 256-bit hash in hex (64 chars) or base64 (44 chars) format. Used to identify blocks, transactions, and messages uniquely.", + "required": false, + "schema": { + "$ref": "#/components/schemas/TonHash" + } + }, + "workchain": { + "name": "workchain", + "in": "query", + "description": "The workchain to query. Use -1 for masterchain (validators, system contracts, config) or 0 for basechain (regular accounts and contracts). Most user transactions happen on workchain 0.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + "shard": { + "name": "shard", + "in": "query", + "description": "The shard identifier. Masterchain always uses -9223372036854775808. For basechain, shards split and merge dynamically. Use the `shards` endpoint to discover current shard configuration.", + "required": true, + "schema": { + "type": "string", + "x-usrv-cpp-type": "std::int64_t" + } + }, + "seqno": { + "name": "seqno", + "in": "query", + "description": "The block sequence number. Each shard numbers its blocks starting from 0. For masterchain, this is also called the block height. Higher numbers are more recent blocks.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + "seqnoOptional": { + "name": "seqno", + "in": "query", + "description": "Query state at a specific block height. If omitted, returns the current state. Use this to look up historical data at a specific point in time.", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + }, + "rootHashOptional": { + "name": "root_hash", + "in": "query", + "description": "The block's root hash for verification. Together with file_hash, this uniquely and cryptographically identifies a block. Only needed when you require proof of block identity.", + "required": false, + "schema": { + "type": "string", + "x-usrv-cpp-type": "#/components/schemas/TonHash" + } + }, + "fileHashOptional": { + "name": "file_hash", + "in": "query", + "description": "The block's file hash for verification. Together with root_hash, this provides cryptographic proof of block identity. Only needed for trustless verification.", + "required": false, + "schema": { + "type": "string", + "x-usrv-cpp-type": "#/components/schemas/TonHash" + } + }, + "afterLtOptional": { + "name": "after_lt", + "in": "query", + "description": "Pagination cursor. Pass the `lt` value from the last item in your previous response to get the next page. Transactions and messages are ordered by logical time.", + "required": false, + "schema": { + "type": "string", + "x-usrv-cpp-format": "std::int64_t" + } + }, + "afterAccountHashOptional": { + "name": "after_hash", + "in": "query", + "description": "Secondary pagination cursor for block transactions. When multiple accounts have transactions at the same lt, use this to continue from a specific account.", + "required": false, + "schema": { + "type": "string", + "x-usrv-cpp-type": "#/components/schemas/TonAddrWithoutWorkchain" + } + }, + "countOptional": { + "name": "count", + "in": "query", + "description": "Maximum number of items to return. The default is 40. Use smaller values for faster responses or larger values to reduce the number of API calls.", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "default": 40 + } + }, + "limitOptional": { + "name": "limit", + "in": "query", + "description": "Maximum number of transactions to return. The default is 10. For accounts with many transactions, use pagination (lt + hash) to fetch more.", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "default": 10 + } + }, + "ltOptional": { + "name": "lt", + "in": "query", + "description": "Starting point for transaction history. Pass the lt from `last_transaction_id` to start from the most recent, or from a specific transaction to continue pagination.", + "required": false, + "schema": { + "type": "string", + "x-usrv-cpp-type": "std::int64_t" + } + }, + "toLtOptional": { + "name": "to_lt", + "in": "query", + "description": "Stop fetching when reaching this logical time. Use this to limit the time range of returned transactions. Set to 0 (default) to fetch all available history.", + "required": false, + "schema": { + "type": "string", + "x-usrv-cpp-type": "std::int64_t", + "default": 0 + } + }, + "archivalOptional": { + "name": "archival", + "in": "query", + "description": "Request data from archival nodes. Regular nodes only keep recent history (about 2 days). Set to true when querying old transactions or historical state. Archival requests may be slower.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + "sourceAddress": { + "name": "source", + "in": "query", + "description": "The sender's address for the message you're looking for.", + "required": true, + "schema": { + "$ref": "#/components/schemas/TonAddr" + } + }, + "destinationAddress": { + "name": "destination", + "in": "query", + "description": "The recipient's address for the message you're looking for.", + "required": true, + "schema": { + "$ref": "#/components/schemas/TonAddr" + } + }, + "createdLt": { + "name": "created_lt", + "in": "query", + "description": "The logical time when the message was created. You can find this in the `created_lt` field of message objects.", + "required": true, + "schema": { + "type": "string", + "x-usrv-cpp-type": "std::int64_t" + } + } + }, + "responses": { + "default": { + "description": "Error response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TonlibErrorResponse" + } + } + } + } + }, + "securitySchemes": { + "APIKeyHeader": { + "type": "apiKey", + "in": "header", + "name": "X-API-Key" + }, + "APIKeyQuery": { + "type": "apiKey", + "in": "query", + "name": "api_key" + } + }, + "schemas": { + "EmptyRequest": { + "type": "object", + "additionalProperties": false, + "required": [], + "properties": {}, + "description": "Empty request body for endpoints that require no parameters." + }, + "AddressRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "address" + ], + "properties": { + "address": { + "$ref": "#/components/schemas/TonAddr", + "description": "The account address in user-friendly format." + } + }, + "description": "Request containing a single address parameter." + }, + "AddressWithSeqnoRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "address" + ], + "properties": { + "address": { + "$ref": "#/components/schemas/TonAddr", + "description": "The account address in user-friendly format." + }, + "seqno": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + } + } + }, + "SeqnoRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "seqno" + ], + "properties": { + "seqno": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + } + } + }, + "DetectAddressRequest": { + "$ref": "#/components/schemas/AddressRequest" + }, + "DetectHashRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "hash" + ], + "properties": { + "hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Unique identifier hash for this object." + } + } + }, + "PackAddressRequest": { + "$ref": "#/components/schemas/AddressRequest" + }, + "UnpackAddressRequest": { + "$ref": "#/components/schemas/AddressRequest" + }, + "AddressInformationRequest": { + "$ref": "#/components/schemas/AddressWithSeqnoRequest" + }, + "ExtendedAddressInformationRequest": { + "$ref": "#/components/schemas/AddressWithSeqnoRequest" + }, + "WalletInformationRequest": { + "$ref": "#/components/schemas/AddressWithSeqnoRequest" + }, + "AddressBalanceRequest": { + "$ref": "#/components/schemas/AddressWithSeqnoRequest" + }, + "AddressStateRequest": { + "$ref": "#/components/schemas/AddressWithSeqnoRequest" + }, + "TokenDataRequest": { + "$ref": "#/components/schemas/AddressWithSeqnoRequest" + }, + "MasterchainInfoRequest": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "MasterchainBlockSignaturesRequest": { + "$ref": "#/components/schemas/SeqnoRequest" + }, + "ShardBlockProofRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "workchain", + "shard", + "seqno" + ], + "properties": { + "workchain": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Workchain ID: -1 for masterchain, 0 for basechain. Most user transactions are on workchain 0." + }, + "shard": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "x-usrv-cpp-type": "std::int64_t" + } + ], + "x-usrv-cpp-type": "std::int64_t", + "description": "Shard identifier. A signed 64-bit integer. Masterchain uses -9223372036854775808." + }, + "seqno": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + }, + "from_seqno": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Starting masterchain block for proof generation." + } + } + }, + "ConsensusBlockRequest": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "LookupBlockRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "workchain", + "shard" + ], + "properties": { + "workchain": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Workchain ID: -1 for masterchain, 0 for basechain. Most user transactions are on workchain 0." + }, + "shard": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "x-usrv-cpp-type": "std::int64_t" + } + ], + "x-usrv-cpp-type": "std::int64_t", + "description": "Shard identifier. A signed 64-bit integer. Masterchain uses -9223372036854775808." + }, + "seqno": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + }, + "lt": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "x-usrv-cpp-type": "std::int64_t" + } + ], + "x-usrv-cpp-type": "std::int64_t", + "description": "Logical time of this event. A globally unique counter that orders all blockchain events. Higher values are more recent." + }, + "unixtime": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Unix timestamp to look up." + } + }, + "description": "Request to find a block by workchain, shard, and either seqno, lt, or unixtime." + }, + "ShardsRequest": { + "$ref": "#/components/schemas/SeqnoRequest" + }, + "BlockHeaderRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "workchain", + "shard", + "seqno" + ], + "properties": { + "workchain": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Workchain ID: -1 for masterchain, 0 for basechain. Most user transactions are on workchain 0." + }, + "shard": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "x-usrv-cpp-type": "std::int64_t" + } + ], + "x-usrv-cpp-type": "std::int64_t", + "description": "Shard identifier. A signed 64-bit integer. Masterchain uses -9223372036854775808." + }, + "seqno": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + }, + "root_hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Merkle root hash of the block state tree. Used for cryptographic verification." + }, + "file_hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Hash of the serialized block data. Together with root_hash, uniquely identifies a block." + } + } + }, + "OutMsgQueueSizeRequest": { + "$ref": "#/components/schemas/EmptyRequest" + }, + "BlockTransactionsRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "workchain", + "shard", + "seqno" + ], + "properties": { + "workchain": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Workchain ID: -1 for masterchain, 0 for basechain. Most user transactions are on workchain 0." + }, + "shard": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "x-usrv-cpp-type": "std::int64_t" + } + ], + "x-usrv-cpp-type": "std::int64_t", + "description": "Shard identifier. A signed 64-bit integer. Masterchain uses -9223372036854775808." + }, + "seqno": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + }, + "root_hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Merkle root hash of the block state tree. Used for cryptographic verification." + }, + "file_hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Hash of the serialized block data. Together with root_hash, uniquely identifies a block." + }, + "after_lt": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "x-usrv-cpp-type": "std::int64_t" + } + ], + "x-usrv-cpp-type": "std::int64_t", + "description": "Return items after this logical time (for pagination)." + }, + "after_hash": { + "$ref": "#/components/schemas/TonAddrWithoutWorkchain", + "description": "Return items after this hash (for pagination within same lt)." + }, + "count": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + } + ], + "x-usrv-cpp-type": "std::int64_t", + "description": "Maximum number of items to return." + } + }, + "description": "Request to fetch transactions from a specific block with optional pagination." + }, + "BlockTransactionsExtRequest": { + "$ref": "#/components/schemas/BlockTransactionsRequest" + }, + "TransactionsRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "address" + ], + "properties": { + "address": { + "$ref": "#/components/schemas/TonAddr", + "description": "The account address in user-friendly format." + }, + "lt": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "x-usrv-cpp-type": "std::int64_t" + } + ], + "x-usrv-cpp-type": "std::int64_t", + "description": "Logical time of this event. A globally unique counter that orders all blockchain events. Higher values are more recent." + }, + "hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Unique identifier hash for this object." + }, + "to_lt": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "x-usrv-cpp-type": "std::int64_t" + } + ], + "x-usrv-cpp-type": "std::int64_t", + "description": "Stop returning items at this logical time." + }, + "archival": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + }, + { + "type": "boolean" + } + ], + "x-usrv-cpp-type": "bool", + "description": "Whether to use archival nodes for old data." + }, + "limit": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + } + ], + "x-usrv-cpp-type": "std::int64_t", + "description": "Maximum number of items to return." + } + }, + "description": "Request to fetch transaction history for an account with optional pagination and filtering parameters." + }, + "TransactionsV2Request": { + "$ref": "#/components/schemas/TransactionsRequest" + }, + "TryLocateTxRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "source", + "destination", + "created_lt" + ], + "properties": { + "source": { + "$ref": "#/components/schemas/TonAddr", + "description": "Sender address. Empty string for external messages (sent from outside the blockchain)." + }, + "destination": { + "$ref": "#/components/schemas/TonAddr", + "description": "Recipient address." + }, + "created_lt": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64", + "x-usrv-cpp-type": "std::int64_t" + } + ], + "x-usrv-cpp-type": "std::int64_t", + "description": "Logical time when this message was created. Use with source and destination to uniquely identify a message." + } + } + }, + "TryLocateResultTxRequest": { + "$ref": "#/components/schemas/TryLocateTxRequest" + }, + "TryLocateSourceTxRequest": { + "$ref": "#/components/schemas/TryLocateTxRequest" + }, + "ConfigParamRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "config_id" + ], + "properties": { + "config_id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Configuration parameter number. Each number controls different blockchain settings." + }, + "seqno": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + } + } + }, + "ConfigAllRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "seqno": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "x-usrv-cpp-type": "std::int32_t", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + } + } + }, + "LibrariesRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "libraries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TonHash" + }, + "description": "Array of library hashes to fetch." + } + } + }, + "SendBocRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "boc" + ], + "properties": { + "boc": { + "$ref": "#/components/schemas/Bytes", + "description": "The message to broadcast, serialized as a BOC (Bag of Cells) and base64 encoded." + } + }, + "description": "Request to broadcast a signed message. The boc field contains the base64-encoded external message." + }, + "EstimateFeeRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "address", + "body" + ], + "properties": { + "address": { + "$ref": "#/components/schemas/TonAddr", + "description": "The account address in user-friendly format." + }, + "body": { + "$ref": "#/components/schemas/Bytes", + "description": "Message body in BOC format, base64 encoded." + }, + "init_code": { + "$ref": "#/components/schemas/Bytes", + "description": "Contract code for deployment, in BOC format." + }, + "init_data": { + "$ref": "#/components/schemas/Bytes", + "description": "Initial contract state for deployment, in BOC format." + }, + "ignore_chksig": { + "type": "boolean", + "default": true, + "description": "Skip signature verification. Set to true when estimating fees before you have a real signature." + } + }, + "description": "Request to estimate transaction fees. Include the target address, message body, and optionally init code/data for contract deployment." + }, + "JsonRpcRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "jsonrpc", + "id", + "method", + "params" + ], + "properties": { + "jsonrpc": { + "type": "string", + "default": "2.0", + "description": "JSON-RPC protocol version, always \"2.0\"." + }, + "id": { + "type": "string", + "description": "Request ID. Pass any string and it will be echoed in the response." + }, + "method": { + "type": "string", + "description": "The get method name (e.g., \"seqno\", \"get_wallet_data\") or its numeric ID." + }, + "params": { + "type": "object", + "additionalProperties": true, + "description": "Method parameters as key-value pairs." + } + }, + "description": "A JSON-RPC 2.0 request. Set `method` to the API method name (e.g., \"getWalletInformation\") and `params` to a dictionary of parameters." + }, + "TonAddr": { + "type": "string", + "x-usrv-cpp-type": "ton_http::types::ton_addr", + "description": "A TON account address. Accepts raw format (workchain:hex like 0:abc...), base64 bounceable (EQ...), base64 non-bounceable (UQ...), or base64url. All formats are automatically detected." + }, + "TonAddrWithoutWorkchain": { + "type": "string", + "x-usrv-cpp-type": "ton_http::types::ton_addr_without_workchain", + "description": "The account ID portion of an address without the workchain prefix. This is the 256-bit identifier in hex or base64 format." + }, + "TonHash": { + "type": "string", + "x-usrv-cpp-type": "ton_http::types::ton_hash", + "description": "A 256-bit hash value. Accepts either hex format (64 characters) or base64 format (44 characters). Used for block hashes, transaction hashes, and cryptographic proofs." + }, + "TonHashHex": { + "type": "string", + "x-usrv-cpp-type": "ton_http::types::ton_hash_hex", + "description": "A 256-bit hash in hexadecimal format. Exactly 64 characters (0-9, a-f)." + }, + "Int256": { + "type": "string", + "x-usrv-cpp-type": "ton_http::types::int256", + "description": "A large integer represented as a string to avoid precision loss. Used for balances and other values that may exceed JavaScript's safe integer limit." + }, + "Bytes": { + "type": "string", + "x-usrv-cpp-type": "ton_http::types::bytes", + "description": "Binary data encoded as base64. Used for serialized cells (BOC format), message bodies, and smart contract code/data." + }, + "AccountAddress": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "accountAddress" + ], + "default": "accountAddress", + "description": "Object type identifier. " + }, + "account_address": { + "type": "string", + "x-usrv-cpp-type": "ton_http::types::ton_addr", + "description": "The account address in user-friendly format." + } + } + }, + "TonBlockIdExt": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "ton.blockIdExt" + ], + "default": "ton.blockIdExt", + "description": "Object type identifier. " + }, + "workchain": { + "type": "integer", + "description": "Workchain ID: -1 for masterchain, 0 for basechain. Most user transactions are on workchain 0." + }, + "shard": { + "type": "string", + "x-usrv-cpp-type": "std::int64_t", + "description": "Shard identifier. A signed 64-bit integer. Masterchain uses -9223372036854775808." + }, + "seqno": { + "type": "integer", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + }, + "root_hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Merkle root hash of the block state tree. Used for cryptographic verification." + }, + "file_hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Hash of the serialized block data. Together with root_hash, uniquely identifies a block." + } + }, + "required": [ + "@type", + "workchain", + "shard", + "seqno", + "root_hash", + "file_hash" + ], + "description": "A complete block identifier with cryptographic hashes. Contains workchain, shard, seqno (position) plus root_hash and file_hash (verification)." + }, + "DetectAddressBase64Variant": { + "type": "object", + "additionalProperties": false, + "description": "Base64 form of address variant", + "properties": { + "@type": { + "type": "string", + "enum": [ + "ext.utils.detectedAddressVariant" + ], + "default": "ext.utils.detectedAddressVariant", + "description": "Object type identifier. " + }, + "b64": { + "type": "string", + "description": "Standard base64 encoding." + }, + "b64url": { + "type": "string", + "description": "URL-safe base64 encoding." + } + }, + "required": [ + "@type", + "b64", + "b64url" + ] + }, + "ExtraCurrencyBalance": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "extraCurrency" + ], + "default": "extraCurrency", + "description": "Object type identifier. " + }, + "id": { + "type": "integer", + "format": "int32", + "description": "Request ID. Pass any string and it will be echoed in the response." + }, + "amount": { + "$ref": "#/components/schemas/Int256", + "description": "Balance amount as string." + } + }, + "required": [ + "@type", + "id", + "amount" + ] + }, + "InternalTransactionId": { + "type": "object", + "additionalProperties": false, + "description": "A reference to a specific transaction. The combination of `lt` (logical time) and `hash` uniquely identifies any transaction. Use these values for pagination and lookups.", + "properties": { + "@type": { + "type": "string", + "enum": [ + "internal.transactionId" + ], + "default": "internal.transactionId", + "description": "Object type identifier. " + }, + "lt": { + "type": "string", + "description": "Logical time of this event. A globally unique counter that orders all blockchain events. Higher values are more recent.", + "x-usrv-cpp-type": "std::int64_t" + }, + "hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Unique identifier hash for this object." + } + }, + "required": [ + "@type", + "lt", + "hash" + ] + }, + "AccountStateRaw": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "raw.accountState" + ], + "default": "raw.accountState", + "description": "Object type identifier. " + }, + "code": { + "$ref": "#/components/schemas/Bytes", + "description": "Smart contract code in BOC format, base64 encoded." + }, + "data": { + "$ref": "#/components/schemas/Bytes", + "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + }, + "frozen_hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Hash of the frozen contract state. Only present for frozen accounts." + } + }, + "required": [ + "@type", + "code", + "data", + "frozen_hash" + ] + }, + "AccountStateWalletV3": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "wallet.v3.accountState" + ], + "default": "wallet.v3.accountState", + "description": "Object type identifier. " + }, + "wallet_id": { + "type": "integer", + "format": "int64", + "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. Default is 698983191 for mainnet." + }, + "seqno": { + "type": "integer", + "format": "int32", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + } + }, + "required": [ + "@type", + "wallet_id", + "seqno" + ] + }, + "AccountStateWalletV4": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "wallet.v4.accountState" + ], + "default": "wallet.v4.accountState", + "description": "Object type identifier. " + }, + "wallet_id": { + "type": "integer", + "format": "int64", + "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. Default is 698983191 for mainnet." + }, + "seqno": { + "type": "integer", + "format": "int32", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + } + }, + "required": [ + "@type", + "wallet_id", + "seqno" + ] + }, + "AccountStateWalletHighloadV1": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "wallet.highload.v1.accountState" + ], + "default": "wallet.highload.v1.accountState", + "description": "Object type identifier. " + }, + "wallet_id": { + "type": "integer", + "format": "int64", + "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. Default is 698983191 for mainnet." + }, + "seqno": { + "type": "integer", + "format": "int32", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + } + }, + "required": [ + "@type", + "wallet_id", + "seqno" + ] + }, + "AccountStateWalletHighloadV2": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "wallet.highload.v2.accountState" + ], + "default": "wallet.highload.v2.accountState", + "description": "Object type identifier. " + }, + "wallet_id": { + "type": "integer", + "format": "int64", + "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. Default is 698983191 for mainnet." + } + }, + "required": [ + "@type", + "wallet_id" + ] + }, + "AccountStateDns": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "dns.accountState" + ], + "default": "dns.accountState", + "description": "Object type identifier. " + }, + "wallet_id": { + "type": "integer", + "format": "int64", + "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. Default is 698983191 for mainnet." + } + }, + "required": [ + "@type", + "wallet_id" + ] + }, + "RWalletLimit": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "rwallet.limit" + ], + "default": "rwallet.limit", + "description": "Object type identifier. " + }, + "seconds": { + "type": "integer", + "format": "int32", + "description": "Time period in seconds for this limit." + }, + "value": { + "type": "integer", + "format": "int64", + "description": "Amount of TON transferred in this message, in nanotons (1 TON = 10^9 nanotons)." + } + }, + "required": [ + "@type", + "seconds", + "value" + ] + }, + "RWalletConfig": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "rwallet.config" + ], + "default": "rwallet.config", + "description": "Object type identifier. " + }, + "start_at": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp when limits start." + }, + "limits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RWalletLimit" + }, + "description": "Spending limits configuration." + } + }, + "required": [ + "@type", + "start_at", + "limits" + ] + }, + "AccountStateRWallet": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "rwallet.accountState" + ], + "default": "rwallet.accountState", + "description": "Object type identifier. " + }, + "wallet_id": { + "type": "integer", + "format": "int64", + "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. Default is 698983191 for mainnet." + }, + "seqno": { + "type": "integer", + "format": "int32", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + }, + "unlocked_balance": { + "type": "integer", + "format": "int64", + "description": "Balance available for withdrawal in nanotons." + }, + "config": { + "$ref": "#/components/schemas/RWalletConfig", + "description": "The configuration parameter value." + } + }, + "required": [ + "@type", + "wallet_id", + "seqno", + "unlocked_balance", + "config" + ] + }, + "PChanConfig": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "pchan.config" + ], + "default": "pchan.config", + "description": "Object type identifier. " + }, + "alice_public_key": { + "type": "string", + "description": "Alice's public key." + }, + "alice_address": { + "$ref": "#/components/schemas/AccountAddress", + "description": "Alice's wallet address." + }, + "bob_public_key": { + "type": "string", + "description": "Bob's public key." + }, + "bob_address": { + "$ref": "#/components/schemas/AccountAddress", + "description": "Bob's wallet address." + }, + "init_timeout": { + "type": "integer", + "format": "int32", + "description": "Timeout for channel initialization in seconds." + }, + "close_timeout": { + "type": "integer", + "format": "int32", + "description": "Timeout for channel closing in seconds." + }, + "channel_id": { + "type": "integer", + "format": "int64", + "description": "Unique channel identifier." + } + }, + "required": [ + "@type", + "alice_public_key", + "alice_address", + "bob_public_key", + "bob_address", + "init_timeout", + "close_timeout", + "channel_id" + ] + }, + "PChanStateInit": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "pchan.stateInit" + ], + "default": "pchan.stateInit", + "description": "Object type identifier. " + }, + "signed_A": { + "type": "boolean", + "description": "True if Alice signed." + }, + "signed_B": { + "type": "boolean", + "description": "True if Bob signed." + }, + "min_A": { + "type": "integer", + "format": "int64", + "description": "Minimum required from Alice." + }, + "min_B": { + "type": "integer", + "format": "int64", + "description": "Minimum required from Bob." + }, + "expire_at": { + "type": "integer", + "format": "int64", + "description": "Initialization expiration timestamp." + }, + "A": { + "type": "integer", + "format": "int64", + "description": "Alice's initial deposit in nanotons." + }, + "B": { + "type": "integer", + "format": "int64", + "description": "Bob's initial deposit in nanotons." + } + }, + "required": [ + "@type", + "signed_A", + "signed_B", + "min_A", + "min_B", + "expire_at", + "A", + "B" + ] + }, + "PChanStateClose": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "pchan.stateClose" + ], + "default": "pchan.stateClose", + "description": "Object type identifier. " + }, + "signed_A": { + "type": "boolean", + "description": "True if Alice signed the close." + }, + "signed_B": { + "type": "boolean", + "description": "True if Bob signed the close." + }, + "min_A": { + "type": "integer", + "format": "int64", + "description": "Minimum guaranteed for Alice." + }, + "min_B": { + "type": "integer", + "format": "int64", + "description": "Minimum guaranteed for Bob." + }, + "expire_at": { + "type": "integer", + "format": "int64", + "description": "Channel expiration timestamp." + }, + "A": { + "type": "integer", + "format": "int64", + "description": "Alice's final balance in nanotons." + }, + "B": { + "type": "integer", + "format": "int64", + "description": "Bob's final balance in nanotons." + } + }, + "required": [ + "@type", + "signed_A", + "signed_B", + "min_A", + "min_B", + "expire_at", + "A", + "B" + ] + }, + "PChanStatePayout": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "pchan.statePayout" + ], + "default": "pchan.statePayout", + "description": "Object type identifier. " + }, + "A": { + "type": "integer", + "format": "int64", + "description": "Alice's payout amount in nanotons." + }, + "B": { + "type": "integer", + "format": "int64", + "description": "Bob's payout amount in nanotons." + } + }, + "required": [ + "@type", + "A", + "B" + ] + }, + "PChanState": { + "oneOf": [ + { + "$ref": "#/components/schemas/PChanStateInit" + }, + { + "$ref": "#/components/schemas/PChanStateClose" + }, + { + "$ref": "#/components/schemas/PChanStatePayout" + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "pchan.stateInit": "#/components/schemas/PChanStateInit", + "pchan.stateClose": "#/components/schemas/PChanStateClose", + "pchan.statePayout": "#/components/schemas/PChanStatePayout" + } + } + }, + "AccountStatePChan": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "pchan.accountState" + ], + "default": "pchan.accountState", + "description": "Object type identifier. " + }, + "config": { + "$ref": "#/components/schemas/PChanConfig", + "description": "The configuration parameter value." + }, + "state": { + "$ref": "#/components/schemas/PChanState", + "description": "Current state of the payment channel." + }, + "description": { + "type": "string", + "description": "Payment channel description." + } + }, + "required": [ + "@type", + "config", + "state", + "description" + ] + }, + "AccountStateUninited": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "uninited.accountState" + ], + "default": "uninited.accountState", + "description": "Object type identifier. " + }, + "frozen_hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Hash of the frozen contract state. Only present for frozen accounts." + } + }, + "required": [ + "@type", + "frozen_hash" + ] + }, + "AccountState": { + "oneOf": [ + { + "$ref": "#/components/schemas/AccountStateRaw" + }, + { + "$ref": "#/components/schemas/AccountStateWalletV3" + }, + { + "$ref": "#/components/schemas/AccountStateWalletV4" + }, + { + "$ref": "#/components/schemas/AccountStateWalletHighloadV1" + }, + { + "$ref": "#/components/schemas/AccountStateWalletHighloadV2" + }, + { + "$ref": "#/components/schemas/AccountStateDns" + }, + { + "$ref": "#/components/schemas/AccountStateRWallet" + }, + { + "$ref": "#/components/schemas/AccountStatePChan" + }, + { + "$ref": "#/components/schemas/AccountStateUninited" + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "raw.accountState": "#/components/schemas/AccountStateRaw", + "wallet.v3.accountState": "#/components/schemas/AccountStateWalletV3", + "wallet.v4.accountState": "#/components/schemas/AccountStateWalletV4", + "wallet.highload.v1.accountState": "#/components/schemas/AccountStateWalletHighloadV1", + "wallet.highload.v2.accountState": "#/components/schemas/AccountStateWalletHighloadV2", + "dns.accountState": "#/components/schemas/AccountStateDns", + "rwallet.accountState": "#/components/schemas/AccountStateRWallet", + "pchan.accountState": "#/components/schemas/AccountStatePChan", + "uninited.accountState": "#/components/schemas/AccountStateUninited" + } + } + }, + "TokenContentDict": { + "type": "object", + "additionalProperties": true + }, + "DnsRecordStorageAddress": { + "type": "object", + "additionalProperties": false, + "required": [ + "@type", + "bag_id" + ], + "properties": { + "@type": { + "type": "string", + "enum": [ + "dns_storage_address" + ], + "default": "dns_storage_address", + "description": "Object type identifier. " + }, + "bag_id": { + "$ref": "#/components/schemas/TonHashHex", + "description": "TON Storage bag identifier." + } + } + }, + "DnsRecordAdnlAddress": { + "type": "object", + "additionalProperties": false, + "required": [ + "@type", + "adnl_addr" + ], + "properties": { + "@type": { + "type": "string", + "enum": [ + "dns_adnl_address" + ], + "default": "dns_adnl_address", + "description": "Object type identifier. " + }, + "adnl_addr": { + "$ref": "#/components/schemas/TonHashHex", + "description": "ADNL address in hex." + } + } + }, + "SmcAddr": { + "type": "object", + "additionalProperties": false, + "required": [ + "@type", + "workchain_id", + "address" + ], + "properties": { + "@type": { + "type": "string", + "enum": [ + "addr_std" + ], + "default": "addr_std", + "description": "Object type identifier. " + }, + "workchain_id": { + "type": "integer", + "format": "int32", + "description": "Workchain identifier (0 for basechain, -1 for masterchain)." + }, + "address": { + "$ref": "#/components/schemas/TonHashHex", + "description": "The account address in user-friendly format." + } + } + }, + "DnsRecordSmcAddress": { + "type": "object", + "additionalProperties": false, + "required": [ + "@type", + "smc_addr" + ], + "properties": { + "@type": { + "type": "string", + "enum": [ + "dns_smc_address" + ], + "default": "dns_smc_address", + "description": "Object type identifier. " + }, + "smc_addr": { + "$ref": "#/components/schemas/SmcAddr", + "description": "Smart contract address." + } + } + }, + "DnsRecordNextResolver": { + "type": "object", + "additionalProperties": false, + "required": [ + "@type", + "resolver" + ], + "properties": { + "@type": { + "type": "string", + "enum": [ + "dns_next_resolver" + ], + "default": "dns_next_resolver", + "description": "Object type identifier. " + }, + "resolver": { + "$ref": "#/components/schemas/SmcAddr", + "description": "Address of the next DNS resolver." + } + } + }, + "DnsRecord": { + "oneOf": [ + { + "$ref": "#/components/schemas/DnsRecordStorageAddress" + }, + { + "$ref": "#/components/schemas/DnsRecordSmcAddress" + }, + { + "$ref": "#/components/schemas/DnsRecordAdnlAddress" + }, + { + "$ref": "#/components/schemas/DnsRecordNextResolver" + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "dns_storage_address": "#/components/schemas/DnsRecordStorageAddress", + "dns_smc_address": "#/components/schemas/DnsRecordSmcAddress", + "dns_adnl_address": "#/components/schemas/DnsRecordAdnlAddress", + "dns_next_resolver": "#/components/schemas/DnsRecordNextResolver" + } + } + }, + "DnsRecordSet": { + "type": "object", + "additionalProperties": true, + "properties": { + "dns_next_resolver": { + "$ref": "#/components/schemas/DnsRecord", + "description": "Next resolver for subdomain lookups." + }, + "wallet": { + "$ref": "#/components/schemas/DnsRecord", + "description": "True if this address is a recognized wallet contract type. If false, wallet-specific fields won't be available." + }, + "site": { + "$ref": "#/components/schemas/DnsRecord", + "description": "Site address (ADNL or storage)." + }, + "storage": { + "$ref": "#/components/schemas/DnsRecord", + "description": "TON Storage bag ID." + } + } + }, + "DnsContent": { + "type": "object", + "additionalProperties": false, + "required": [ + "domain", + "data" + ], + "properties": { + "domain": { + "type": "string", + "description": "Domain name." + }, + "data": { + "$ref": "#/components/schemas/DnsRecordSet", + "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + } + } + }, + "TokenContent": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "data" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "onchain", + "offchain" + ], + "description": "Content encoding type." + }, + "data": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/TokenContentDict" + } + ], + "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + } + } + }, + "JettonMasterData": { + "type": "object", + "additionalProperties": false, + "required": [ + "@type", + "address", + "contract_type", + "total_supply", + "mintable", + "jetton_content", + "jetton_wallet_code" + ], + "properties": { + "@type": { + "type": "string", + "enum": [ + "ext.tokens.jettonMasterData" + ], + "default": "ext.tokens.jettonMasterData", + "description": "Object type identifier. " + }, + "address": { + "$ref": "#/components/schemas/TonAddr", + "description": "The account address in user-friendly format." + }, + "contract_type": { + "type": "string", + "enum": [ + "jetton_master" + ], + "default": "jetton_master", + "description": "Type of token contract: jetton_master, jetton_wallet, nft_collection, or nft_item." + }, + "total_supply": { + "$ref": "#/components/schemas/Int256", + "description": "Total number of tokens in existence, in the smallest unit. Divide by 10^decimals for human-readable amount." + }, + "mintable": { + "type": "boolean", + "description": "Whether new tokens can still be created. If false, the total supply is permanently fixed." + }, + "admin_address": { + "$ref": "#/components/schemas/TonAddr", + "description": "Address that can mint new tokens or change settings. May be empty if admin rights were revoked." + }, + "jetton_content": { + "$ref": "#/components/schemas/TokenContent", + "description": "Token metadata: name, symbol, decimals, description, image URL." + }, + "jetton_wallet_code": { + "$ref": "#/components/schemas/Bytes", + "description": "Code used to deploy user wallets for this token. Used to verify wallet authenticity." + } + }, + "description": "Jetton (fungible token) master contract data. Contains total supply, whether minting is allowed, admin address, and token metadata (name, symbol, decimals). This is the central contract that tracks the token." + }, + "JettonWalletData": { + "type": "object", + "additionalProperties": false, + "required": [ + "@type", + "address", + "contract_type", + "balance", + "owner", + "jetton", + "jetton_wallet_code" + ], + "properties": { + "@type": { + "type": "string", + "enum": [ + "ext.tokens.jettonWalletData" + ], + "default": "ext.tokens.jettonWalletData", + "description": "Object type identifier. " + }, + "address": { + "$ref": "#/components/schemas/TonAddr", + "description": "The account address in user-friendly format." + }, + "contract_type": { + "type": "string", + "enum": [ + "jetton_wallet" + ], + "default": "jetton_wallet", + "description": "Type of token contract: jetton_master, jetton_wallet, nft_collection, or nft_item." + }, + "balance": { + "$ref": "#/components/schemas/Int256", + "description": "The account or token balance in the smallest unit (nanotons for TON, or base units for tokens). Divide by 10^decimals to get the human-readable amount." + }, + "owner": { + "$ref": "#/components/schemas/TonAddr", + "description": "Current owner of this wallet or NFT." + }, + "jetton": { + "$ref": "#/components/schemas/TonAddr", + "description": "Address of the Jetton master contract for this wallet." + }, + "mintless_is_claimed": { + "type": "boolean", + "description": "True if mintless jettons were claimed." + }, + "jetton_wallet_code": { + "$ref": "#/components/schemas/Bytes", + "description": "Code used to deploy user wallets for this token. Used to verify wallet authenticity." + } + }, + "description": "Jetton wallet contract data. Each user has a separate wallet contract for each token they hold. Contains the token balance, owner address, and reference to the master contract." + }, + "NftCollectionData": { + "type": "object", + "additionalProperties": false, + "required": [ + "@type", + "address", + "contract_type", + "next_item_index", + "collection_content" + ], + "properties": { + "@type": { + "type": "string", + "enum": [ + "ext.tokens.nftCollectionData" + ], + "default": "ext.tokens.nftCollectionData", + "description": "Object type identifier. " + }, + "address": { + "$ref": "#/components/schemas/TonAddr", + "description": "The account address in user-friendly format." + }, + "contract_type": { + "type": "string", + "enum": [ + "nft_collection" + ], + "default": "nft_collection", + "description": "Type of token contract: jetton_master, jetton_wallet, nft_collection, or nft_item." + }, + "next_item_index": { + "$ref": "#/components/schemas/Int256", + "description": "Index that will be assigned to the next minted item. Also indicates total items if minted sequentially." + }, + "owner_address": { + "$ref": "#/components/schemas/TonAddr", + "description": "Current owner of this wallet, NFT, or collection." + }, + "collection_content": { + "$ref": "#/components/schemas/TokenContent", + "description": "Collection metadata: name, description, cover image." + } + }, + "description": "NFT collection contract data. Contains the number of items minted, collection owner, and collection metadata (name, description, image)." + }, + "NftItemData": { + "type": "object", + "additionalProperties": false, + "required": [ + "@type", + "address", + "contract_type", + "init", + "index", + "content" + ], + "properties": { + "@type": { + "type": "string", + "enum": [ + "ext.tokens.nftItemData" + ], + "default": "ext.tokens.nftItemData", + "description": "Object type identifier. " + }, + "address": { + "$ref": "#/components/schemas/TonAddr", + "description": "The account address in user-friendly format." + }, + "contract_type": { + "type": "string", + "enum": [ + "nft_item" + ], + "default": "nft_item", + "description": "Type of token contract: jetton_master, jetton_wallet, nft_collection, or nft_item." + }, + "init": { + "type": "boolean", + "description": "The genesis (first) block." + }, + "index": { + "$ref": "#/components/schemas/Int256", + "description": "This item's position in the collection." + }, + "collection_address": { + "$ref": "#/components/schemas/TonAddr", + "description": "Address of the NFT collection this item belongs to." + }, + "owner_address": { + "$ref": "#/components/schemas/TonAddr", + "description": "Current owner of this wallet, NFT, or collection." + }, + "content": { + "oneOf": [ + { + "$ref": "#/components/schemas/TokenContent" + }, + { + "$ref": "#/components/schemas/DnsContent" + } + ], + "description": "NFT content and metadata." + } + }, + "description": "Individual NFT data. Contains the item index, collection reference, current owner, and item-specific content/metadata." + }, + "TokenData": { + "oneOf": [ + { + "$ref": "#/components/schemas/JettonMasterData" + }, + { + "$ref": "#/components/schemas/JettonWalletData" + }, + { + "$ref": "#/components/schemas/NftCollectionData" + }, + { + "$ref": "#/components/schemas/NftItemData" + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "ext.tokens.jettonMasterData": "#/components/schemas/JettonMasterData", + "ext.tokens.jettonWalletData": "#/components/schemas/JettonWalletData", + "ext.tokens.nftCollectionData": "#/components/schemas/NftCollectionData", + "ext.tokens.nftItemData": "#/components/schemas/NftItemData" + } + }, + "description": "Token metadata returned by getTokenData. Can be a Jetton master, Jetton wallet, NFT collection, or NFT item depending on what contract you queried." + }, + "AccountStateEnum": { + "type": "string", + "enum": [ + "uninitialized", + "active", + "frozen" + ], + "description": "The lifecycle state of an account: `uninitialized` (no contract deployed), `active` (contract working normally), or `frozen` (suspended due to zero balance)." + }, + "BlockSignature": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "blocks.signature" + ], + "default": "blocks.signature", + "description": "Object type identifier. " + }, + "node_id_short": { + "$ref": "#/components/schemas/TonHash", + "description": "Short identifier of the validator node." + }, + "signature": { + "$ref": "#/components/schemas/Bytes", + "description": "Validator signature in base64." + } + }, + "required": [ + "@type", + "node_id_short", + "signature" + ] + }, + "ShardBlockLink": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "blocks.shardBlockLink" + ], + "default": "blocks.shardBlockLink", + "description": "Object type identifier. " + }, + "id": { + "$ref": "#/components/schemas/TonBlockIdExt", + "description": "Request ID. Pass any string and it will be echoed in the response." + }, + "proof": { + "$ref": "#/components/schemas/Bytes", + "description": "Merkle proof for this shard block." + } + }, + "required": [ + "@type", + "id", + "proof" + ] + }, + "BlockLinkBack": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "blocks.blockLinkBack" + ], + "default": "blocks.blockLinkBack", + "description": "Object type identifier. " + }, + "to_key_block": { + "type": "boolean", + "description": "True if destination is a key block." + }, + "from": { + "$ref": "#/components/schemas/TonBlockIdExt", + "description": "Source block reference." + }, + "to": { + "$ref": "#/components/schemas/TonBlockIdExt", + "description": "Destination block reference." + }, + "dest_proof": { + "$ref": "#/components/schemas/Bytes", + "description": "Proof for the destination block." + }, + "proof": { + "$ref": "#/components/schemas/Bytes", + "description": "Merkle proof data." + }, + "state_proof": { + "$ref": "#/components/schemas/Bytes", + "description": "State proof data." + } + }, + "required": [ + "@type", + "to_key_block", + "from", + "to", + "dest_proof", + "proof", + "state_proof" + ] + }, + "OutMsgQueueSize": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "blocks.outMsgQueueSize" + ], + "default": "blocks.outMsgQueueSize", + "description": "Object type identifier. " + }, + "id": { + "$ref": "#/components/schemas/TonBlockIdExt", + "description": "Request ID. Pass any string and it will be echoed in the response." + }, + "size": { + "type": "integer", + "description": "Queue size for the shard." + } + }, + "required": [ + "@type", + "id", + "size" + ] + }, + "LibraryEntry": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "smc.libraryEntry" + ], + "default": "smc.libraryEntry", + "description": "Object type identifier. " + }, + "hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Unique identifier hash for this object." + }, + "data": { + "$ref": "#/components/schemas/Bytes", + "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + } + }, + "required": [ + "@type", + "hash", + "data" + ] + }, + "ShortTxId": { + "type": "object", + "additionalProperties": false, + "description": "Short transaction identifier", + "properties": { + "@type": { + "type": "string", + "enum": [ + "blocks.shortTxId" + ], + "default": "blocks.shortTxId", + "description": "Object type identifier. " + }, + "mode": { + "type": "integer", + "description": "Transaction mode flags" + }, + "account": { + "$ref": "#/components/schemas/TonAddr", + "description": "The account address that this transaction belongs to." + }, + "lt": { + "type": "string", + "description": "Logical time of this event. A globally unique counter that orders all blockchain events. Higher values are more recent.", + "x-usrv-cpp-type": "std::int64_t" + }, + "hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Unique identifier hash for this object." + } + }, + "required": [ + "@type", + "mode", + "account", + "lt", + "hash" + ] + }, + "MsgDataRaw": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "msg.dataRaw" + ], + "default": "msg.dataRaw", + "description": "Object type identifier. " + }, + "body": { + "$ref": "#/components/schemas/Bytes", + "description": "Message body in BOC format, base64 encoded." + }, + "init_state": { + "$ref": "#/components/schemas/Bytes", + "description": "Contract init state in base64." + } + } + }, + "MsgDataText": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "msg.dataText" + ], + "default": "msg.dataText", + "description": "Object type identifier. " + }, + "text": { + "$ref": "#/components/schemas/Bytes", + "description": "Plain text message content." + } + } + }, + "MsgDataDecryptedText": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "msg.dataDecryptedText" + ], + "default": "msg.dataDecryptedText", + "description": "Object type identifier. " + }, + "text": { + "$ref": "#/components/schemas/Bytes", + "description": "Decrypted message text." + } + } + }, + "MsgDataEncryptedText": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "msg.dataEncryptedText" + ], + "default": "msg.dataEncryptedText", + "description": "Object type identifier. " + }, + "text": { + "$ref": "#/components/schemas/Bytes", + "description": "Encrypted message content." + } + } + }, + "MsgData": { + "oneOf": [ + { + "$ref": "#/components/schemas/MsgDataRaw" + }, + { + "$ref": "#/components/schemas/MsgDataText" + }, + { + "$ref": "#/components/schemas/MsgDataDecryptedText" + }, + { + "$ref": "#/components/schemas/MsgDataEncryptedText" + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "msg.dataRaw": "#/components/schemas/MsgDataRaw", + "msg.dataText": "#/components/schemas/MsgDataText", + "msg.dataDecryptedText": "#/components/schemas/MsgDataDecryptedText", + "msg.dataEncryptedText": "#/components/schemas/MsgDataEncryptedText" + } + } + }, + "MessageStd": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "raw.message" + ], + "default": "raw.message", + "description": "Object type identifier. " + }, + "hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Unique identifier hash for this object." + }, + "source": { + "$ref": "#/components/schemas/AccountAddress", + "description": "Sender address. Empty string for external messages (sent from outside the blockchain)." + }, + "destination": { + "$ref": "#/components/schemas/AccountAddress", + "description": "Recipient address." + }, + "value": { + "$ref": "#/components/schemas/Int256", + "description": "Amount of TON transferred in this message, in nanotons (1 TON = 10^9 nanotons)." + }, + "extra_currencies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtraCurrencyBalance" + }, + "description": "Non-TON currencies transferred. TON supports multiple native currencies." + }, + "fwd_fee": { + "$ref": "#/components/schemas/Int256", + "description": "Fee for forwarding this message to its destination, in nanotons." + }, + "ihr_fee": { + "$ref": "#/components/schemas/Int256", + "description": "Instant Hypercube Routing fee in nanotons. Usually 0 as IHR is rarely used." + }, + "created_lt": { + "type": "string", + "description": "Logical time when this message was created. Use with source and destination to uniquely identify a message.", + "x-usrv-cpp-type": "std::int64_t" + }, + "body_hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Hash of the message body. Use this to verify message content without the full body." + }, + "msg_data": { + "$ref": "#/components/schemas/MsgData", + "description": "The message body containing instructions for the destination contract." + } + }, + "required": [ + "@type", + "hash", + "source", + "destination", + "value", + "extra_currencies", + "fwd_fee", + "ihr_fee", + "created_lt", + "body_hash", + "msg_data" + ] + }, + "TransactionStd": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "raw.transaction" + ], + "default": "raw.transaction", + "description": "Object type identifier. " + }, + "address": { + "$ref": "#/components/schemas/AccountAddress", + "description": "The account address in user-friendly format." + }, + "utime": { + "type": "integer", + "description": "Unix timestamp (seconds since 1970-01-01). When this event occurred in real-world time." + }, + "data": { + "$ref": "#/components/schemas/Bytes", + "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + }, + "transaction_id": { + "$ref": "#/components/schemas/InternalTransactionId", + "description": "Reference to this transaction. Use `lt` and `hash` to fetch full details." + }, + "fee": { + "$ref": "#/components/schemas/Int256", + "description": "Total fees paid for this transaction in nanotons." + }, + "storage_fee": { + "$ref": "#/components/schemas/Int256", + "description": "Fees paid for storing the contract state on-chain, in nanotons. Charged based on contract size and time." + }, + "other_fee": { + "$ref": "#/components/schemas/Int256", + "description": "Computation and action fees in nanotons. Covers gas for executing contract code." + }, + "in_msg": { + "$ref": "#/components/schemas/MessageStd", + "description": "The incoming message that triggered this transaction. External messages come from outside the blockchain." + }, + "out_msgs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageStd" + }, + "description": "Messages sent by this transaction. A transaction can send multiple messages to different destinations." + } + }, + "required": [ + "@type", + "address", + "utime", + "data", + "transaction_id", + "fee", + "storage_fee", + "other_fee", + "out_msgs" + ] + }, + "TransactionExt": { + "allOf": [ + { + "$ref": "#/components/schemas/TransactionStd" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "raw.transactionExt" + ], + "default": "raw.transactionExt", + "description": "Object type identifier. " + }, + "account": { + "$ref": "#/components/schemas/TonAddr", + "description": "The account address that this transaction belongs to." + } + } + } + ] + }, + "Message": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "ext.message" + ], + "default": "ext.message", + "description": "Object type identifier. " + }, + "hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Unique identifier hash for this object." + }, + "source": { + "$ref": "#/components/schemas/TonAddr", + "description": "Sender address. Empty string for external messages (sent from outside the blockchain)." + }, + "destination": { + "$ref": "#/components/schemas/TonAddr", + "description": "Recipient address." + }, + "value": { + "$ref": "#/components/schemas/Int256", + "description": "Amount of TON transferred in this message, in nanotons (1 TON = 10^9 nanotons)." + }, + "extra_currencies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtraCurrencyBalance" + }, + "description": "Non-TON currencies transferred. TON supports multiple native currencies." + }, + "fwd_fee": { + "$ref": "#/components/schemas/Int256", + "description": "Fee for forwarding this message to its destination, in nanotons." + }, + "ihr_fee": { + "$ref": "#/components/schemas/Int256", + "description": "Instant Hypercube Routing fee in nanotons. Usually 0 as IHR is rarely used." + }, + "created_lt": { + "type": "string", + "description": "Logical time when this message was created. Use with source and destination to uniquely identify a message.", + "x-usrv-cpp-type": "std::int64_t" + }, + "body_hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Hash of the message body. Use this to verify message content without the full body." + }, + "msg_data": { + "$ref": "#/components/schemas/MsgData", + "description": "The message body containing instructions for the destination contract." + }, + "message": { + "type": "string", + "description": "Human-readable comment if the message body is a simple text comment." + }, + "message_decode_error": { + "type": "string", + "description": "Error text if the message body couldn't be decoded as a comment." + } + }, + "required": [ + "@type", + "hash", + "source", + "destination", + "value", + "extra_currencies", + "fwd_fee", + "ihr_fee", + "created_lt", + "body_hash", + "msg_data" + ], + "description": "A message between accounts. Contains sender, recipient, TON amount transferred, and the message body. The `created_lt` field orders messages globally." + }, + "Transaction": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "ext.transaction" + ], + "default": "ext.transaction", + "description": "Object type identifier. " + }, + "address": { + "$ref": "#/components/schemas/AccountAddress", + "description": "The account address in user-friendly format." + }, + "account": { + "$ref": "#/components/schemas/TonAddr", + "description": "The account address that this transaction belongs to." + }, + "utime": { + "type": "integer", + "description": "Unix timestamp (seconds since 1970-01-01). When this event occurred in real-world time." + }, + "data": { + "$ref": "#/components/schemas/Bytes", + "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + }, + "transaction_id": { + "$ref": "#/components/schemas/InternalTransactionId", + "description": "Reference to this transaction. Use `lt` and `hash` to fetch full details." + }, + "fee": { + "$ref": "#/components/schemas/Int256", + "description": "Total fees paid for this transaction in nanotons." + }, + "storage_fee": { + "$ref": "#/components/schemas/Int256", + "description": "Fees paid for storing the contract state on-chain, in nanotons. Charged based on contract size and time." + }, + "other_fee": { + "$ref": "#/components/schemas/Int256", + "description": "Computation and action fees in nanotons. Covers gas for executing contract code." + }, + "in_msg": { + "$ref": "#/components/schemas/Message", + "description": "The incoming message that triggered this transaction. External messages come from outside the blockchain." + }, + "out_msgs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" + }, + "description": "Messages sent by this transaction. A transaction can send multiple messages to different destinations." + } + }, + "required": [ + "@type", + "address", + "account", + "utime", + "data", + "transaction_id", + "fee", + "storage_fee", + "other_fee", + "out_msgs" + ], + "description": "A single transaction on the TON blockchain. Contains the triggering message (`in_msg`), any messages sent (`out_msgs`), fees paid, and references for looking up related data." + }, + "TonlibObject": { + "oneOf": [ + { + "$ref": "#/components/schemas/DetectAddress" + }, + { + "$ref": "#/components/schemas/DetectHash" + }, + { + "$ref": "#/components/schemas/AddressInformation" + }, + { + "$ref": "#/components/schemas/ExtendedAddressInformation" + }, + { + "$ref": "#/components/schemas/WalletInformation" + }, + { + "$ref": "#/components/schemas/JettonMasterData" + }, + { + "$ref": "#/components/schemas/JettonWalletData" + }, + { + "$ref": "#/components/schemas/NftCollectionData" + }, + { + "$ref": "#/components/schemas/NftItemData" + }, + { + "$ref": "#/components/schemas/MasterchainInfo" + }, + { + "$ref": "#/components/schemas/MasterchainBlockSignatures" + }, + { + "$ref": "#/components/schemas/ShardBlockProof" + }, + { + "$ref": "#/components/schemas/ConsensusBlock" + }, + { + "$ref": "#/components/schemas/TonBlockIdExt" + }, + { + "$ref": "#/components/schemas/Shards" + }, + { + "$ref": "#/components/schemas/BlockHeader" + }, + { + "$ref": "#/components/schemas/OutMsgQueueSizes" + }, + { + "$ref": "#/components/schemas/BlockTransactions" + }, + { + "$ref": "#/components/schemas/BlockTransactionsExt" + }, + { + "$ref": "#/components/schemas/Transaction" + }, + { + "$ref": "#/components/schemas/TransactionsStd" + }, + { + "$ref": "#/components/schemas/ConfigInfo" + }, + { + "$ref": "#/components/schemas/LibraryResult" + }, + { + "$ref": "#/components/schemas/QueryFees" + }, + { + "$ref": "#/components/schemas/ExtMessageInfo" + }, + { + "$ref": "#/components/schemas/ResultOk" + }, + { + "$ref": "#/components/schemas/RunGetMethodStdResult" + }, + { + "$ref": "#/components/schemas/RunGetMethodResult" + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "ext.utils.detectAddress": "#/components/schemas/DetectAddress", + "ext.utils.detectedHash": "#/components/schemas/DetectHash", + "raw.fullAccountState": "#/components/schemas/AddressInformation", + "fullAccountState": "#/components/schemas/ExtendedAddressInformation", + "ext.accounts.walletInformation": "#/components/schemas/WalletInformation", + "ext.tokens.jettonMasterData": "#/components/schemas/JettonMasterData", + "ext.tokens.jettonWalletData": "#/components/schemas/JettonWalletData", + "ext.tokens.nftCollectionData": "#/components/schemas/NftCollectionData", + "ext.tokens.nftItemData": "#/components/schemas/NftItemData", + "blocks.masterchainInfo": "#/components/schemas/MasterchainInfo", + "blocks.blockSignatures": "#/components/schemas/MasterchainBlockSignatures", + "blocks.shardBlockProof": "#/components/schemas/ShardBlockProof", + "ext.blocks.consensusBlock": "#/components/schemas/ConsensusBlock", + "ton.blockIdExt": "#/components/schemas/TonBlockIdExt", + "blocks.shards": "#/components/schemas/Shards", + "blocks.header": "#/components/schemas/BlockHeader", + "blocks.outMsgQueueSizes": "#/components/schemas/OutMsgQueueSizes", + "blocks.transactions": "#/components/schemas/BlockTransactions", + "blocks.transactionsExt": "#/components/schemas/BlockTransactionsExt", + "ext.transaction": "#/components/schemas/Transaction", + "raw.transactions": "#/components/schemas/TransactionsStd", + "configInfo": "#/components/schemas/ConfigInfo", + "query.fees": "#/components/schemas/QueryFees", + "smc.libraryResult": "#/components/schemas/LibraryResult", + "raw.extMessageInfo": "#/components/schemas/ExtMessageInfo", + "ok": "#/components/schemas/ResultOk", + "smc.runResult": "#/components/schemas/RunGetMethodStdResult", + "ext.runResult": "#/components/schemas/RunGetMethodResult" + } + } + }, + "TonlibResponse": { + "type": "object", + "title": "TonlibResponse", + "additionalProperties": false, + "required": [ + "ok", + "result", + "@extra" + ], + "properties": { + "ok": { + "type": "boolean", + "title": "Ok", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." + }, + "result": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/AccountStateEnum" + }, + { + "$ref": "#/components/schemas/TonlibObject" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/TonlibObject" + } + } + ], + "description": "The response data. Only present when `ok` is true. " + }, + "@extra": { + "type": "string", + "title": "Extra information", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." + }, + "jsonrpc": { + "type": "string", + "description": "JSON-RPC protocol version, always \"2.0\"." + }, + "id": { + "type": "string", + "description": "Request ID. Pass any string and it will be echoed in the response." + } + } + }, + "TonlibErrorResponse": { + "type": "object", + "additionalProperties": false, + "description": "The `ok` field is always false, `code` contains the HTTP status, and `error` describes what went wrong.", + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always false for error responses." + }, + "code": { + "type": "integer", + "minimum": 400, + "maximum": 599, + "description": "HTTP status code. Common values: 404 (not found), 409 (conflict), 422 (validation error), 429 (rate limit), 500 (server error), 504 (timeout), 542 (liteserver error)." + }, + "error": { + "type": "string", + "description": "Error message explaining what went wrong." + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "JsonRpcResponse": { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "required": [ + "jsonrpc", + "id" + ], + "properties": { + "jsonrpc": { + "type": "string", + "default": "2.0", + "description": "JSON-RPC protocol version, always \"2.0\"." + }, + "id": { + "type": "string", + "description": "Request ID. Pass any string and it will be echoed in the response." + } + } + }, + { + "$ref": "#/components/schemas/TonlibResponse" + } + ] + }, + "JsonRpcErrorResponse": { + "allOf": [ + { + "type": "object", + "additionalProperties": false, + "required": [ + "jsonrpc", + "id" + ], + "properties": { + "jsonrpc": { + "type": "string", + "default": "2.0", + "description": "JSON-RPC protocol version, always \"2.0\"." + }, + "id": { + "type": "string", + "description": "Request ID. Pass any string and it will be echoed in the response." + } + } + }, + { + "$ref": "#/components/schemas/TonlibErrorResponse" + } + ] + }, + "DetectAddress": { + "type": "object", + "additionalProperties": false, + "description": "Information about the address.", + "properties": { + "@type": { + "type": "string", + "enum": [ + "ext.utils.detectedAddress" + ], + "default": "ext.utils.detectedAddress", + "description": "Object type identifier. " + }, + "raw_form": { + "type": "string", + "description": "Raw address format (workchain:hex)." + }, + "bounceable": { + "$ref": "#/components/schemas/DetectAddressBase64Variant", + "description": "Bounceable address format." + }, + "non_bounceable": { + "$ref": "#/components/schemas/DetectAddressBase64Variant", + "description": "Non-bounceable address format." + }, + "given_type": { + "type": "string", + "enum": [ + "raw_form", + "friendly_bounceable", + "friendly_non_bounceable" + ], + "description": "Address format that was provided." + }, + "test_only": { + "type": "boolean", + "description": "True if this is a testnet address." + } + }, + "required": [ + "@type", + "raw_form", + "bounceable", + "non_bounceable", + "given_type", + "test_only" + ] + }, + "DetectHash": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "ext.utils.detectedHash" + ], + "default": "ext.utils.detectedHash", + "description": "Object type identifier. " + }, + "b64": { + "type": "string", + "title": "base64 form", + "description": "Standard base64 encoding." + }, + "b64url": { + "type": "string", + "title": "base64 url-safe form", + "description": "URL-safe base64 encoding." + }, + "hex": { + "type": "string", + "title": "hex form", + "description": "Hexadecimal encoding." + } + }, + "required": [ + "@type", + "b64", + "b64url", + "hex" + ] + }, + "PackAddress": { + "type": "string", + "title": "Address packed in base64", + "x-usrv-cpp-type": "ton_http::types::bytes" + }, + "UnpackAddress": { + "type": "string", + "title": "Address unpacked to raw form" + }, + "AddressInformation": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "raw.fullAccountState" + ], + "default": "raw.fullAccountState", + "description": "Object type identifier. " + }, + "balance": { + "$ref": "#/components/schemas/Int256", + "description": "The account or token balance in the smallest unit (nanotons for TON, or base units for tokens). Divide by 10^decimals to get the human-readable amount." + }, + "extra_currencies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtraCurrencyBalance" + }, + "description": "Non-TON currencies transferred. TON supports multiple native currencies." + }, + "last_transaction_id": { + "$ref": "#/components/schemas/InternalTransactionId", + "description": "Reference to the most recent transaction. Use as starting point for getTransactions." + }, + "block_id": { + "$ref": "#/components/schemas/TonBlockIdExt", + "description": "Full block identifier where this event occurred." + }, + "code": { + "$ref": "#/components/schemas/Bytes", + "description": "Smart contract code in BOC format, base64 encoded." + }, + "data": { + "$ref": "#/components/schemas/Bytes", + "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + }, + "frozen_hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Hash of the frozen contract state. Only present for frozen accounts." + }, + "sync_utime": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp when this data was synced." + }, + "state": { + "$ref": "#/components/schemas/AccountStateEnum", + "description": "Account state: uninit, active, or frozen." + }, + "suspended": { + "type": "boolean", + "description": "True if the account is suspended." + } + }, + "required": [ + "@type", + "balance", + "extra_currencies", + "code", + "data", + "last_transaction_id", + "block_id", + "frozen_hash", + "sync_utime", + "state" + ], + "description": "Raw account state including balance, code, data, and status. The code and data fields contain the smart contract in BOC format." + }, + "ExtendedAddressInformation": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "fullAccountState" + ], + "default": "fullAccountState", + "description": "Object type identifier. " + }, + "address": { + "$ref": "#/components/schemas/AccountAddress", + "description": "The account address in user-friendly format." + }, + "balance": { + "$ref": "#/components/schemas/Int256", + "description": "The account or token balance in the smallest unit (nanotons for TON, or base units for tokens). Divide by 10^decimals to get the human-readable amount." + }, + "extra_currencies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtraCurrencyBalance" + }, + "description": "Non-TON currencies transferred. TON supports multiple native currencies." + }, + "last_transaction_id": { + "$ref": "#/components/schemas/InternalTransactionId", + "description": "Reference to the most recent transaction. Use as starting point for getTransactions." + }, + "block_id": { + "$ref": "#/components/schemas/TonBlockIdExt", + "description": "Full block identifier where this event occurred." + }, + "sync_utime": { + "type": "integer", + "format": "int64", + "description": "Unix timestamp when this data was synced." + }, + "account_state": { + "$ref": "#/components/schemas/AccountState", + "description": "Current lifecycle state: uninitialized, active, or frozen." + }, + "revision": { + "type": "integer", + "description": "Contract revision number." + } + }, + "required": [ + "@type", + "address", + "balance", + "extra_currencies", + "last_transaction_id", + "block_id", + "sync_utime", + "account_state", + "revision" + ], + "description": "Account information with parsed wallet state. For wallet contracts, extracts wallet-specific fields instead of returning raw code/data." + }, + "WalletInformation": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "ext.accounts.walletInformation" + ], + "default": "ext.accounts.walletInformation", + "description": "Object type identifier. " + }, + "wallet": { + "type": "boolean", + "description": "True if this address is a recognized wallet contract type. If false, wallet-specific fields won't be available." + }, + "balance": { + "type": "string", + "x-usrv-cpp-type": "ton_http::types::int256", + "description": "The account or token balance in the smallest unit (nanotons for TON, or base units for tokens). Divide by 10^decimals to get the human-readable amount." + }, + "account_state": { + "$ref": "#/components/schemas/AccountStateEnum", + "description": "Current lifecycle state: uninitialized, active, or frozen." + }, + "last_transaction_id": { + "$ref": "#/components/schemas/InternalTransactionId", + "description": "Reference to the most recent transaction. Use as starting point for getTransactions." + }, + "wallet_type": { + "type": "string", + "enum": [ + "wallet v1 r1", + "wallet v1 r2", + "wallet v1 r3", + "wallet v2 r1", + "wallet v2 r2", + "wallet v3 r1", + "wallet v3 r2", + "wallet v4 r1", + "wallet v4 r2", + "wallet v5 beta", + "wallet v5 r1" + ], + "description": "The wallet contract version: v1r1 through v5r1. Newer versions (v4, v5) have more features." + }, + "seqno": { + "type": "integer", + "format": "int64", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + }, + "wallet_id": { + "type": "integer", + "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. Default is 698983191 for mainnet." + }, + "is_signature_allowed": { + "type": "boolean", + "description": "For v5 wallets: whether external signatures are enabled. If false, wallet is controlled only by plugins." + } + }, + "required": [ + "@type", + "wallet", + "balance", + "account_state", + "last_transaction_id" + ], + "description": "Information about a wallet account. The `wallet` field indicates if this is a known wallet type. If true, `wallet_type`, `seqno`, and `wallet_id` will be populated. Check seqno before sending transactions." + }, + "AddressBalance": { + "$ref": "#/components/schemas/Int256" + }, + "AddressState": { + "$ref": "#/components/schemas/AccountStateEnum" + }, + "MasterchainInfo": { + "type": "object", + "additionalProperties": false, + "description": "Current masterchain state. The `last` block is the most recent, `init` is the genesis block. Use `last.seqno` as the current block height.", + "properties": { + "@type": { + "type": "string", + "enum": [ + "blocks.masterchainInfo" + ], + "default": "blocks.masterchainInfo", + "description": "Object type identifier. " + }, + "last": { + "$ref": "#/components/schemas/TonBlockIdExt", + "description": "The most recent masterchain block." + }, + "state_root_hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Merkle root of the entire blockchain state at this block." + }, + "init": { + "$ref": "#/components/schemas/TonBlockIdExt", + "description": "The genesis (first) block." + } + }, + "required": [ + "@type", + "last", + "state_root_hash", + "init" + ] + }, + "MasterchainBlockSignatures": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "blocks.blockSignatures" + ], + "default": "blocks.blockSignatures", + "description": "Object type identifier. " + }, + "id": { + "$ref": "#/components/schemas/TonBlockIdExt", + "description": "Request ID. Pass any string and it will be echoed in the response." + }, + "signatures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlockSignature" + }, + "description": "Array of validator signatures." + } + }, + "required": [ + "@type", + "id", + "signatures" + ] + }, + "ShardBlockProof": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { "type": "string", - "title": "Body", - "description": "b64-encoded cell with message body" + "enum": [ + "blocks.shardBlockProof" + ], + "default": "blocks.shardBlockProof", + "description": "Object type identifier. " }, - "init_code": { + "from": { + "$ref": "#/components/schemas/TonBlockIdExt", + "description": "Starting block for the proof." + }, + "mc_id": { + "$ref": "#/components/schemas/TonBlockIdExt", + "description": "Masterchain block identifier." + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShardBlockLink" + }, + "description": "Chain of block links." + }, + "mc_proof": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlockLinkBack" + }, + "description": "Masterchain proof data." + } + }, + "required": [ + "@type", + "from", + "mc_id", + "links", + "mc_proof" + ] + }, + "ConsensusBlock": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { "type": "string", - "title": "Init Code", - "description": "b64-encoded cell with init-code", - "default": "" + "enum": [ + "ext.blocks.consensusBlock" + ], + "default": "ext.blocks.consensusBlock", + "description": "Object type identifier. " }, - "init_data": { + "consensus_block": { + "type": "integer", + "format": "int32", + "description": "Consensus block sequence number." + }, + "timestamp": { + "type": "integer", + "format": "int32", + "description": "Block creation timestamp." + } + }, + "required": [ + "@type", + "consensus_block", + "timestamp" + ], + "description": "The latest block that has achieved finality. Unlike the tip of the chain, this block is guaranteed to never be reverted." + }, + "LookupBlock": { + "$ref": "#/components/schemas/TonBlockIdExt" + }, + "Shards": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "blocks.shards" + ], + "default": "blocks.shards", + "description": "Object type identifier. " + }, + "shards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TonBlockIdExt" + }, + "description": "Array of shard block identifiers." + } + }, + "required": [ + "@type", + "shards" + ], + "description": "List of shardchain blocks at a specific masterchain height. Shows how the basechain is currently partitioned." + }, + "BlockHeader": { + "type": "object", + "additionalProperties": true, + "description": "Block metadata including creation time, validator info, and links to previous blocks. Does not include the transactions themselves.", + "properties": { + "@type": { "type": "string", - "title": "Init Data", - "description": "b64-encoded cell with init-data", - "default": "" + "enum": [ + "blocks.header" + ], + "default": "blocks.header", + "description": "Object type identifier. " }, - "ignore_chksig": { + "id": { + "$ref": "#/components/schemas/TonBlockIdExt", + "description": "Request ID. Pass any string and it will be echoed in the response." + }, + "global_id": { + "type": "integer", + "description": "Global network identifier." + }, + "version": { + "type": "integer", + "description": "Block format version." + }, + "after_merge": { + "type": "boolean", + "description": "True if block was created after a merge." + }, + "after_split": { + "type": "boolean", + "description": "True if block was created after a split." + }, + "before_split": { + "type": "boolean", + "description": "True if block was created before a split." + }, + "want_merge": { + "type": "boolean", + "description": "Indicates if validators wanted a merge." + }, + "want_split": { + "type": "boolean", + "description": "Indicates if validators wanted a split." + }, + "validator_list_hash_short": { + "type": "integer", + "description": "Short hash of validator list." + }, + "catchain_seqno": { + "type": "integer", + "description": "Catchain sequence number." + }, + "min_ref_mc_seqno": { + "type": "integer", + "description": "Minimum referenced masterchain seqno." + }, + "is_key_block": { + "type": "boolean", + "description": "True if this block is a key block." + }, + "prev_key_block_seqno": { + "type": "integer", + "description": "Previous key block sequence number." + }, + "start_lt": { + "type": "string", + "description": "Starting logical time.", + "x-usrv-cpp-type": "std::int64_t" + }, + "end_lt": { + "type": "string", + "description": "Ending logical time.", + "x-usrv-cpp-type": "std::int64_t" + }, + "gen_utime": { + "type": "integer", + "description": "Block generation UNIX timestamp." + }, + "prev_blocks": { + "type": "array", + "description": "List of previous block identifiers.", + "items": { + "$ref": "#/components/schemas/TonBlockIdExt" + } + } + }, + "required": [ + "@type", + "id", + "global_id", + "version", + "after_merge", + "after_split", + "before_split", + "want_merge", + "want_split", + "validator_list_hash_short", + "catchain_seqno", + "min_ref_mc_seqno", + "is_key_block", + "prev_key_block_seqno", + "start_lt", + "end_lt", + "gen_utime", + "prev_blocks" + ] + }, + "OutMsgQueueSizes": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "blocks.outMsgQueueSizes" + ], + "default": "blocks.outMsgQueueSizes", + "description": "Object type identifier. " + }, + "shards": { + "type": "array", + "description": "List of outgoing message queue sizes per shard.", + "items": { + "$ref": "#/components/schemas/OutMsgQueueSize" + } + }, + "ext_msg_queue_size_limit": { + "type": "integer", + "description": "Limit for the external message queue size." + } + }, + "required": [ + "@type", + "shards", + "ext_msg_queue_size_limit" + ] + }, + "ConfigInfo": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "configInfo" + ], + "default": "configInfo", + "description": "Object type identifier. " + }, + "config": { + "$ref": "#/components/schemas/TvmCell", + "description": "The configuration parameter value." + } + }, + "required": [ + "@type", + "config" + ], + "description": "Blockchain configuration data. Contains one or more config parameters as requested. Each parameter controls different aspects of network operation." + }, + "LibraryResult": { + "type": "object", + "additionalProperties": false, + "properties": { + "@type": { + "type": "string", + "enum": [ + "smc.libraryResult" + ], + "default": "smc.libraryResult", + "description": "Object type identifier. " + }, + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LibraryEntry" + }, + "description": "The response data. Only present when `ok` is true. " + } + }, + "required": [ + "@type", + "result" + ], + "description": "Library code fetched by hash. Contains the actual code cells for shared libraries referenced by smart contracts." + }, + "BlockTransactions": { + "type": "object", + "additionalProperties": false, + "description": "Block transactions information", + "properties": { + "@type": { + "type": "string", + "enum": [ + "blocks.transactions" + ], + "default": "blocks.transactions", + "description": "Object type identifier. " + }, + "id": { + "description": "Request ID. Pass any string and it will be echoed in the response.", + "$ref": "#/components/schemas/TonBlockIdExt" + }, + "req_count": { + "type": "integer", + "description": "Number of requested transactions" + }, + "incomplete": { + "type": "boolean", + "description": "Indicates if the transaction list is incomplete" + }, + "transactions": { + "type": "array", + "description": "List of short transaction identifiers", + "items": { + "$ref": "#/components/schemas/ShortTxId" + } + } + }, + "required": [ + "@type", + "id", + "req_count", + "incomplete", + "transactions" + ] + }, + "BlockTransactionsExt": { + "type": "object", + "additionalProperties": false, + "description": "Block transactions information", + "properties": { + "@type": { + "type": "string", + "enum": [ + "blocks.transactionsExt" + ], + "default": "blocks.transactionsExt", + "description": "Object type identifier. " + }, + "id": { + "description": "Request ID. Pass any string and it will be echoed in the response.", + "$ref": "#/components/schemas/TonBlockIdExt" + }, + "req_count": { + "type": "integer", + "description": "Number of requested transactions" + }, + "incomplete": { "type": "boolean", - "title": "Ignore Chksig", - "description": "If true during test query processing assume that all chksig operations return True", - "default": true + "description": "Indicates if the transaction list is incomplete" + }, + "transactions": { + "type": "array", + "description": "List of short transaction identifiers", + "items": { + "$ref": "#/components/schemas/TransactionExt" + } } }, + "required": [ + "@type", + "id", + "req_count", + "incomplete", + "transactions" + ] + }, + "Transactions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transaction" + } + }, + "TransactionsStd": { "type": "object", + "additionalProperties": false, "required": [ - "address", - "body" + "@type", + "transactions", + "previous_transaction_id" ], - "title": "Body_estimate_fee_estimateFee_post" - }, - "Body_run_get_method_runGetMethod_post": { "properties": { - "address": { + "@type": { "type": "string", - "title": "Address", - "description": "Contract address" - }, - "method": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } + "enum": [ + "raw.transactions" ], - "title": "Method", - "description": "Method name or method id" + "default": "raw.transactions", + "description": "Object type identifier. " }, - "stack": { + "transactions": { + "type": "array", "items": { - "items": {}, - "type": "array" + "$ref": "#/components/schemas/TransactionStd" }, - "type": "array", - "title": "Stack", - "description": "Array of stack elements: `[['num',3], ['cell', cell_object], ['slice', slice_object]]`" + "description": "Array of transactions." }, - "seqno": { - "type": "integer", - "title": "Seqno", - "description": "Seqno of masterchain block at which moment the Get Method is to be executed" + "previous_transaction_id": { + "$ref": "#/components/schemas/InternalTransactionId", + "description": "Previous transaction reference for pagination." } - }, + } + }, + "ExtMessageInfo": { "type": "object", + "additionalProperties": false, "required": [ - "address", - "method", - "stack" + "@type", + "hash", + "hash_norm" ], - "title": "Body_run_get_method_runGetMethod_post" - }, - "Body_send_boc_return_hash_sendBocReturnHash_post": { "properties": { - "boc": { + "@type": { "type": "string", - "title": "Boc", - "description": "b64 encoded bag of cells" + "enum": [ + "raw.extMessageInfo" + ], + "default": "raw.extMessageInfo", + "description": "Object type identifier. " + }, + "hash": { + "$ref": "#/components/schemas/TonHash", + "description": "Unique identifier hash for this object." + }, + "hash_norm": { + "$ref": "#/components/schemas/TonHash", + "description": "Normalized message hash." } }, + "description": "Information about a broadcast external message. Contains the message hash which you can use to track its processing." + }, + "ResultOk": { "type": "object", + "additionalProperties": false, "required": [ - "boc" + "@type" ], - "title": "Body_send_boc_return_hash_sendBocReturnHash_post" - }, - "Body_send_boc_sendBoc_post": { "properties": { - "boc": { + "@type": { "type": "string", - "title": "Boc", - "description": "b64 encoded bag of cells" + "enum": [ + "ok" + ], + "default": "ok", + "description": "Object type identifier. " } }, + "description": "Simple success response with no additional data." + }, + "SendBocResult": { + "oneOf": [ + { + "$ref": "#/components/schemas/ResultOk" + }, + { + "$ref": "#/components/schemas/ExtMessageInfo" + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "ok": "#/components/schemas/ResultOk", + "ext.messageInfo": "#/components/schemas/ExtMessageInfo" + } + } + }, + "Fees": { "type": "object", + "additionalProperties": false, "required": [ - "boc" + "@type", + "in_fwd_fee", + "storage_fee", + "gas_fee", + "fwd_fee" ], - "title": "Body_send_boc_sendBoc_post" - }, - "Body_send_query_sendQuery_post": { "properties": { - "address": { + "@type": { "type": "string", - "title": "Address", - "description": "Address in any format" + "enum": [ + "fees" + ], + "default": "fees", + "description": "Object type identifier. " }, - "body": { - "type": "string", - "title": "Body", - "description": "b64-encoded BoC-serialized cell with message body" + "in_fwd_fee": { + "type": "integer", + "format": "int64", + "description": "Inbound forwarding fee in nanotons." }, - "init_code": { - "type": "string", - "title": "Init Code", - "description": "b64-encoded BoC-serialized cell with init-code", - "default": "" + "storage_fee": { + "type": "integer", + "format": "int64", + "description": "Fees paid for storing the contract state on-chain, in nanotons. Charged based on contract size and time." }, - "init_data": { - "type": "string", - "title": "Init Data", - "description": "b64-encoded BoC-serialized cell with init-data", - "default": "" + "gas_fee": { + "type": "integer", + "format": "int64", + "description": "Gas fees in nanotons." + }, + "fwd_fee": { + "type": "integer", + "format": "int64", + "description": "Fee for forwarding this message to its destination, in nanotons." } - }, + } + }, + "QueryFees": { "type": "object", + "additionalProperties": false, "required": [ - "address", - "body" + "@type", + "source_fees", + "destination_fees" ], - "title": "Body_send_query_sendQuery_post" - }, - "DeprecatedTonResponseJsonRPC": { "properties": { - "ok": { - "type": "boolean", - "title": "Ok" - }, - "result": { - "title": "Result" - }, - "error": { + "@type": { "type": "string", - "title": "Error" - }, - "code": { - "type": "integer", - "title": "Code" + "enum": [ + "query.fees" + ], + "default": "query.fees", + "description": "Object type identifier. " }, - "id": { - "type": "string", - "title": "Id" + "source_fees": { + "$ref": "#/components/schemas/Fees", + "description": "Fees charged at source." }, - "jsonrpc": { - "type": "string", - "title": "Jsonrpc", - "default": "2.0" + "destination_fees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Fees" + }, + "description": "Fees charged at destination." } }, + "description": "Estimated fees for a transaction. Shows the breakdown between storage fees (for contract state), gas fees (for computation), and forward fees (for message delivery)." + }, + "TvmStackEntrySlice": { "type": "object", + "additionalProperties": false, "required": [ - "ok", - "id" + "@type", + "slice" ], - "title": "DeprecatedTonResponseJsonRPC" - }, - "TonRequestJsonRPC": { "properties": { - "method": { - "type": "string", - "title": "Method" - }, - "params": { - "type": "object", - "title": "Params", - "default": {} - }, - "id": { + "@type": { "type": "string", - "title": "Id" + "enum": [ + "tvm.stackEntrySlice" + ], + "default": "tvm.stackEntrySlice", + "description": "Object type identifier. " }, - "jsonrpc": { - "type": "string", - "title": "Jsonrpc" + "slice": { + "$ref": "#/components/schemas/TvmSlice", + "description": "TVM slice value." } - }, + } + }, + "TvmStackEntryCell": { "type": "object", + "additionalProperties": false, "required": [ - "method" + "@type", + "cell" ], - "title": "TonRequestJsonRPC" - }, - "TonResponse": { "properties": { - "ok": { - "type": "boolean", - "title": "Ok" - }, - "result": { - "anyOf": [ - { - "type": "string" - }, - { - "items": {}, - "type": "array" - }, - { - "type": "object" - } - ], - "title": "Result" - }, - "error": { + "@type": { "type": "string", - "title": "Error" + "enum": [ + "tvm.stackEntryCell" + ], + "default": "tvm.stackEntryCell", + "description": "Object type identifier. " }, - "code": { - "type": "integer", - "title": "Code" + "cell": { + "$ref": "#/components/schemas/TvmCell", + "description": "TVM cell value." } - }, + } + }, + "TvmStackEntryNumber": { "type": "object", + "additionalProperties": false, "required": [ - "ok" + "@type", + "number" ], - "title": "TonResponse" - }, - "InternalTransactionId": { - "type": "object", - "description": "Internal transaction identifier.", "properties": { "@type": { "type": "string", - "example": "internal.transactionId" - }, - "lt": { - "type": "string", - "description": "Logical time." + "enum": [ + "tvm.stackEntryNumber" + ], + "default": "tvm.stackEntryNumber", + "description": "Object type identifier. " }, - "hash": { - "type": "string", - "description": "Base64 hash of the tx." + "number": { + "$ref": "#/components/schemas/TvmNumberDecimal", + "description": "TVM number value." } - }, - "required": [ - "lt", - "hash" - ] + } }, - "TonBlockIdExt": { + "TvmStackEntryTuple": { "type": "object", + "additionalProperties": false, + "required": [ + "@type", + "tuple" + ], "properties": { "@type": { "type": "string", - "example": "ton.blockIdExt" - }, - "workchain": { - "type": "integer" + "enum": [ + "tvm.stackEntryTuple" + ], + "default": "tvm.stackEntryTuple", + "description": "Object type identifier. " }, - "shard": { + "tuple": { + "$ref": "#/components/schemas/TvmTuple", + "description": "TVM tuple value." + } + } + }, + "TvmStackEntryList": { + "type": "object", + "additionalProperties": false, + "required": [ + "@type", + "list" + ], + "properties": { + "@type": { "type": "string", - "description": "64-bit signed integer as string" - }, - "seqno": { - "type": "integer" - }, - "root_hash": { - "type": "string" + "enum": [ + "tvm.stackEntryList" + ], + "default": "tvm.stackEntryList", + "description": "Object type identifier. " }, - "file_hash": { - "type": "string" + "list": { + "$ref": "#/components/schemas/TvmList", + "description": "TVM list value." } - }, + } + }, + "TvmStackEntryUnsupported": { + "type": "object", + "additionalProperties": false, "required": [ - "workchain", - "shard", - "seqno", - "root_hash", - "file_hash" + "@type" ], - "description": "Extended block identifier." + "properties": { + "@type": { + "type": "string", + "enum": [ + "tvm.stackEntryUnsupported" + ], + "default": "tvm.stackEntryUnsupported", + "description": "Object type identifier. " + } + } }, - "AccountAddress": { + "TvmSlice": { "type": "object", - "description": "Account address object.", + "additionalProperties": false, + "required": [ + "@type", + "bytes" + ], "properties": { "@type": { "type": "string", - "example": "accountAddress" + "enum": [ + "tvm.slice" + ], + "default": "tvm.slice", + "description": "Object type identifier. " }, - "account_address": { - "type": "string", - "description": "Friendly address string." + "bytes": { + "$ref": "#/components/schemas/Bytes", + "description": "Slice data in base64." } - }, - "required": [ - "account_address" - ] + } }, - "GetAddressInformationResult": { + "TvmCell": { "type": "object", - "description": "Raw account state augmented with computed `state`. Fields come directly from tonlib.", + "additionalProperties": false, + "required": [ + "@type", + "bytes" + ], "properties": { "@type": { - "type": "string", - "example": "raw.fullAccountState" - }, - "address": { - "$ref": "#/components/schemas/AccountAddress" - }, - "balance": { - "type": "string", - "description": "Balance in nanotons." - }, - "extra_currencies": { - "type": "array", - "items": { - "type": "object" - } - }, - "code": { - "type": "string", - "description": "Base64-encoded code cell" - }, - "data": { - "type": "string", - "description": "Base64-encoded data cell" - }, - "last_transaction_id": { - "$ref": "#/components/schemas/InternalTransactionId" - }, - "block_id": { - "$ref": "#/components/schemas/TonBlockIdExt" - }, - "frozen_hash": { - "type": "string" - }, - "sync_utime": { - "type": "integer" - }, - "@extra": { - "type": "string" - }, - "state": { "type": "string", "enum": [ - "uninitialized", - "active", - "frozen" + "tvm.cell" ], - "description": "Computed from code/frozen_hash by the API server." - } - }, - "required": [ - "balance", - "last_transaction_id", - "state" - ] - }, - "GetAddressInformationResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" - }, - { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/GetAddressInformationResult" - } - } + "default": "tvm.cell", + "description": "Object type identifier. " + }, + "bytes": { + "$ref": "#/components/schemas/Bytes", + "description": "Cell data in base64." } - ] + } }, - "GetExtendedAddressInformationResult": { + "TvmNumberDecimal": { "type": "object", - "description": "Generic account state decoded by tonlib; contract-specific `account_state` may contain typed fields (e.g., wallet.v3.accountState).", + "additionalProperties": false, + "required": [ + "@type", + "number" + ], "properties": { "@type": { "type": "string", - "example": "fullAccountState" - }, - "address": { - "$ref": "#/components/schemas/AccountAddress" + "enum": [ + "tvm.numberDecimal" + ], + "default": "tvm.numberDecimal", + "description": "Object type identifier. " }, - "balance": { - "type": "string" + "number": { + "$ref": "#/components/schemas/Int256", + "description": "Decimal number as string." + } + } + }, + "TvmTuple": { + "type": "object", + "additionalProperties": false, + "required": [ + "@type", + "elements" + ], + "properties": { + "@type": { + "type": "string", + "enum": [ + "tvm.tuple" + ], + "default": "tvm.tuple", + "description": "Object type identifier. " }, - "extra_currencies": { + "elements": { "type": "array", "items": { - "type": "object" - } - }, - "last_transaction_id": { - "$ref": "#/components/schemas/InternalTransactionId" - }, - "block_id": { - "$ref": "#/components/schemas/TonBlockIdExt" - }, - "sync_utime": { - "type": "integer" - }, - "account_state": { - "type": "object", - "description": "Decoded state depending on contract type. For wallets, may include wallet_id and seqno.", - "properties": { - "@type": { - "type": "string", - "example": "wallet.v3.accountState" - }, - "wallet_id": { - "type": "string" - }, - "seqno": { - "type": "integer" + "oneOf": [ + { + "$ref": "#/components/schemas/TvmStackEntrySlice", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryCell", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryNumber", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryTuple", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryList", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryUnsupported", + "x-usrv-cpp-indirect": true + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "tvm.stackEntrySlice": "#/components/schemas/TvmStackEntrySlice", + "tvm.stackEntryCell": "#/components/schemas/TvmStackEntryCell", + "tvm.stackEntryNumber": "#/components/schemas/TvmStackEntryNumber", + "tvm.stackEntryTuple": "#/components/schemas/TvmStackEntryTuple", + "tvm.stackEntryList": "#/components/schemas/TvmStackEntryList", + "tvm.stackEntryUnsupported": "#/components/schemas/TvmStackEntryUnsupported" + } } }, - "additionalProperties": true - }, - "revision": { - "type": "integer" - }, - "@extra": { - "type": "string" + "description": "Array of stack entries." } - }, - "required": [ - "balance", - "last_transaction_id" - ] + } }, - "GetExtendedAddressInformationResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" + "TvmList": { + "type": "object", + "additionalProperties": false, + "required": [ + "@type", + "elements" + ], + "properties": { + "@type": { + "type": "string", + "enum": [ + "tvm.list" + ], + "default": "tvm.list", + "description": "Object type identifier. " }, - { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/GetExtendedAddressInformationResult" + "elements": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TvmStackEntrySlice", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryCell", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryNumber", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryTuple", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryList", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryUnsupported", + "x-usrv-cpp-indirect": true + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "tvm.stackEntrySlice": "#/components/schemas/TvmStackEntrySlice", + "tvm.stackEntryCell": "#/components/schemas/TvmStackEntryCell", + "tvm.stackEntryNumber": "#/components/schemas/TvmStackEntryNumber", + "tvm.stackEntryTuple": "#/components/schemas/TvmStackEntryTuple", + "tvm.stackEntryList": "#/components/schemas/TvmStackEntryList", + "tvm.stackEntryUnsupported": "#/components/schemas/TvmStackEntryUnsupported" + } } - } + }, + "description": "Array of stack entries." } - ] + } }, - "GetWalletInformationResult": { + "RunGetMethodStdRequest": { "type": "object", - "description": "Parsed wallet info built by the API: wallet flags + wallet-specific fields if recognized.", + "additionalProperties": false, + "required": [ + "address", + "method", + "stack" + ], "properties": { - "wallet": { - "type": "boolean" + "address": { + "$ref": "#/components/schemas/TonAddr", + "description": "The account address in user-friendly format." }, - "balance": { - "type": "string" + "method": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int32" + } + ], + "description": "The get method name (e.g., \"seqno\", \"get_wallet_data\") or its numeric ID." }, - "extra_currencies": { + "stack": { "type": "array", "items": { - "type": "object" - } + "oneOf": [ + { + "$ref": "#/components/schemas/TvmStackEntrySlice", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryCell", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryNumber", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryTuple", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryList", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryUnsupported", + "x-usrv-cpp-indirect": true + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "tvm.stackEntrySlice": "#/components/schemas/TvmStackEntrySlice", + "tvm.stackEntryCell": "#/components/schemas/TvmStackEntryCell", + "tvm.stackEntryNumber": "#/components/schemas/TvmStackEntryNumber", + "tvm.stackEntryTuple": "#/components/schemas/TvmStackEntryTuple", + "tvm.stackEntryList": "#/components/schemas/TvmStackEntryList", + "tvm.stackEntryUnsupported": "#/components/schemas/TvmStackEntryUnsupported" + } + } + }, + "description": "Input arguments or output values as a TVM stack. Each entry has a type and value." }, - "account_state": { + "seqno": { + "type": "integer", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + } + } + }, + "RunGetMethodStdResult": { + "type": "object", + "additionalProperties": false, + "required": [ + "@type", + "gas_used", + "stack", + "exit_code" + ], + "properties": { + "@type": { "type": "string", "enum": [ - "uninitialized", - "active", - "frozen" - ] - }, - "wallet_type": { - "type": "string", - "nullable": true + "smc.runResult" + ], + "default": "smc.runResult", + "description": "Object type identifier. " }, - "seqno": { + "gas_used": { "type": "integer", - "nullable": true - }, - "last_transaction_id": { - "$ref": "#/components/schemas/InternalTransactionId" + "format": "int64", + "description": "Amount of gas consumed during execution. Useful for estimating costs of similar operations." }, - "wallet_id": { - "type": "string" + "stack": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/TvmStackEntrySlice", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryCell", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryNumber", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryTuple", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryList", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmStackEntryUnsupported", + "x-usrv-cpp-indirect": true + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "tvm.stackEntrySlice": "#/components/schemas/TvmStackEntrySlice", + "tvm.stackEntryCell": "#/components/schemas/TvmStackEntryCell", + "tvm.stackEntryNumber": "#/components/schemas/TvmStackEntryNumber", + "tvm.stackEntryTuple": "#/components/schemas/TvmStackEntryTuple", + "tvm.stackEntryList": "#/components/schemas/TvmStackEntryList", + "tvm.stackEntryUnsupported": "#/components/schemas/TvmStackEntryUnsupported" + } + } + }, + "description": "Input arguments or output values as a TVM stack. Each entry has a type and value." }, - "public_key": { - "type": "string" + "exit_code": { + "type": "integer", + "format": "int32", + "description": "TVM execution result: 0 or 1 means success, other values indicate errors. Check TON docs for error codes." } }, - "required": [ - "wallet", - "balance", - "extra_currencies", - "account_state" - ] + "description": "Same as RunGetMethodResult but uses typed stack entries for clearer output parsing." }, - "GetWalletInformationResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" - }, - { + "LegacyTvmCell": { + "type": "object", + "additionalProperties": false, + "required": [ + "data", + "refs", + "special" + ], + "properties": { + "data": { "type": "object", + "additionalProperties": false, + "required": [ + "b64", + "len" + ], "properties": { - "result": { - "$ref": "#/components/schemas/GetWalletInformationResult" + "b64": { + "$ref": "#/components/schemas/Bytes", + "description": "Cell data in base64." + }, + "len": { + "type": "integer", + "format": "int32", + "description": "Data length in bits." } - } + }, + "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + }, + "refs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LegacyTvmCell" + }, + "description": "Array of child cell references." + }, + "special": { + "type": "boolean", + "description": "True if this is a special cell." } - ] + } }, - "DetectAddressResult": { + "LegacyStackEntryCell": { "type": "object", - "description": "All possible address forms derived from the input. Exact keys depend on pytonlib utils.", + "additionalProperties": false, + "required": [ + "bytes" + ], "properties": { - "raw_form": { - "type": "string", - "description": "Hex raw address (workchain:hash)" - }, - "bounceable": { - "type": "string", - "description": "User-friendly bounceable" + "bytes": { + "$ref": "#/components/schemas/Bytes", + "description": "Cell data in base64." }, - "non_bounceable": { - "type": "string", - "description": "User-friendly non-bounceable" + "object": { + "$ref": "#/components/schemas/LegacyTvmCell", + "description": "Parsed cell object." } - }, - "additionalProperties": true + } }, - "DetectAddressResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" - }, - { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/DetectAddressResult" - } + "LegacyStackEntry": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "$ref": "#/components/schemas/LegacyStackEntryCell" + }, + { + "$ref": "#/components/schemas/TvmTuple", + "x-usrv-cpp-indirect": true + }, + { + "$ref": "#/components/schemas/TvmList", + "x-usrv-cpp-indirect": true } - } - ] + ] + }, + "minItems": 2, + "maxItems": 2 }, - "StringResultResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" + "RunGetMethodRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "address", + "method", + "stack" + ], + "properties": { + "address": { + "$ref": "#/components/schemas/TonAddr", + "description": "The account address in user-friendly format." }, - { - "type": "object", - "properties": { - "result": { + "method": { + "oneOf": [ + { "type": "string" + }, + { + "type": "integer", + "format": "int32" } - } - } - ] - }, - "AddressStateResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" + ], + "description": "The get method name (e.g., \"seqno\", \"get_wallet_data\") or its numeric ID." }, - { - "type": "object", - "properties": { - "result": { - "type": "string", - "enum": [ - "uninitialized", - "active", - "frozen" - ] - } - } + "stack": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LegacyStackEntry" + }, + "description": "Input arguments or output values as a TVM stack. Each entry has a type and value." + }, + "seqno": { + "type": "integer", + "format": "int32", + "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." } - ] + }, + "description": "Request to execute a smart contract get method. Specify address, method name/ID, and input stack." }, - "GetTokenDataResult": { + "RunGetMethodResult": { "type": "object", - "description": "NFT or Jetton information as returned by tonlib; varies by contract type.", - "additionalProperties": true - }, - "GetTokenDataResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" + "additionalProperties": false, + "required": [ + "@type", + "gas_used", + "stack", + "exit_code", + "block_id", + "last_transaction_id" + ], + "properties": { + "@type": { + "type": "string", + "enum": [ + "smc.runResult" + ], + "default": "smc.runResult", + "description": "Object type identifier. " + }, + "gas_used": { + "type": "integer", + "format": "int64", + "description": "Amount of gas consumed during execution. Useful for estimating costs of similar operations." + }, + "stack": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LegacyStackEntry" + }, + "description": "Input arguments or output values as a TVM stack. Each entry has a type and value." + }, + "exit_code": { + "type": "integer", + "format": "int32", + "description": "TVM execution result: 0 or 1 means success, other values indicate errors. Check TON docs for error codes." + }, + "block_id": { + "$ref": "#/components/schemas/TonBlockIdExt", + "description": "Full block identifier where this event occurred." }, - { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/GetTokenDataResult" - } - } + "last_transaction_id": { + "$ref": "#/components/schemas/InternalTransactionId", + "description": "Reference to the most recent transaction. Use as starting point for getTransactions." } - ] + }, + "description": "Result of executing a smart contract get method. Contains the TVM exit code (0 or 1 means success), gas used, and the output stack with return values." }, - "BlocksMasterchainInfo": { + "UnpackedAddress": { "type": "object", - "description": "Information about the latest masterchain block.", + "additionalProperties": false, + "description": "Unpacked address components.", "properties": { - "@type": { - "type": "string", - "example": "blocks.masterchainInfo" + "workchain": { + "type": "integer", + "description": "Workchain ID: -1 for masterchain, 0 for basechain. Most user transactions are on workchain 0." }, - "last": { - "$ref": "#/components/schemas/TonBlockIdExt" + "bounceable": { + "type": "boolean", + "description": "Whether the address is bounceable." }, - "state_root_hash": { - "type": "string" + "testnet": { + "type": "boolean", + "description": "Whether the address is for testnet." }, - "init": { - "$ref": "#/components/schemas/TonBlockIdExt" + "addr_hex": { + "type": "string", + "description": "Account ID in hexadecimal format." + } + } + }, + "DetectAddressResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." + }, + "result": { + "$ref": "#/components/schemas/DetectAddress", + "description": "The response data. Only present when `ok` is true." }, "@extra": { - "type": "string" + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "last", - "state_root_hash", - "init" - ] + "description": "Response containing all address format variants." }, - "GetMasterchainInfoResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" + "DetectHashResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/BlocksMasterchainInfo", - "description": "Information about the latest masterchain block." - } - } + "result": { + "$ref": "#/components/schemas/DetectHash", + "description": "The response data. Only present when `ok` is true. " + }, + "@extra": { + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } - ] + }, + "description": "Response containing all hash format variants." }, - "BlockSignature": { + "PackAddressResponse": { "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "blocks.signature" + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "node_id_short": { + "result": { "type": "string", - "description": "Short node ID" + "description": "The response data. Only present when `ok` is true. " }, - "signature": { + "@extra": { "type": "string", - "description": "Base64 signature" + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "node_id_short", - "signature" - ], - "description": "Validator signature." + "description": "Response containing the packed base64 address." }, - "BlocksBlockSignatures": { + "UnpackAddressResponse": { "type": "object", - "description": "Validator signatures for a given block.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "blocks.blockSignatures" - }, - "id": { - "$ref": "#/components/schemas/TonBlockIdExt" + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "signatures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BlockSignature" - }, - "description": "List of validator signatures for the block." + "result": { + "$ref": "#/components/schemas/UnpackedAddress", + "description": "The response data. Only present when `ok` is true. " }, "@extra": { - "type": "string" + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "id", - "signatures" - ] + "description": "Response containing the unpacked raw address components." }, - "GetMasterchainBlockSignaturesResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" + "AddressInformationResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/BlocksBlockSignatures", - "description": "Validator signatures for a given block." - } - } - } - ] - }, - "GetConsensusBlockResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" + "result": { + "$ref": "#/components/schemas/AddressInformation", + "description": "The response data. Only present when `ok` is true. " }, - { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/BlocksMasterchainInfo", - "description": "Consensus block information from the masterchain." - } - } + "@extra": { + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } - ] + }, + "description": "Response containing account state, balance, code, and data." }, - "BlocksShardBlockProof": { + "ExtendedAddressInformationResponse": { "type": "object", - "description": "Proof of inclusion of a shard block in the masterchain.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "blocks.shardBlockProof" - }, - "from": { - "$ref": "#/components/schemas/TonBlockIdExt" - }, - "mc_id": { - "$ref": "#/components/schemas/TonBlockIdExt" - }, - "links": { - "type": "array", - "items": { - "type": "object" - } + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "mc_proof": { - "type": "array", - "items": { - "type": "object" - } + "result": { + "$ref": "#/components/schemas/ExtendedAddressInformation", + "description": "The response data. Only present when `ok` is true. " }, "@extra": { - "type": "string" + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "from", - "mc_id" - ] + "description": "Response containing extended account information with parsed wallet state." }, - "GetShardBlockProofResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" + "WalletInformationResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/BlocksShardBlockProof", - "description": "Proof of inclusion of a shard block in the masterchain." - } - } + "result": { + "$ref": "#/components/schemas/WalletInformation", + "description": "The response data. Only present when `ok` is true. " + }, + "@extra": { + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } - ] + }, + "description": "Response containing wallet-specific information including type, seqno, and balance." }, - "LookupBlockResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" + "AddressBalanceResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/TonBlockIdExt", - "description": "Block identifier for the looked-up block." - } - } + "result": { + "$ref": "#/components/schemas/Int256", + "description": "The response data. Only present when `ok` is true. " + }, + "@extra": { + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } - ] + }, + "description": "Response containing the account balance in nanotons." }, - "BlocksShards": { + "AddressStateResponse": { "type": "object", - "description": "List of shard blocks at a given masterchain seqno.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "blocks.shards" + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "shards": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TonBlockIdExt" - }, - "description": "Shard block IDs at the given masterchain seqno." + "result": { + "$ref": "#/components/schemas/AccountStateEnum", + "description": "The response data. Only present when `ok` is true. " }, "@extra": { - "type": "string" + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "shards" - ] + "description": "Response containing the account lifecycle state." }, - "ShardsResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" + "TokenDataResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/BlocksShards", - "description": "List of shard blocks at a given masterchain seqno." - } - } + "result": { + "$ref": "#/components/schemas/TokenData", + "description": "The response data. Only present when `ok` is true. " + }, + "@extra": { + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } - ] + }, + "description": "Response containing Jetton or NFT token metadata." }, - "ShortTxId": { + "MasterchainInfoResponse": { "type": "object", - "description": "Short transaction identifier.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "blocks.shortTxId" + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "mode": { - "type": "integer", - "description": "Transaction mode flags." + "result": { + "$ref": "#/components/schemas/MasterchainInfo", + "description": "The response data. Only present when `ok` is true. " }, - "account": { + "@extra": { "type": "string", - "description": "Account address of the transaction." + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." + } + }, + "description": "Response containing current masterchain state and latest block." + }, + "MasterchainBlockSignaturesResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "lt": { - "type": "string", - "description": "Logical time of the transaction." + "result": { + "$ref": "#/components/schemas/MasterchainBlockSignatures", + "description": "The response data. Only present when `ok` is true. " }, - "hash": { + "@extra": { "type": "string", - "description": "Base64 hash of the transaction." + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "account", - "lt", - "hash" - ] + "description": "Response containing validator signatures for a masterchain block." }, - "BlocksTransactions": { + "ShardBlockProofResponse": { "type": "object", - "description": "Transactions included in a block.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "blocks.transactions" - }, - "id": { - "description": "Identifier of the block containing the transactions.", - "$ref": "#/components/schemas/TonBlockIdExt" - }, - "req_count": { - "type": "integer", - "description": "Number of requested transactions." - }, - "incomplete": { + "ok": { "type": "boolean", - "description": "Indicates if the transaction list is incomplete." + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "transactions": { - "type": "array", - "description": "List of short transaction identifiers.", - "items": { - "$ref": "#/components/schemas/ShortTxId" - } + "result": { + "$ref": "#/components/schemas/ShardBlockProof", + "description": "The response data. Only present when `ok` is true. " }, "@extra": { "type": "string", - "description": "Extra metadata for the response." + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "id", - "transactions" - ] - }, - "GetBlockTransactionsResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" - }, - { - "type": "object", - "properties": { - "result": { - "description": "Transactions included in the specified block.", - "$ref": "#/components/schemas/BlocksTransactions" - } - } - } - ] + "description": "Response containing Merkle proof linking shard block to masterchain." }, - "ExtraCurrency": { + "ConsensusBlockResponse": { "type": "object", - "description": "Extra currency amount.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "extraCurrency" + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "id": { - "type": "integer", - "description": "Currency ID." + "result": { + "$ref": "#/components/schemas/ConsensusBlock", + "description": "The response data. Only present when `ok` is true. " }, - "amount": { + "@extra": { "type": "string", - "description": "Amount in smallest units." + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "id", - "amount" - ] + "description": "Response containing the latest consensus block information." }, - "MsgDataRaw": { + "LookupBlockResponse": { "type": "object", - "description": "Raw message data.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "msg.dataRaw" + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "body": { - "type": "string", - "description": "Base64-encoded message body." + "result": { + "$ref": "#/components/schemas/TonBlockIdExt", + "description": "The response data. Only present when `ok` is true. " }, - "init_state": { + "@extra": { "type": "string", - "description": "Base64-encoded init state.", - "nullable": true + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "body" - ] + "description": "Response containing the full block identifier." }, - "RawMessage": { + "ShardsResponse": { "type": "object", - "description": "Raw message.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "raw.message" - }, - "hash": { - "type": "string", - "description": "Base64 hash of the message." - }, - "source": { - "$ref": "#/components/schemas/AccountAddress", - "description": "Source address." - }, - "destination": { - "$ref": "#/components/schemas/AccountAddress", - "description": "Destination address." - }, - "value": { - "type": "string", - "description": "Value in nanotons." - }, - "extra_currencies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExtraCurrency" - }, - "description": "Optional extra currencies." - }, - "fwd_fee": { - "type": "string", - "description": "Forwarding fee in nanotons." - }, - "ihr_fee": { - "type": "string", - "description": "Instant Hypercube Routing fee in nanotons." + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "created_lt": { - "type": "string", - "description": "Message creation logical time." + "result": { + "$ref": "#/components/schemas/Shards", + "description": "The response data. Only present when `ok` is true. " }, - "body_hash": { + "@extra": { "type": "string", - "description": "Base64 hash of message body." - }, - "msg_data": { - "$ref": "#/components/schemas/MsgDataRaw", - "description": "Message data." + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "hash", - "destination", - "value", - "created_lt", - "msg_data" - ] + "description": "Response containing active shardchain blocks for a masterchain block." }, - "RawTransaction": { + "BlockHeaderResponse": { "type": "object", - "description": "Raw transaction object.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "raw.transaction" - }, - "address": { - "$ref": "#/components/schemas/AccountAddress", - "description": "Account address." - }, - "utime": { - "type": "integer", - "description": "UNIX timestamp of the transaction." - }, - "data": { - "type": "string", - "description": "Base64-encoded raw transaction data." - }, - "transaction_id": { - "$ref": "#/components/schemas/InternalTransactionId", - "description": "Internal transaction id." - }, - "fee": { - "type": "string", - "description": "Total fee in nanotons." - }, - "storage_fee": { - "type": "string", - "description": "Storage fee in nanotons." - }, - "other_fee": { - "type": "string", - "description": "Other fees in nanotons." - }, - "in_msg": { - "$ref": "#/components/schemas/RawMessage", - "description": "Incoming message.", - "nullable": true + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "out_msgs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RawMessage" - }, - "description": "Outgoing messages." + "result": { + "$ref": "#/components/schemas/BlockHeader", + "description": "The response data. Only present when `ok` is true. " }, - "account": { + "@extra": { "type": "string", - "description": "Workchain:hex account id." + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "transaction_id", - "fee", - "other_fee", - "out_msgs", - "account" - ] + "description": "Response containing block header information." }, - "BlocksTransactionsExt": { + "OutMsgQueueSizeResponse": { "type": "object", - "description": "Extended transactions included in a block.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "blocks.transactionsExt" - }, - "id": { - "$ref": "#/components/schemas/TonBlockIdExt", - "description": "Identifier of the block." - }, - "req_count": { - "type": "integer", - "description": "Number of requested transactions." - }, - "incomplete": { + "ok": { "type": "boolean", - "description": "Whether the list is truncated." + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "transactions": { - "type": "array", - "description": "Verbose transaction list with raw messages.", - "items": { - "$ref": "#/components/schemas/RawTransaction" - } + "result": { + "$ref": "#/components/schemas/OutMsgQueueSizes", + "description": "The response data. Only present when `ok` is true. " }, "@extra": { "type": "string", - "description": "Extra metadata for the response." + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "id", - "transactions" - ] - }, - "GetBlockTransactionsExtResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" - }, - { - "type": "object", - "properties": { - "result": { - "description": "Extended transactions included in the specified block.", - "$ref": "#/components/schemas/BlocksTransactionsExt" - } - } - } - ] + "description": "Response containing outbound message queue sizes." }, - "BlocksHeader": { + "BlockTransactionsResponse": { "type": "object", - "description": "Block header information.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "blocks.header" - }, - "id": { - "$ref": "#/components/schemas/TonBlockIdExt", - "description": "Extended identifier of the block." - }, - "global_id": { - "type": "integer", - "description": "Global network identifier." - }, - "version": { - "type": "integer", - "description": "Block format version." - }, - "after_merge": { - "type": "boolean", - "description": "True if block was created after a merge." - }, - "after_split": { - "type": "boolean", - "description": "True if block was created after a split." - }, - "before_split": { - "type": "boolean", - "description": "True if block was created before a split." - }, - "want_merge": { - "type": "boolean", - "description": "Indicates if validators wanted a merge." - }, - "want_split": { + "ok": { "type": "boolean", - "description": "Indicates if validators wanted a split." - }, - "validator_list_hash_short": { - "type": "integer", - "description": "Short hash of validator list." + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "catchain_seqno": { - "type": "integer", - "description": "Catchain sequence number." - }, - "min_ref_mc_seqno": { - "type": "integer", - "description": "Minimum referenced masterchain seqno." + "result": { + "$ref": "#/components/schemas/BlockTransactions", + "description": "The response data. Only present when `ok` is true. " }, - "is_key_block": { + "@extra": { + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." + } + }, + "description": "Response containing list of transactions in a block." + }, + "BlockTransactionsExtResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], + "properties": { + "ok": { "type": "boolean", - "description": "True if this block is a key block." - }, - "prev_key_block_seqno": { - "type": "integer", - "description": "Previous key block sequence number." + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "start_lt": { - "type": "string", - "description": "Starting logical time." + "result": { + "$ref": "#/components/schemas/BlockTransactionsExt", + "description": "The response data. Only present when `ok` is true. " }, - "end_lt": { + "@extra": { "type": "string", - "description": "Ending logical time." - }, - "gen_utime": { - "type": "integer", - "description": "Block generation UNIX timestamp." + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." + } + }, + "description": "Response containing detailed transactions from a block." + }, + "TransactionsResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "prev_blocks": { + "result": { "type": "array", - "description": "List of previous block identifiers.", "items": { - "$ref": "#/components/schemas/TonBlockIdExt" - } + "$ref": "#/components/schemas/Transaction" + }, + "description": "The response data. Only present when `ok` is true. " }, "@extra": { "type": "string", - "description": "Extra metadata for the response." + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "id", - "global_id", - "version", - "gen_utime" - ] + "description": "Response containing list of account transactions." }, - "GetBlockHeaderResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" + "TransactionsV2Response": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - { - "type": "object", - "properties": { - "result": { - "description": "Header information of the specified block.", - "$ref": "#/components/schemas/BlocksHeader" - } - } + "result": { + "$ref": "#/components/schemas/TransactionsStd", + "description": "The response data. Only present when `ok` is true. " + }, + "@extra": { + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } - ] + }, + "description": "Response containing account transactions in V2 format." }, - "BlocksOutMsgQueueSize": { + "LocateTxResponse": { "type": "object", - "description": "Size of the outgoing message queue for a shard.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "blocks.outMsgQueueSize" + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "id": { - "$ref": "#/components/schemas/TonBlockIdExt", - "description": "Block identifier for the shard." + "result": { + "$ref": "#/components/schemas/Transaction", + "description": "The response data. Only present when `ok` is true. " }, - "size": { - "type": "integer", - "description": "Queue size for the shard." + "@extra": { + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "id", - "size" - ] + "description": "Response containing the located transaction." }, - "BlocksOutMsgQueueSizes": { + "LocateResultTxResponse": { "type": "object", - "description": "Outgoing message queue sizes for shards.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "blocks.outMsgQueueSizes" - }, - "shards": { - "type": "array", - "description": "List of outgoing message queue sizes per shard.", - "items": { - "$ref": "#/components/schemas/BlocksOutMsgQueueSize" - } + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "ext_msg_queue_size_limit": { - "type": "integer", - "description": "Limit for the external message queue size." + "result": { + "$ref": "#/components/schemas/Transaction", + "description": "The response data. Only present when `ok` is true. " }, "@extra": { "type": "string", - "description": "Extra metadata for the response." + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "shards", - "ext_msg_queue_size_limit" - ] + "description": "Response containing the result transaction." }, - "GetOutMsgQueueSizesResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" + "LocateSourceTxResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - { - "type": "object", - "properties": { - "result": { - "description": "Outgoing message queue sizes for all shards.", - "$ref": "#/components/schemas/BlocksOutMsgQueueSizes" - } - } + "result": { + "$ref": "#/components/schemas/Transaction", + "description": "The response data. Only present when `ok` is true. " + }, + "@extra": { + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } - ] + }, + "description": "Response containing the source transaction." }, - "TvmCell": { + "ConfigParamResponse": { "type": "object", - "description": "Raw TVM cell serialized as base64 bytes.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "tvm.cell" + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "bytes": { + "result": { + "$ref": "#/components/schemas/ConfigInfo", + "description": "The response data. Only present when `ok` is true. " + }, + "@extra": { "type": "string", - "description": "Base64-encoded BoC bytes." + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, - "required": [ - "bytes" - ] + "description": "Response containing the requested configuration parameter." }, - "ConfigInfo": { + "ConfigAllResponse": { "type": "object", - "description": "Configuration parameter payload.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { - "type": "string", - "example": "configInfo" + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "config": { - "$ref": "#/components/schemas/TvmCell", - "description": "TVM cell with the parameter contents." + "result": { + "$ref": "#/components/schemas/ConfigInfo", + "description": "The response data. Only present when `ok` is true. " }, "@extra": { "type": "string", - "description": "Extra metadata for the response." + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, + "description": "Response containing all configuration parameters." + }, + "LibrariesResponse": { + "type": "object", + "additionalProperties": false, "required": [ - "config" - ] + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." + }, + "result": { + "$ref": "#/components/schemas/LibraryResult", + "description": "The response data. Only present when `ok` is true. " + }, + "@extra": { + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." + } + }, + "description": "Response containing requested library code." }, - "GetConfigParamResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" + "SendBocResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - { - "type": "object", - "properties": { - "result": { - "description": "Configuration parameter for the requested id (at optional seqno).", - "$ref": "#/components/schemas/ConfigInfo" - } - } + "result": { + "$ref": "#/components/schemas/ResultOk", + "description": "The response data. Only present when `ok` is true. " + }, + "@extra": { + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } - ] + }, + "description": "Response confirming message was accepted for broadcast." }, - "ConfigAll": { + "SendBocReturnHashResponse": { "type": "object", - "description": "All configuration parameters at a specific masterchain state.", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], "properties": { - "@type": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." + }, + "result": { + "$ref": "#/components/schemas/ExtMessageInfo", + "description": "The response data. Only present when `ok` is true. " + }, + "@extra": { "type": "string", - "example": "configInfo" + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." + } + }, + "description": "Response containing the message hash after broadcast." + }, + "EstimateFeeResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - "config": { - "$ref": "#/components/schemas/TvmCell", - "description": "TVM cell containing all configuration parameters." + "result": { + "$ref": "#/components/schemas/QueryFees", + "description": "The response data. Only present when `ok` is true. " }, "@extra": { "type": "string", - "description": "Extra metadata for the response." + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } }, + "description": "Response containing estimated transaction fees." + }, + "RunGetMethodResponse": { + "type": "object", + "additionalProperties": false, "required": [ - "config" - ] + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." + }, + "result": { + "$ref": "#/components/schemas/RunGetMethodResult", + "description": "The response data. Only present when `ok` is true. " + }, + "@extra": { + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." + } + }, + "description": "Response containing get method execution results." }, - "GetConfigAllResponse": { - "allOf": [ - { - "$ref": "#/components/schemas/TonResponse" + "RunGetMethodStdResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "result" + ], + "properties": { + "ok": { + "type": "boolean", + "default": true, + "description": "Indicates if the request succeeded. If false, check the `error` field for details." }, - { - "type": "object", - "properties": { - "result": { - "description": "All configuration parameters for the requested masterchain seqno.", - "$ref": "#/components/schemas/ConfigAll" - } - } + "result": { + "$ref": "#/components/schemas/RunGetMethodStdResult", + "description": "The response data. Only present when `ok` is true. " + }, + "@extra": { + "type": "string", + "description": "Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses." } - ] + }, + "description": "Response containing get method execution results in standard format." } } - }, - "tags": [ - { - "name": "Accounts", - "description": "Information about accounts." - }, - { - "name": "Blocks", - "description": "Information about blocks." - }, - { - "name": "Transactions", - "description": "Fetching and locating transactions." - }, - { - "name": "Config", - "description": "Get blockchain config" - }, - { - "name": "Smart contracts", - "description": "Run get method of smart contract." - }, - { - "name": "Messages and Transactions", - "description": "Send data to blockchain." - }, - { - "name": "JSON-RPC", - "description": "JSON-RPC endpoint." - } - ] -} + } +} \ No newline at end of file