From 00366aec50d0f70d342b503305762902b2ab3a8d Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Fri, 28 Nov 2025 05:27:49 +0200 Subject: [PATCH 01/21] update field descriptions --- ecosystem/api/toncenter/v2.json | 10057 +++++++++++++++++++++--------- 1 file changed, 7172 insertions(+), 2885 deletions(-) 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 From eaef911730f6d0f0dbe0a3381a6020321af02377 Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Tue, 17 Feb 2026 16:41:36 +0200 Subject: [PATCH 02/21] error updates --- ecosystem/api/toncenter/v2.json | 1965 +++++++++++++++++++++++++++++-- 1 file changed, 1837 insertions(+), 128 deletions(-) diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index 848087d09..848fb7da4 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -1,5 +1,5 @@ { - "openapi": "3.1.1", + "openapi": "3.1.0", "info": { "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", @@ -45,8 +45,23 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_jsonrpc" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "500": { + "$ref": "#/components/responses/500_execution" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -83,8 +98,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" } }, "security": [ @@ -124,8 +148,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" } }, "security": [ @@ -162,8 +195,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" } }, "security": [ @@ -203,8 +245,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" } }, "security": [ @@ -241,8 +292,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" } }, "security": [ @@ -282,8 +342,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" } }, "security": [ @@ -320,8 +389,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" } }, "security": [ @@ -361,8 +439,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" } }, "security": [ @@ -402,8 +489,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -443,8 +542,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -484,8 +595,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -525,8 +648,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -566,8 +701,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -607,8 +754,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -648,8 +807,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -689,8 +860,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -730,8 +913,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -771,8 +966,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -809,8 +1016,26 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "409": { + "$ref": "#/components/responses/409" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "500": { + "$ref": "#/components/responses/500_token" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -850,8 +1075,26 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "409": { + "$ref": "#/components/responses/409" + }, + "422": { + "$ref": "#/components/responses/422_address" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "500": { + "$ref": "#/components/responses/500_token" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -884,8 +1127,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -925,8 +1177,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -963,8 +1224,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_block" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1004,8 +1277,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_block" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1058,8 +1343,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_block" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1099,8 +1396,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_block" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1133,8 +1442,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1174,8 +1492,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1238,8 +1565,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_lookup" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1279,8 +1618,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_lookup" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1318,8 +1669,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_block" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1359,8 +1722,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_block" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1409,8 +1784,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_block" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1450,8 +1837,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_block" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1483,8 +1882,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1524,8 +1932,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1583,8 +2000,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_block_tx" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1624,8 +2053,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_block_tx" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1683,8 +2124,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_block_tx" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1724,8 +2177,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_block_tx" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1778,8 +2243,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_transaction" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1819,8 +2296,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_transaction" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1873,8 +2362,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_transaction" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1897,7 +2398,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TransactionsStdRequest" + "$ref": "#/components/schemas/TransactionsRequest" } } }, @@ -1914,8 +2415,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_transaction" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1958,8 +2471,23 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422_locate" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -1999,8 +2527,23 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422_locate" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -2043,8 +2586,23 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422_locate" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -2084,8 +2642,23 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422_locate" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -2128,8 +2701,23 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422_locate" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -2169,8 +2757,23 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "422": { + "$ref": "#/components/responses/422_locate" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -2224,8 +2827,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_config" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -2265,8 +2880,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_config" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -2310,8 +2937,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -2351,8 +2987,17 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -2398,8 +3043,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_libraries" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -2439,8 +3096,20 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_libraries" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -2483,8 +3152,26 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_run" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "500": { + "$ref": "#/components/responses/500_execution" + }, + "504": { + "$ref": "#/components/responses/504" + }, + "542": { + "$ref": "#/components/responses/542" } }, "security": [ @@ -2527,8 +3214,26 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_run" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "500": { + "$ref": "#/components/responses/500_execution" + }, + "504": { + "$ref": "#/components/responses/504" + }, + "542": { + "$ref": "#/components/responses/542" } }, "security": [ @@ -2571,8 +3276,23 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_send" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "500": { + "$ref": "#/components/responses/500_send" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -2615,8 +3335,23 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_send" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "500": { + "$ref": "#/components/responses/500_send" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -2659,8 +3394,23 @@ } } }, - "default": { - "$ref": "#/components/responses/default" + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "422": { + "$ref": "#/components/responses/422_run" + }, + "429": { + "$ref": "#/components/responses/429" + }, + "500": { + "$ref": "#/components/responses/500_execution" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -2909,18 +3659,977 @@ } } } + }, + "401": { + "description": "API key does not exist. Check for typos or generate a new key.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 401, + "description": "HTTP status code `401`." + }, + "error": { + "type": "string", + "enum": [ + "API key does not exist" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 401, + "error": "API key does not exist" + } + } + } + }, + "403": { + "description": "API key is not allowed for this network (e.g. testnet key used on mainnet).", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 403, + "description": "HTTP status code `403`." + }, + "error": { + "type": "string", + "enum": [ + "Network not allowed" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 403, + "error": "Network not allowed" + } + } + } + }, + "404": { + "description": "Requested data not found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 404, + "description": "HTTP status code `404`." + }, + "error": { + "type": "string", + "enum": [ + "transaction not found" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 404, + "error": "transaction not found" + } + } + } + }, + "409": { + "description": "Resource exists but is the wrong type.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 409, + "description": "HTTP status code `409`." + }, + "error": { + "type": "string", + "enum": [ + "Smart contract is not Jetton or NFT" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 409, + "error": "Smart contract is not Jetton or NFT" + } + } + } + }, + "422_address": { + "description": "Invalid address or seqno parameter.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 422, + "description": "HTTP status code `422`." + }, + "error": { + "type": "string", + "enum": [ + "empty address", + "failed to parse address", + "failed to parse seqno", + "seqno should be positive" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 422, + "error": "empty address" + } + } + } + }, + "422_transaction": { + "description": "Invalid transaction query parameters.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 422, + "description": "HTTP status code `422`." + }, + "error": { + "type": "string", + "enum": [ + "failed to parse address", + "failed to parse hash", + "failed to parse lt", + "lt should be non-negative", + "lt and hash should be used together", + "limit should be positive", + "limit should be less or equal 1000" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 422, + "error": "failed to parse address" + } + } + } + }, + "422_locate": { + "description": "Invalid locate transaction parameters.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 422, + "description": "HTTP status code `422`." + }, + "error": { + "type": "string", + "enum": [ + "empty source address", + "empty destination address", + "failed to parse created_lt", + "created_lt should be non-negative" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 422, + "error": "empty source address" + } + } + } + }, + "422_block": { + "description": "Invalid block query parameters.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 422, + "description": "HTTP status code `422`." + }, + "error": { + "type": "string", + "enum": [ + "workchain required", + "shard required", + "seqno required", + "failed to parse workchain", + "failed to parse shard", + "failed to parse root_hash", + "failed to parse seqno", + "seqno should be positive", + "from_seqno should be non-negative" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 422, + "error": "workchain required" + } + } + } + }, + "422_lookup": { + "description": "Invalid block lookup parameters.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 422, + "description": "HTTP status code `422`." + }, + "error": { + "type": "string", + "enum": [ + "failed to parse workchain", + "failed to parse shard", + "exactly one of seqno, lt, unixtime should be specified", + "lt should be non-negative", + "unixtime should be non-negative" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 422, + "error": "failed to parse workchain" + } + } + } + }, + "422_block_tx": { + "description": "Invalid block transactions parameters.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 422, + "description": "HTTP status code `422`." + }, + "error": { + "type": "string", + "enum": [ + "failed to parse workchain", + "failed to parse shard", + "failed to parse seqno", + "after_lt and after_hash should be used together", + "after_lt should be non-negative", + "count should be positive", + "count should be less or equal 10000" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 422, + "error": "failed to parse workchain" + } + } + } + }, + "422_send": { + "description": "Invalid send parameters.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 422, + "description": "HTTP status code `422`." + }, + "error": { + "type": "string", + "enum": [ + "empty boc" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 422, + "error": "empty boc" + } + } + } + }, + "422_run": { + "description": "Invalid get method or stack parameters.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 422, + "description": "HTTP status code `422`." + }, + "error": { + "type": "string", + "enum": [ + "Stack should be array", + "Invalid stack format: array expected", + "Invalid stack entry format: array of exact 2 elements expected", + "Expected string as first element in stack entry", + "Wrong type of number in stack entry", + "Invalid tvm.Cell, base64 string expected", + "Invalid tvm.Slice, base64 string expected", + "Empty tvm.Cell", + "Empty tvm.Slice" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 422, + "error": "Stack should be array" + } + } + } + }, + "422_config": { + "description": "Invalid config parameter request.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 422, + "description": "HTTP status code `422`." + }, + "error": { + "type": "string", + "enum": [ + "failed to parse config_id", + "failed to parse param", + "only one of config_id or param should be specified", + "param should be non-negative" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 422, + "error": "failed to parse config_id" + } + } + } + }, + "422_libraries": { + "description": "Invalid libraries parameter.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 422, + "description": "HTTP status code `422`." + }, + "error": { + "type": "string", + "enum": [ + "failed to parse libraries" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 422, + "error": "failed to parse libraries" + } + } + } + }, + "422_jsonrpc": { + "description": "Invalid JSON-RPC request.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 422, + "description": "HTTP status code `422`." + }, + "error": { + "type": "string", + "enum": [ + "params must contain an object" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 422, + "error": "params must contain an object" + } + } + } + }, + "429": { + "description": "Rate limit exceeded. Back off and retry, or use an API key for higher limits.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 429, + "description": "HTTP status code `429`." + }, + "error": { + "type": "string", + "enum": [ + "Ratelimit exceeded" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 429, + "error": "Ratelimit exceeded" + } + } + } + }, + "500_send": { + "description": "Transaction simulation failed.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 500, + "description": "HTTP status code `500`." + }, + "error": { + "type": "string", + "enum": [ + "Exit code != 0" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 500, + "error": "Exit code != 0" + } + } + } + }, + "500_execution": { + "description": "Get method or simulation execution failed.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 500, + "description": "HTTP status code `500`." + }, + "error": { + "type": "string", + "enum": [ + "Exit code != 0", + "Stack size < 5", + "Failed to parse int: ", + "stackEntryNumber expected", + "stackEntryCell expected at position", + "stackEntryCell or stackEntrySlice expected", + "addr_ext is not supported", + "addr_var is not supported", + "anycast is not supported" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 500, + "error": "Exit code != 0" + } + } + } + }, + "500_token": { + "description": "Failed to retrieve or parse token data.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 500, + "description": "HTTP status code `500`." + }, + "error": { + "type": "string", + "enum": [ + "Failed to unpack token data", + "Invalid uri", + "missing uri field in offchain data", + "failed to serialize TokenData", + "Exit code != 0", + "Stack size < 5" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 500, + "error": "Failed to unpack token data" + } + } + } + }, + "504": { + "description": "Timeout waiting for liteserver response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 504, + "description": "HTTP status code `504`." + }, + "error": { + "type": "string", + "enum": [ + "LITE_SERVER_NETWORK timeout" + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 504, + "error": "LITE_SERVER_NETWORK timeout" + } + } + } + }, + "542": { + "description": "Liteserver-specific error or unsupported stack type.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "ok", + "code", + "error" + ], + "properties": { + "ok": { + "type": "boolean", + "const": false, + "description": "Always `false` for error responses." + }, + "code": { + "type": "integer", + "const": 542, + "description": "HTTP status code `542`." + }, + "error": { + "type": "string", + "enum": [ + "Unsupported stack entry type: " + ] + }, + "@extra": { + "type": "string", + "description": "Extra data passed through from the request." + } + } + }, + "example": { + "ok": false, + "code": 542, + "error": "Unsupported stack entry type: " + } + } + } } }, "securitySchemes": { "APIKeyHeader": { "type": "apiKey", "in": "header", - "name": "X-API-Key" + "name": "X-API-Key", + "description": "API key sent in the `X-API-Key` header. Requests without a key are limited to 1 req/s. Get a key from the [API key guide](/ecosystem/api/toncenter/get-api-key)." }, "APIKeyQuery": { "type": "apiKey", "in": "query", - "name": "api_key" + "name": "api_key", + "description": "API key sent as a query parameter. Equivalent to the header method. Get a key from the [API key guide](/ecosystem/api/toncenter/get-api-key)." } }, "schemas": { From d0a488fa9a0be814cee3b088b28f83567010f0f2 Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Tue, 17 Feb 2026 16:57:05 +0200 Subject: [PATCH 03/21] updates --- ecosystem/api/toncenter/v2.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index 848fb7da4..bdde0823d 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -1,5 +1,5 @@ { - "openapi": "3.1.0", + "openapi": "3.1.1", "info": { "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", @@ -4623,13 +4623,13 @@ "type": "apiKey", "in": "header", "name": "X-API-Key", - "description": "API key sent in the `X-API-Key` header. Requests without a key are limited to 1 req/s. Get a key from the [API key guide](/ecosystem/api/toncenter/get-api-key)." + "description": "API key sent in the `X-API-Key` header. Requests without a key are limited to 1 req/s, more info [here](/ecosystem/api/toncenter/v2-authentication)." }, "APIKeyQuery": { "type": "apiKey", "in": "query", "name": "api_key", - "description": "API key sent as a query parameter. Equivalent to the header method. Get a key from the [API key guide](/ecosystem/api/toncenter/get-api-key)." + "description": "API key sent as a query parameter. Equivalent to the header method, more info [here](/ecosystem/api/toncenter/v2-authentication)." } }, "schemas": { From 76f13c09170534024f89fdcc1930edc4237b8843 Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Wed, 18 Feb 2026 10:06:59 +0200 Subject: [PATCH 04/21] updates --- docs.json | 5 +- ecosystem/api/toncenter/v2-tonlib-types.mdx | 361 ++ ecosystem/api/toncenter/v2.json | 3637 ++++++------------- 3 files changed, 1432 insertions(+), 2571 deletions(-) create mode 100644 ecosystem/api/toncenter/v2-tonlib-types.mdx diff --git a/docs.json b/docs.json index 85b61a11e..59b0e1a1d 100644 --- a/docs.json +++ b/docs.json @@ -82,8 +82,9 @@ "pages": [ "ecosystem/api/toncenter/v2/overview", "ecosystem/api/toncenter/v2-authentication", - "ecosystem/api/toncenter/v2-errors" - ], + "ecosystem/api/toncenter/v2-errors", + "ecosystem/api/toncenter/v2-tonlib-types" + ], "openapi": { "source": "ecosystem/api/toncenter/v2.json", "directory": "ecosystem/api/toncenter/v2" diff --git a/ecosystem/api/toncenter/v2-tonlib-types.mdx b/ecosystem/api/toncenter/v2-tonlib-types.mdx new file mode 100644 index 000000000..85e2f8b07 --- /dev/null +++ b/ecosystem/api/toncenter/v2-tonlib-types.mdx @@ -0,0 +1,361 @@ +--- +title: "TonLib type identifiers" +description: "Reference for the @type discriminator values returned by TON Center API v2." +--- + +## Overview + +Every object returned by API v2 includes an `@type` field that identifies the object's structure. These values originate from two sources: + +- **TonLib types** (e.g. `raw.fullAccountState`, `tvm.cell`) come from the [TonLib TL schema](https://github.com/ton-blockchain/ton/blob/master/tl/generate/scheme/tonlib_api.tl), the type definition language used by the C++ library powering this API. +- **Extended types** (prefixed with `ext.`) are added by TON Center to provide parsed, developer-friendly representations not available in the base TonLib schema. + +The `@type` field acts as a **discriminator**: when a response can return different object shapes, the `@type` value tells you which fields to expect. This is useful for type-safe deserialization in statically typed languages. + +```json +{ + "@type": "raw.fullAccountState", + "balance": "1000000000", + "code": "te6cc...", + "data": "te6cc...", + "last_transaction_id": { + "@type": "internal.transactionId", + "lt": "12345678", + "hash": "abc..." + } +} +``` + +## TL primitive types + +The TL schema maps to JSON types as follows: + +| TL type | JSON type | Notes | +| :----------- | :-------- | :----------------------------------------------------------- | +| `int32` | number | 32-bit signed integer | +| `int53` | number | 53-bit signed integer (safe for JavaScript `Number`) | +| `int64` | string | 64-bit signed integer as decimal string (exceeds JS safe range) | +| `int256` | string | 256-bit integer as decimal or hex string | +| `bytes` | string | Binary data, base64-encoded | +| `string` | string | UTF-8 text | +| `Bool` | boolean | `true` or `false` | +| `vector` | array | Ordered list of elements of type `T` | + +## Account state + +When you query account information, the `account_state` field uses `@type` to indicate which kind of contract is deployed. The TL schema defines these as variants of `AccountState`: + +``` +raw.accountState code:bytes data:bytes frozen_hash:bytes = AccountState; +wallet.v3.accountState wallet_id:int64 seqno:int32 = AccountState; +wallet.v4.accountState wallet_id:int64 seqno:int32 = AccountState; +wallet.highload.v1.accountState wallet_id:int64 seqno:int32 = AccountState; +wallet.highload.v2.accountState wallet_id:int64 = AccountState; +dns.accountState wallet_id:int64 = AccountState; +rwallet.accountState wallet_id:int64 seqno:int32 unlocked_balance:int64 config:rwallet.config = AccountState; +pchan.accountState config:pchan.config state:pchan.State description:string = AccountState; +uninited.accountState frozen_hash:bytes = AccountState; +``` + +| `@type` value | API schema | TL fields | +| :-------------------------------- | :------------------------------- | :-------------------------------------------- | +| `raw.accountState` | `AccountStateRaw` | `code`, `data`, `frozen_hash` | +| `wallet.v3.accountState` | `AccountStateWalletV3` | `wallet_id`, `seqno` | +| `wallet.v4.accountState` | `AccountStateWalletV4` | `wallet_id`, `seqno` | +| `wallet.highload.v1.accountState` | `AccountStateWalletHighloadV1` | `wallet_id`, `seqno` | +| `wallet.highload.v2.accountState` | `AccountStateWalletHighloadV2` | `wallet_id` | +| `dns.accountState` | `AccountStateDns` | `wallet_id` | +| `rwallet.accountState` | `AccountStateRWallet` | `wallet_id`, `seqno`, `unlocked_balance`, `config` | +| `pchan.accountState` | `AccountStatePChan` | `config`, `state`, `description` | +| `uninited.accountState` | `AccountStateUninited` | `frozen_hash` | + +## Account information + +Full account queries return one of these top-level types: + +``` +raw.fullAccountState balance:int64 extra_currencies:vector code:bytes data:bytes + last_transaction_id:internal.transactionId block_id:ton.blockIdExt frozen_hash:bytes sync_utime:int53 + = raw.FullAccountState; + +fullAccountState address:accountAddress balance:int64 extra_currencies:vector + last_transaction_id:internal.transactionId block_id:ton.blockIdExt sync_utime:int53 + account_state:AccountState revision:int32 + = FullAccountState; +``` + +| `@type` value | API schema | Description | +| :----------------------------------- | :----------------------------- | :------------------------------------------------------ | +| `raw.fullAccountState` | `AddressInformation` | Raw state with balance, code, data, and frozen hash | +| `fullAccountState` | `ExtendedAddressInformation` | Parsed state with identified contract type | +| `ext.accounts.walletInformation` | `WalletInformation` | Wallet-specific: type, seqno, wallet_id (TON Center extension) | + +## Address types + +``` +accountAddress account_address:string = AccountAddress; +``` + +| `@type` value | API schema | TL fields | +| :--------------- | :--------------- | :----------------- | +| `accountAddress` | `AccountAddress` | `account_address` | +| `addr_std` | `SmcAddr` | `workchain`, `id` | + +## Block identifiers + +``` +ton.blockIdExt workchain:int32 shard:int64 seqno:int32 root_hash:bytes file_hash:bytes = ton.BlockIdExt; +``` + +| `@type` value | API schema | TL fields | +| :--------------- | :--------------- | :----------------------------------------------- | +| `ton.blockIdExt` | `TonBlockIdExt` | `workchain`, `shard`, `seqno`, `root_hash`, `file_hash` | + +## Block data + +These types are returned by block query endpoints. The TL definitions: + +``` +blocks.masterchainInfo last:ton.BlockIdExt state_root_hash:bytes init:ton.BlockIdExt = blocks.MasterchainInfo; +blocks.shards shards:vector = blocks.Shards; +blocks.header id:ton.blockIdExt global_id:int32 version:int32 flags:# after_merge:Bool after_split:Bool + before_split:Bool want_merge:Bool want_split:Bool validator_list_hash_short:int32 catchain_seqno:int32 + min_ref_mc_seqno:int32 is_key_block:Bool prev_key_block_seqno:int32 start_lt:int64 end_lt:int64 + gen_utime:int53 vert_seqno:# prev_blocks:vector = blocks.Header; +blocks.transactions id:ton.blockIdExt req_count:int32 incomplete:Bool + transactions:vector = blocks.Transactions; +blocks.transactionsExt id:ton.blockIdExt req_count:int32 incomplete:Bool + transactions:vector = blocks.TransactionsExt; +blocks.blockSignatures id:ton.blockIdExt signatures:(vector blocks.signature) = blocks.BlockSignatures; +blocks.shardBlockProof from:ton.blockIdExt mc_id:ton.blockIdExt + links:(vector blocks.shardBlockLink) mc_proof:(vector blocks.blockLinkBack) = blocks.ShardBlockProof; +blocks.outMsgQueueSizes shards:(vector blocks.outMsgQueueSize) + ext_msg_queue_size_limit:int32 = blocks.OutMsgQueueSizes; +``` + +| `@type` value | API schema | Description | +| :------------------------------- | :---------------------------- | :------------------------------------------ | +| `blocks.masterchainInfo` | `MasterchainInfo` | Latest and genesis block references | +| `blocks.shards` | `Shards` | Active shard block identifiers | +| `blocks.header` | `BlockHeader` | Block metadata, merge/split flags, timing | +| `blocks.transactions` | `BlockTransactions` | Short transaction IDs within a block | +| `blocks.transactionsExt` | `BlockTransactionsExt` | Full transactions within a block | +| `blocks.shortTxId` | `ShortTxId` | Compact reference: account, lt, hash | +| `blocks.blockSignatures` | `MasterchainBlockSignatures` | Validator signatures for a block | +| `blocks.signature` | `BlockSignature` | Single validator signature | +| `blocks.shardBlockProof` | `ShardBlockProof` | Merkle proof chain to masterchain | +| `blocks.shardBlockLink` | `ShardBlockLink` | Single link in a proof chain | +| `blocks.blockLinkBack` | `BlockLinkBack` | Backward proof link between blocks | +| `blocks.outMsgQueueSize` | `OutMsgQueueSize` | Per-shard queue size | +| `blocks.outMsgQueueSizes` | `OutMsgQueueSizes` | Queue sizes across all shards | +| `ext.blocks.consensusBlock` | `ConsensusBlock` | Latest finalized block (TON Center extension) | + +## Transactions and messages + +``` +raw.transaction address:accountAddress utime:int53 data:bytes transaction_id:internal.transactionId + fee:int64 storage_fee:int64 other_fee:int64 in_msg:raw.message + out_msgs:vector = raw.Transaction; +raw.transactions transactions:vector + previous_transaction_id:internal.transactionId = raw.Transactions; +raw.message hash:bytes source:accountAddress destination:accountAddress value:int64 + extra_currencies:vector fwd_fee:int64 ihr_fee:int64 created_lt:int64 + body_hash:bytes msg_data:msg.Data = raw.Message; +raw.extMessageInfo hash:bytes hash_norm:bytes = raw.ExtMessageInfo; +internal.transactionId lt:int64 hash:bytes = internal.TransactionId; +``` + +| `@type` value | API schema | Description | +| :------------------------- | :---------------------- | :--------------------------------------------- | +| `raw.transaction` | `TransactionStd` | Raw transaction with messages and fees | +| `raw.transactions` | `TransactionsStd` | Paginated transaction list with cursor | +| `raw.message` | `MessageStd` | Raw message with sender, recipient, value | +| `raw.extMessageInfo` | `ExtMessageInfo` | External message hash after broadcast | +| `internal.transactionId` | `InternalTransactionId` | Transaction reference: lt + hash | +| `ext.transaction` | `Transaction` | Transaction with decoded comments (TON Center extension) | +| `ext.message` | `Message` | Message with decoded text comments (TON Center extension) | + +### Message body types + +The `msg_data` field on messages uses `@type` to indicate how to interpret the body: + +``` +msg.dataRaw body:bytes init_state:bytes = msg.Data; +msg.dataText text:bytes = msg.Data; +msg.dataDecryptedText text:bytes = msg.Data; +msg.dataEncryptedText text:bytes = msg.Data; +``` + +| `@type` value | API schema | Description | +| :---------------------- | :--------------------- | :--------------------------------------- | +| `msg.dataRaw` | `MsgDataRaw` | Raw binary body + optional init state | +| `msg.dataText` | `MsgDataText` | Plain text comment (base64-encoded UTF-8)| +| `msg.dataEncryptedText` | `MsgDataEncryptedText` | Encrypted message body | +| `msg.dataDecryptedText` | `MsgDataDecryptedText` | Decrypted message body | + +## TVM types + +Used as input and output for smart contract get methods (`runGetMethod`, `runGetMethodStd`). + +### Stack entries + +Each stack entry wraps a value with a type tag: + +``` +tvm.stackEntryNumber number:tvm.Number = tvm.StackEntry; +tvm.stackEntryCell cell:tvm.cell = tvm.StackEntry; +tvm.stackEntrySlice slice:tvm.slice = tvm.StackEntry; +tvm.stackEntryTuple tuple:tvm.Tuple = tvm.StackEntry; +tvm.stackEntryList list:tvm.List = tvm.StackEntry; +tvm.stackEntryUnsupported = tvm.StackEntry; +``` + +| `@type` value | API schema | Value field | +| :------------------------- | :----------------------- | :-------------------- | +| `tvm.stackEntryNumber` | `TvmStackEntryNumber` | `number` (decimal string via `tvm.numberDecimal`) | +| `tvm.stackEntryCell` | `TvmStackEntryCell` | `cell` (base64 BOC via `tvm.cell`) | +| `tvm.stackEntrySlice` | `TvmStackEntrySlice` | `slice` (base64 BOC via `tvm.slice`) | +| `tvm.stackEntryTuple` | `TvmStackEntryTuple` | `tuple` (nested stack entries) | +| `tvm.stackEntryList` | `TvmStackEntryList` | `list` (nested stack entries) | +| `tvm.stackEntryUnsupported`| `TvmStackEntryUnsupported`| No value (type not representable) | + +### Value types + +``` +tvm.cell bytes:bytes = tvm.Cell; +tvm.slice bytes:bytes = tvm.Slice; +tvm.numberDecimal number:string = tvm.Number; +tvm.tuple elements:vector = tvm.Tuple; +tvm.list elements:vector = tvm.List; +``` + +| `@type` value | API schema | TL fields | +| :------------------- | :----------------- | :--------------------------- | +| `tvm.cell` | `TvmCell` | `bytes` (base64 BOC) | +| `tvm.slice` | `TvmSlice` | `bytes` (base64 BOC) | +| `tvm.numberDecimal` | `TvmNumberDecimal` | `number` (decimal string) | +| `tvm.tuple` | `TvmTuple` | `elements` (stack entries) | +| `tvm.list` | `TvmList` | `elements` (stack entries) | + +### Get method result + +``` +smc.runResult gas_used:int53 stack:vector exit_code:int32 = smc.RunResult; +``` + +| `@type` value | API schema | TL fields | +| :--------------- | :--------------------- | :------------------------------- | +| `smc.runResult` | `RunGetMethodResult` | `gas_used`, `stack`, `exit_code` | +| `smc.runResult` | `RunGetMethodStdResult`| Same fields, typed stack entries | + +## Fees + +``` +fees in_fwd_fee:int53 storage_fee:int53 gas_fee:int53 fwd_fee:int53 = Fees; +query.fees source_fees:fees destination_fees:vector = query.Fees; +``` + +| `@type` value | API schema | TL fields | +| :------------- | :----------- | :------------------------------------------------- | +| `fees` | `Fees` | `in_fwd_fee`, `storage_fee`, `gas_fee`, `fwd_fee` | +| `query.fees` | `QueryFees` | `source_fees`, `destination_fees` | + +## Configuration + +``` +configInfo config:tvm.cell = ConfigInfo; +``` + +| `@type` value | API schema | TL fields | +| :------------ | :---------- | :--------------------------------- | +| `configInfo` | `ConfigInfo`| `config` (TVM cell with parameters)| + +## Libraries + +``` +smc.libraryEntry hash:int256 data:bytes = smc.LibraryEntry; +smc.libraryResult result:(vector smc.libraryEntry) = smc.LibraryResult; +``` + +| `@type` value | API schema | TL fields | +| :------------------ | :------------- | :------------------- | +| `smc.libraryEntry` | `LibraryEntry` | `hash`, `data` | +| `smc.libraryResult` | `LibraryResult`| `result` (entries) | + +## Token types (TON Center extensions) + +These types are not in the base TonLib TL schema. They are added by TON Center to provide parsed Jetton and NFT data via the `getTokenData` endpoint. + +| `@type` value | API schema | Description | +| :------------------------------- | :------------------ | :----------------------------------------------- | +| `ext.tokens.jettonMasterData` | `JettonMasterData` | Jetton master: total supply, admin, metadata | +| `ext.tokens.jettonWalletData` | `JettonWalletData` | Jetton wallet: balance, owner, master reference | +| `ext.tokens.nftCollectionData` | `NftCollectionData` | NFT collection: item count, owner, metadata | +| `ext.tokens.nftItemData` | `NftItemData` | NFT item: index, owner, collection reference | + +## DNS record types + +DNS entries use `@type` to indicate the record type stored at a domain: + +``` +dns.entryDataNextResolver resolver:AccountAddress = dns.EntryData; +dns.entryDataSmcAddress smc_address:AccountAddress = dns.EntryData; +dns.entryDataAdnlAddress adnl_address:AdnlAddress = dns.EntryData; +dns.entryDataStorageAddress bag_id:int256 = dns.EntryData; +``` + +| `@type` value | API schema | TL fields | +| :-------------------- | :----------------------- | :------------------------- | +| `dns_next_resolver` | `DnsRecordNextResolver` | `resolver` (address) | +| `dns_smc_address` | `DnsRecordSmcAddress` | `smc_address` (address) | +| `dns_adnl_address` | `DnsRecordAdnlAddress` | `adnl_address` | +| `dns_storage_address` | `DnsRecordStorageAddress`| `bag_id` (int256) | + +## Payment channel types + +``` +pchan.config alice_public_key:string alice_address:accountAddress bob_public_key:string + bob_address:accountAddress init_timeout:int32 close_timeout:int32 channel_id:int64 = pchan.Config; +pchan.stateInit signed_A:Bool signed_B:Bool min_A:int64 min_B:int64 + expire_at:int53 A:int64 B:int64 = pchan.State; +pchan.stateClose signed_A:Bool signed_B:Bool min_A:int64 min_B:int64 + expire_at:int53 A:int64 B:int64 = pchan.State; +pchan.statePayout A:int64 B:int64 = pchan.State; +``` + +| `@type` value | API schema | Description | +| :----------------- | :---------------- | :----------------------------------- | +| `pchan.config` | `PChanConfig` | Channel parties, timeouts, ID | +| `pchan.stateInit` | `PChanStateInit` | Initialization phase (signing) | +| `pchan.stateClose` | `PChanStateClose` | Closing phase (signing) | +| `pchan.statePayout`| `PChanStatePayout`| Payout phase (final balances) | + +## Restricted wallet types + +``` +rwallet.limit seconds:int32 value:int64 = rwallet.Limit; +rwallet.config start_at:int53 limits:vector = rwallet.Config; +``` + +| `@type` value | API schema | TL fields | +| :--------------- | :------------- | :---------------------------- | +| `rwallet.config` | `RWalletConfig`| `start_at`, `limits` | +| `rwallet.limit` | `RWalletLimit` | `seconds`, `value` | + +## Utility types + +TON Center extensions. + +| `@type` value | API schema | Description | +| :--------------------------------- | :-------------------------- | :--------------------------------- | +| `ext.utils.detectedAddress` | `DetectAddress` | Address in all encoding formats | +| `ext.utils.detectedAddressVariant` | `DetectAddressBase64Variant`| Base64 and URL-safe base64 pair | +| `ext.utils.detectedHash` | `DetectHash` | Hash in hex, base64, URL-safe | +| `extraCurrency` | `ExtraCurrencyBalance` | Non-TON currency ID and balance | +| `ok` | `ResultOk` | Success with no return data | + +## Reference + +For background on the TL-B format used across the TON ecosystem, see the [TL-B overview](/languages/tl-b). + +Types prefixed with `ext.` are TON Center extensions not present in the upstream TL schema. \ No newline at end of file diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index bdde0823d..5ee6190f4 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -1,5 +1,5 @@ { - "openapi": "3.1.1", + "openapi": "3.1.0", "info": { "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", @@ -16,31 +16,29 @@ } ], "paths": { - "/api/v2/jsonRPC": { - "post": { + "/api/v2/getAddressInformation": { + "get": { "tags": [ - "rpc" + "Accounts" ], - "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" - } - } + "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": [ + { + "$ref": "#/components/parameters/address" }, - "required": true - }, + { + "$ref": "#/components/parameters/seqnoOptional" + } + ], "responses": { "200": { - "description": "OK", + "description": "Returns the account balance, contract state, code, data, and last transaction reference.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TonlibResponse" + "$ref": "#/components/schemas/AddressInformationResponse" } } } @@ -52,14 +50,11 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_jsonrpc" + "$ref": "#/components/responses/422_address" }, "429": { "$ref": "#/components/responses/429" }, - "500": { - "$ref": "#/components/responses/500_execution" - }, "504": { "$ref": "#/components/responses/504" } @@ -74,26 +69,29 @@ ] } }, - "/api/v2/detectAddress": { + "/api/v2/getExtendedAddressInformation": { "get": { "tags": [ - "Utils" + "Accounts" ], - "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", + "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": [ { "$ref": "#/components/parameters/address" + }, + { + "$ref": "#/components/parameters/seqnoOptional" } ], "responses": { "200": { - "description": "OK", + "description": "Returns detailed account information including parsed contract state and type.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DetectAddressResponse" + "$ref": "#/components/schemas/ExtendedAddressInformationResponse" } } } @@ -109,6 +107,9 @@ }, "429": { "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -119,31 +120,31 @@ "APIKeyQuery": [] } ] - }, - "post": { + } + }, + "/api/v2/getWalletInformation": { + "get": { "tags": [ - "rpc" + "Accounts" ], - "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" - } - } + "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": [ + { + "$ref": "#/components/parameters/address" }, - "required": true - }, + { + "$ref": "#/components/parameters/seqnoOptional" + } + ], "responses": { "200": { - "description": "OK", + "description": "Returns wallet-specific details: type, seqno, subwallet ID, and balance.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DetectAddressResponse" + "$ref": "#/components/schemas/WalletInformationResponse" } } } @@ -159,6 +160,9 @@ }, "429": { "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -171,26 +175,29 @@ ] } }, - "/api/v2/detectHash": { + "/api/v2/getAddressBalance": { "get": { "tags": [ - "Utils" + "Accounts" ], - "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", + "summary": "Get address balance", + "description": "Returns the TON balance of an account in nanotons. 1 TON = 1,000,000,000 nanotons. A lightweight endpoint that returns only the balance without contract code, data, or other account details. Returns \"0\" for addresses that have never received any funds.", + "operationId": "getAddressBalance_get", "parameters": [ { - "$ref": "#/components/parameters/hash" + "$ref": "#/components/parameters/address" + }, + { + "$ref": "#/components/parameters/seqnoOptional" } ], "responses": { "200": { - "description": "OK", + "description": "Returns the account balance in nanotons.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DetectHashResponse" + "$ref": "#/components/schemas/AddressBalanceResponse" } } } @@ -206,6 +213,9 @@ }, "429": { "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -216,31 +226,31 @@ "APIKeyQuery": [] } ] - }, - "post": { + } + }, + "/api/v2/getAddressState": { + "get": { "tags": [ - "rpc" + "Accounts" ], - "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" - } - } + "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": [ + { + "$ref": "#/components/parameters/address" }, - "required": true - }, + { + "$ref": "#/components/parameters/seqnoOptional" + } + ], "responses": { "200": { - "description": "OK", + "description": "Returns the account lifecycle state: `uninit`, `active`, or `frozen`.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DetectHashResponse" + "$ref": "#/components/schemas/AddressStateResponse" } } } @@ -256,6 +266,9 @@ }, "429": { "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -268,14 +281,14 @@ ] } }, - "/api/v2/packAddress": { + "/api/v2/getTokenData": { "get": { "tags": [ - "Utils" + "Accounts" ], - "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", + "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": [ { "$ref": "#/components/parameters/address" @@ -283,11 +296,11 @@ ], "responses": { "200": { - "description": "OK", + "description": "Returns parsed token metadata for Jetton masters, Jetton wallets, NFT collections, and NFT items.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PackAddressResponse" + "$ref": "#/components/schemas/TokenDataResponse" } } } @@ -298,11 +311,20 @@ "403": { "$ref": "#/components/responses/403" }, + "409": { + "$ref": "#/components/responses/409" + }, "422": { "$ref": "#/components/responses/422_address" }, "429": { "$ref": "#/components/responses/429" + }, + "500": { + "$ref": "#/components/responses/500_token" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -313,31 +335,49 @@ "APIKeyQuery": [] } ] - }, - "post": { + } + }, + "/api/v2/getBlockTransactions": { + "get": { "tags": [ - "rpc" + "Transactions" ], - "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" - } - } + "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" }, - "required": true - }, + { + "$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", + "description": "Returns short transaction identifiers (account, lt, hash) for transactions in the specified block.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PackAddressResponse" + "$ref": "#/components/schemas/BlockTransactionsResponse" } } } @@ -349,10 +389,13 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_address" + "$ref": "#/components/responses/422_block_tx" }, "429": { "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -365,26 +408,47 @@ ] } }, - "/api/v2/unpackAddress": { + "/api/v2/getBlockTransactionsExt": { "get": { "tags": [ - "Utils" + "Transactions" ], - "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", + "summary": "Get block transactions (extended)", + "description": "Returns full transaction objects for all transactions in a specific block. Each transaction includes complete data: inbound and outbound messages, fees, state changes, and BOC-encoded raw data. Use `count` to limit results and `after_lt`/`after_hash` for pagination when `incomplete` is true.", + "operationId": "getBlockTransactionsExt_get", "parameters": [ { - "$ref": "#/components/parameters/address" + "$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", + "description": "Returns full transaction objects for transactions in the specified block.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnpackAddressResponse" + "$ref": "#/components/schemas/BlockTransactionsExtResponse" } } } @@ -396,10 +460,13 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_address" + "$ref": "#/components/responses/422_block_tx" }, "429": { "$ref": "#/components/responses/429" + }, + "504": { + "$ref": "#/components/responses/504" } }, "security": [ @@ -410,134 +477,44 @@ "APIKeyQuery": [] } ] - }, - "post": { + } + }, + "/api/v2/getTransactions": { + "get": { "tags": [ - "rpc" + "Transactions" ], - "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": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnpackAddressResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_address" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - } - }, - "/api/v2/getAddressInformation": { - "get": { - "tags": [ - "accounts" - ], - "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", + "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/seqnoOptional" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddressInformationResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" + "$ref": "#/components/parameters/limitOptional" }, - "422": { - "$ref": "#/components/responses/422_address" + { + "$ref": "#/components/parameters/ltOptional" }, - "429": { - "$ref": "#/components/responses/429" + { + "$ref": "#/components/parameters/hashOptional", + "description": "Transaction hash to start from" }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ { - "APIKeyHeader": [] + "$ref": "#/components/parameters/toLtOptional" }, { - "APIKeyQuery": [] + "$ref": "#/components/parameters/archivalOptional" } - ] - }, - "post": { - "tags": [ - "rpc" ], - "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": "OK", + "description": "Returns a list of transactions for the specified account, ordered by logical time.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddressInformationResponse" + "$ref": "#/components/schemas/TransactionsResponse" } } } @@ -549,7 +526,7 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_address" + "$ref": "#/components/responses/422_transaction" }, "429": { "$ref": "#/components/responses/429" @@ -568,82 +545,42 @@ ] } }, - "/api/v2/getExtendedAddressInformation": { + "/api/v2/getTransactionsStd": { "get": { "tags": [ - "accounts" + "Transactions" ], - "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", + "summary": "Get transactions (standard)", + "description": "Returns transaction history for an account in a standardized format. Transactions are returned newest-first. Each transaction includes the triggering inbound message, all outbound messages, and fees paid. The response includes a `previous_transaction_id` cursor for paginating through older transactions.", + "operationId": "getTransactionsStd_get", "parameters": [ { "$ref": "#/components/parameters/address" }, { - "$ref": "#/components/parameters/seqnoOptional" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtendedAddressInformationResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" + "$ref": "#/components/parameters/limitOptional" }, - "422": { - "$ref": "#/components/responses/422_address" + { + "$ref": "#/components/parameters/ltOptional" }, - "429": { - "$ref": "#/components/responses/429" + { + "$ref": "#/components/parameters/hashOptional", + "description": "Transaction hash to start from" }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ { - "APIKeyHeader": [] + "$ref": "#/components/parameters/toLtOptional" }, { - "APIKeyQuery": [] + "$ref": "#/components/parameters/archivalOptional" } - ] - }, - "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": "OK", + "description": "Returns transactions in standardized format with a pagination cursor.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExtendedAddressInformationResponse" + "$ref": "#/components/schemas/TonlibResponse" } } } @@ -655,7 +592,7 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_address" + "$ref": "#/components/responses/422_transaction" }, "429": { "$ref": "#/components/responses/429" @@ -674,82 +611,32 @@ ] } }, - "/api/v2/getWalletInformation": { + "/api/v2/tryLocateTx": { "get": { "tags": [ - "accounts" + "Transactions" ], - "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", + "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/address" - }, - { - "$ref": "#/components/parameters/seqnoOptional" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WalletInformationResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_address" - }, - "429": { - "$ref": "#/components/responses/429" + "$ref": "#/components/parameters/sourceAddress" }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ { - "APIKeyHeader": [] + "$ref": "#/components/parameters/destinationAddress" }, { - "APIKeyQuery": [] + "$ref": "#/components/parameters/createdLt" } - ] - }, - "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", + "description": "Returns the transaction matching the given source, destination, and created logical time.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WalletInformationResponse" + "$ref": "#/components/schemas/LocateTxResponse" } } } @@ -760,8 +647,11 @@ "403": { "$ref": "#/components/responses/403" }, + "404": { + "$ref": "#/components/responses/404" + }, "422": { - "$ref": "#/components/responses/422_address" + "$ref": "#/components/responses/422_locate" }, "429": { "$ref": "#/components/responses/429" @@ -780,29 +670,32 @@ ] } }, - "/api/v2/getAddressBalance": { + "/api/v2/tryLocateResultTx": { "get": { "tags": [ - "accounts" + "Transactions" ], - "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", + "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/address" + "$ref": "#/components/parameters/sourceAddress" }, { - "$ref": "#/components/parameters/seqnoOptional" + "$ref": "#/components/parameters/destinationAddress" + }, + { + "$ref": "#/components/parameters/createdLt" } ], "responses": { "200": { - "description": "OK", + "description": "Returns the resulting transaction on the destination account for the given message.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddressBalanceResponse" + "$ref": "#/components/schemas/LocateResultTxResponse" } } } @@ -813,8 +706,11 @@ "403": { "$ref": "#/components/responses/403" }, + "404": { + "$ref": "#/components/responses/404" + }, "422": { - "$ref": "#/components/responses/422_address" + "$ref": "#/components/responses/422_locate" }, "429": { "$ref": "#/components/responses/429" @@ -831,1348 +727,34 @@ "APIKeyQuery": [] } ] - }, - "post": { + } + }, + "/api/v2/tryLocateSourceTx": { + "get": { "tags": [ - "rpc" + "Transactions" ], - "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": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddressBalanceResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_address" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - } - }, - "/api/v2/getAddressState": { - "get": { - "tags": [ - "accounts" - ], - "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": [ - { - "$ref": "#/components/parameters/address" - }, - { - "$ref": "#/components/parameters/seqnoOptional" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddressStateResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_address" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "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": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddressStateResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_address" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - } - }, - "/api/v2/getTokenData": { - "get": { - "tags": [ - "accounts" - ], - "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": [ - { - "$ref": "#/components/parameters/address" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TokenDataResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "409": { - "$ref": "#/components/responses/409" - }, - "422": { - "$ref": "#/components/responses/422_address" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "500": { - "$ref": "#/components/responses/500_token" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "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": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TokenDataResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "409": { - "$ref": "#/components/responses/409" - }, - "422": { - "$ref": "#/components/responses/422_address" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "500": { - "$ref": "#/components/responses/500_token" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - } - }, - "/api/v2/getMasterchainInfo": { - "get": { - "tags": [ - "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": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MasterchainInfoResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - }, - "post": { - "tags": [ - "rpc" - ], - "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": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MasterchainInfoResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - } - }, - "/api/v2/getMasterchainBlockSignatures": { - "get": { - "tags": [ - "blocks" - ], - "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": [ - { - "$ref": "#/components/parameters/seqno" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MasterchainBlockSignaturesResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_block" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "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": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MasterchainBlockSignaturesResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_block" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - } - }, - "/api/v2/getShardBlockProof": { - "get": { - "tags": [ - "blocks" - ], - "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": [ - { - "$ref": "#/components/parameters/workchain" - }, - { - "$ref": "#/components/parameters/shard" - }, - { - "$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", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShardBlockProofResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_block" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "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": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShardBlockProofResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_block" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - } - }, - "/api/v2/getConsensusBlock": { - "get": { - "tags": [ - "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": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConsensusBlockResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - }, - "post": { - "tags": [ - "rpc" - ], - "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/ConsensusBlockRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConsensusBlockResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - } - }, - "/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" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_lookup" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - }, - "post": { - "tags": [ - "rpc" - ], - "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/LookupBlockRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LookupBlockResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_lookup" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - } - }, - "/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" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_block" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - }, - "post": { - "tags": [ - "rpc" - ], - "summary": "Get Shards", - "description": "Get shards information", - "operationId": "getShards_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShardsRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TonlibResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_block" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - } - }, - "/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" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_block" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - }, - "post": { - "tags": [ - "rpc" - ], - "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/BlockHeaderRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BlockHeaderResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_block" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - } - }, - "/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" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - }, - "post": { - "tags": [ - "rpc" - ], - "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/OutMsgQueueSizeRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OutMsgQueueSizeResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - } - }, - "/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" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_block_tx" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "APIKeyQuery": [] - } - ] - }, - "post": { - "tags": [ - "rpc" - ], - "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/BlockTransactionsRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BlockTransactionsResponse" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_block_tx" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] - }, - { - "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", + "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/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" - } - } - } - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "422": { - "$ref": "#/components/responses/422_block_tx" - }, - "429": { - "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" - } - }, - "security": [ - { - "APIKeyHeader": [] + "$ref": "#/components/parameters/sourceAddress" }, { - "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" - } - } + "$ref": "#/components/parameters/destinationAddress" }, - "required": true - }, + { + "$ref": "#/components/parameters/createdLt" + } + ], "responses": { "200": { - "description": "OK", + "description": "Returns the originating transaction on the source account for the given message.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BlockTransactionsExtResponse" + "$ref": "#/components/schemas/LocateSourceTxResponse" } } } @@ -2183,8 +765,11 @@ "403": { "$ref": "#/components/responses/403" }, + "404": { + "$ref": "#/components/responses/404" + }, "422": { - "$ref": "#/components/responses/422_block_tx" + "$ref": "#/components/responses/422_locate" }, "429": { "$ref": "#/components/responses/429" @@ -2203,42 +788,22 @@ ] } }, - "/api/v2/getTransactions": { + "/api/v2/getMasterchainInfo": { "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" - } + "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": "OK", + "description": "Returns the latest masterchain block, state root hash, and genesis block reference.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TransactionsResponse" + "$ref": "#/components/schemas/MasterchainInfoResponse" } } } @@ -2249,9 +814,6 @@ "403": { "$ref": "#/components/responses/403" }, - "422": { - "$ref": "#/components/responses/422_transaction" - }, "429": { "$ref": "#/components/responses/429" }, @@ -2267,31 +829,28 @@ "APIKeyQuery": [] } ] - }, - "post": { + } + }, + "/api/v2/getMasterchainBlockSignatures": { + "get": { "tags": [ - "rpc" + "Blocks" + ], + "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": [ + { + "$ref": "#/components/parameters/seqno" + } ], - "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", + "description": "Returns validator signatures for the specified masterchain block.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TransactionsResponse" + "$ref": "#/components/schemas/MasterchainBlockSignaturesResponse" } } } @@ -2303,7 +862,7 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_transaction" + "$ref": "#/components/responses/422_block" }, "429": { "$ref": "#/components/responses/429" @@ -2322,42 +881,42 @@ ] } }, - "/api/v2/getTransactionsStd": { + "/api/v2/getShardBlockProof": { "get": { "tags": [ - "transactions" + "Blocks" ], - "summary": "Get Transactions Std", - "description": "Standardized version of getTransactions", - "operationId": "getTransactionsStd_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": [ { - "$ref": "#/components/parameters/address" - }, - { - "$ref": "#/components/parameters/limitOptional" - }, - { - "$ref": "#/components/parameters/ltOptional" + "$ref": "#/components/parameters/workchain" }, { - "$ref": "#/components/parameters/hashOptional", - "description": "Transaction hash to start from" + "$ref": "#/components/parameters/shard" }, { - "$ref": "#/components/parameters/toLtOptional" + "$ref": "#/components/parameters/seqno" }, { - "$ref": "#/components/parameters/archivalOptional" + "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", + "format": "int32" + } } ], "responses": { "200": { - "description": "OK", + "description": "Returns a cryptographic proof chain linking a shard block to the masterchain.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TonlibResponse" + "$ref": "#/components/schemas/ShardBlockProofResponse" } } } @@ -2369,7 +928,7 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_transaction" + "$ref": "#/components/responses/422_block" }, "429": { "$ref": "#/components/responses/429" @@ -2386,31 +945,24 @@ "APIKeyQuery": [] } ] - }, - "post": { + } + }, + "/api/v2/getConsensusBlock": { + "get": { "tags": [ - "rpc" + "Blocks" ], - "summary": "Get Transactions Std", - "description": "Standardized version of getTransactions", - "operationId": "getTransactionsStd_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TransactionsRequest" - } - } - }, - "required": true - }, + "summary": "Get consensus block", + "description": "Returns the latest block that has reached consensus and is guaranteed to be final. This block will never be reverted, making it safe for confirming transactions. Use this when you need absolute certainty that a transaction is permanent.", + "operationId": "getConsensusBlock_get", + "parameters": [], "responses": { "200": { - "description": "OK", + "description": "Returns the latest consensus block sequence number and timestamp.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TonlibResponse" + "$ref": "#/components/schemas/ConsensusBlockResponse" } } } @@ -2421,9 +973,6 @@ "403": { "$ref": "#/components/responses/403" }, - "422": { - "$ref": "#/components/responses/422_transaction" - }, "429": { "$ref": "#/components/responses/429" }, @@ -2441,32 +990,52 @@ ] } }, - "/api/v2/tryLocateTx": { + "/api/v2/lookupBlock": { "get": { "tags": [ - "transactions" + "Blocks" ], - "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", + "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/sourceAddress" + "$ref": "#/components/parameters/workchain" }, { - "$ref": "#/components/parameters/destinationAddress" + "$ref": "#/components/parameters/shard" }, { - "$ref": "#/components/parameters/createdLt" + "$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", + "description": "Returns the full block identifier matching the given seqno, logical time, or unix timestamp.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LocateTxResponse" + "$ref": "#/components/schemas/LookupBlockResponse" } } } @@ -2477,11 +1046,8 @@ "403": { "$ref": "#/components/responses/403" }, - "404": { - "$ref": "#/components/responses/404" - }, "422": { - "$ref": "#/components/responses/422_locate" + "$ref": "#/components/responses/422_lookup" }, "429": { "$ref": "#/components/responses/429" @@ -2498,31 +1064,29 @@ "APIKeyQuery": [] } ] - }, - "post": { + } + }, + "/api/v2/getShards": { + "get": { "tags": [ - "rpc" + "Blocks" + ], + "summary": "Get shards", + "description": "Returns the active shardchain block identifiers at a given masterchain block height. Each shard processes a subset of accounts in parallel. The response shows how the basechain is currently partitioned and which block each shard is at.", + "operationId": "getShards_get", + "parameters": [ + { + "$ref": "#/components/parameters/seqno", + "description": "Seqno of masterchain block" + } ], - "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", + "description": "Returns the list of active shard block identifiers at the specified masterchain block.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LocateTxResponse" + "$ref": "#/components/schemas/TonlibResponse" } } } @@ -2533,11 +1097,8 @@ "403": { "$ref": "#/components/responses/403" }, - "404": { - "$ref": "#/components/responses/404" - }, "422": { - "$ref": "#/components/responses/422_locate" + "$ref": "#/components/responses/422_block" }, "429": { "$ref": "#/components/responses/429" @@ -2556,32 +1117,38 @@ ] } }, - "/api/v2/tryLocateResultTx": { + "/api/v2/getBlockHeader": { "get": { "tags": [ - "transactions" + "Blocks" ], - "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", + "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/sourceAddress" + "$ref": "#/components/parameters/workchain" }, { - "$ref": "#/components/parameters/destinationAddress" + "$ref": "#/components/parameters/shard" }, { - "$ref": "#/components/parameters/createdLt" + "$ref": "#/components/parameters/seqno" + }, + { + "$ref": "#/components/parameters/rootHashOptional" + }, + { + "$ref": "#/components/parameters/fileHashOptional" } ], "responses": { "200": { - "description": "OK", + "description": "Returns the block header with merge/split flags, validator info, and timing data.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LocateResultTxResponse" + "$ref": "#/components/schemas/BlockHeaderResponse" } } } @@ -2592,11 +1159,8 @@ "403": { "$ref": "#/components/responses/403" }, - "404": { - "$ref": "#/components/responses/404" - }, "422": { - "$ref": "#/components/responses/422_locate" + "$ref": "#/components/responses/422_block" }, "429": { "$ref": "#/components/responses/429" @@ -2613,31 +1177,23 @@ "APIKeyQuery": [] } ] - }, - "post": { + } + }, + "/api/v2/getOutMsgQueueSize": { + "get": { "tags": [ - "rpc" + "Blocks" ], - "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 - }, + "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", + "description": "Returns the outgoing message queue sizes for all active shards.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LocateResultTxResponse" + "$ref": "#/components/schemas/OutMsgQueueSizeResponse" } } } @@ -2648,12 +1204,6 @@ "403": { "$ref": "#/components/responses/403" }, - "404": { - "$ref": "#/components/responses/404" - }, - "422": { - "$ref": "#/components/responses/422_locate" - }, "429": { "$ref": "#/components/responses/429" }, @@ -2671,32 +1221,31 @@ ] } }, - "/api/v2/tryLocateSourceTx": { - "get": { + "/api/v2/runGetMethod": { + "post": { "tags": [ - "transactions" + "Run method" ], - "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" + "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" + } + } }, - { - "$ref": "#/components/parameters/createdLt" - } - ], + "required": true + }, "responses": { "200": { - "description": "OK", + "description": "Returns the TVM stack output and exit code from executing the specified get method.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LocateSourceTxResponse" + "$ref": "#/components/schemas/RunGetMethodResponse" } } } @@ -2707,17 +1256,20 @@ "403": { "$ref": "#/components/responses/403" }, - "404": { - "$ref": "#/components/responses/404" - }, "422": { - "$ref": "#/components/responses/422_locate" + "$ref": "#/components/responses/422_run" }, "429": { "$ref": "#/components/responses/429" }, + "500": { + "$ref": "#/components/responses/500_execution" + }, "504": { "$ref": "#/components/responses/504" + }, + "542": { + "$ref": "#/components/responses/542" } }, "security": [ @@ -2728,19 +1280,21 @@ "APIKeyQuery": [] } ] - }, + } + }, + "/api/v2/runGetMethodStd": { "post": { "tags": [ - "rpc" + "Run method" ], - "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", + "summary": "Run get method (standard)", + "description": "Executes a read-only method on a smart contract using typed stack entries. Input and output stack entries use explicit types (`TvmStackEntryNumber`, `TvmStackEntryCell`, etc.) for structured input/output handling. Common methods: `seqno` (wallet sequence number), `get_wallet_data` (wallet info), `get_jetton_data` (token info).", + "operationId": "runGetMethodStd_post", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TryLocateSourceTxRequest" + "$ref": "#/components/schemas/RunGetMethodStdRequest" } } }, @@ -2748,11 +1302,11 @@ }, "responses": { "200": { - "description": "OK", + "description": "Returns the get method result in standardized stack format.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LocateSourceTxResponse" + "$ref": "#/components/schemas/RunGetMethodStdResponse" } } } @@ -2763,17 +1317,20 @@ "403": { "$ref": "#/components/responses/403" }, - "404": { - "$ref": "#/components/responses/404" - }, "422": { - "$ref": "#/components/responses/422_locate" + "$ref": "#/components/responses/422_run" }, "429": { "$ref": "#/components/responses/429" }, + "500": { + "$ref": "#/components/responses/500_execution" + }, "504": { "$ref": "#/components/responses/504" + }, + "542": { + "$ref": "#/components/responses/542" } }, "security": [ @@ -2786,43 +1343,31 @@ ] } }, - "/api/v2/getConfigParam": { - "get": { + "/api/v2/sendBoc": { + "post": { "tags": [ - "configuration" + "Send" ], - "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" + "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" + } } }, - { - "name": "seqno", - "in": "query", - "description": "Block seqno", - "required": false, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], + "required": true + }, "responses": { "200": { - "description": "OK", + "description": "Returns a success confirmation after broadcasting the serialized message to the network.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConfigParamResponse" + "$ref": "#/components/schemas/SendBocResponse" } } } @@ -2834,11 +1379,14 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_config" + "$ref": "#/components/responses/422_send" }, "429": { "$ref": "#/components/responses/429" }, + "500": { + "$ref": "#/components/responses/500_send" + }, "504": { "$ref": "#/components/responses/504" } @@ -2851,19 +1399,21 @@ "APIKeyQuery": [] } ] - }, + } + }, + "/api/v2/sendBocReturnHash": { "post": { "tags": [ - "rpc" + "Send" ], - "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", + "summary": "Send BOC (return hash)", + "description": "Broadcasts a signed message to the TON network and returns the message hash. The `boc` parameter must contain a complete, signed external message in base64 format. The API validates the message and forwards it to validators. The returned hash can be used to track the message's processing status.", + "operationId": "sendBocReturnHash_post", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConfigParamRequest" + "$ref": "#/components/schemas/SendBocRequest" } } }, @@ -2871,11 +1421,11 @@ }, "responses": { "200": { - "description": "OK", + "description": "Returns the message hash after broadcasting the serialized message to the network.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConfigParamResponse" + "$ref": "#/components/schemas/SendBocReturnHashResponse" } } } @@ -2887,11 +1437,14 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_config" + "$ref": "#/components/responses/422_send" }, "429": { "$ref": "#/components/responses/429" }, + "500": { + "$ref": "#/components/responses/500_send" + }, "504": { "$ref": "#/components/responses/504" } @@ -2906,33 +1459,31 @@ ] } }, - "/api/v2/getConfigAll": { - "get": { + "/api/v2/estimateFee": { + "post": { "tags": [ - "configuration" + "Send" ], - "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" + "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", + "description": "Returns the estimated fees (gas, storage, forwarding) for the specified message.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConfigAllResponse" + "$ref": "#/components/schemas/EstimateFeeResponse" } } } @@ -2943,9 +1494,15 @@ "403": { "$ref": "#/components/responses/403" }, + "422": { + "$ref": "#/components/responses/422_run" + }, "429": { "$ref": "#/components/responses/429" }, + "500": { + "$ref": "#/components/responses/500_execution" + }, "504": { "$ref": "#/components/responses/504" } @@ -2958,31 +1515,28 @@ "APIKeyQuery": [] } ] - }, - "post": { + } + }, + "/api/v2/detectAddress": { + "get": { "tags": [ - "rpc" + "Utils" + ], + "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": [ + { + "$ref": "#/components/parameters/address" + } ], - "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", + "description": "Returns the address in all supported formats (raw, bounceable, non-bounceable) with base64 and URL-safe variants.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ConfigAllResponse" + "$ref": "#/components/schemas/DetectAddressResponse" } } } @@ -2993,11 +1547,11 @@ "403": { "$ref": "#/components/responses/403" }, + "422": { + "$ref": "#/components/responses/422_address" + }, "429": { "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" } }, "security": [ @@ -3010,35 +1564,26 @@ ] } }, - "/api/v2/getLibraries": { + "/api/v2/detectHash": { "get": { "tags": [ - "configuration" + "Utils" ], - "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", + "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": [ { - "name": "libraries", - "in": "query", - "description": "Hashes of libraries", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "#/components/schemas/TonHash" - } - } + "$ref": "#/components/parameters/hash" } ], "responses": { "200": { - "description": "OK", + "description": "Returns the hash in all supported formats (hex, base64, URL-safe base64).", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LibrariesResponse" + "$ref": "#/components/schemas/DetectHashResponse" } } } @@ -3050,13 +1595,10 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_libraries" + "$ref": "#/components/responses/422_address" }, "429": { "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" } }, "security": [ @@ -3067,31 +1609,28 @@ "APIKeyQuery": [] } ] - }, - "post": { + } + }, + "/api/v2/packAddress": { + "get": { "tags": [ - "rpc" + "Utils" + ], + "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": [ + { + "$ref": "#/components/parameters/address" + } ], - "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", + "description": "Returns the address converted to user-friendly (base64) format.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LibrariesResponse" + "$ref": "#/components/schemas/PackAddressResponse" } } } @@ -3103,13 +1642,10 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_libraries" + "$ref": "#/components/responses/422_address" }, "429": { "$ref": "#/components/responses/429" - }, - "504": { - "$ref": "#/components/responses/504" } }, "security": [ @@ -3122,32 +1658,26 @@ ] } }, - "/api/v2/runGetMethod": { - "post": { + "/api/v2/unpackAddress": { + "get": { "tags": [ - "run method", - "rpc" + "Utils" + ], + "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": [ + { + "$ref": "#/components/parameters/address" + } ], - "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", + "description": "Returns the unpacked address components: workchain, hex account ID, and format flags.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RunGetMethodResponse" + "$ref": "#/components/schemas/UnpackAddressResponse" } } } @@ -3159,19 +1689,10 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_run" + "$ref": "#/components/responses/422_address" }, "429": { "$ref": "#/components/responses/429" - }, - "500": { - "$ref": "#/components/responses/500_execution" - }, - "504": { - "$ref": "#/components/responses/504" - }, - "542": { - "$ref": "#/components/responses/542" } }, "security": [ @@ -3184,32 +1705,43 @@ ] } }, - "/api/v2/runGetMethodStd": { - "post": { + "/api/v2/getConfigParam": { + "get": { "tags": [ - "run method", - "rpc" + "Configuration" ], - "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" - } + "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" } }, - "required": true - }, + { + "name": "seqno", + "in": "query", + "description": "Block seqno", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], "responses": { "200": { - "description": "OK", + "description": "Returns the specified blockchain configuration parameter as a TVM cell.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RunGetMethodStdResponse" + "$ref": "#/components/schemas/ConfigParamResponse" } } } @@ -3221,19 +1753,13 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_run" + "$ref": "#/components/responses/422_config" }, "429": { "$ref": "#/components/responses/429" }, - "500": { - "$ref": "#/components/responses/500_execution" - }, "504": { "$ref": "#/components/responses/504" - }, - "542": { - "$ref": "#/components/responses/542" } }, "security": [ @@ -3246,32 +1772,33 @@ ] } }, - "/api/v2/sendBoc": { - "post": { + "/api/v2/getConfigAll": { + "get": { "tags": [ - "send", - "rpc" + "Configuration" ], - "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" - } + "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" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK", + "description": "Returns all blockchain configuration parameters as a single TVM cell.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SendBocResponse" + "$ref": "#/components/schemas/ConfigAllResponse" } } } @@ -3282,15 +1809,9 @@ "403": { "$ref": "#/components/responses/403" }, - "422": { - "$ref": "#/components/responses/422_send" - }, "429": { "$ref": "#/components/responses/429" }, - "500": { - "$ref": "#/components/responses/500_send" - }, "504": { "$ref": "#/components/responses/504" } @@ -3305,32 +1826,35 @@ ] } }, - "/api/v2/sendBocReturnHash": { - "post": { + "/api/v2/getLibraries": { + "get": { "tags": [ - "send", - "rpc" + "Configuration" ], - "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" + "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" } } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK", + "description": "Returns the code of the requested shared library cells.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SendBocReturnHashResponse" + "$ref": "#/components/schemas/LibrariesResponse" } } } @@ -3342,14 +1866,11 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_send" + "$ref": "#/components/responses/422_libraries" }, "429": { "$ref": "#/components/responses/429" }, - "500": { - "$ref": "#/components/responses/500_send" - }, "504": { "$ref": "#/components/responses/504" } @@ -3364,20 +1885,19 @@ ] } }, - "/api/v2/estimateFee": { + "/api/v2/jsonRPC": { "post": { "tags": [ - "send", - "rpc" + "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", + "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/EstimateFeeRequest" + "$ref": "#/components/schemas/JsonRpcRequest" } } }, @@ -3385,11 +1905,11 @@ }, "responses": { "200": { - "description": "OK", + "description": "Returns the result of the specified JSON-RPC method call.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EstimateFeeResponse" + "$ref": "#/components/schemas/TonlibResponse" } } } @@ -3401,7 +1921,7 @@ "$ref": "#/components/responses/403" }, "422": { - "$ref": "#/components/responses/422_run" + "$ref": "#/components/responses/422_jsonrpc" }, "429": { "$ref": "#/components/responses/429" @@ -3426,35 +1946,35 @@ }, "tags": [ { - "name": "Utils", - "description": "Some useful methods" + "name": "Accounts", + "description": "Information about accounts" }, { - "name": "accounts", - "description": "Information about accounts" + "name": "Transactions", + "description": "Fetching and locating transactions" }, { - "name": "blocks", + "name": "Blocks", "description": "Information about blocks" }, { - "name": "transactions", - "description": "Fetching and locating transactions" + "name": "Run method", + "description": "Run get-method of smart contracts" }, { - "name": "configuration", - "description": "Information about blockchain config" + "name": "Send", + "description": "Send data to blockchain" }, { - "name": "run method", - "description": "Run get-method of smart contracts" + "name": "Utils", + "description": "Some useful methods" }, { - "name": "send", - "description": "Send data to blockchain" + "name": "Configuration", + "description": "Information about blockchain config" }, { - "name": "rpc", + "name": "RPC", "description": "JSON-RPC and POST endpoints" } ], @@ -3463,16 +1983,15 @@ "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" - } + }, + "description": "The account address to query." }, "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" @@ -3481,7 +2000,6 @@ "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" @@ -3623,20 +2141,20 @@ "sourceAddress": { "name": "source", "in": "query", - "description": "The sender's address for the message you're looking for.", "required": true, "schema": { "$ref": "#/components/schemas/TonAddr" - } + }, + "description": "Source account address." }, "destinationAddress": { "name": "destination", "in": "query", - "description": "The recipient's address for the message you're looking for.", "required": true, "schema": { "$ref": "#/components/schemas/TonAddr" - } + }, + "description": "Destination account address." }, "createdLt": { "name": "created_lt", @@ -4623,13 +3141,13 @@ "type": "apiKey", "in": "header", "name": "X-API-Key", - "description": "API key sent in the `X-API-Key` header. Requests without a key are limited to 1 req/s, more info [here](/ecosystem/api/toncenter/v2-authentication)." + "description": "API key header of the form `X-API-Key: `, where `` is your API key. Requests without a key are limited to 1 req/s. More info [here](/ecosystem/api/toncenter/v2-authentication)." }, "APIKeyQuery": { "type": "apiKey", "in": "query", "name": "api_key", - "description": "API key sent as a query parameter. Equivalent to the header method, more info [here](/ecosystem/api/toncenter/v2-authentication)." + "description": "API key query parameter of the form `?api_key=`, where `` is your API key. Equivalent to the header method. More info [here](/ecosystem/api/toncenter/v2-authentication)." } }, "schemas": { @@ -4648,8 +3166,7 @@ ], "properties": { "address": { - "$ref": "#/components/schemas/TonAddr", - "description": "The account address in user-friendly format." + "$ref": "#/components/schemas/TonAddr" } }, "description": "Request containing a single address parameter." @@ -4662,8 +3179,7 @@ ], "properties": { "address": { - "$ref": "#/components/schemas/TonAddr", - "description": "The account address in user-friendly format." + "$ref": "#/components/schemas/TonAddr" }, "seqno": { "oneOf": [ @@ -4714,7 +3230,7 @@ "properties": { "hash": { "$ref": "#/components/schemas/TonHash", - "description": "Unique identifier hash for this object." + "description": "Hash value to detect encoding formats for." } } }, @@ -5060,8 +3576,7 @@ ], "properties": { "address": { - "$ref": "#/components/schemas/TonAddr", - "description": "The account address in user-friendly format." + "$ref": "#/components/schemas/TonAddr" }, "lt": { "oneOf": [ @@ -5079,7 +3594,7 @@ }, "hash": { "$ref": "#/components/schemas/TonHash", - "description": "Unique identifier hash for this object." + "description": "Hash of the starting transaction for pagination. Use together with `lt` from a previous response's `transaction_id`." }, "to_lt": { "oneOf": [ @@ -5232,7 +3747,7 @@ "items": { "$ref": "#/components/schemas/TonHash" }, - "description": "Array of library hashes to fetch." + "description": "Array of library cell hashes to retrieve. Each hash is a 256-bit value in hex (64 chars) or base64 (44 chars) format." } } }, @@ -5245,7 +3760,7 @@ "properties": { "boc": { "$ref": "#/components/schemas/Bytes", - "description": "The message to broadcast, serialized as a BOC (Bag of Cells) and base64 encoded." + "description": "Serialized external message in BOC format, base64 encoded. Contains the signed transaction to broadcast." } }, "description": "Request to broadcast a signed message. The boc field contains the base64-encoded external message." @@ -5259,8 +3774,7 @@ ], "properties": { "address": { - "$ref": "#/components/schemas/TonAddr", - "description": "The account address in user-friendly format." + "$ref": "#/components/schemas/TonAddr" }, "body": { "$ref": "#/components/schemas/Bytes", @@ -5268,16 +3782,16 @@ }, "init_code": { "$ref": "#/components/schemas/Bytes", - "description": "Contract code for deployment, in BOC format." + "description": "Contract code for deployment messages, BOC format, base64 encoded. Omit for regular transfers." }, "init_data": { "$ref": "#/components/schemas/Bytes", - "description": "Initial contract state for deployment, in BOC format." + "description": "Initial contract storage for deployment, BOC format, base64 encoded. Omit for regular transfers." }, "ignore_chksig": { "type": "boolean", "default": true, - "description": "Skip signature verification. Set to true when estimating fees before you have a real signature." + "description": "Set to `true` to skip signature verification during fee estimation; otherwise `false`. Useful when you don't have a real signature yet." } }, "description": "Request to estimate transaction fees. Include the target address, message body, and optionally init code/data for contract deployment." @@ -5295,20 +3809,20 @@ "jsonrpc": { "type": "string", "default": "2.0", - "description": "JSON-RPC protocol version, always \"2.0\"." + "description": "JSON-RPC protocol version. Must be `\"2.0\"`." }, "id": { "type": "string", - "description": "Request ID. Pass any string and it will be echoed in the response." + "description": "Request identifier. Echoed back in the response for matching async calls." }, "method": { "type": "string", - "description": "The get method name (e.g., \"seqno\", \"get_wallet_data\") or its numeric ID." + "description": "API method name to invoke (e.g., `getMasterchainInfo`, `getAddressBalance`)." }, "params": { "type": "object", "additionalProperties": true, - "description": "Method parameters as key-value pairs." + "description": "Method parameters as a JSON object with 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." @@ -5316,7 +3830,7 @@ "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." + "description": "Account address in [raw](/foundations/addresses/formats#raw-format) format (e.g., `0:ca6e321c...`) or [user-friendly](/foundations/addresses/formats#user-friendly-format) format (e.g., `EQDKbjIcfM...`). All formats are automatically detected." }, "TonAddrWithoutWorkchain": { "type": "string", @@ -5353,12 +3867,12 @@ "accountAddress" ], "default": "accountAddress", - "description": "Object type identifier. " + "description": "TonLib type identifier for account address objects. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "account_address": { "type": "string", "x-usrv-cpp-type": "ton_http::types::ton_addr", - "description": "The account address in user-friendly format." + "description": "Account address string." } } }, @@ -5372,28 +3886,28 @@ "ton.blockIdExt" ], "default": "ton.blockIdExt", - "description": "Object type identifier. " + "description": "TonLib type identifier for full block identifiers. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "workchain": { "type": "integer", - "description": "Workchain ID: -1 for masterchain, 0 for basechain. Most user transactions are on workchain 0." + "description": "Workchain ID: `-1` for masterchain, `0` for basechain." }, "shard": { "type": "string", "x-usrv-cpp-type": "std::int64_t", - "description": "Shard identifier. A signed 64-bit integer. Masterchain uses -9223372036854775808." + "description": "Shard identifier as a signed 64-bit integer string. 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." + "description": "Block sequence number (height) within this shard." }, "root_hash": { "$ref": "#/components/schemas/TonHash", - "description": "Merkle root hash of the block state tree. Used for cryptographic verification." + "description": "Merkle root hash of the block state tree." }, "file_hash": { "$ref": "#/components/schemas/TonHash", - "description": "Hash of the serialized block data. Together with root_hash, uniquely identifies a block." + "description": "Hash of the serialized block file. Together with root_hash, uniquely identifies a block." } }, "required": [ @@ -5409,7 +3923,7 @@ "DetectAddressBase64Variant": { "type": "object", "additionalProperties": false, - "description": "Base64 form of address variant", + "description": "User-friendly address in both standard base64 and URL-safe base64 encodings.", "properties": { "@type": { "type": "string", @@ -5417,15 +3931,15 @@ "ext.utils.detectedAddressVariant" ], "default": "ext.utils.detectedAddressVariant", - "description": "Object type identifier. " + "description": "TonLib type identifier for base64 address encoding variants. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "b64": { "type": "string", - "description": "Standard base64 encoding." + "description": "Address in standard base64 encoding (48 characters, uses `+` and `/`)." }, "b64url": { "type": "string", - "description": "URL-safe base64 encoding." + "description": "Address in URL-safe base64 encoding (48 characters, uses `-` and `_` instead of `+` and `/`)." } }, "required": [ @@ -5444,16 +3958,16 @@ "extraCurrency" ], "default": "extraCurrency", - "description": "Object type identifier. " + "description": "TonLib type identifier for extra currency balance entries. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "id": { "type": "integer", "format": "int32", - "description": "Request ID. Pass any string and it will be echoed in the response." + "description": "Extra currency identifier number." }, "amount": { "$ref": "#/components/schemas/Int256", - "description": "Balance amount as string." + "description": "Currency balance amount as a decimal string." } }, "required": [ @@ -5473,16 +3987,16 @@ "internal.transactionId" ], "default": "internal.transactionId", - "description": "Object type identifier. " + "description": "TonLib type identifier for transaction ID references. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "lt": { "type": "string", - "description": "Logical time of this event. A globally unique counter that orders all blockchain events. Higher values are more recent.", + "description": "Logical time of this transaction.", "x-usrv-cpp-type": "std::int64_t" }, "hash": { "$ref": "#/components/schemas/TonHash", - "description": "Unique identifier hash for this object." + "description": "Transaction hash." } }, "required": [ @@ -5501,19 +4015,19 @@ "raw.accountState" ], "default": "raw.accountState", - "description": "Object type identifier. " + "description": "TonLib type identifier for raw (unrecognized) contract states. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "code": { "$ref": "#/components/schemas/Bytes", - "description": "Smart contract code in BOC format, base64 encoded." + "description": "Smart contract code in BOC format, base64 encoded. Empty if account is uninitialized." }, "data": { "$ref": "#/components/schemas/Bytes", - "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + "description": "Smart contract persistent storage in BOC format, base64 encoded." }, "frozen_hash": { "$ref": "#/components/schemas/TonHash", - "description": "Hash of the frozen contract state. Only present for frozen accounts." + "description": "Hash of the frozen state. Only present for frozen accounts." } }, "required": [ @@ -5533,7 +4047,7 @@ "wallet.v3.accountState" ], "default": "wallet.v3.accountState", - "description": "Object type identifier. " + "description": "TonLib type identifier for Wallet v3 contracts. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "wallet_id": { "type": "integer", @@ -5562,7 +4076,7 @@ "wallet.v4.accountState" ], "default": "wallet.v4.accountState", - "description": "Object type identifier. " + "description": "TonLib type identifier for Wallet v4 contracts. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "wallet_id": { "type": "integer", @@ -5591,7 +4105,7 @@ "wallet.highload.v1.accountState" ], "default": "wallet.highload.v1.accountState", - "description": "Object type identifier. " + "description": "TonLib type identifier for Highload Wallet v1 contracts. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "wallet_id": { "type": "integer", @@ -5620,7 +4134,7 @@ "wallet.highload.v2.accountState" ], "default": "wallet.highload.v2.accountState", - "description": "Object type identifier. " + "description": "TonLib type identifier for Highload Wallet v2 contracts. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "wallet_id": { "type": "integer", @@ -5643,12 +4157,12 @@ "dns.accountState" ], "default": "dns.accountState", - "description": "Object type identifier. " + "description": "TonLib type identifier for DNS resolver contracts. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "wallet_id": { "type": "integer", "format": "int64", - "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. Default is 698983191 for mainnet." + "description": "Subwallet ID used by this DNS resolver contract." } }, "required": [ @@ -5666,17 +4180,17 @@ "rwallet.limit" ], "default": "rwallet.limit", - "description": "Object type identifier. " + "description": "TonLib type identifier for restricted wallet spending limit rules. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "seconds": { "type": "integer", "format": "int32", - "description": "Time period in seconds for this limit." + "description": "Duration of this spending limit window in seconds." }, "value": { "type": "integer", "format": "int64", - "description": "Amount of TON transferred in this message, in nanotons (1 TON = 10^9 nanotons)." + "description": "Maximum spendable amount within this time period, in nanotons." } }, "required": [ @@ -5695,19 +4209,19 @@ "rwallet.config" ], "default": "rwallet.config", - "description": "Object type identifier. " + "description": "TonLib type identifier for restricted wallet configuration. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "start_at": { "type": "integer", "format": "int64", - "description": "Unix timestamp when limits start." + "description": "Unix timestamp when the spending limits become active." }, "limits": { "type": "array", "items": { "$ref": "#/components/schemas/RWalletLimit" }, - "description": "Spending limits configuration." + "description": "Array of spending limit rules. Each entry defines a time window in seconds and the maximum spendable amount in nanotons within that window." } }, "required": [ @@ -5726,26 +4240,26 @@ "rwallet.accountState" ], "default": "rwallet.accountState", - "description": "Object type identifier. " + "description": "TonLib type identifier for restricted wallet contracts. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "wallet_id": { "type": "integer", "format": "int64", - "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. Default is 698983191 for mainnet." + "description": "Subwallet ID for this restricted wallet." }, "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": "Current sequence number for replay protection." }, "unlocked_balance": { "type": "integer", "format": "int64", - "description": "Balance available for withdrawal in nanotons." + "description": "Balance available for immediate withdrawal, in nanotons." }, "config": { "$ref": "#/components/schemas/RWalletConfig", - "description": "The configuration parameter value." + "description": "Spending limits and restrictions configuration." } }, "required": [ @@ -5766,38 +4280,38 @@ "pchan.config" ], "default": "pchan.config", - "description": "Object type identifier. " + "description": "TonLib type identifier for payment channel configuration. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "alice_public_key": { "type": "string", - "description": "Alice's public key." + "description": "Alice's Ed25519 public key for signing channel operations." }, "alice_address": { "$ref": "#/components/schemas/AccountAddress", - "description": "Alice's wallet address." + "description": "Alice's on-chain wallet address." }, "bob_public_key": { "type": "string", - "description": "Bob's public key." + "description": "Bob's Ed25519 public key for signing channel operations." }, "bob_address": { "$ref": "#/components/schemas/AccountAddress", - "description": "Bob's wallet address." + "description": "Bob's on-chain wallet address." }, "init_timeout": { "type": "integer", "format": "int32", - "description": "Timeout for channel initialization in seconds." + "description": "Maximum seconds allowed to complete channel initialization before it expires." }, "close_timeout": { "type": "integer", "format": "int32", - "description": "Timeout for channel closing in seconds." + "description": "Maximum seconds allowed to complete cooperative channel closure." }, "channel_id": { "type": "integer", "format": "int64", - "description": "Unique channel identifier." + "description": "Unique numeric identifier for this payment channel." } }, "required": [ @@ -5821,40 +4335,40 @@ "pchan.stateInit" ], "default": "pchan.stateInit", - "description": "Object type identifier. " + "description": "TonLib type identifier for payment channels in the initialization phase. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "signed_A": { "type": "boolean", - "description": "True if Alice signed." + "description": "Returns `true` if Alice has signed the initialization; otherwise `false`." }, "signed_B": { "type": "boolean", - "description": "True if Bob signed." + "description": "Returns `true` if Bob has signed the initialization; otherwise `false`." }, "min_A": { "type": "integer", "format": "int64", - "description": "Minimum required from Alice." + "description": "Minimum deposit required from Alice, in nanotons." }, "min_B": { "type": "integer", "format": "int64", - "description": "Minimum required from Bob." + "description": "Minimum deposit required from Bob, in nanotons." }, "expire_at": { "type": "integer", "format": "int64", - "description": "Initialization expiration timestamp." + "description": "Unix timestamp when the initialization offer expires." }, "A": { "type": "integer", "format": "int64", - "description": "Alice's initial deposit in nanotons." + "description": "Alice's deposited amount in nanotons." }, "B": { "type": "integer", "format": "int64", - "description": "Bob's initial deposit in nanotons." + "description": "Bob's deposited amount in nanotons." } }, "required": [ @@ -5878,30 +4392,30 @@ "pchan.stateClose" ], "default": "pchan.stateClose", - "description": "Object type identifier. " + "description": "TonLib type identifier for payment channels in the closing phase. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "signed_A": { "type": "boolean", - "description": "True if Alice signed the close." + "description": "Returns `true` if Alice has signed the close proposal; otherwise `false`." }, "signed_B": { "type": "boolean", - "description": "True if Bob signed the close." + "description": "Returns `true` if Bob has signed the close proposal; otherwise `false`." }, "min_A": { "type": "integer", "format": "int64", - "description": "Minimum guaranteed for Alice." + "description": "Minimum guaranteed payout for Alice, in nanotons." }, "min_B": { "type": "integer", "format": "int64", - "description": "Minimum guaranteed for Bob." + "description": "Minimum guaranteed payout for Bob, in nanotons." }, "expire_at": { "type": "integer", "format": "int64", - "description": "Channel expiration timestamp." + "description": "Unix timestamp when the close proposal expires." }, "A": { "type": "integer", @@ -5935,7 +4449,7 @@ "pchan.statePayout" ], "default": "pchan.statePayout", - "description": "Object type identifier. " + "description": "TonLib type identifier for payment channels in the payout phase. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "A": { "type": "integer", @@ -5985,19 +4499,19 @@ "pchan.accountState" ], "default": "pchan.accountState", - "description": "Object type identifier. " + "description": "TonLib type identifier for payment channel contracts. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "config": { "$ref": "#/components/schemas/PChanConfig", - "description": "The configuration parameter value." + "description": "Payment channel configuration (parties, timeouts, keys)." }, "state": { "$ref": "#/components/schemas/PChanState", - "description": "Current state of the payment channel." + "description": "Current payment channel state (init, close, or payout phase)." }, "description": { "type": "string", - "description": "Payment channel description." + "description": "Human-readable payment channel description." } }, "required": [ @@ -6017,11 +4531,11 @@ "uninited.accountState" ], "default": "uninited.accountState", - "description": "Object type identifier. " + "description": "TonLib type identifier for uninitialized accounts. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "frozen_hash": { "$ref": "#/components/schemas/TonHash", - "description": "Hash of the frozen contract state. Only present for frozen accounts." + "description": "Hash of the frozen state. Present if account was frozen before being uninitialized." } }, "required": [ @@ -6092,11 +4606,11 @@ "dns_storage_address" ], "default": "dns_storage_address", - "description": "Object type identifier. " + "description": "TonLib type identifier for TON Storage DNS records. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "bag_id": { "$ref": "#/components/schemas/TonHashHex", - "description": "TON Storage bag identifier." + "description": "TON Storage bag identifier in hex, pointing to distributed file storage." } } }, @@ -6114,11 +4628,11 @@ "dns_adnl_address" ], "default": "dns_adnl_address", - "description": "Object type identifier. " + "description": "TonLib type identifier for ADNL address DNS records. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "adnl_addr": { "$ref": "#/components/schemas/TonHashHex", - "description": "ADNL address in hex." + "description": "ADNL (Abstract Datagram Network Layer) address in hex, used for TON Sites and services." } } }, @@ -6137,16 +4651,16 @@ "addr_std" ], "default": "addr_std", - "description": "Object type identifier. " + "description": "TonLib type identifier for standard smart contract addresses. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "workchain_id": { "type": "integer", "format": "int32", - "description": "Workchain identifier (0 for basechain, -1 for masterchain)." + "description": "Workchain ID (`0` for basechain, `-1` for masterchain)." }, "address": { "$ref": "#/components/schemas/TonHashHex", - "description": "The account address in user-friendly format." + "description": "Account identifier as a 64-character hex string." } } }, @@ -6164,11 +4678,11 @@ "dns_smc_address" ], "default": "dns_smc_address", - "description": "Object type identifier. " + "description": "TonLib type identifier for smart contract address DNS records. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "smc_addr": { "$ref": "#/components/schemas/SmcAddr", - "description": "Smart contract address." + "description": "Smart contract address associated with this DNS record." } } }, @@ -6186,11 +4700,11 @@ "dns_next_resolver" ], "default": "dns_next_resolver", - "description": "Object type identifier. " + "description": "TonLib type identifier for next-resolver DNS records. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "resolver": { "$ref": "#/components/schemas/SmcAddr", - "description": "Address of the next DNS resolver." + "description": "Smart contract address of the next DNS resolver in the chain." } } }, @@ -6225,19 +4739,19 @@ "properties": { "dns_next_resolver": { "$ref": "#/components/schemas/DnsRecord", - "description": "Next resolver for subdomain lookups." + "description": "Next resolver contract 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." + "description": "Wallet address associated with this domain." }, "site": { "$ref": "#/components/schemas/DnsRecord", - "description": "Site address (ADNL or storage)." + "description": "Site hosting address (ADNL or TON Storage)." }, "storage": { "$ref": "#/components/schemas/DnsRecord", - "description": "TON Storage bag ID." + "description": "TON Storage bag ID for files hosted under this domain." } } }, @@ -6251,11 +4765,11 @@ "properties": { "domain": { "type": "string", - "description": "Domain name." + "description": "The resolved domain name." }, "data": { "$ref": "#/components/schemas/DnsRecordSet", - "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + "description": "Parsed DNS records for this domain." } } }, @@ -6273,7 +4787,7 @@ "onchain", "offchain" ], - "description": "Content encoding type." + "description": "How the content is stored: `onchain` (in contract data) or `offchain` (external URI)." }, "data": { "oneOf": [ @@ -6284,7 +4798,7 @@ "$ref": "#/components/schemas/TokenContentDict" } ], - "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + "description": "Token metadata key-value pairs (name, symbol, decimals, image, description)." } } }, @@ -6307,11 +4821,11 @@ "ext.tokens.jettonMasterData" ], "default": "ext.tokens.jettonMasterData", - "description": "Object type identifier. " + "description": "TonLib type identifier for Jetton master contract data. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "address": { "$ref": "#/components/schemas/TonAddr", - "description": "The account address in user-friendly format." + "description": "Contract address of this Jetton master." }, "contract_type": { "type": "string", @@ -6323,23 +4837,23 @@ }, "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." + "description": "Total tokens in circulation, 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." + "description": "Returns `true` if new tokens can still be minted; `false` means the supply is permanently capped." }, "admin_address": { "$ref": "#/components/schemas/TonAddr", - "description": "Address that can mint new tokens or change settings. May be empty if admin rights were revoked." + "description": "Admin address that can mint tokens or update metadata. Empty if admin rights were revoked." }, "jetton_content": { "$ref": "#/components/schemas/TokenContent", - "description": "Token metadata: name, symbol, decimals, description, image URL." + "description": "Token metadata: name, symbol, decimals, description, and 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": "Code used to deploy individual 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." @@ -6363,11 +4877,11 @@ "ext.tokens.jettonWalletData" ], "default": "ext.tokens.jettonWalletData", - "description": "Object type identifier. " + "description": "TonLib type identifier for Jetton wallet contract data. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "address": { "$ref": "#/components/schemas/TonAddr", - "description": "The account address in user-friendly format." + "description": "Contract address of this Jetton wallet." }, "contract_type": { "type": "string", @@ -6379,23 +4893,23 @@ }, "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." + "description": "Token balance in the smallest unit. Divide by the master contract's decimals for human-readable amount." }, "owner": { "$ref": "#/components/schemas/TonAddr", - "description": "Current owner of this wallet or NFT." + "description": "Wallet owner's address (the user who holds these tokens)." }, "jetton": { "$ref": "#/components/schemas/TonAddr", - "description": "Address of the Jetton master contract for this wallet." + "description": "Address of the Jetton master contract this wallet belongs to." }, "mintless_is_claimed": { "type": "boolean", - "description": "True if mintless jettons were claimed." + "description": "Returns `true` if the mintless jetton allocation has been claimed; otherwise `false`." }, "jetton_wallet_code": { "$ref": "#/components/schemas/Bytes", - "description": "Code used to deploy user wallets for this token. Used to verify wallet authenticity." + "description": "Wallet contract code. Should match the master contract's wallet code to verify 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." @@ -6417,11 +4931,11 @@ "ext.tokens.nftCollectionData" ], "default": "ext.tokens.nftCollectionData", - "description": "Object type identifier. " + "description": "TonLib type identifier for NFT collection contract data. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "address": { "$ref": "#/components/schemas/TonAddr", - "description": "The account address in user-friendly format." + "description": "Contract address of this NFT collection." }, "contract_type": { "type": "string", @@ -6433,15 +4947,15 @@ }, "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." + "description": "Index that will be assigned to the next minted NFT. Also indicates total items if minted sequentially." }, "owner_address": { "$ref": "#/components/schemas/TonAddr", - "description": "Current owner of this wallet, NFT, or collection." + "description": "Collection owner's address. Controls minting and metadata updates." }, "collection_content": { "$ref": "#/components/schemas/TokenContent", - "description": "Collection metadata: name, description, cover image." + "description": "Collection metadata: name, description, and cover image." } }, "description": "NFT collection contract data. Contains the number of items minted, collection owner, and collection metadata (name, description, image)." @@ -6464,11 +4978,11 @@ "ext.tokens.nftItemData" ], "default": "ext.tokens.nftItemData", - "description": "Object type identifier. " + "description": "TonLib type identifier for NFT item contract data. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "address": { "$ref": "#/components/schemas/TonAddr", - "description": "The account address in user-friendly format." + "description": "Contract address of this NFT item." }, "contract_type": { "type": "string", @@ -6480,19 +4994,19 @@ }, "init": { "type": "boolean", - "description": "The genesis (first) block." + "description": "Returns `true` if this NFT item has been initialized (deployed); otherwise `false`." }, "index": { "$ref": "#/components/schemas/Int256", - "description": "This item's position in the collection." + "description": "This item's sequential index within its collection." }, "collection_address": { "$ref": "#/components/schemas/TonAddr", - "description": "Address of the NFT collection this item belongs to." + "description": "Address of the NFT collection this item belongs to. Empty if standalone NFT." }, "owner_address": { "$ref": "#/components/schemas/TonAddr", - "description": "Current owner of this wallet, NFT, or collection." + "description": "Current owner's address. Changes on each transfer." }, "content": { "oneOf": [ @@ -6503,7 +5017,7 @@ "$ref": "#/components/schemas/DnsContent" } ], - "description": "NFT content and metadata." + "description": "NFT item metadata and content (name, description, image URL)." } }, "description": "Individual NFT data. Contains the item index, collection reference, current owner, and item-specific content/metadata." @@ -6553,15 +5067,15 @@ "blocks.signature" ], "default": "blocks.signature", - "description": "Object type identifier. " + "description": "TonLib type identifier for validator signature objects. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "node_id_short": { "$ref": "#/components/schemas/TonHash", - "description": "Short identifier of the validator node." + "description": "Short public key hash of the validator node that produced this signature." }, "signature": { "$ref": "#/components/schemas/Bytes", - "description": "Validator signature in base64." + "description": "Ed25519 signature of the block by this validator, base64 encoded." } }, "required": [ @@ -6580,15 +5094,15 @@ "blocks.shardBlockLink" ], "default": "blocks.shardBlockLink", - "description": "Object type identifier. " + "description": "TonLib type identifier for shard-to-masterchain proof links. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "id": { "$ref": "#/components/schemas/TonBlockIdExt", - "description": "Request ID. Pass any string and it will be echoed in the response." + "description": "Block identifier for this link in the proof chain." }, "proof": { "$ref": "#/components/schemas/Bytes", - "description": "Merkle proof for this shard block." + "description": "Merkle proof data for this shard block link." } }, "required": [ @@ -6607,31 +5121,31 @@ "blocks.blockLinkBack" ], "default": "blocks.blockLinkBack", - "description": "Object type identifier. " + "description": "TonLib type identifier for backward block link proofs. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "to_key_block": { "type": "boolean", - "description": "True if destination is a key block." + "description": "Returns `true` if the destination block is a key block; otherwise `false`." }, "from": { "$ref": "#/components/schemas/TonBlockIdExt", - "description": "Source block reference." + "description": "Source block in the proof chain." }, "to": { "$ref": "#/components/schemas/TonBlockIdExt", - "description": "Destination block reference." + "description": "Destination block in the proof chain." }, "dest_proof": { "$ref": "#/components/schemas/Bytes", - "description": "Proof for the destination block." + "description": "Cryptographic proof for the destination block." }, "proof": { "$ref": "#/components/schemas/Bytes", - "description": "Merkle proof data." + "description": "Merkle proof linking the two blocks." }, "state_proof": { "$ref": "#/components/schemas/Bytes", - "description": "State proof data." + "description": "State proof validating the block link." } }, "required": [ @@ -6654,15 +5168,15 @@ "blocks.outMsgQueueSize" ], "default": "blocks.outMsgQueueSize", - "description": "Object type identifier. " + "description": "TonLib type identifier for per-shard queue size entries. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "id": { "$ref": "#/components/schemas/TonBlockIdExt", - "description": "Request ID. Pass any string and it will be echoed in the response." + "description": "Full block identifier for the shard." }, "size": { "type": "integer", - "description": "Queue size for the shard." + "description": "Number of outgoing messages waiting in this shard's queue." } }, "required": [ @@ -6681,15 +5195,15 @@ "smc.libraryEntry" ], "default": "smc.libraryEntry", - "description": "Object type identifier. " + "description": "TonLib type identifier for shared library cell entries. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "hash": { "$ref": "#/components/schemas/TonHash", - "description": "Unique identifier hash for this object." + "description": "Library cell hash." }, "data": { "$ref": "#/components/schemas/Bytes", - "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + "description": "Library cell code in BOC format, base64 encoded." } }, "required": [ @@ -6701,7 +5215,7 @@ "ShortTxId": { "type": "object", "additionalProperties": false, - "description": "Short transaction identifier", + "description": "Compact transaction reference containing the account address, logical time, and hash. Used in block transaction listings for efficient enumeration.", "properties": { "@type": { "type": "string", @@ -6709,24 +5223,24 @@ "blocks.shortTxId" ], "default": "blocks.shortTxId", - "description": "Object type identifier. " + "description": "TonLib type identifier for compact transaction references. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "mode": { "type": "integer", - "description": "Transaction mode flags" + "description": "Bitmask indicating which optional fields are present." }, "account": { "$ref": "#/components/schemas/TonAddr", - "description": "The account address that this transaction belongs to." + "description": "Account address that executed this transaction." }, "lt": { "type": "string", - "description": "Logical time of this event. A globally unique counter that orders all blockchain events. Higher values are more recent.", + "description": "Logical time of this transaction.", "x-usrv-cpp-type": "std::int64_t" }, "hash": { "$ref": "#/components/schemas/TonHash", - "description": "Unique identifier hash for this object." + "description": "Transaction hash." } }, "required": [ @@ -6747,15 +5261,15 @@ "msg.dataRaw" ], "default": "msg.dataRaw", - "description": "Object type identifier. " + "description": "TonLib type identifier for raw (binary) message bodies. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "body": { "$ref": "#/components/schemas/Bytes", - "description": "Message body in BOC format, base64 encoded." + "description": "Raw message body in BOC format, base64 encoded." }, "init_state": { "$ref": "#/components/schemas/Bytes", - "description": "Contract init state in base64." + "description": "Contract init state (code + data) attached to this message, base64 encoded. Present only for deploy messages." } } }, @@ -6769,11 +5283,11 @@ "msg.dataText" ], "default": "msg.dataText", - "description": "Object type identifier. " + "description": "TonLib type identifier for plain text comment message bodies. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "text": { "$ref": "#/components/schemas/Bytes", - "description": "Plain text message content." + "description": "UTF-8 text comment, base64 encoded." } } }, @@ -6787,11 +5301,11 @@ "msg.dataDecryptedText" ], "default": "msg.dataDecryptedText", - "description": "Object type identifier. " + "description": "TonLib type identifier for decrypted text message bodies. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "text": { "$ref": "#/components/schemas/Bytes", - "description": "Decrypted message text." + "description": "Decrypted UTF-8 text content, base64 encoded." } } }, @@ -6805,11 +5319,11 @@ "msg.dataEncryptedText" ], "default": "msg.dataEncryptedText", - "description": "Object type identifier. " + "description": "TonLib type identifier for encrypted text message bodies. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "text": { "$ref": "#/components/schemas/Bytes", - "description": "Encrypted message content." + "description": "Encrypted message payload, base64 encoded." } } }, @@ -6848,51 +5362,51 @@ "raw.message" ], "default": "raw.message", - "description": "Object type identifier. " + "description": "TonLib type identifier for raw message objects. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "hash": { "$ref": "#/components/schemas/TonHash", - "description": "Unique identifier hash for this object." + "description": "Message hash, uniquely identifying this message." }, "source": { "$ref": "#/components/schemas/AccountAddress", - "description": "Sender address. Empty string for external messages (sent from outside the blockchain)." + "description": "Sender account address. Empty for external inbound messages." }, "destination": { "$ref": "#/components/schemas/AccountAddress", - "description": "Recipient address." + "description": "Recipient account address." }, "value": { "$ref": "#/components/schemas/Int256", - "description": "Amount of TON transferred in this message, in nanotons (1 TON = 10^9 nanotons)." + "description": "TON amount transferred with this message, in nanotons." }, "extra_currencies": { "type": "array", "items": { "$ref": "#/components/schemas/ExtraCurrencyBalance" }, - "description": "Non-TON currencies transferred. TON supports multiple native currencies." + "description": "Array of non-TON currencies transferred in this message. Each entry contains a currency ID (integer) and amount (decimal string). Empty array if only TON was transferred." }, "fwd_fee": { "$ref": "#/components/schemas/Int256", - "description": "Fee for forwarding this message to its destination, in nanotons." + "description": "Forwarding fee deducted from the message value, in nanotons." }, "ihr_fee": { "$ref": "#/components/schemas/Int256", - "description": "Instant Hypercube Routing fee in nanotons. Usually 0 as IHR is rarely used." + "description": "Instant Hypercube Routing fee in nanotons. Usually 0." }, "created_lt": { "type": "string", - "description": "Logical time when this message was created. Use with source and destination to uniquely identify a message.", + "description": "Logical time when this message was created.", "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." + "description": "Hash of the message body." }, "msg_data": { "$ref": "#/components/schemas/MsgData", - "description": "The message body containing instructions for the destination contract." + "description": "Message body payload (raw, text comment, or encrypted)." } }, "required": [ @@ -6919,46 +5433,46 @@ "raw.transaction" ], "default": "raw.transaction", - "description": "Object type identifier. " + "description": "TonLib type identifier for raw transaction objects. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "address": { "$ref": "#/components/schemas/AccountAddress", - "description": "The account address in user-friendly format." + "description": "Account address object for this transaction." }, "utime": { "type": "integer", - "description": "Unix timestamp (seconds since 1970-01-01). When this event occurred in real-world time." + "description": "Unix timestamp when this transaction was executed." }, "data": { "$ref": "#/components/schemas/Bytes", - "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + "description": "Full transaction data serialized as BOC, base64 encoded." }, "transaction_id": { "$ref": "#/components/schemas/InternalTransactionId", - "description": "Reference to this transaction. Use `lt` and `hash` to fetch full details." + "description": "Transaction identifier (logical time + hash)." }, "fee": { "$ref": "#/components/schemas/Int256", - "description": "Total fees paid for this transaction in nanotons." + "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." + "description": "Storage fee component, in nanotons." }, "other_fee": { "$ref": "#/components/schemas/Int256", - "description": "Computation and action fees in nanotons. Covers gas for executing contract code." + "description": "Computation and action fee component, in nanotons." }, "in_msg": { "$ref": "#/components/schemas/MessageStd", - "description": "The incoming message that triggered this transaction. External messages come from outside the blockchain." + "description": "The inbound message that triggered this transaction." }, "out_msgs": { "type": "array", "items": { "$ref": "#/components/schemas/MessageStd" }, - "description": "Messages sent by this transaction. A transaction can send multiple messages to different destinations." + "description": "Array of outbound messages produced by this transaction. Each message contains sender and recipient address objects, TON amount (nanotons as string), forwarding fee, and raw message body." } }, "required": [ @@ -7008,15 +5522,15 @@ "ext.message" ], "default": "ext.message", - "description": "Object type identifier. " + "description": "TonLib type identifier for extended message objects with decoded comments. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "hash": { "$ref": "#/components/schemas/TonHash", - "description": "Unique identifier hash for this object." + "description": "Message hash, uniquely identifying this message." }, "source": { "$ref": "#/components/schemas/TonAddr", - "description": "Sender address. Empty string for external messages (sent from outside the blockchain)." + "description": "Sender address. Empty for external inbound messages." }, "destination": { "$ref": "#/components/schemas/TonAddr", @@ -7024,43 +5538,43 @@ }, "value": { "$ref": "#/components/schemas/Int256", - "description": "Amount of TON transferred in this message, in nanotons (1 TON = 10^9 nanotons)." + "description": "TON amount transferred with this message, in nanotons." }, "extra_currencies": { "type": "array", "items": { "$ref": "#/components/schemas/ExtraCurrencyBalance" }, - "description": "Non-TON currencies transferred. TON supports multiple native currencies." + "description": "Array of non-TON currencies transferred in this message. Each entry contains a currency ID (integer) and amount (decimal string). Empty array if only TON was transferred." }, "fwd_fee": { "$ref": "#/components/schemas/Int256", - "description": "Fee for forwarding this message to its destination, in nanotons." + "description": "Forwarding fee deducted from the message value, in nanotons." }, "ihr_fee": { "$ref": "#/components/schemas/Int256", - "description": "Instant Hypercube Routing fee in nanotons. Usually 0 as IHR is rarely used." + "description": "Instant Hypercube Routing fee in nanotons. Usually 0." }, "created_lt": { "type": "string", - "description": "Logical time when this message was created. Use with source and destination to uniquely identify a message.", + "description": "Logical time when this message was created.", "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." + "description": "Hash of the message body. Useful for verifying content without the full payload." }, "msg_data": { "$ref": "#/components/schemas/MsgData", - "description": "The message body containing instructions for the destination contract." + "description": "Message body payload (raw, text comment, or encrypted)." }, "message": { "type": "string", - "description": "Human-readable comment if the message body is a simple text comment." + "description": "Decoded text comment, if the message body is a simple UTF-8 text." }, "message_decode_error": { "type": "string", - "description": "Error text if the message body couldn't be decoded as a comment." + "description": "Error description if the message body could not be decoded as a text comment." } }, "required": [ @@ -7088,50 +5602,50 @@ "ext.transaction" ], "default": "ext.transaction", - "description": "Object type identifier. " + "description": "TonLib type identifier for extended transaction objects with decoded messages. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "address": { "$ref": "#/components/schemas/AccountAddress", - "description": "The account address in user-friendly format." + "description": "Account address object for this transaction." }, "account": { "$ref": "#/components/schemas/TonAddr", - "description": "The account address that this transaction belongs to." + "description": "Account address in raw format." }, "utime": { "type": "integer", - "description": "Unix timestamp (seconds since 1970-01-01). When this event occurred in real-world time." + "description": "Unix timestamp when this transaction was executed." }, "data": { "$ref": "#/components/schemas/Bytes", - "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + "description": "Full transaction data serialized as BOC, base64 encoded." }, "transaction_id": { "$ref": "#/components/schemas/InternalTransactionId", - "description": "Reference to this transaction. Use `lt` and `hash` to fetch full details." + "description": "Transaction identifier (logical time + hash)." }, "fee": { "$ref": "#/components/schemas/Int256", - "description": "Total fees paid for this transaction in nanotons." + "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." + "description": "Storage fee component, in nanotons." }, "other_fee": { "$ref": "#/components/schemas/Int256", - "description": "Computation and action fees in nanotons. Covers gas for executing contract code." + "description": "Computation and action fee component, in nanotons." }, "in_msg": { "$ref": "#/components/schemas/Message", - "description": "The incoming message that triggered this transaction. External messages come from outside the blockchain." + "description": "The inbound message that triggered this transaction." }, "out_msgs": { "type": "array", "items": { "$ref": "#/components/schemas/Message" }, - "description": "Messages sent by this transaction. A transaction can send multiple messages to different destinations." + "description": "Array of outbound messages produced by this transaction. Each message contains sender, recipient, TON amount (nanotons as string), forwarding fee, message body, and optional decoded text comment." } }, "required": [ @@ -7283,27 +5797,12 @@ "type": "boolean", "title": "Ok", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See 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. " + "type": "object", + "description": "The method return value. The structure depends on the method called; see individual method documentation for response schemas. Only present when `ok` is `true`.", + "additionalProperties": true }, "@extra": { "type": "string", @@ -7312,13 +5811,14 @@ }, "jsonrpc": { "type": "string", - "description": "JSON-RPC protocol version, always \"2.0\"." + "description": "JSON-RPC protocol version. Always `\"2.0\"` when using the JSON-RPC endpoint." }, "id": { "type": "string", - "description": "Request ID. Pass any string and it will be echoed in the response." + "description": "Echoed request identifier from the original JSON-RPC request." } - } + }, + "description": "JSON-RPC response envelope. Contains the result of the called method, or an error if the request failed. The `result` structure varies by method. Refer to the individual endpoint documentation for details. See [TonLib types](/ecosystem/api/toncenter/v2-tonlib-types) for a full list of `@type` identifiers." }, "TonlibErrorResponse": { "type": "object", @@ -7333,7 +5833,7 @@ "ok": { "type": "boolean", "const": false, - "description": "Always false for error responses." + "description": "Always `false` for error responses." }, "code": { "type": "integer", @@ -7406,7 +5906,7 @@ "DetectAddress": { "type": "object", "additionalProperties": false, - "description": "Information about the address.", + "description": "Detected address in all supported formats. Contains the raw on-chain form, bounceable and non-bounceable user-friendly representations (each in base64 and URL-safe base64), the format type of the original input, and the testnet-only flag from the user-friendly encoding.", "properties": { "@type": { "type": "string", @@ -7414,19 +5914,19 @@ "ext.utils.detectedAddress" ], "default": "ext.utils.detectedAddress", - "description": "Object type identifier. " + "description": "TonLib type identifier for address detection results. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "raw_form": { "type": "string", - "description": "Raw address format (workchain:hex)." + "description": "Raw address in `workchain_id:account_id` hex format (e.g., `0:abc...def`). This is the canonical on-chain representation without flags or checksum." }, "bounceable": { "$ref": "#/components/schemas/DetectAddressBase64Variant", - "description": "Bounceable address format." + "description": "Bounceable form of the address in standard base64 and URL-safe base64. Bounceable addresses (prefix `E...`) instruct wallet software to set the bounce flag on outgoing messages, so funds are returned if the destination contract cannot process them." }, "non_bounceable": { "$ref": "#/components/schemas/DetectAddressBase64Variant", - "description": "Non-bounceable address format." + "description": "Non-bounceable form of the address in standard base64 and URL-safe base64. Non-bounceable addresses (prefix `U...`) instruct wallet software to clear the bounce flag, ensuring funds are credited even if the recipient has no deployed contract." }, "given_type": { "type": "string", @@ -7435,11 +5935,11 @@ "friendly_bounceable", "friendly_non_bounceable" ], - "description": "Address format that was provided." + "description": "The encoding format of the address as provided in the request (e.g., `raw_form`, `dns`, `friendly_bounceable`, `friendly_non_bounceable`)." }, "test_only": { "type": "boolean", - "description": "True if this is a testnet address." + "description": "Returns `true` if the user-friendly address has the testnet-only flag set (`0x80`); otherwise `false`. This is a flag in the address encoding that tells wallet software to reject this address on mainnet. The underlying account itself can exist on both networks." } }, "required": [ @@ -7461,22 +5961,22 @@ "ext.utils.detectedHash" ], "default": "ext.utils.detectedHash", - "description": "Object type identifier. " + "description": "TonLib type identifier for hash detection results. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "b64": { "type": "string", "title": "base64 form", - "description": "Standard base64 encoding." + "description": "Hash in standard base64 encoding (44 characters, uses `+` and `/`)." }, "b64url": { "type": "string", "title": "base64 url-safe form", - "description": "URL-safe base64 encoding." + "description": "Hash in URL-safe base64 encoding (44 characters, uses `-` and `_` instead of `+` and `/`)." }, "hex": { "type": "string", "title": "hex form", - "description": "Hexadecimal encoding." + "description": "Hash in lowercase hexadecimal encoding (64 characters)." } }, "required": [ @@ -7484,7 +5984,8 @@ "b64", "b64url", "hex" - ] + ], + "description": "Detected hash in all supported encoding formats: hex (64 characters), standard base64 (44 characters), and URL-safe base64." }, "PackAddress": { "type": "string", @@ -7505,7 +6006,7 @@ "raw.fullAccountState" ], "default": "raw.fullAccountState", - "description": "Object type identifier. " + "description": "TonLib type identifier for full account state responses. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "balance": { "$ref": "#/components/schemas/Int256", @@ -7516,7 +6017,7 @@ "items": { "$ref": "#/components/schemas/ExtraCurrencyBalance" }, - "description": "Non-TON currencies transferred. TON supports multiple native currencies." + "description": "Array of non-TON currency balances held by this account. Each entry contains a currency ID (integer) and balance amount (decimal string). Empty array if the account holds no extra currencies." }, "last_transaction_id": { "$ref": "#/components/schemas/InternalTransactionId", @@ -7541,7 +6042,7 @@ "sync_utime": { "type": "integer", "format": "int64", - "description": "Unix timestamp when this data was synced." + "description": "Unix timestamp of the block from which this data was read." }, "state": { "$ref": "#/components/schemas/AccountStateEnum", @@ -7549,7 +6050,7 @@ }, "suspended": { "type": "boolean", - "description": "True if the account is suspended." + "description": "Returns `true` if the account has been suspended by a governance decision; otherwise `false`." } }, "required": [ @@ -7576,11 +6077,11 @@ "fullAccountState" ], "default": "fullAccountState", - "description": "Object type identifier. " + "description": "TonLib type identifier for extended account state responses. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "address": { "$ref": "#/components/schemas/AccountAddress", - "description": "The account address in user-friendly format." + "description": "Account address object." }, "balance": { "$ref": "#/components/schemas/Int256", @@ -7591,7 +6092,7 @@ "items": { "$ref": "#/components/schemas/ExtraCurrencyBalance" }, - "description": "Non-TON currencies transferred. TON supports multiple native currencies." + "description": "Array of non-TON currency balances held by this account. Each entry contains a currency ID (integer) and balance amount (decimal string). Empty array if the account holds no extra currencies." }, "last_transaction_id": { "$ref": "#/components/schemas/InternalTransactionId", @@ -7604,15 +6105,15 @@ "sync_utime": { "type": "integer", "format": "int64", - "description": "Unix timestamp when this data was synced." + "description": "Unix timestamp of the block from which this data was read." }, "account_state": { "$ref": "#/components/schemas/AccountState", - "description": "Current lifecycle state: uninitialized, active, or frozen." + "description": "Detailed account state including contract type and internal data." }, "revision": { "type": "integer", - "description": "Contract revision number." + "description": "Contract revision number. Different revisions may have different behavior." } }, "required": [ @@ -7638,20 +6139,20 @@ "ext.accounts.walletInformation" ], "default": "ext.accounts.walletInformation", - "description": "Object type identifier. " + "description": "TonLib type identifier for wallet info responses. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "wallet": { "type": "boolean", - "description": "True if this address is a recognized wallet contract type. If false, wallet-specific fields won't be available." + "description": "Returns `true` if this address is a recognized wallet contract type; otherwise `false`." }, "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." + "description": "Account balance in nanotons as a decimal string." }, "account_state": { "$ref": "#/components/schemas/AccountStateEnum", - "description": "Current lifecycle state: uninitialized, active, or frozen." + "description": "Account lifecycle state: `uninit`, `active`, or `frozen`." }, "last_transaction_id": { "$ref": "#/components/schemas/InternalTransactionId", @@ -7672,20 +6173,20 @@ "wallet v5 beta", "wallet v5 r1" ], - "description": "The wallet contract version: v1r1 through v5r1. Newer versions (v4, v5) have more features." + "description": "Wallet contract version (e.g., `wallet v4 r2`, `wallet v5 r1`). Empty if not a recognized wallet." }, "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." + "description": "Current wallet sequence number. Increment this for each outgoing transaction to prevent replays." }, "wallet_id": { "type": "integer", - "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. Default is 698983191 for mainnet." + "description": "Subwallet ID. Allows creating multiple wallets from one key pair. Default is `698983191` on mainnet." }, "is_signature_allowed": { "type": "boolean", - "description": "For v5 wallets: whether external signatures are enabled. If false, wallet is controlled only by plugins." + "description": "Returns `true` if external signatures are enabled (v5 wallets only); `false` means the wallet is controlled only by plugins." } }, "required": [ @@ -7714,7 +6215,7 @@ "blocks.masterchainInfo" ], "default": "blocks.masterchainInfo", - "description": "Object type identifier. " + "description": "TonLib type identifier for masterchain state info. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "last": { "$ref": "#/components/schemas/TonBlockIdExt", @@ -7722,11 +6223,11 @@ }, "state_root_hash": { "$ref": "#/components/schemas/TonHash", - "description": "Merkle root of the entire blockchain state at this block." + "description": "Merkle root hash of the entire blockchain state at the latest block." }, "init": { "$ref": "#/components/schemas/TonBlockIdExt", - "description": "The genesis (first) block." + "description": "The genesis (first) masterchain block." } }, "required": [ @@ -7746,18 +6247,18 @@ "blocks.blockSignatures" ], "default": "blocks.blockSignatures", - "description": "Object type identifier. " + "description": "TonLib type identifier for block signature collections. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "id": { "$ref": "#/components/schemas/TonBlockIdExt", - "description": "Request ID. Pass any string and it will be echoed in the response." + "description": "Full block identifier for the signed block." }, "signatures": { "type": "array", "items": { "$ref": "#/components/schemas/BlockSignature" }, - "description": "Array of validator signatures." + "description": "Array of validator signatures for this block. Each entry contains the validator's short node ID (base64 hash) and their Ed25519 signature (base64)." } }, "required": [ @@ -7776,29 +6277,29 @@ "blocks.shardBlockProof" ], "default": "blocks.shardBlockProof", - "description": "Object type identifier. " + "description": "TonLib type identifier for shard block proof chains. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "from": { "$ref": "#/components/schemas/TonBlockIdExt", - "description": "Starting block for the proof." + "description": "The shard block being proven." }, "mc_id": { "$ref": "#/components/schemas/TonBlockIdExt", - "description": "Masterchain block identifier." + "description": "Masterchain block used as trust anchor for the proof." }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/ShardBlockLink" }, - "description": "Chain of block links." + "description": "Array of cryptographic links forming a proof chain from the shard block to the masterchain. Each link contains a block identifier and a Merkle proof (base64)." }, "mc_proof": { "type": "array", "items": { "$ref": "#/components/schemas/BlockLinkBack" }, - "description": "Masterchain proof data." + "description": "Array of masterchain block link proofs. Each entry contains source and destination block identifiers with corresponding Merkle proofs (base64) and state proofs (base64)." } }, "required": [ @@ -7819,17 +6320,17 @@ "ext.blocks.consensusBlock" ], "default": "ext.blocks.consensusBlock", - "description": "Object type identifier. " + "description": "TonLib type identifier for consensus block info. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "consensus_block": { "type": "integer", "format": "int32", - "description": "Consensus block sequence number." + "description": "Sequence number of the latest consensus block." }, "timestamp": { "type": "integer", "format": "int32", - "description": "Block creation timestamp." + "description": "Unix timestamp when the consensus block was created." } }, "required": [ @@ -7852,14 +6353,14 @@ "blocks.shards" ], "default": "blocks.shards", - "description": "Object type identifier. " + "description": "TonLib type identifier for shard listing responses. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "shards": { "type": "array", "items": { "$ref": "#/components/schemas/TonBlockIdExt" }, - "description": "Array of shard block identifiers." + "description": "Array of active shard block identifiers. Each entry contains workchain (integer), shard ID (string), seqno (integer), root_hash (base64/hex), and file_hash (base64/hex)." } }, "required": [ @@ -7879,77 +6380,77 @@ "blocks.header" ], "default": "blocks.header", - "description": "Object type identifier. " + "description": "TonLib type identifier for block header objects. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "id": { "$ref": "#/components/schemas/TonBlockIdExt", - "description": "Request ID. Pass any string and it will be echoed in the response." + "description": "Full block identifier including workchain, shard, seqno, and hashes." }, "global_id": { "type": "integer", - "description": "Global network identifier." + "description": "Global network ID (`-239` for mainnet, `-3` for testnet)." }, "version": { "type": "integer", - "description": "Block format version." + "description": "Block format version number." }, "after_merge": { "type": "boolean", - "description": "True if block was created after a merge." + "description": "Returns `true` if this block was created immediately after a shard merge; otherwise `false`." }, "after_split": { "type": "boolean", - "description": "True if block was created after a split." + "description": "Returns `true` if this block was created immediately after a shard split; otherwise `false`." }, "before_split": { "type": "boolean", - "description": "True if block was created before a split." + "description": "Returns `true` if this shard will split after this block; otherwise `false`." }, "want_merge": { "type": "boolean", - "description": "Indicates if validators wanted a merge." + "description": "Returns `true` if validators have signaled a preference to merge this shard; otherwise `false`." }, "want_split": { "type": "boolean", - "description": "Indicates if validators wanted a split." + "description": "Returns `true` if validators have signaled a preference to split this shard; otherwise `false`." }, "validator_list_hash_short": { "type": "integer", - "description": "Short hash of validator list." + "description": "Short hash of the validator set active during this block." }, "catchain_seqno": { "type": "integer", - "description": "Catchain sequence number." + "description": "Catchain sequence number used for validator consensus." }, "min_ref_mc_seqno": { "type": "integer", - "description": "Minimum referenced masterchain seqno." + "description": "Minimum masterchain block seqno referenced by this block." }, "is_key_block": { "type": "boolean", - "description": "True if this block is a key block." + "description": "Returns `true` if this is a key block containing validator set changes or config updates; otherwise `false`." }, "prev_key_block_seqno": { "type": "integer", - "description": "Previous key block sequence number." + "description": "Sequence number of the previous key block." }, "start_lt": { "type": "string", - "description": "Starting logical time.", + "description": "Logical time at the start of this block.", "x-usrv-cpp-type": "std::int64_t" }, "end_lt": { "type": "string", - "description": "Ending logical time.", + "description": "Logical time at the end of this block. All transactions in this block have lt between start_lt and end_lt.", "x-usrv-cpp-type": "std::int64_t" }, "gen_utime": { "type": "integer", - "description": "Block generation UNIX timestamp." + "description": "Unix timestamp when this block was generated." }, "prev_blocks": { "type": "array", - "description": "List of previous block identifiers.", + "description": "Array of previous block identifiers (workchain, shard, seqno, root_hash, file_hash). Usually contains one entry, but two after a shard merge.", "items": { "$ref": "#/components/schemas/TonBlockIdExt" } @@ -7986,18 +6487,18 @@ "blocks.outMsgQueueSizes" ], "default": "blocks.outMsgQueueSizes", - "description": "Object type identifier. " + "description": "TonLib type identifier for outgoing message queue size responses. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "shards": { "type": "array", - "description": "List of outgoing message queue sizes per shard.", + "description": "Array of per-shard queue sizes. Each entry contains the shard's block identifier and the number of outgoing messages waiting in its queue (integer).", "items": { "$ref": "#/components/schemas/OutMsgQueueSize" } }, "ext_msg_queue_size_limit": { "type": "integer", - "description": "Limit for the external message queue size." + "description": "Maximum allowed external message queue size before new messages are rejected." } }, "required": [ @@ -8016,11 +6517,11 @@ "configInfo" ], "default": "configInfo", - "description": "Object type identifier. " + "description": "TonLib type identifier for blockchain configuration responses. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "config": { "$ref": "#/components/schemas/TvmCell", - "description": "The configuration parameter value." + "description": "The requested configuration parameter value as a TVM cell." } }, "required": [ @@ -8039,14 +6540,14 @@ "smc.libraryResult" ], "default": "smc.libraryResult", - "description": "Object type identifier. " + "description": "TonLib type identifier for library lookup results. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/LibraryEntry" }, - "description": "The response data. Only present when `ok` is true. " + "description": "Array of library entries. Each entry contains a hash (base64 or hex) identifying the library and a data field with the library code in BOC format (base64)." } }, "required": [ @@ -8058,7 +6559,7 @@ "BlockTransactions": { "type": "object", "additionalProperties": false, - "description": "Block transactions information", + "description": "List of short transaction identifiers found in a specific block, with a flag indicating whether more transactions are available for pagination.", "properties": { "@type": { "type": "string", @@ -8066,23 +6567,23 @@ "blocks.transactions" ], "default": "blocks.transactions", - "description": "Object type identifier. " + "description": "TonLib type identifier for block transaction listings. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "id": { - "description": "Request ID. Pass any string and it will be echoed in the response.", + "description": "Full block identifier for the queried block.", "$ref": "#/components/schemas/TonBlockIdExt" }, "req_count": { "type": "integer", - "description": "Number of requested transactions" + "description": "Number of transactions requested." }, "incomplete": { "type": "boolean", - "description": "Indicates if the transaction list is incomplete" + "description": "Returns `true` if there are more transactions in this block; otherwise `false`. Use the last transaction as cursor for pagination." }, "transactions": { "type": "array", - "description": "List of short transaction identifiers", + "description": "Array of compact transaction references. Each entry contains the account address (string), logical time (string), and transaction hash (base64 or hex).", "items": { "$ref": "#/components/schemas/ShortTxId" } @@ -8099,7 +6600,7 @@ "BlockTransactionsExt": { "type": "object", "additionalProperties": false, - "description": "Block transactions information", + "description": "List of full transaction objects found in a specific block, with a flag indicating whether more transactions are available for pagination.", "properties": { "@type": { "type": "string", @@ -8107,23 +6608,23 @@ "blocks.transactionsExt" ], "default": "blocks.transactionsExt", - "description": "Object type identifier. " + "description": "TonLib type identifier for extended block transaction listings. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "id": { - "description": "Request ID. Pass any string and it will be echoed in the response.", + "description": "Full block identifier for the queried block.", "$ref": "#/components/schemas/TonBlockIdExt" }, "req_count": { "type": "integer", - "description": "Number of requested transactions" + "description": "Number of transactions requested." }, "incomplete": { "type": "boolean", - "description": "Indicates if the transaction list is incomplete" + "description": "Returns `true` if there are more transactions in this block; otherwise `false`. Use the last transaction as cursor for pagination." }, "transactions": { "type": "array", - "description": "List of short transaction identifiers", + "description": "Array of full transaction objects. Each entry contains the account address, timestamps, inbound/outbound messages, fees (in nanotons), and the raw transaction BOC (base64).", "items": { "$ref": "#/components/schemas/TransactionExt" } @@ -8158,18 +6659,18 @@ "raw.transactions" ], "default": "raw.transactions", - "description": "Object type identifier. " + "description": "TonLib type identifier for paginated raw transaction lists. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "transactions": { "type": "array", "items": { "$ref": "#/components/schemas/TransactionStd" }, - "description": "Array of transactions." + "description": "Array of transaction objects in standardized format. Each transaction contains address, timestamps, inbound/outbound messages, fees in nanotons, and raw BOC (base64)." }, "previous_transaction_id": { "$ref": "#/components/schemas/InternalTransactionId", - "description": "Previous transaction reference for pagination." + "description": "Use this as cursor to fetch the next page of older transactions." } } }, @@ -8188,15 +6689,15 @@ "raw.extMessageInfo" ], "default": "raw.extMessageInfo", - "description": "Object type identifier. " + "description": "TonLib type identifier for external message info after broadcast. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "hash": { "$ref": "#/components/schemas/TonHash", - "description": "Unique identifier hash for this object." + "description": "Hash of the external message as accepted by the network." }, "hash_norm": { "$ref": "#/components/schemas/TonHash", - "description": "Normalized message hash." + "description": "Normalized message hash, stable across re-serializations." } }, "description": "Information about a broadcast external message. Contains the message hash which you can use to track its processing." @@ -8214,7 +6715,7 @@ "ok" ], "default": "ok", - "description": "Object type identifier. " + "description": "TonLib type identifier for successful operations with no return data. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." } }, "description": "Simple success response with no additional data." @@ -8253,27 +6754,27 @@ "fees" ], "default": "fees", - "description": "Object type identifier. " + "description": "TonLib type identifier for fee breakdown objects. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "in_fwd_fee": { "type": "integer", "format": "int64", - "description": "Inbound forwarding fee in nanotons." + "description": "Fee for importing this inbound message, in nanotons." }, "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." + "description": "Storage fee charged for keeping the contract state on-chain, in nanotons." }, "gas_fee": { "type": "integer", "format": "int64", - "description": "Gas fees in nanotons." + "description": "Computation gas fee for executing contract code, in nanotons." }, "fwd_fee": { "type": "integer", "format": "int64", - "description": "Fee for forwarding this message to its destination, in nanotons." + "description": "Fee for forwarding outbound messages created by this transaction, in nanotons." } } }, @@ -8292,18 +6793,18 @@ "query.fees" ], "default": "query.fees", - "description": "Object type identifier. " + "description": "TonLib type identifier for fee estimation results. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "source_fees": { "$ref": "#/components/schemas/Fees", - "description": "Fees charged at source." + "description": "Fees charged on the sending account." }, "destination_fees": { "type": "array", "items": { "$ref": "#/components/schemas/Fees" }, - "description": "Fees charged at destination." + "description": "Array of fee breakdowns charged on the receiving account. Each entry contains `in_fwd_fee`, `storage_fee`, `gas_fee`, and `fwd_fee` in nanotons (integers)." } }, "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)." @@ -8322,11 +6823,11 @@ "tvm.stackEntrySlice" ], "default": "tvm.stackEntrySlice", - "description": "Object type identifier. " + "description": "TonLib type identifier for slice-typed stack entries. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "slice": { "$ref": "#/components/schemas/TvmSlice", - "description": "TVM slice value." + "description": "The TVM slice value." } } }, @@ -8344,11 +6845,11 @@ "tvm.stackEntryCell" ], "default": "tvm.stackEntryCell", - "description": "Object type identifier. " + "description": "TonLib type identifier for cell-typed stack entries. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "cell": { "$ref": "#/components/schemas/TvmCell", - "description": "TVM cell value." + "description": "The TVM cell value." } } }, @@ -8366,11 +6867,11 @@ "tvm.stackEntryNumber" ], "default": "tvm.stackEntryNumber", - "description": "Object type identifier. " + "description": "TonLib type identifier for number-typed stack entries. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "number": { "$ref": "#/components/schemas/TvmNumberDecimal", - "description": "TVM number value." + "description": "The TVM number value (arbitrary-precision decimal)." } } }, @@ -8388,11 +6889,11 @@ "tvm.stackEntryTuple" ], "default": "tvm.stackEntryTuple", - "description": "Object type identifier. " + "description": "TonLib type identifier for tuple-typed stack entries. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "tuple": { "$ref": "#/components/schemas/TvmTuple", - "description": "TVM tuple value." + "description": "The TVM tuple value." } } }, @@ -8410,11 +6911,11 @@ "tvm.stackEntryList" ], "default": "tvm.stackEntryList", - "description": "Object type identifier. " + "description": "TonLib type identifier for list-typed stack entries. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "list": { "$ref": "#/components/schemas/TvmList", - "description": "TVM list value." + "description": "The TVM list value." } } }, @@ -8431,7 +6932,7 @@ "tvm.stackEntryUnsupported" ], "default": "tvm.stackEntryUnsupported", - "description": "Object type identifier. " + "description": "TonLib type identifier for stack entries with unsupported types. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." } } }, @@ -8449,11 +6950,11 @@ "tvm.slice" ], "default": "tvm.slice", - "description": "Object type identifier. " + "description": "TonLib type identifier for TVM slice values. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "bytes": { "$ref": "#/components/schemas/Bytes", - "description": "Slice data in base64." + "description": "TVM slice data serialized as base64." } } }, @@ -8471,11 +6972,11 @@ "tvm.cell" ], "default": "tvm.cell", - "description": "Object type identifier. " + "description": "TonLib type identifier for TVM cell values. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "bytes": { "$ref": "#/components/schemas/Bytes", - "description": "Cell data in base64." + "description": "TVM cell data serialized as base64." } } }, @@ -8493,11 +6994,11 @@ "tvm.numberDecimal" ], "default": "tvm.numberDecimal", - "description": "Object type identifier. " + "description": "TonLib type identifier for TVM decimal number values. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "number": { "$ref": "#/components/schemas/Int256", - "description": "Decimal number as string." + "description": "Integer value as a decimal string (supports arbitrarily large numbers)." } } }, @@ -8515,7 +7016,7 @@ "tvm.tuple" ], "default": "tvm.tuple", - "description": "Object type identifier. " + "description": "TonLib type identifier for TVM tuple structures. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "elements": { "type": "array", @@ -8558,7 +7059,7 @@ } } }, - "description": "Array of stack entries." + "description": "Ordered tuple of TVM stack entries. Each element is a typed object with `@type` discriminator (`tvm.stackEntryNumber`, `tvm.stackEntryCell`, `tvm.stackEntrySlice`, `tvm.stackEntryTuple`, or `tvm.stackEntryList`)." } } }, @@ -8576,7 +7077,7 @@ "tvm.list" ], "default": "tvm.list", - "description": "Object type identifier. " + "description": "TonLib type identifier for TVM list structures. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "elements": { "type": "array", @@ -8619,7 +7120,7 @@ } } }, - "description": "Array of stack entries." + "description": "Ordered list of TVM stack entries. Each element is a typed object with `@type` discriminator (`tvm.stackEntryNumber`, `tvm.stackEntryCell`, `tvm.stackEntrySlice`, `tvm.stackEntryTuple`, or `tvm.stackEntryList`)." } } }, @@ -8633,8 +7134,7 @@ ], "properties": { "address": { - "$ref": "#/components/schemas/TonAddr", - "description": "The account address in user-friendly format." + "$ref": "#/components/schemas/TonAddr" }, "method": { "oneOf": [ @@ -8689,7 +7189,7 @@ } } }, - "description": "Input arguments or output values as a TVM stack. Each entry has a type and value." + "description": "Input arguments as a TVM stack. Each entry is a typed object with `@type` discriminator: `tvm.stackEntryNumber` (decimal string), `tvm.stackEntryCell` (base64 BOC), `tvm.stackEntrySlice` (base64 BOC), `tvm.stackEntryTuple`, or `tvm.stackEntryList`." }, "seqno": { "type": "integer", @@ -8713,12 +7213,12 @@ "smc.runResult" ], "default": "smc.runResult", - "description": "Object type identifier. " + "description": "TonLib type identifier for standardized get method execution results. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "gas_used": { "type": "integer", "format": "int64", - "description": "Amount of gas consumed during execution. Useful for estimating costs of similar operations." + "description": "Gas consumed during execution. Useful for cost estimation." }, "stack": { "type": "array", @@ -8761,15 +7261,15 @@ } } }, - "description": "Input arguments or output values as a TVM stack. Each entry has a type and value." + "description": "Output values as a TVM stack. Each entry is a typed object with `@type` discriminator: `tvm.stackEntryNumber` (decimal string), `tvm.stackEntryCell` (base64 BOC), `tvm.stackEntrySlice` (base64 BOC), `tvm.stackEntryTuple`, or `tvm.stackEntryList`." }, "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." + "description": "TVM exit code: 0 or 1 means success, other values indicate errors." } }, - "description": "Same as RunGetMethodResult but uses typed stack entries for clearer output parsing." + "description": "Result of executing a smart contract get method. Contains the TVM exit code (0 or 1 means success), gas consumed, and the output stack with typed return values." }, "LegacyTvmCell": { "type": "object", @@ -8798,18 +7298,18 @@ "description": "Data length in bits." } }, - "description": "Raw transaction or contract data in BOC (Bag of Cells) format, base64 encoded." + "description": "Cell binary data." }, "refs": { "type": "array", "items": { "$ref": "#/components/schemas/LegacyTvmCell" }, - "description": "Array of child cell references." + "description": "Array of child cell references, forming a directed acyclic graph (DAG). Each child is a TVM cell object with its own data (base64), refs, and special flag." }, "special": { "type": "boolean", - "description": "True if this is a special cell." + "description": "Returns `true` if this is a special (exotic) cell type such as a Merkle proof or library reference; otherwise `false`." } } }, @@ -8822,11 +7322,11 @@ "properties": { "bytes": { "$ref": "#/components/schemas/Bytes", - "description": "Cell data in base64." + "description": "Raw cell bytes in base64." }, "object": { "$ref": "#/components/schemas/LegacyTvmCell", - "description": "Parsed cell object." + "description": "Parsed cell object with data, refs, and type info." } } }, @@ -8867,8 +7367,7 @@ ], "properties": { "address": { - "$ref": "#/components/schemas/TonAddr", - "description": "The account address in user-friendly format." + "$ref": "#/components/schemas/TonAddr" }, "method": { "oneOf": [ @@ -8887,7 +7386,7 @@ "items": { "$ref": "#/components/schemas/LegacyStackEntry" }, - "description": "Input arguments or output values as a TVM stack. Each entry has a type and value." + "description": "Input arguments as a TVM stack. Each entry is a two-element array: `[type, value]` where type is `\"num\"` (decimal string), `\"cell\"` (base64 BOC), or `\"slice\"` (base64 BOC)." }, "seqno": { "type": "integer", @@ -8915,32 +7414,32 @@ "smc.runResult" ], "default": "smc.runResult", - "description": "Object type identifier. " + "description": "TonLib type identifier for get method execution results. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." }, "gas_used": { "type": "integer", "format": "int64", - "description": "Amount of gas consumed during execution. Useful for estimating costs of similar operations." + "description": "Gas consumed during execution. Useful for cost estimation." }, "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." + "description": "Output values as a TVM stack. Each entry is a two-element array: `[type, value]` where type is `\"num\"` (decimal string), `\"cell\"` (base64 BOC), or `\"slice\"` (base64 BOC)." }, "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." + "description": "TVM exit code: 0 or 1 means success, other values indicate errors." }, "block_id": { "$ref": "#/components/schemas/TonBlockIdExt", - "description": "Full block identifier where this event occurred." + "description": "Block at which the get method was executed." }, "last_transaction_id": { "$ref": "#/components/schemas/InternalTransactionId", - "description": "Reference to the most recent transaction. Use as starting point for getTransactions." + "description": "Most recent transaction at the time of execution." } }, "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." @@ -8948,23 +7447,23 @@ "UnpackedAddress": { "type": "object", "additionalProperties": false, - "description": "Unpacked address components.", + "description": "Decoded address components extracted from a packed base64 address. Contains the workchain, raw hex account ID, and flags for bounceable and testnet formats.", "properties": { "workchain": { "type": "integer", - "description": "Workchain ID: -1 for masterchain, 0 for basechain. Most user transactions are on workchain 0." + "description": "Workchain ID extracted from the address: `0` for basechain, `-1` for masterchain." }, "bounceable": { "type": "boolean", - "description": "Whether the address is bounceable." + "description": "Returns `true` if the user-friendly address was encoded in bounceable format (flag byte `0x11`); otherwise `false` (non-bounceable, flag byte `0x51`)." }, "testnet": { "type": "boolean", - "description": "Whether the address is for testnet." + "description": "Returns `true` if the user-friendly address has the testnet-only flag set (flag byte includes `0x80`); otherwise `false`. This is a metadata flag in the address encoding. The underlying account can exist on both testnet and mainnet." }, "addr_hex": { "type": "string", - "description": "Account ID in hexadecimal format." + "description": "The 256-bit `account_id` in hexadecimal (64 characters). Combined with `workchain`, this forms the raw address." } } }, @@ -8979,11 +7478,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/DetectAddress", - "description": "The response data. Only present when `ok` is true." + "description": "The response data. Only present when `ok` is `true`." }, "@extra": { "type": "string", @@ -9003,11 +7502,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/DetectHash", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9027,11 +7526,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "type": "string", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9051,11 +7550,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/UnpackedAddress", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9075,11 +7574,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/AddressInformation", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9099,11 +7598,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/ExtendedAddressInformation", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9123,11 +7622,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/WalletInformation", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9147,11 +7646,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/Int256", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9171,11 +7670,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/AccountStateEnum", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9195,11 +7694,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/TokenData", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9219,11 +7718,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/MasterchainInfo", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9243,11 +7742,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/MasterchainBlockSignatures", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9267,11 +7766,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/ShardBlockProof", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9291,11 +7790,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/ConsensusBlock", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9315,11 +7814,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/TonBlockIdExt", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9339,11 +7838,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/Shards", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9363,11 +7862,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/BlockHeader", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9387,11 +7886,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/OutMsgQueueSizes", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9411,11 +7910,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/BlockTransactions", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9435,11 +7934,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/BlockTransactionsExt", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9459,14 +7958,14 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "type": "array", "items": { "$ref": "#/components/schemas/Transaction" }, - "description": "The response data. Only present when `ok` is true. " + "description": "Array of transaction objects, ordered newest-first. Each transaction contains the triggering inbound message, all outbound messages, fees in nanotons, timestamps, and the raw BOC (base64)." }, "@extra": { "type": "string", @@ -9486,11 +7985,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/TransactionsStd", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9510,11 +8009,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/Transaction", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9534,11 +8033,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/Transaction", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9558,11 +8057,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/Transaction", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9582,11 +8081,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/ConfigInfo", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9606,11 +8105,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/ConfigInfo", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9630,11 +8129,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/LibraryResult", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9654,11 +8153,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/ResultOk", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9678,11 +8177,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/ExtMessageInfo", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9702,11 +8201,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/QueryFees", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9726,11 +8225,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/RunGetMethodResult", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", @@ -9750,11 +8249,11 @@ "ok": { "type": "boolean", "default": true, - "description": "Indicates if the request succeeded. If false, check the `error` field for details." + "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { "$ref": "#/components/schemas/RunGetMethodStdResult", - "description": "The response data. Only present when `ok` is true. " + "description": "The response data. Only present when `ok` is `true`. " }, "@extra": { "type": "string", From 62b1e13964a0caf949bb584ef8917bf5d25ab84f Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Wed, 18 Feb 2026 10:10:36 +0200 Subject: [PATCH 05/21] fix version --- ecosystem/api/toncenter/v2-tonlib-types.mdx | 248 ++++++++++---------- ecosystem/api/toncenter/v2.json | 2 +- 2 files changed, 125 insertions(+), 125 deletions(-) diff --git a/ecosystem/api/toncenter/v2-tonlib-types.mdx b/ecosystem/api/toncenter/v2-tonlib-types.mdx index 85e2f8b07..f5a4ebac3 100644 --- a/ecosystem/api/toncenter/v2-tonlib-types.mdx +++ b/ecosystem/api/toncenter/v2-tonlib-types.mdx @@ -30,16 +30,16 @@ The `@type` field acts as a **discriminator**: when a response can return differ The TL schema maps to JSON types as follows: -| TL type | JSON type | Notes | -| :----------- | :-------- | :----------------------------------------------------------- | -| `int32` | number | 32-bit signed integer | -| `int53` | number | 53-bit signed integer (safe for JavaScript `Number`) | -| `int64` | string | 64-bit signed integer as decimal string (exceeds JS safe range) | -| `int256` | string | 256-bit integer as decimal or hex string | -| `bytes` | string | Binary data, base64-encoded | -| `string` | string | UTF-8 text | -| `Bool` | boolean | `true` or `false` | -| `vector` | array | Ordered list of elements of type `T` | +| TL type | JSON type | Notes | +| :---------- | :-------- | :-------------------------------------------------------------- | +| `int32` | number | 32-bit signed integer | +| `int53` | number | 53-bit signed integer (safe for JavaScript `Number`) | +| `int64` | string | 64-bit signed integer as decimal string (exceeds JS safe range) | +| `int256` | string | 256-bit integer as decimal or hex string | +| `bytes` | string | Binary data, base64-encoded | +| `string` | string | UTF-8 text | +| `Bool` | boolean | `true` or `false` | +| `vector` | array | Ordered list of elements of type `T` | ## Account state @@ -57,17 +57,17 @@ pchan.accountState config:pchan.config state:pchan.State description:string = Ac uninited.accountState frozen_hash:bytes = AccountState; ``` -| `@type` value | API schema | TL fields | -| :-------------------------------- | :------------------------------- | :-------------------------------------------- | -| `raw.accountState` | `AccountStateRaw` | `code`, `data`, `frozen_hash` | -| `wallet.v3.accountState` | `AccountStateWalletV3` | `wallet_id`, `seqno` | -| `wallet.v4.accountState` | `AccountStateWalletV4` | `wallet_id`, `seqno` | -| `wallet.highload.v1.accountState` | `AccountStateWalletHighloadV1` | `wallet_id`, `seqno` | -| `wallet.highload.v2.accountState` | `AccountStateWalletHighloadV2` | `wallet_id` | -| `dns.accountState` | `AccountStateDns` | `wallet_id` | -| `rwallet.accountState` | `AccountStateRWallet` | `wallet_id`, `seqno`, `unlocked_balance`, `config` | -| `pchan.accountState` | `AccountStatePChan` | `config`, `state`, `description` | -| `uninited.accountState` | `AccountStateUninited` | `frozen_hash` | +| `@type` value | API schema | TL fields | +| :-------------------------------- | :----------------------------- | :------------------------------------------------- | +| `raw.accountState` | `AccountStateRaw` | `code`, `data`, `frozen_hash` | +| `wallet.v3.accountState` | `AccountStateWalletV3` | `wallet_id`, `seqno` | +| `wallet.v4.accountState` | `AccountStateWalletV4` | `wallet_id`, `seqno` | +| `wallet.highload.v1.accountState` | `AccountStateWalletHighloadV1` | `wallet_id`, `seqno` | +| `wallet.highload.v2.accountState` | `AccountStateWalletHighloadV2` | `wallet_id` | +| `dns.accountState` | `AccountStateDns` | `wallet_id` | +| `rwallet.accountState` | `AccountStateRWallet` | `wallet_id`, `seqno`, `unlocked_balance`, `config` | +| `pchan.accountState` | `AccountStatePChan` | `config`, `state`, `description` | +| `uninited.accountState` | `AccountStateUninited` | `frozen_hash` | ## Account information @@ -84,11 +84,11 @@ fullAccountState address:accountAddress balance:int64 extra_currencies:vector = tvm.Tuple; tvm.list elements:vector = tvm.List; ``` -| `@type` value | API schema | TL fields | -| :------------------- | :----------------- | :--------------------------- | -| `tvm.cell` | `TvmCell` | `bytes` (base64 BOC) | -| `tvm.slice` | `TvmSlice` | `bytes` (base64 BOC) | -| `tvm.numberDecimal` | `TvmNumberDecimal` | `number` (decimal string) | -| `tvm.tuple` | `TvmTuple` | `elements` (stack entries) | -| `tvm.list` | `TvmList` | `elements` (stack entries) | +| `@type` value | API schema | TL fields | +| :------------------ | :----------------- | :------------------------- | +| `tvm.cell` | `TvmCell` | `bytes` (base64 BoC) | +| `tvm.slice` | `TvmSlice` | `bytes` (base64 BoC) | +| `tvm.numberDecimal` | `TvmNumberDecimal` | `number` (decimal string) | +| `tvm.tuple` | `TvmTuple` | `elements` (stack entries) | +| `tvm.list` | `TvmList` | `elements` (stack entries) | ### Get method result @@ -243,10 +243,10 @@ tvm.list elements:vector = tvm.List; smc.runResult gas_used:int53 stack:vector exit_code:int32 = smc.RunResult; ``` -| `@type` value | API schema | TL fields | -| :--------------- | :--------------------- | :------------------------------- | -| `smc.runResult` | `RunGetMethodResult` | `gas_used`, `stack`, `exit_code` | -| `smc.runResult` | `RunGetMethodStdResult`| Same fields, typed stack entries | +| `@type` value | API schema | TL fields | +| :-------------- | :---------------------- | :------------------------------- | +| `smc.runResult` | `RunGetMethodResult` | `gas_used`, `stack`, `exit_code` | +| `smc.runResult` | `RunGetMethodStdResult` | Same fields, typed stack entries | ## Fees @@ -255,10 +255,10 @@ fees in_fwd_fee:int53 storage_fee:int53 gas_fee:int53 fwd_fee:int53 = Fees; query.fees source_fees:fees destination_fees:vector = query.Fees; ``` -| `@type` value | API schema | TL fields | -| :------------- | :----------- | :------------------------------------------------- | -| `fees` | `Fees` | `in_fwd_fee`, `storage_fee`, `gas_fee`, `fwd_fee` | -| `query.fees` | `QueryFees` | `source_fees`, `destination_fees` | +| `@type` value | API schema | TL fields | +| :------------ | :---------- | :------------------------------------------------ | +| `fees` | `Fees` | `in_fwd_fee`, `storage_fee`, `gas_fee`, `fwd_fee` | +| `query.fees` | `QueryFees` | `source_fees`, `destination_fees` | ## Configuration @@ -266,9 +266,9 @@ query.fees source_fees:fees destination_fees:vector = query.Fees; configInfo config:tvm.cell = ConfigInfo; ``` -| `@type` value | API schema | TL fields | -| :------------ | :---------- | :--------------------------------- | -| `configInfo` | `ConfigInfo`| `config` (TVM cell with parameters)| +| `@type` value | API schema | TL fields | +| :------------ | :----------- | :---------------------------------- | +| `configInfo` | `ConfigInfo` | `config` (TVM cell with parameters) | ## Libraries @@ -277,21 +277,21 @@ smc.libraryEntry hash:int256 data:bytes = smc.LibraryEntry; smc.libraryResult result:(vector smc.libraryEntry) = smc.LibraryResult; ``` -| `@type` value | API schema | TL fields | -| :------------------ | :------------- | :------------------- | -| `smc.libraryEntry` | `LibraryEntry` | `hash`, `data` | -| `smc.libraryResult` | `LibraryResult`| `result` (entries) | +| `@type` value | API schema | TL fields | +| :------------------ | :-------------- | :----------------- | +| `smc.libraryEntry` | `LibraryEntry` | `hash`, `data` | +| `smc.libraryResult` | `LibraryResult` | `result` (entries) | ## Token types (TON Center extensions) These types are not in the base TonLib TL schema. They are added by TON Center to provide parsed Jetton and NFT data via the `getTokenData` endpoint. -| `@type` value | API schema | Description | -| :------------------------------- | :------------------ | :----------------------------------------------- | -| `ext.tokens.jettonMasterData` | `JettonMasterData` | Jetton master: total supply, admin, metadata | -| `ext.tokens.jettonWalletData` | `JettonWalletData` | Jetton wallet: balance, owner, master reference | -| `ext.tokens.nftCollectionData` | `NftCollectionData` | NFT collection: item count, owner, metadata | -| `ext.tokens.nftItemData` | `NftItemData` | NFT item: index, owner, collection reference | +| `@type` value | API schema | Description | +| :----------------------------- | :------------------ | :---------------------------------------------- | +| `ext.tokens.jettonMasterData` | `JettonMasterData` | Jetton master: total supply, admin, metadata | +| `ext.tokens.jettonWalletData` | `JettonWalletData` | Jetton wallet: balance, owner, master reference | +| `ext.tokens.nftCollectionData` | `NftCollectionData` | NFT collection: item count, owner, metadata | +| `ext.tokens.nftItemData` | `NftItemData` | NFT item: index, owner, collection reference | ## DNS record types @@ -304,12 +304,12 @@ dns.entryDataAdnlAddress adnl_address:AdnlAddress = dns.EntryData; dns.entryDataStorageAddress bag_id:int256 = dns.EntryData; ``` -| `@type` value | API schema | TL fields | -| :-------------------- | :----------------------- | :------------------------- | -| `dns_next_resolver` | `DnsRecordNextResolver` | `resolver` (address) | -| `dns_smc_address` | `DnsRecordSmcAddress` | `smc_address` (address) | -| `dns_adnl_address` | `DnsRecordAdnlAddress` | `adnl_address` | -| `dns_storage_address` | `DnsRecordStorageAddress`| `bag_id` (int256) | +| `@type` value | API schema | TL fields | +| :-------------------- | :------------------------ | :---------------------- | +| `dns_next_resolver` | `DnsRecordNextResolver` | `resolver` (address) | +| `dns_smc_address` | `DnsRecordSmcAddress` | `smc_address` (address) | +| `dns_adnl_address` | `DnsRecordAdnlAddress` | `adnl_address` | +| `dns_storage_address` | `DnsRecordStorageAddress` | `bag_id` (int256) | ## Payment channel types @@ -323,12 +323,12 @@ pchan.stateClose signed_A:Bool signed_B:Bool min_A:int64 min_B:int64 pchan.statePayout A:int64 B:int64 = pchan.State; ``` -| `@type` value | API schema | Description | -| :----------------- | :---------------- | :----------------------------------- | -| `pchan.config` | `PChanConfig` | Channel parties, timeouts, ID | -| `pchan.stateInit` | `PChanStateInit` | Initialization phase (signing) | -| `pchan.stateClose` | `PChanStateClose` | Closing phase (signing) | -| `pchan.statePayout`| `PChanStatePayout`| Payout phase (final balances) | +| `@type` value | API schema | Description | +| :------------------ | :----------------- | :----------------------------- | +| `pchan.config` | `PChanConfig` | Channel parties, timeouts, ID | +| `pchan.stateInit` | `PChanStateInit` | Initialization phase (signing) | +| `pchan.stateClose` | `PChanStateClose` | Closing phase (signing) | +| `pchan.statePayout` | `PChanStatePayout` | Payout phase (final balances) | ## Restricted wallet types @@ -337,25 +337,25 @@ rwallet.limit seconds:int32 value:int64 = rwallet.Limit; rwallet.config start_at:int53 limits:vector = rwallet.Config; ``` -| `@type` value | API schema | TL fields | -| :--------------- | :------------- | :---------------------------- | -| `rwallet.config` | `RWalletConfig`| `start_at`, `limits` | -| `rwallet.limit` | `RWalletLimit` | `seconds`, `value` | +| `@type` value | API schema | TL fields | +| :--------------- | :-------------- | :------------------- | +| `rwallet.config` | `RWalletConfig` | `start_at`, `limits` | +| `rwallet.limit` | `RWalletLimit` | `seconds`, `value` | ## Utility types TON Center extensions. -| `@type` value | API schema | Description | -| :--------------------------------- | :-------------------------- | :--------------------------------- | -| `ext.utils.detectedAddress` | `DetectAddress` | Address in all encoding formats | -| `ext.utils.detectedAddressVariant` | `DetectAddressBase64Variant`| Base64 and URL-safe base64 pair | -| `ext.utils.detectedHash` | `DetectHash` | Hash in hex, base64, URL-safe | -| `extraCurrency` | `ExtraCurrencyBalance` | Non-TON currency ID and balance | -| `ok` | `ResultOk` | Success with no return data | +| `@type` value | API schema | Description | +| :--------------------------------- | :--------------------------- | :------------------------------ | +| `ext.utils.detectedAddress` | `DetectAddress` | Address in all encoding formats | +| `ext.utils.detectedAddressVariant` | `DetectAddressBase64Variant` | Base64 and URL-safe base64 pair | +| `ext.utils.detectedHash` | `DetectHash` | Hash in hex, base64, URL-safe | +| `extraCurrency` | `ExtraCurrencyBalance` | Non-TON currency ID and balance | +| `ok` | `ResultOk` | Success with no return data | ## Reference For background on the TL-B format used across the TON ecosystem, see the [TL-B overview](/languages/tl-b). -Types prefixed with `ext.` are TON Center extensions not present in the upstream TL schema. \ No newline at end of file +Types prefixed with `ext.` are TON Center extensions not present in the upstream TL schema. diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index 5ee6190f4..e80fd44bb 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -1,5 +1,5 @@ { - "openapi": "3.1.0", + "openapi": "3.1.1", "info": { "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", From 9cb12cae35b5538decf99437d065bd45913199d6 Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Wed, 18 Feb 2026 11:00:09 +0200 Subject: [PATCH 06/21] fix broken page --- ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx diff --git a/ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx b/ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx deleted file mode 100644 index b0f2112ec..000000000 --- a/ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /getWalletInformation ---- \ No newline at end of file From 734acbd7a7335adc4cf762b585548d4d7b7921bb Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Wed, 18 Feb 2026 11:02:32 +0200 Subject: [PATCH 07/21] fix again --- ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx diff --git a/ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx b/ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx new file mode 100644 index 000000000..4ea25833e --- /dev/null +++ b/ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /getWalletInformation +--- From 95292c85bb1d8384399298225ab42638c772ffc6 Mon Sep 17 00:00:00 2001 From: Lavinia Talpas Date: Thu, 19 Feb 2026 06:17:28 +0200 Subject: [PATCH 08/21] Update ecosystem/api/toncenter/v2-tonlib-types.mdx Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- ecosystem/api/toncenter/v2-tonlib-types.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem/api/toncenter/v2-tonlib-types.mdx b/ecosystem/api/toncenter/v2-tonlib-types.mdx index f5a4ebac3..1a4a03014 100644 --- a/ecosystem/api/toncenter/v2-tonlib-types.mdx +++ b/ecosystem/api/toncenter/v2-tonlib-types.mdx @@ -10,7 +10,7 @@ Every object returned by API v2 includes an `@type` field that identifies the ob - **TonLib types** (e.g. `raw.fullAccountState`, `tvm.cell`) come from the [TonLib TL schema](https://github.com/ton-blockchain/ton/blob/master/tl/generate/scheme/tonlib_api.tl), the type definition language used by the C++ library powering this API. - **Extended types** (prefixed with `ext.`) are added by TON Center to provide parsed, developer-friendly representations not available in the base TonLib schema. -The `@type` field acts as a **discriminator**: when a response can return different object shapes, the `@type` value tells you which fields to expect. This is useful for type-safe deserialization in statically typed languages. +The `@type` field acts as a **discriminator**: when a response can return different object shapes, the `@type` value indicates which fields to expect. This pattern is useful for type-safe deserialization in statically typed languages. ```json { From 3e972b4598130b78ec2df9ae3afd0a4a55a9ea19 Mon Sep 17 00:00:00 2001 From: Lavinia Talpas Date: Thu, 19 Feb 2026 06:18:00 +0200 Subject: [PATCH 09/21] Update ecosystem/api/toncenter/v2-tonlib-types.mdx Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- ecosystem/api/toncenter/v2-tonlib-types.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem/api/toncenter/v2-tonlib-types.mdx b/ecosystem/api/toncenter/v2-tonlib-types.mdx index 1a4a03014..99187c9a0 100644 --- a/ecosystem/api/toncenter/v2-tonlib-types.mdx +++ b/ecosystem/api/toncenter/v2-tonlib-types.mdx @@ -43,7 +43,7 @@ The TL schema maps to JSON types as follows: ## Account state -When you query account information, the `account_state` field uses `@type` to indicate which kind of contract is deployed. The TL schema defines these as variants of `AccountState`: +When querying account information, the `account_state` field uses `@type` to indicate which kind of contract is deployed. The TL schema defines these as variants of `AccountState`: ``` raw.accountState code:bytes data:bytes frozen_hash:bytes = AccountState; From c3a9d9cbafbd72dfef3e2a476cc0f309733c11d0 Mon Sep 17 00:00:00 2001 From: Lavinia Talpas Date: Thu, 19 Feb 2026 06:18:31 +0200 Subject: [PATCH 10/21] Update ecosystem/api/toncenter/v2.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- ecosystem/api/toncenter/v2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index e80fd44bb..f66f43556 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -735,7 +735,7 @@ "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.", + "description": "Finds the transaction that sent a specific message. Given message parameters, returns the transaction on the source account that created this outgoing message. Useful for tracing where a message originated from.", "operationId": "tryLocateSourceTx_get", "parameters": [ { From 2cb4d9607531bd2aca846fb0ddf16030ed555bed Mon Sep 17 00:00:00 2001 From: Lavinia Talpas Date: Thu, 19 Feb 2026 06:18:54 +0200 Subject: [PATCH 11/21] Update ecosystem/api/toncenter/v2.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- ecosystem/api/toncenter/v2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index f66f43556..31d20d8b0 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -1227,7 +1227,7 @@ "Run method" ], "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.", + "description": "Executes a read-only method on a smart contract. Get methods query contract state without sending a transaction. Common methods include `seqno` (wallet sequence number), `get_wallet_data` (wallet info), and `get_jetton_data` (token info). Method arguments are provided in the `stack` array.", "operationId": "runGetMethod_post", "requestBody": { "content": { From afa4c0f2c3168eae3c83fdc4fc4fa3feaab6ab99 Mon Sep 17 00:00:00 2001 From: Lavinia Talpas Date: Thu, 19 Feb 2026 06:19:09 +0200 Subject: [PATCH 12/21] Update ecosystem/api/toncenter/v2.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- ecosystem/api/toncenter/v2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index 31d20d8b0..a2e160ebe 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -1123,7 +1123,7 @@ "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.", + "description": "Returns block metadata without the full transaction list. Includes timestamps, validator info, and references to previous blocks. Intended for block explorers and other use cases that require block information without transactions.", "operationId": "getBlockHeader_get", "parameters": [ { From 7df77e0b65922ff5707f10309a0521c5d42117a0 Mon Sep 17 00:00:00 2001 From: Lavinia Talpas Date: Thu, 19 Feb 2026 06:19:26 +0200 Subject: [PATCH 13/21] Update ecosystem/api/toncenter/v2.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- ecosystem/api/toncenter/v2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index a2e160ebe..56ed50e89 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -953,7 +953,7 @@ "Blocks" ], "summary": "Get consensus block", - "description": "Returns the latest block that has reached consensus and is guaranteed to be final. This block will never be reverted, making it safe for confirming transactions. Use this when you need absolute certainty that a transaction is permanent.", + "description": "Returns the latest block that has reached consensus and is guaranteed to be final. This block will never be reverted, making it safe for confirming transactions that require absolute finality.", "operationId": "getConsensusBlock_get", "parameters": [], "responses": { From bf12b550ddc5b5a42656446f0d69288b63441d39 Mon Sep 17 00:00:00 2001 From: Lavinia Talpas Date: Thu, 19 Feb 2026 06:19:43 +0200 Subject: [PATCH 14/21] Update ecosystem/api/toncenter/v2.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- ecosystem/api/toncenter/v2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index 56ed50e89..e2213e66d 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -794,7 +794,7 @@ "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.", + "description": "Returns the current state of the TON masterchain. The `last` field contains the latest block used for querying current state. The seqno in `last` is the current block height. Use this endpoint to obtain the latest block reference for other queries.", "operationId": "getMasterchainInfo_get", "parameters": [], "responses": { From 6e03f086fee91474ed58e57d36d7cce395cebea8 Mon Sep 17 00:00:00 2001 From: Lavinia Talpas Date: Thu, 19 Feb 2026 06:20:01 +0200 Subject: [PATCH 15/21] Update ecosystem/api/toncenter/v2.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- ecosystem/api/toncenter/v2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index e2213e66d..9d56ba8e0 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -617,7 +617,7 @@ "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.", + "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 for locating when a previously sent message was executed.", "operationId": "tryLocateTx_get", "parameters": [ { From 2692094fa974ec939518b1fbe97493663689e87f Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Sat, 28 Feb 2026 03:12:34 +0200 Subject: [PATCH 16/21] remove tonlib types file --- docs.json | 3 +- ecosystem/api/toncenter/v2-tonlib-types.mdx | 361 -------------------- 2 files changed, 1 insertion(+), 363 deletions(-) delete mode 100644 ecosystem/api/toncenter/v2-tonlib-types.mdx diff --git a/docs.json b/docs.json index bc7e7452e..fce5a8b3c 100644 --- a/docs.json +++ b/docs.json @@ -82,8 +82,7 @@ "pages": [ "ecosystem/api/toncenter/v2/overview", "ecosystem/api/toncenter/v2-authentication", - "ecosystem/api/toncenter/v2-errors", - "ecosystem/api/toncenter/v2-tonlib-types" + "ecosystem/api/toncenter/v2-errors" ], "openapi": { "source": "ecosystem/api/toncenter/v2.json", diff --git a/ecosystem/api/toncenter/v2-tonlib-types.mdx b/ecosystem/api/toncenter/v2-tonlib-types.mdx deleted file mode 100644 index 99187c9a0..000000000 --- a/ecosystem/api/toncenter/v2-tonlib-types.mdx +++ /dev/null @@ -1,361 +0,0 @@ ---- -title: "TonLib type identifiers" -description: "Reference for the @type discriminator values returned by TON Center API v2." ---- - -## Overview - -Every object returned by API v2 includes an `@type` field that identifies the object's structure. These values originate from two sources: - -- **TonLib types** (e.g. `raw.fullAccountState`, `tvm.cell`) come from the [TonLib TL schema](https://github.com/ton-blockchain/ton/blob/master/tl/generate/scheme/tonlib_api.tl), the type definition language used by the C++ library powering this API. -- **Extended types** (prefixed with `ext.`) are added by TON Center to provide parsed, developer-friendly representations not available in the base TonLib schema. - -The `@type` field acts as a **discriminator**: when a response can return different object shapes, the `@type` value indicates which fields to expect. This pattern is useful for type-safe deserialization in statically typed languages. - -```json -{ - "@type": "raw.fullAccountState", - "balance": "1000000000", - "code": "te6cc...", - "data": "te6cc...", - "last_transaction_id": { - "@type": "internal.transactionId", - "lt": "12345678", - "hash": "abc..." - } -} -``` - -## TL primitive types - -The TL schema maps to JSON types as follows: - -| TL type | JSON type | Notes | -| :---------- | :-------- | :-------------------------------------------------------------- | -| `int32` | number | 32-bit signed integer | -| `int53` | number | 53-bit signed integer (safe for JavaScript `Number`) | -| `int64` | string | 64-bit signed integer as decimal string (exceeds JS safe range) | -| `int256` | string | 256-bit integer as decimal or hex string | -| `bytes` | string | Binary data, base64-encoded | -| `string` | string | UTF-8 text | -| `Bool` | boolean | `true` or `false` | -| `vector` | array | Ordered list of elements of type `T` | - -## Account state - -When querying account information, the `account_state` field uses `@type` to indicate which kind of contract is deployed. The TL schema defines these as variants of `AccountState`: - -``` -raw.accountState code:bytes data:bytes frozen_hash:bytes = AccountState; -wallet.v3.accountState wallet_id:int64 seqno:int32 = AccountState; -wallet.v4.accountState wallet_id:int64 seqno:int32 = AccountState; -wallet.highload.v1.accountState wallet_id:int64 seqno:int32 = AccountState; -wallet.highload.v2.accountState wallet_id:int64 = AccountState; -dns.accountState wallet_id:int64 = AccountState; -rwallet.accountState wallet_id:int64 seqno:int32 unlocked_balance:int64 config:rwallet.config = AccountState; -pchan.accountState config:pchan.config state:pchan.State description:string = AccountState; -uninited.accountState frozen_hash:bytes = AccountState; -``` - -| `@type` value | API schema | TL fields | -| :-------------------------------- | :----------------------------- | :------------------------------------------------- | -| `raw.accountState` | `AccountStateRaw` | `code`, `data`, `frozen_hash` | -| `wallet.v3.accountState` | `AccountStateWalletV3` | `wallet_id`, `seqno` | -| `wallet.v4.accountState` | `AccountStateWalletV4` | `wallet_id`, `seqno` | -| `wallet.highload.v1.accountState` | `AccountStateWalletHighloadV1` | `wallet_id`, `seqno` | -| `wallet.highload.v2.accountState` | `AccountStateWalletHighloadV2` | `wallet_id` | -| `dns.accountState` | `AccountStateDns` | `wallet_id` | -| `rwallet.accountState` | `AccountStateRWallet` | `wallet_id`, `seqno`, `unlocked_balance`, `config` | -| `pchan.accountState` | `AccountStatePChan` | `config`, `state`, `description` | -| `uninited.accountState` | `AccountStateUninited` | `frozen_hash` | - -## Account information - -Full account queries return one of these top-level types: - -``` -raw.fullAccountState balance:int64 extra_currencies:vector code:bytes data:bytes - last_transaction_id:internal.transactionId block_id:ton.blockIdExt frozen_hash:bytes sync_utime:int53 - = raw.FullAccountState; - -fullAccountState address:accountAddress balance:int64 extra_currencies:vector - last_transaction_id:internal.transactionId block_id:ton.blockIdExt sync_utime:int53 - account_state:AccountState revision:int32 - = FullAccountState; -``` - -| `@type` value | API schema | Description | -| :------------------------------- | :--------------------------- | :-------------------------------------------------------------- | -| `raw.fullAccountState` | `AddressInformation` | Raw state with balance, code, data, and frozen hash | -| `fullAccountState` | `ExtendedAddressInformation` | Parsed state with identified contract type | -| `ext.accounts.walletInformation` | `WalletInformation` | Wallet-specific: type, seqno, wallet\_id (TON Center extension) | - -## Address types - -``` -accountAddress account_address:string = AccountAddress; -``` - -| `@type` value | API schema | TL fields | -| :--------------- | :--------------- | :---------------- | -| `accountAddress` | `AccountAddress` | `account_address` | -| `addr_std` | `SmcAddr` | `workchain`, `id` | - -## Block identifiers - -``` -ton.blockIdExt workchain:int32 shard:int64 seqno:int32 root_hash:bytes file_hash:bytes = ton.BlockIdExt; -``` - -| `@type` value | API schema | TL fields | -| :--------------- | :-------------- | :------------------------------------------------------ | -| `ton.blockIdExt` | `TonBlockIdExt` | `workchain`, `shard`, `seqno`, `root_hash`, `file_hash` | - -## Block data - -These types are returned by block query endpoints. The TL definitions: - -``` -blocks.masterchainInfo last:ton.BlockIdExt state_root_hash:bytes init:ton.BlockIdExt = blocks.MasterchainInfo; -blocks.shards shards:vector = blocks.Shards; -blocks.header id:ton.blockIdExt global_id:int32 version:int32 flags:# after_merge:Bool after_split:Bool - before_split:Bool want_merge:Bool want_split:Bool validator_list_hash_short:int32 catchain_seqno:int32 - min_ref_mc_seqno:int32 is_key_block:Bool prev_key_block_seqno:int32 start_lt:int64 end_lt:int64 - gen_utime:int53 vert_seqno:# prev_blocks:vector = blocks.Header; -blocks.transactions id:ton.blockIdExt req_count:int32 incomplete:Bool - transactions:vector = blocks.Transactions; -blocks.transactionsExt id:ton.blockIdExt req_count:int32 incomplete:Bool - transactions:vector = blocks.TransactionsExt; -blocks.blockSignatures id:ton.blockIdExt signatures:(vector blocks.signature) = blocks.BlockSignatures; -blocks.shardBlockProof from:ton.blockIdExt mc_id:ton.blockIdExt - links:(vector blocks.shardBlockLink) mc_proof:(vector blocks.blockLinkBack) = blocks.ShardBlockProof; -blocks.outMsgQueueSizes shards:(vector blocks.outMsgQueueSize) - ext_msg_queue_size_limit:int32 = blocks.OutMsgQueueSizes; -``` - -| `@type` value | API schema | Description | -| :-------------------------- | :--------------------------- | :-------------------------------------------- | -| `blocks.masterchainInfo` | `MasterchainInfo` | Latest and genesis block references | -| `blocks.shards` | `Shards` | Active shard block identifiers | -| `blocks.header` | `BlockHeader` | Block metadata, merge/split flags, timing | -| `blocks.transactions` | `BlockTransactions` | Short transaction IDs within a block | -| `blocks.transactionsExt` | `BlockTransactionsExt` | Full transactions within a block | -| `blocks.shortTxId` | `ShortTxId` | Compact reference: account, lt, hash | -| `blocks.blockSignatures` | `MasterchainBlockSignatures` | Validator signatures for a block | -| `blocks.signature` | `BlockSignature` | Single validator signature | -| `blocks.shardBlockProof` | `ShardBlockProof` | Merkle proof chain to masterchain | -| `blocks.shardBlockLink` | `ShardBlockLink` | Single link in a proof chain | -| `blocks.blockLinkBack` | `BlockLinkBack` | Backward proof link between blocks | -| `blocks.outMsgQueueSize` | `OutMsgQueueSize` | Per-shard queue size | -| `blocks.outMsgQueueSizes` | `OutMsgQueueSizes` | Queue sizes across all shards | -| `ext.blocks.consensusBlock` | `ConsensusBlock` | Latest finalized block (TON Center extension) | - -## Transactions and messages - -``` -raw.transaction address:accountAddress utime:int53 data:bytes transaction_id:internal.transactionId - fee:int64 storage_fee:int64 other_fee:int64 in_msg:raw.message - out_msgs:vector = raw.Transaction; -raw.transactions transactions:vector - previous_transaction_id:internal.transactionId = raw.Transactions; -raw.message hash:bytes source:accountAddress destination:accountAddress value:int64 - extra_currencies:vector fwd_fee:int64 ihr_fee:int64 created_lt:int64 - body_hash:bytes msg_data:msg.Data = raw.Message; -raw.extMessageInfo hash:bytes hash_norm:bytes = raw.ExtMessageInfo; -internal.transactionId lt:int64 hash:bytes = internal.TransactionId; -``` - -| `@type` value | API schema | Description | -| :----------------------- | :---------------------- | :-------------------------------------------------------- | -| `raw.transaction` | `TransactionStd` | Raw transaction with messages and fees | -| `raw.transactions` | `TransactionsStd` | Paginated transaction list with cursor | -| `raw.message` | `MessageStd` | Raw message with sender, recipient, value | -| `raw.extMessageInfo` | `ExtMessageInfo` | External message hash after broadcast | -| `internal.transactionId` | `InternalTransactionId` | Transaction reference: lt + hash | -| `ext.transaction` | `Transaction` | Transaction with decoded comments (TON Center extension) | -| `ext.message` | `Message` | Message with decoded text comments (TON Center extension) | - -### Message body types - -The `msg_data` field on messages uses `@type` to indicate how to interpret the body: - -``` -msg.dataRaw body:bytes init_state:bytes = msg.Data; -msg.dataText text:bytes = msg.Data; -msg.dataDecryptedText text:bytes = msg.Data; -msg.dataEncryptedText text:bytes = msg.Data; -``` - -| `@type` value | API schema | Description | -| :---------------------- | :--------------------- | :---------------------------------------- | -| `msg.dataRaw` | `MsgDataRaw` | Raw binary body + optional init state | -| `msg.dataText` | `MsgDataText` | Plain text comment (base64-encoded UTF-8) | -| `msg.dataEncryptedText` | `MsgDataEncryptedText` | Encrypted message body | -| `msg.dataDecryptedText` | `MsgDataDecryptedText` | Decrypted message body | - -## TVM types - -Used as input and output for smart contract get methods (`runGetMethod`, `runGetMethodStd`). - -### Stack entries - -Each stack entry wraps a value with a type tag: - -``` -tvm.stackEntryNumber number:tvm.Number = tvm.StackEntry; -tvm.stackEntryCell cell:tvm.cell = tvm.StackEntry; -tvm.stackEntrySlice slice:tvm.slice = tvm.StackEntry; -tvm.stackEntryTuple tuple:tvm.Tuple = tvm.StackEntry; -tvm.stackEntryList list:tvm.List = tvm.StackEntry; -tvm.stackEntryUnsupported = tvm.StackEntry; -``` - -| `@type` value | API schema | Value field | -| :-------------------------- | :------------------------- | :------------------------------------------------ | -| `tvm.stackEntryNumber` | `TvmStackEntryNumber` | `number` (decimal string via `tvm.numberDecimal`) | -| `tvm.stackEntryCell` | `TvmStackEntryCell` | `cell` (base64 BoC via `tvm.cell`) | -| `tvm.stackEntrySlice` | `TvmStackEntrySlice` | `slice` (base64 BoC via `tvm.slice`) | -| `tvm.stackEntryTuple` | `TvmStackEntryTuple` | `tuple` (nested stack entries) | -| `tvm.stackEntryList` | `TvmStackEntryList` | `list` (nested stack entries) | -| `tvm.stackEntryUnsupported` | `TvmStackEntryUnsupported` | No value (type not representable) | - -### Value types - -``` -tvm.cell bytes:bytes = tvm.Cell; -tvm.slice bytes:bytes = tvm.Slice; -tvm.numberDecimal number:string = tvm.Number; -tvm.tuple elements:vector = tvm.Tuple; -tvm.list elements:vector = tvm.List; -``` - -| `@type` value | API schema | TL fields | -| :------------------ | :----------------- | :------------------------- | -| `tvm.cell` | `TvmCell` | `bytes` (base64 BoC) | -| `tvm.slice` | `TvmSlice` | `bytes` (base64 BoC) | -| `tvm.numberDecimal` | `TvmNumberDecimal` | `number` (decimal string) | -| `tvm.tuple` | `TvmTuple` | `elements` (stack entries) | -| `tvm.list` | `TvmList` | `elements` (stack entries) | - -### Get method result - -``` -smc.runResult gas_used:int53 stack:vector exit_code:int32 = smc.RunResult; -``` - -| `@type` value | API schema | TL fields | -| :-------------- | :---------------------- | :------------------------------- | -| `smc.runResult` | `RunGetMethodResult` | `gas_used`, `stack`, `exit_code` | -| `smc.runResult` | `RunGetMethodStdResult` | Same fields, typed stack entries | - -## Fees - -``` -fees in_fwd_fee:int53 storage_fee:int53 gas_fee:int53 fwd_fee:int53 = Fees; -query.fees source_fees:fees destination_fees:vector = query.Fees; -``` - -| `@type` value | API schema | TL fields | -| :------------ | :---------- | :------------------------------------------------ | -| `fees` | `Fees` | `in_fwd_fee`, `storage_fee`, `gas_fee`, `fwd_fee` | -| `query.fees` | `QueryFees` | `source_fees`, `destination_fees` | - -## Configuration - -``` -configInfo config:tvm.cell = ConfigInfo; -``` - -| `@type` value | API schema | TL fields | -| :------------ | :----------- | :---------------------------------- | -| `configInfo` | `ConfigInfo` | `config` (TVM cell with parameters) | - -## Libraries - -``` -smc.libraryEntry hash:int256 data:bytes = smc.LibraryEntry; -smc.libraryResult result:(vector smc.libraryEntry) = smc.LibraryResult; -``` - -| `@type` value | API schema | TL fields | -| :------------------ | :-------------- | :----------------- | -| `smc.libraryEntry` | `LibraryEntry` | `hash`, `data` | -| `smc.libraryResult` | `LibraryResult` | `result` (entries) | - -## Token types (TON Center extensions) - -These types are not in the base TonLib TL schema. They are added by TON Center to provide parsed Jetton and NFT data via the `getTokenData` endpoint. - -| `@type` value | API schema | Description | -| :----------------------------- | :------------------ | :---------------------------------------------- | -| `ext.tokens.jettonMasterData` | `JettonMasterData` | Jetton master: total supply, admin, metadata | -| `ext.tokens.jettonWalletData` | `JettonWalletData` | Jetton wallet: balance, owner, master reference | -| `ext.tokens.nftCollectionData` | `NftCollectionData` | NFT collection: item count, owner, metadata | -| `ext.tokens.nftItemData` | `NftItemData` | NFT item: index, owner, collection reference | - -## DNS record types - -DNS entries use `@type` to indicate the record type stored at a domain: - -``` -dns.entryDataNextResolver resolver:AccountAddress = dns.EntryData; -dns.entryDataSmcAddress smc_address:AccountAddress = dns.EntryData; -dns.entryDataAdnlAddress adnl_address:AdnlAddress = dns.EntryData; -dns.entryDataStorageAddress bag_id:int256 = dns.EntryData; -``` - -| `@type` value | API schema | TL fields | -| :-------------------- | :------------------------ | :---------------------- | -| `dns_next_resolver` | `DnsRecordNextResolver` | `resolver` (address) | -| `dns_smc_address` | `DnsRecordSmcAddress` | `smc_address` (address) | -| `dns_adnl_address` | `DnsRecordAdnlAddress` | `adnl_address` | -| `dns_storage_address` | `DnsRecordStorageAddress` | `bag_id` (int256) | - -## Payment channel types - -``` -pchan.config alice_public_key:string alice_address:accountAddress bob_public_key:string - bob_address:accountAddress init_timeout:int32 close_timeout:int32 channel_id:int64 = pchan.Config; -pchan.stateInit signed_A:Bool signed_B:Bool min_A:int64 min_B:int64 - expire_at:int53 A:int64 B:int64 = pchan.State; -pchan.stateClose signed_A:Bool signed_B:Bool min_A:int64 min_B:int64 - expire_at:int53 A:int64 B:int64 = pchan.State; -pchan.statePayout A:int64 B:int64 = pchan.State; -``` - -| `@type` value | API schema | Description | -| :------------------ | :----------------- | :----------------------------- | -| `pchan.config` | `PChanConfig` | Channel parties, timeouts, ID | -| `pchan.stateInit` | `PChanStateInit` | Initialization phase (signing) | -| `pchan.stateClose` | `PChanStateClose` | Closing phase (signing) | -| `pchan.statePayout` | `PChanStatePayout` | Payout phase (final balances) | - -## Restricted wallet types - -``` -rwallet.limit seconds:int32 value:int64 = rwallet.Limit; -rwallet.config start_at:int53 limits:vector = rwallet.Config; -``` - -| `@type` value | API schema | TL fields | -| :--------------- | :-------------- | :------------------- | -| `rwallet.config` | `RWalletConfig` | `start_at`, `limits` | -| `rwallet.limit` | `RWalletLimit` | `seconds`, `value` | - -## Utility types - -TON Center extensions. - -| `@type` value | API schema | Description | -| :--------------------------------- | :--------------------------- | :------------------------------ | -| `ext.utils.detectedAddress` | `DetectAddress` | Address in all encoding formats | -| `ext.utils.detectedAddressVariant` | `DetectAddressBase64Variant` | Base64 and URL-safe base64 pair | -| `ext.utils.detectedHash` | `DetectHash` | Hash in hex, base64, URL-safe | -| `extraCurrency` | `ExtraCurrencyBalance` | Non-TON currency ID and balance | -| `ok` | `ResultOk` | Success with no return data | - -## Reference - -For background on the TL-B format used across the TON ecosystem, see the [TL-B overview](/languages/tl-b). - -Types prefixed with `ext.` are TON Center extensions not present in the upstream TL schema. From 3db86db8ec1b8c27a80f554c00f339051e891bf4 Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Thu, 5 Mar 2026 04:39:05 +0200 Subject: [PATCH 17/21] address comments --- ecosystem/api/toncenter/v2.json | 537 +++++++++++++++----------------- 1 file changed, 259 insertions(+), 278 deletions(-) diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index 9d56ba8e0..50be70bdc 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -29,12 +29,12 @@ "$ref": "#/components/parameters/address" }, { - "$ref": "#/components/parameters/seqnoOptional" + "$ref": "#/components/parameters/`seqno`Optional" } ], "responses": { "200": { - "description": "Returns the account balance, contract state, code, data, and last transaction reference.", + "description": "The complete current state of the requested account.", "content": { "application/json": { "schema": { @@ -75,14 +75,14 @@ "Accounts" ], "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.", + "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": [ { "$ref": "#/components/parameters/address" }, { - "$ref": "#/components/parameters/seqnoOptional" + "$ref": "#/components/parameters/`seqno`Optional" } ], "responses": { @@ -128,19 +128,19 @@ "Accounts" ], "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.", + "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": [ { "$ref": "#/components/parameters/address" }, { - "$ref": "#/components/parameters/seqnoOptional" + "$ref": "#/components/parameters/`seqno`Optional" } ], "responses": { "200": { - "description": "Returns wallet-specific details: type, seqno, subwallet ID, and balance.", + "description": "Returns wallet-specific details: type, `seqno`, subwallet ID, and balance.", "content": { "application/json": { "schema": { @@ -188,7 +188,7 @@ "$ref": "#/components/parameters/address" }, { - "$ref": "#/components/parameters/seqnoOptional" + "$ref": "#/components/parameters/`seqno`Optional" } ], "responses": { @@ -234,19 +234,19 @@ "Accounts" ], "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.", + "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). See [address states](/foundations/status) for details. Check this before interacting with a contract.", "operationId": "getAddressState_get", "parameters": [ { "$ref": "#/components/parameters/address" }, { - "$ref": "#/components/parameters/seqnoOptional" + "$ref": "#/components/parameters/`seqno`Optional" } ], "responses": { "200": { - "description": "Returns the account lifecycle state: `uninit`, `active`, or `frozen`.", + "description": "Returns the account lifecycle state: `uninit`, `active`, or `frozen`. See [address states](/foundations/status) for details.", "content": { "application/json": { "schema": { @@ -353,7 +353,7 @@ "$ref": "#/components/parameters/shard" }, { - "$ref": "#/components/parameters/seqno" + "$ref": "#/components/parameters/`seqno`" }, { "$ref": "#/components/parameters/rootHashOptional" @@ -424,7 +424,7 @@ "$ref": "#/components/parameters/shard" }, { - "$ref": "#/components/parameters/seqno" + "$ref": "#/components/parameters/`seqno`" }, { "$ref": "#/components/parameters/rootHashOptional" @@ -499,7 +499,7 @@ }, { "$ref": "#/components/parameters/hashOptional", - "description": "Transaction hash to start from" + "description": "SHA-256 transaction hash to start pagination from" }, { "$ref": "#/components/parameters/toLtOptional" @@ -565,7 +565,7 @@ }, { "$ref": "#/components/parameters/hashOptional", - "description": "Transaction hash to start from" + "description": "SHA-256 transaction hash to start pagination from" }, { "$ref": "#/components/parameters/toLtOptional" @@ -794,12 +794,12 @@ "Blocks" ], "summary": "Get masterchain info", - "description": "Returns the current state of the TON masterchain. The `last` field contains the latest block used for querying current state. The seqno in `last` is the current block height. Use this endpoint to obtain the latest block reference for other queries.", + "description": "Returns the current state of the TON masterchain. The `last` field contains the latest block used for querying current state. The `seqno` in `last` is the current block height. Use this endpoint to obtain the latest block reference for other queries.", "operationId": "getMasterchainInfo_get", "parameters": [], "responses": { "200": { - "description": "Returns the latest masterchain block, state root hash, and genesis block reference.", + "description": "The current masterchain state, including the latest block identifier, its state root hash, and the genesis block reference. Use `result.last.seqno` as the current block height.", "content": { "application/json": { "schema": { @@ -841,7 +841,7 @@ "operationId": "getMasterchainBlockSignatures_get", "parameters": [ { - "$ref": "#/components/parameters/seqno" + "$ref": "#/components/parameters/`seqno`" } ], "responses": { @@ -897,10 +897,10 @@ "$ref": "#/components/parameters/shard" }, { - "$ref": "#/components/parameters/seqno" + "$ref": "#/components/parameters/`seqno`" }, { - "name": "from_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, @@ -958,7 +958,7 @@ "parameters": [], "responses": { "200": { - "description": "Returns the latest consensus block sequence number and timestamp.", + "description": "The latest masterchain block that has achieved finality \u2014 guaranteed to never be reverted. Returns its sequence number and Unix timestamp.", "content": { "application/json": { "schema": { @@ -996,7 +996,7 @@ "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.", + "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": [ { @@ -1006,7 +1006,7 @@ "$ref": "#/components/parameters/shard" }, { - "$ref": "#/components/parameters/seqnoOptional" + "$ref": "#/components/parameters/`seqno`Optional" }, { "name": "lt", @@ -1031,7 +1031,7 @@ ], "responses": { "200": { - "description": "Returns the full block identifier matching the given seqno, logical time, or unix timestamp.", + "description": "Returns the full block identifier matching the given `seqno`, logical time, or unix timestamp.", "content": { "application/json": { "schema": { @@ -1076,7 +1076,7 @@ "operationId": "getShards_get", "parameters": [ { - "$ref": "#/components/parameters/seqno", + "$ref": "#/components/parameters/`seqno`", "description": "Seqno of masterchain block" } ], @@ -1133,7 +1133,7 @@ "$ref": "#/components/parameters/shard" }, { - "$ref": "#/components/parameters/seqno" + "$ref": "#/components/parameters/`seqno`" }, { "$ref": "#/components/parameters/rootHashOptional" @@ -1189,7 +1189,7 @@ "operationId": "getOutMsgQueueSize_get", "responses": { "200": { - "description": "Returns the outgoing message queue sizes for all active shards.", + "description": "Outgoing message queue sizes for all active shards. A growing queue indicates network congestion and may cause transaction delays.", "content": { "application/json": { "schema": { @@ -1725,9 +1725,9 @@ } }, { - "name": "seqno", + "name": "`seqno`", "in": "query", - "description": "Block seqno", + "description": "Block `seqno`", "required": false, "schema": { "type": "integer", @@ -1778,13 +1778,13 @@ "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.", + "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", + "name": "`seqno`", "in": "query", - "description": "Block seqno", + "description": "Block `seqno`", "required": false, "schema": { "type": "integer", @@ -2008,7 +2008,7 @@ "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.", + "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", @@ -2018,25 +2018,25 @@ "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.", + "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", + "`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.", + "description": "Masterchain block sequence number (block height). Used to query state at a specific point in time. If omitted, returns the current state.", "required": true, "schema": { "type": "integer", "format": "int32" } }, - "seqnoOptional": { - "name": "seqno", + "`seqno`Optional": { + "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, @@ -2048,7 +2048,7 @@ "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.", + "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", @@ -2058,7 +2058,7 @@ "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.", + "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", @@ -2078,7 +2078,7 @@ "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.", + "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", @@ -2131,7 +2131,7 @@ "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.", + "description": "Request data from archival nodes. Regular nodes keep at least the last 2 days of history. Set to true when querying old transactions or historical state. Archival requests may be slower.", "required": false, "schema": { "type": "boolean", @@ -2351,7 +2351,7 @@ } }, "422_address": { - "description": "Invalid address or seqno parameter.", + "description": "Invalid address or `seqno` parameter.", "content": { "application/json": { "schema": { @@ -2378,8 +2378,8 @@ "enum": [ "empty address", "failed to parse address", - "failed to parse seqno", - "seqno should be positive" + "failed to parse `seqno`", + "`seqno` should be positive" ] }, "@extra": { @@ -2519,13 +2519,13 @@ "enum": [ "workchain required", "shard required", - "seqno required", + "`seqno` required", "failed to parse workchain", "failed to parse shard", "failed to parse root_hash", - "failed to parse seqno", - "seqno should be positive", - "from_seqno should be non-negative" + "failed to parse `seqno`", + "`seqno` should be positive", + "from_`seqno` should be non-negative" ] }, "@extra": { @@ -2570,7 +2570,7 @@ "enum": [ "failed to parse workchain", "failed to parse shard", - "exactly one of seqno, lt, unixtime should be specified", + "exactly one of `seqno`, lt, unixtime should be specified", "lt should be non-negative", "unixtime should be non-negative" ] @@ -2617,7 +2617,7 @@ "enum": [ "failed to parse workchain", "failed to parse shard", - "failed to parse seqno", + "failed to parse `seqno`", "after_lt and after_hash should be used together", "after_lt should be non-negative", "count should be positive", @@ -3141,7 +3141,7 @@ "type": "apiKey", "in": "header", "name": "X-API-Key", - "description": "API key header of the form `X-API-Key: `, where `` is your API key. Requests without a key are limited to 1 req/s. More info [here](/ecosystem/api/toncenter/v2-authentication)." + "description": "API key header of the form `X-API-Key: `, where `` is your API key. Requests without a key are limited to 1 RPS. More info [here](/ecosystem/api/toncenter/v2-authentication)." }, "APIKeyQuery": { "type": "apiKey", @@ -3181,7 +3181,7 @@ "address": { "$ref": "#/components/schemas/TonAddr" }, - "seqno": { + "`seqno`": { "oneOf": [ { "type": "string" @@ -3192,7 +3192,7 @@ } ], "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." + "description": "Masterchain block sequence number. Query the account state as it was at this block height. If omitted, returns the current state." } } }, @@ -3200,10 +3200,10 @@ "type": "object", "additionalProperties": false, "required": [ - "seqno" + "`seqno`" ], "properties": { - "seqno": { + "`seqno`": { "oneOf": [ { "type": "string" @@ -3214,7 +3214,7 @@ } ], "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." + "description": "Masterchain block sequence number (block height). Used to query blockchain config at a specific block. If omitted, the latest masterchain block is used." } } }, @@ -3270,7 +3270,7 @@ "required": [ "workchain", "shard", - "seqno" + "`seqno`" ], "properties": { "workchain": { @@ -3284,7 +3284,7 @@ } ], "x-usrv-cpp-type": "std::int32_t", - "description": "Workchain ID: -1 for masterchain, 0 for basechain. Most user transactions are on workchain 0." + "description": "Workchain ID: `-1` for masterchain, `0` for basechain. Most user transactions are on workchain `0`." }, "shard": { "oneOf": [ @@ -3300,7 +3300,7 @@ "x-usrv-cpp-type": "std::int64_t", "description": "Shard identifier. A signed 64-bit integer. Masterchain uses -9223372036854775808." }, - "seqno": { + "`seqno`": { "oneOf": [ { "type": "string" @@ -3311,9 +3311,9 @@ } ], "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." + "description": "Shardchain block sequence number. Identifies a specific block within the given workchain and shard. Use together with `workchain` and `shard` to uniquely identify a block." }, - "from_seqno": { + "from_`seqno`": { "oneOf": [ { "type": "string" @@ -3350,7 +3350,7 @@ } ], "x-usrv-cpp-type": "std::int32_t", - "description": "Workchain ID: -1 for masterchain, 0 for basechain. Most user transactions are on workchain 0." + "description": "Workchain ID: `-1` for masterchain, `0` for basechain. Most user transactions are on workchain `0`." }, "shard": { "oneOf": [ @@ -3366,7 +3366,7 @@ "x-usrv-cpp-type": "std::int64_t", "description": "Shard identifier. A signed 64-bit integer. Masterchain uses -9223372036854775808." }, - "seqno": { + "`seqno`": { "oneOf": [ { "type": "string" @@ -3377,7 +3377,7 @@ } ], "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." + "description": "Block sequence number within the specified workchain and shard. Use together with `workchain` and `shard` to uniquely identify a block. If omitted, the latest block is used." }, "lt": { "oneOf": [ @@ -3407,7 +3407,7 @@ "description": "Unix timestamp to look up." } }, - "description": "Request to find a block by workchain, shard, and either seqno, lt, or unixtime." + "description": "Request to find a block by workchain, shard, and either `seqno`, lt, or unixtime." }, "ShardsRequest": { "$ref": "#/components/schemas/SeqnoRequest" @@ -3418,7 +3418,7 @@ "required": [ "workchain", "shard", - "seqno" + "`seqno`" ], "properties": { "workchain": { @@ -3432,7 +3432,7 @@ } ], "x-usrv-cpp-type": "std::int32_t", - "description": "Workchain ID: -1 for masterchain, 0 for basechain. Most user transactions are on workchain 0." + "description": "Workchain ID: `-1` for masterchain, `0` for basechain. Most user transactions are on workchain `0`." }, "shard": { "oneOf": [ @@ -3448,7 +3448,7 @@ "x-usrv-cpp-type": "std::int64_t", "description": "Shard identifier. A signed 64-bit integer. Masterchain uses -9223372036854775808." }, - "seqno": { + "`seqno`": { "oneOf": [ { "type": "string" @@ -3459,7 +3459,7 @@ } ], "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." + "description": "Block sequence number within the specified workchain and shard. Use together with `workchain` and `shard` to uniquely identify a block. If omitted, the latest block is used." }, "root_hash": { "$ref": "#/components/schemas/TonHash", @@ -3467,7 +3467,7 @@ }, "file_hash": { "$ref": "#/components/schemas/TonHash", - "description": "Hash of the serialized block data. Together with root_hash, uniquely identifies a block." + "description": "Hash of the serialized block data. Together with `root_hash`, uniquely identifies a block." } } }, @@ -3480,7 +3480,7 @@ "required": [ "workchain", "shard", - "seqno" + "`seqno`" ], "properties": { "workchain": { @@ -3494,7 +3494,7 @@ } ], "x-usrv-cpp-type": "std::int32_t", - "description": "Workchain ID: -1 for masterchain, 0 for basechain. Most user transactions are on workchain 0." + "description": "Workchain ID: `-1` for masterchain, `0` for basechain. Most user transactions are on workchain `0`." }, "shard": { "oneOf": [ @@ -3510,7 +3510,7 @@ "x-usrv-cpp-type": "std::int64_t", "description": "Shard identifier. A signed 64-bit integer. Masterchain uses -9223372036854775808." }, - "seqno": { + "`seqno`": { "oneOf": [ { "type": "string" @@ -3521,7 +3521,7 @@ } ], "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." + "description": "Block sequence number within the specified workchain and shard. Use together with `workchain` and `shard` to uniquely identify a block. If omitted, the latest block is used." }, "root_hash": { "$ref": "#/components/schemas/TonHash", @@ -3529,7 +3529,7 @@ }, "file_hash": { "$ref": "#/components/schemas/TonHash", - "description": "Hash of the serialized block data. Together with root_hash, uniquely identifies a block." + "description": "Hash of the serialized block data. Together with `root_hash`, uniquely identifies a block." }, "after_lt": { "oneOf": [ @@ -3547,7 +3547,7 @@ }, "after_hash": { "$ref": "#/components/schemas/TonAddrWithoutWorkchain", - "description": "Return items after this hash (for pagination within same lt)." + "description": "Return items after this hash (for pagination within same `lt`)." }, "count": { "oneOf": [ @@ -3704,7 +3704,7 @@ "x-usrv-cpp-type": "std::int32_t", "description": "Configuration parameter number. Each number controls different blockchain settings." }, - "seqno": { + "`seqno`": { "oneOf": [ { "type": "string" @@ -3715,7 +3715,7 @@ } ], "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." + "description": "Masterchain block sequence number (block height). Used to query blockchain config at a specific block. If omitted, the latest masterchain block is used." } } }, @@ -3723,7 +3723,7 @@ "type": "object", "additionalProperties": false, "properties": { - "seqno": { + "`seqno`": { "oneOf": [ { "type": "string" @@ -3734,7 +3734,7 @@ } ], "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." + "description": "Masterchain block sequence number (block height). Used to query blockchain config at a specific block. If omitted, the latest masterchain block is used." } } }, @@ -3809,7 +3809,7 @@ "jsonrpc": { "type": "string", "default": "2.0", - "description": "JSON-RPC protocol version. Must be `\"2.0\"`." + "description": "JSON-RPC protocol version identifier." }, "id": { "type": "string", @@ -3872,7 +3872,7 @@ "account_address": { "type": "string", "x-usrv-cpp-type": "ton_http::types::ton_addr", - "description": "Account address string." + "description": "The account address in raw format (`workchain:hex`), e.g. `0:abc123...`. Use the [pack address](/ecosystem/api/toncenter/v2/utils/pack-address) endpoint to convert to user-friendly base64 format." } } }, @@ -3897,9 +3897,9 @@ "x-usrv-cpp-type": "std::int64_t", "description": "Shard identifier as a signed 64-bit integer string. Masterchain uses `-9223372036854775808`." }, - "seqno": { + "`seqno`": { "type": "integer", - "description": "Block sequence number (height) within this shard." + "description": "Block sequence number within its workchain and shard. For the masterchain (workchain `-1`), this equals the global block height. For basechain shards (workchain `0`), this is the sequence number local to that specific shard, not a global height." }, "root_hash": { "$ref": "#/components/schemas/TonHash", @@ -3907,18 +3907,18 @@ }, "file_hash": { "$ref": "#/components/schemas/TonHash", - "description": "Hash of the serialized block file. Together with root_hash, uniquely identifies a block." + "description": "Hash of the serialized block file. Together with `root_hash`, uniquely identifies a block." } }, "required": [ "@type", "workchain", "shard", - "seqno", + "`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)." + "description": "A complete block identifier with cryptographic hashes. Contains `workchain`, `shard`, `seqno` (position) plus `root_hash` and `file_hash` (verification)." }, "DetectAddressBase64Variant": { "type": "object", @@ -3963,7 +3963,7 @@ "id": { "type": "integer", "format": "int32", - "description": "Extra currency identifier number." + "description": "A 32-bit integer identifying the extra currency. Currency IDs are defined at the blockchain configuration level and stored in `ConfigParam 7` of the masterchain. See [extra currency minting](https://docs.ton.org/v3/documentation/infra/minter-flow) for details." }, "amount": { "$ref": "#/components/schemas/Int256", @@ -3991,12 +3991,12 @@ }, "lt": { "type": "string", - "description": "Logical time of this transaction.", + "description": "Logical time of this transaction. A globally unique counter that orders all events on the blockchain.", "x-usrv-cpp-type": "std::int64_t" }, "hash": { "$ref": "#/components/schemas/TonHash", - "description": "Transaction hash." + "description": "SHA-256 hash of this transaction, encoded in base64." } }, "required": [ @@ -4035,7 +4035,9 @@ "code", "data", "frozen_hash" - ] + ], + "title": "Raw account state", + "description": "Unrecognized or non-wallet contract state. Identified by `@type: raw.accountState`. Returned when TonLib cannot parse the contract as a known type." }, "AccountStateWalletV3": { "type": "object", @@ -4052,19 +4054,21 @@ "wallet_id": { "type": "integer", "format": "int64", - "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. Default is 698983191 for mainnet." + "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. The default value is `0x29a9a317` (698983191) on both mainnet and testnet, derived from the first 4 bytes of the TON mainnet initial state hash. Note: v5 wallets use a different scheme with network-specific values to prevent cross-network transaction replay. See [wallet interaction guide](/standard/wallets/interact) for full details." }, - "seqno": { + "`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": "Wallet contract sequence number. Used for replay protection: each outgoing transaction must include the current `seqno` and increments it by 1. Fetch the current value before sending a transaction." } }, "required": [ "@type", "wallet_id", - "seqno" - ] + "`seqno`" + ], + "title": "Wallet v3", + "description": "Standard wallet contract version 3. Identified by `@type: wallet.v3.accountState`. The most widely deployed wallet type prior to v4." }, "AccountStateWalletV4": { "type": "object", @@ -4081,19 +4085,21 @@ "wallet_id": { "type": "integer", "format": "int64", - "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. Default is 698983191 for mainnet." + "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. The default value is `0x29a9a317` (698983191) on both mainnet and testnet, derived from the first 4 bytes of the TON mainnet initial state hash. Note: v5 wallets use a different scheme with network-specific values to prevent cross-network transaction replay. See [wallet interaction guide](/standard/wallets/interact) for full details." }, - "seqno": { + "`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": "Wallet contract sequence number. Used for replay protection: each outgoing transaction must include the current `seqno` and increments it by 1. Fetch the current value before sending a transaction." } }, "required": [ "@type", "wallet_id", - "seqno" - ] + "`seqno`" + ], + "title": "Wallet v4", + "description": "Standard wallet contract version 4. Identified by `@type: wallet.v4.accountState`. Adds plugin support over v3." }, "AccountStateWalletHighloadV1": { "type": "object", @@ -4110,19 +4116,21 @@ "wallet_id": { "type": "integer", "format": "int64", - "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. Default is 698983191 for mainnet." + "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. The default value is `0x29a9a317` (698983191) on both mainnet and testnet, derived from the first 4 bytes of the TON mainnet initial state hash. Note: v5 wallets use a different scheme with network-specific values to prevent cross-network transaction replay. See [wallet interaction guide](/standard/wallets/interact) for full details." }, - "seqno": { + "`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": "Wallet contract sequence number. Used for replay protection: each outgoing transaction must include the current `seqno` and increments it by 1. Fetch the current value before sending a transaction." } }, "required": [ "@type", "wallet_id", - "seqno" - ] + "`seqno`" + ], + "title": "Highload wallet v1", + "description": "High-throughput wallet contract version 1. Identified by `@type: wallet.highload.v1.accountState`. Designed for sending many transactions in a single block." }, "AccountStateWalletHighloadV2": { "type": "object", @@ -4139,13 +4147,15 @@ "wallet_id": { "type": "integer", "format": "int64", - "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. Default is 698983191 for mainnet." + "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. The default value is `0x29a9a317` (698983191) on both mainnet and testnet, derived from the first 4 bytes of the TON mainnet initial state hash. Note: v5 wallets use a different scheme with network-specific values to prevent cross-network transaction replay. See [wallet interaction guide](/standard/wallets/interact) for full details." } }, "required": [ "@type", "wallet_id" - ] + ], + "title": "Highload wallet v2", + "description": "High-throughput wallet contract version 2. Identified by `@type: wallet.highload.v2.accountState`. Improved version of highload v1 with better replay protection." }, "AccountStateDns": { "type": "object", @@ -4162,13 +4172,15 @@ "wallet_id": { "type": "integer", "format": "int64", - "description": "Subwallet ID used by this DNS resolver contract." + "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. The default value is `0x29a9a317` (698983191) on both mainnet and testnet, derived from the first 4 bytes of the TON mainnet initial state hash. Note: v5 wallets use a different scheme with network-specific values to prevent cross-network transaction replay. See [wallet interaction guide](/standard/wallets/interact) for full details." } }, "required": [ "@type", "wallet_id" - ] + ], + "title": "DNS contract", + "description": "TON DNS contract state. Identified by `@type: dns.accountState`. Used by contracts that resolve TON domain names." }, "RWalletLimit": { "type": "object", @@ -4245,12 +4257,12 @@ "wallet_id": { "type": "integer", "format": "int64", - "description": "Subwallet ID for this restricted wallet." + "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. The default value is `0x29a9a317` (698983191) on both mainnet and testnet, derived from the first 4 bytes of the TON mainnet initial state hash. Note: v5 wallets use a different scheme with network-specific values to prevent cross-network transaction replay. See [wallet interaction guide](/standard/wallets/interact) for full details." }, - "seqno": { + "`seqno`": { "type": "integer", "format": "int32", - "description": "Current sequence number for replay protection." + "description": "Wallet contract sequence number. Used for replay protection: each outgoing transaction must include the current `seqno` and increments it by 1. Fetch the current value before sending a transaction." }, "unlocked_balance": { "type": "integer", @@ -4265,10 +4277,12 @@ "required": [ "@type", "wallet_id", - "seqno", + "`seqno`", "unlocked_balance", "config" - ] + ], + "title": "Restricted wallet", + "description": "Restricted wallet contract state. Identified by `@type: rwallet.accountState`. Used for wallets with vesting or transfer restrictions." }, "PChanConfig": { "type": "object", @@ -4519,7 +4533,9 @@ "config", "state", "description" - ] + ], + "title": "Payment channel", + "description": "Payment channel contract state. Identified by `@type: pchan.accountState`. Used for off-chain payment channels between two parties." }, "AccountStateUninited": { "type": "object", @@ -4541,7 +4557,9 @@ "required": [ "@type", "frozen_hash" - ] + ], + "title": "Uninitialized", + "description": "Account exists on-chain but has no deployed contract. Identified by `@type: uninited.accountState`. The address has received TON but no code has been deployed yet." }, "AccountState": { "oneOf": [ @@ -4787,7 +4805,7 @@ "onchain", "offchain" ], - "description": "How the content is stored: `onchain` (in contract data) or `offchain` (external URI)." + "description": "Storage method for token (jetton) metadata content: `onchain` (stored in contract data) or `offchain` (external URI)." }, "data": { "oneOf": [ @@ -4821,7 +4839,7 @@ "ext.tokens.jettonMasterData" ], "default": "ext.tokens.jettonMasterData", - "description": "TonLib type identifier for Jetton master contract data. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." + "description": "TonLib type identifier for Jetton master contract data. See [token types](/ecosystem/api/toncenter/v2-tonlib-types#token-types-ton-center-extensions)." }, "address": { "$ref": "#/components/schemas/TonAddr", @@ -4877,7 +4895,7 @@ "ext.tokens.jettonWalletData" ], "default": "ext.tokens.jettonWalletData", - "description": "TonLib type identifier for Jetton wallet contract data. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." + "description": "TonLib type identifier for Jetton wallet contract data. See [token types](/ecosystem/api/toncenter/v2-tonlib-types#token-types-ton-center-extensions)." }, "address": { "$ref": "#/components/schemas/TonAddr", @@ -4893,7 +4911,7 @@ }, "balance": { "$ref": "#/components/schemas/Int256", - "description": "Token balance in the smallest unit. Divide by the master contract's decimals for human-readable amount." + "description": "The token balance in the Jetton's base units (smallest denomination). To get the human-readable amount, divide by 10^decimals, where `decimals` is a metadata field on the Jetton master contract (commonly 9, but varies per token). See [Jetton overview](/standard/tokens/jettons/overview) for how Jetton decimals are defined." }, "owner": { "$ref": "#/components/schemas/TonAddr", @@ -4931,7 +4949,7 @@ "ext.tokens.nftCollectionData" ], "default": "ext.tokens.nftCollectionData", - "description": "TonLib type identifier for NFT collection contract data. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." + "description": "TonLib type identifier for NFT collection contract data. See [token types](/ecosystem/api/toncenter/v2-tonlib-types#token-types-ton-center-extensions)." }, "address": { "$ref": "#/components/schemas/TonAddr", @@ -4978,7 +4996,7 @@ "ext.tokens.nftItemData" ], "default": "ext.tokens.nftItemData", - "description": "TonLib type identifier for NFT item contract data. See [all types](/ecosystem/api/toncenter/v2-tonlib-types)." + "description": "TonLib type identifier for NFT item contract data. See [token types](/ecosystem/api/toncenter/v2-tonlib-types#token-types-ton-center-extensions)." }, "address": { "$ref": "#/components/schemas/TonAddr", @@ -5055,7 +5073,7 @@ "active", "frozen" ], - "description": "The lifecycle state of an account: `uninitialized` (no contract deployed), `active` (contract working normally), or `frozen` (suspended due to zero balance)." + "description": "The lifecycle state of an account: `uninitialized` (no contract deployed), `active` (contract working normally), or `frozen` (suspended due to zero balance). See [address states](/foundations/status) for details." }, "BlockSignature": { "type": "object", @@ -5235,12 +5253,12 @@ }, "lt": { "type": "string", - "description": "Logical time of this transaction.", + "description": "Logical time of this transaction. A globally unique counter that orders all events on the blockchain.", "x-usrv-cpp-type": "std::int64_t" }, "hash": { "$ref": "#/components/schemas/TonHash", - "description": "Transaction hash." + "description": "SHA-256 hash of this transaction, encoded in base64." } }, "required": [ @@ -5366,7 +5384,7 @@ }, "hash": { "$ref": "#/components/schemas/TonHash", - "description": "Message hash, uniquely identifying this message." + "description": "SHA-256 hash of this message, encoded in base64." }, "source": { "$ref": "#/components/schemas/AccountAddress", @@ -5385,7 +5403,7 @@ "items": { "$ref": "#/components/schemas/ExtraCurrencyBalance" }, - "description": "Array of non-TON currencies transferred in this message. Each entry contains a currency ID (integer) and amount (decimal string). Empty array if only TON was transferred." + "description": "Array of extra currencies (native blockchain-level tokens, distinct from Jettons) transferred in this message. Each entry contains a currency ID (integer) and amount (decimal string). Empty array if no extra currencies were transferred." }, "fwd_fee": { "$ref": "#/components/schemas/Int256", @@ -5393,7 +5411,7 @@ }, "ihr_fee": { "$ref": "#/components/schemas/Int256", - "description": "Instant Hypercube Routing fee in nanotons. Usually 0." + "description": "Instant Hypercube Routing (IHR) fee in nanotons. Always `0` \u2014 this is hardcoded at the protocol level and cannot be changed." }, "created_lt": { "type": "string", @@ -5449,7 +5467,7 @@ }, "transaction_id": { "$ref": "#/components/schemas/InternalTransactionId", - "description": "Transaction identifier (logical time + hash)." + "description": "The transaction identifier, represented by logical time and transaction hash." }, "fee": { "$ref": "#/components/schemas/Int256", @@ -5457,11 +5475,11 @@ }, "storage_fee": { "$ref": "#/components/schemas/Int256", - "description": "Storage fee component, in nanotons." + "description": "Storage fees in nanotons deducted from the account balance during the storage phase of this transaction. Covers the cost of storing the contract state on-chain since the last transaction." }, "other_fee": { "$ref": "#/components/schemas/Int256", - "description": "Computation and action fee component, in nanotons." + "description": "Fees in nanotons deducted from the account balance during the computation and action phases of this transaction. Covers the cost of TVM execution and processing outgoing messages." }, "in_msg": { "$ref": "#/components/schemas/MessageStd", @@ -5526,7 +5544,7 @@ }, "hash": { "$ref": "#/components/schemas/TonHash", - "description": "Message hash, uniquely identifying this message." + "description": "SHA-256 hash of this message, encoded in base64." }, "source": { "$ref": "#/components/schemas/TonAddr", @@ -5545,7 +5563,7 @@ "items": { "$ref": "#/components/schemas/ExtraCurrencyBalance" }, - "description": "Array of non-TON currencies transferred in this message. Each entry contains a currency ID (integer) and amount (decimal string). Empty array if only TON was transferred." + "description": "Array of extra currencies (native blockchain-level tokens, distinct from Jettons) transferred in this message. Each entry contains a currency ID (integer) and amount (decimal string). Empty array if no extra currencies were transferred." }, "fwd_fee": { "$ref": "#/components/schemas/Int256", @@ -5553,7 +5571,7 @@ }, "ihr_fee": { "$ref": "#/components/schemas/Int256", - "description": "Instant Hypercube Routing fee in nanotons. Usually 0." + "description": "Instant Hypercube Routing (IHR) fee in nanotons. Always `0` \u2014 this is hardcoded at the protocol level and cannot be changed." }, "created_lt": { "type": "string", @@ -5570,7 +5588,7 @@ }, "message": { "type": "string", - "description": "Decoded text comment, if the message body is a simple UTF-8 text." + "description": "Decoded UTF-8 text comment from the message body. Present only when the message body is a plain text comment (opcode `0x00000000`). Empty string otherwise." }, "message_decode_error": { "type": "string", @@ -5622,7 +5640,7 @@ }, "transaction_id": { "$ref": "#/components/schemas/InternalTransactionId", - "description": "Transaction identifier (logical time + hash)." + "description": "The transaction identifier, represented by logical time and transaction hash." }, "fee": { "$ref": "#/components/schemas/Int256", @@ -5630,11 +5648,11 @@ }, "storage_fee": { "$ref": "#/components/schemas/Int256", - "description": "Storage fee component, in nanotons." + "description": "Storage fees in nanotons deducted from the account balance during the storage phase of this transaction. Covers the cost of storing the contract state on-chain since the last transaction." }, "other_fee": { "$ref": "#/components/schemas/Int256", - "description": "Computation and action fee component, in nanotons." + "description": "Fees in nanotons deducted from the account balance during the computation and action phases of this transaction. Covers the cost of TVM execution and processing outgoing messages." }, "in_msg": { "$ref": "#/components/schemas/Message", @@ -5659,8 +5677,7 @@ "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": [ @@ -5811,14 +5828,13 @@ }, "jsonrpc": { "type": "string", - "description": "JSON-RPC protocol version. Always `\"2.0\"` when using the JSON-RPC endpoint." + "description": "JSON-RPC protocol version identifier." }, "id": { "type": "string", "description": "Echoed request identifier from the original JSON-RPC request." } - }, - "description": "JSON-RPC response envelope. Contains the result of the called method, or an error if the request failed. The `result` structure varies by method. Refer to the individual endpoint documentation for details. See [TonLib types](/ecosystem/api/toncenter/v2-tonlib-types) for a full list of `@type` identifiers." + } }, "TonlibErrorResponse": { "type": "object", @@ -5864,7 +5880,7 @@ "jsonrpc": { "type": "string", "default": "2.0", - "description": "JSON-RPC protocol version, always \"2.0\"." + "description": "JSON-RPC protocol version identifier." }, "id": { "type": "string", @@ -5890,7 +5906,7 @@ "jsonrpc": { "type": "string", "default": "2.0", - "description": "JSON-RPC protocol version, always \"2.0\"." + "description": "JSON-RPC protocol version identifier." }, "id": { "type": "string", @@ -6010,7 +6026,7 @@ }, "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." + "description": "The account balance in nanotons (the smallest unit of TON). 1 TON = 1,000,000,000 nanotons (10^9), so divide by 10^9 to get the human-readable TON amount. See [units and decimals](/ecosystem/wallet-apps/deep-links#read-more) for more context. If this field appears on a Jetton wallet, the balance is in the token's base units. Divide by 10^decimals, where `decimals` is defined by the Jetton master contract. See [Jetton overview](/standard/tokens/jettons/overview) for details on how Jetton decimals work." }, "extra_currencies": { "type": "array", @@ -6085,7 +6101,7 @@ }, "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." + "description": "The account balance in nanotons (the smallest unit of TON). 1 TON = 1,000,000,000 nanotons (10^9), so divide by 10^9 to get the human-readable TON amount. See [units and decimals](/ecosystem/wallet-apps/deep-links#read-more) for more context. If this field appears on a Jetton wallet, the balance is in the token's base units. Divide by 10^decimals, where `decimals` is defined by the Jetton master contract. See [Jetton overview](/standard/tokens/jettons/overview) for details on how Jetton decimals work." }, "extra_currencies": { "type": "array", @@ -6126,8 +6142,7 @@ "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", @@ -6175,14 +6190,14 @@ ], "description": "Wallet contract version (e.g., `wallet v4 r2`, `wallet v5 r1`). Empty if not a recognized wallet." }, - "seqno": { + "`seqno`": { "type": "integer", "format": "int64", - "description": "Current wallet sequence number. Increment this for each outgoing transaction to prevent replays." + "description": "Wallet contract sequence number. Used for replay protection: each outgoing transaction must include the current `seqno` and increments it by 1. Fetch the current value before sending a transaction." }, "wallet_id": { "type": "integer", - "description": "Subwallet ID. Allows creating multiple wallets from one key pair. Default is `698983191` on mainnet." + "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. The default value is `0x29a9a317` (698983191) on both mainnet and testnet, derived from the first 4 bytes of the TON mainnet initial state hash. Note: v5 wallets use a different scheme with network-specific values to prevent cross-network transaction replay. See [wallet interaction guide](/standard/wallets/interact) for full details." }, "is_signature_allowed": { "type": "boolean", @@ -6196,7 +6211,7 @@ "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." + "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" @@ -6207,7 +6222,6 @@ "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", @@ -6223,7 +6237,7 @@ }, "state_root_hash": { "$ref": "#/components/schemas/TonHash", - "description": "Merkle root hash of the entire blockchain state at the latest block." + "description": "SHA-256 Merkle root hash of the entire blockchain state at the latest block." }, "init": { "$ref": "#/components/schemas/TonBlockIdExt", @@ -6337,8 +6351,7 @@ "@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" @@ -6360,7 +6373,7 @@ "items": { "$ref": "#/components/schemas/TonBlockIdExt" }, - "description": "Array of active shard block identifiers. Each entry contains workchain (integer), shard ID (string), seqno (integer), root_hash (base64/hex), and file_hash (base64/hex)." + "description": "Array of active shard block identifiers. Each entry contains `workchain` (integer), `shard` ID (string), `seqno` (integer), `root_hash` (base64/hex), and `file_hash` (base64/hex)." } }, "required": [ @@ -6384,7 +6397,7 @@ }, "id": { "$ref": "#/components/schemas/TonBlockIdExt", - "description": "Full block identifier including workchain, shard, seqno, and hashes." + "description": "Full block identifier including workchain, shard, `seqno`, and hashes." }, "global_id": { "type": "integer", @@ -6418,19 +6431,19 @@ "type": "integer", "description": "Short hash of the validator set active during this block." }, - "catchain_seqno": { + "catchain_`seqno`": { "type": "integer", "description": "Catchain sequence number used for validator consensus." }, - "min_ref_mc_seqno": { + "min_ref_mc_`seqno`": { "type": "integer", - "description": "Minimum masterchain block seqno referenced by this block." + "description": "Minimum masterchain block `seqno` referenced by this block." }, "is_key_block": { "type": "boolean", "description": "Returns `true` if this is a key block containing validator set changes or config updates; otherwise `false`." }, - "prev_key_block_seqno": { + "prev_key_block_`seqno`": { "type": "integer", "description": "Sequence number of the previous key block." }, @@ -6441,7 +6454,7 @@ }, "end_lt": { "type": "string", - "description": "Logical time at the end of this block. All transactions in this block have lt between start_lt and end_lt.", + "description": "Logical time at the end of this block. All transactions in this block have `lt` between `start_lt` and `end_lt`.", "x-usrv-cpp-type": "std::int64_t" }, "gen_utime": { @@ -6450,7 +6463,7 @@ }, "prev_blocks": { "type": "array", - "description": "Array of previous block identifiers (workchain, shard, seqno, root_hash, file_hash). Usually contains one entry, but two after a shard merge.", + "description": "Array of previous block identifiers (`workchain`, `shard`, `seqno`, `root_hash`, `file_hash`). Usually contains one entry, but two after a shard merge.", "items": { "$ref": "#/components/schemas/TonBlockIdExt" } @@ -6467,10 +6480,10 @@ "want_merge", "want_split", "validator_list_hash_short", - "catchain_seqno", - "min_ref_mc_seqno", + "catchain_`seqno`", + "min_ref_mc_`seqno`", "is_key_block", - "prev_key_block_seqno", + "prev_key_block_`seqno`", "start_lt", "end_lt", "gen_utime", @@ -6575,7 +6588,7 @@ }, "req_count": { "type": "integer", - "description": "Number of transactions requested." + "description": "The maximum number of transactions requested, as specified by the `count` request parameter. If `incomplete` is `true`, more transactions exist beyond this limit." }, "incomplete": { "type": "boolean", @@ -6616,7 +6629,7 @@ }, "req_count": { "type": "integer", - "description": "Number of transactions requested." + "description": "The maximum number of transactions requested, as specified by the `count` request parameter. If `incomplete` is `true`, more transactions exist beyond this limit." }, "incomplete": { "type": "boolean", @@ -6693,11 +6706,11 @@ }, "hash": { "$ref": "#/components/schemas/TonHash", - "description": "Hash of the external message as accepted by the network." + "description": "SHA-256 hash of the external message as accepted by the network." }, "hash_norm": { "$ref": "#/components/schemas/TonHash", - "description": "Normalized message hash, stable across re-serializations." + "description": "SHA-256 normalized message hash, stable across re-serializations. See [TEP-467](https://github.com/ton-blockchain/TEPs/blob/master/text/0467-normalized-message-hash.md) for the standard." } }, "description": "Information about a broadcast external message. Contains the message hash which you can use to track its processing." @@ -7146,7 +7159,7 @@ "format": "int32" } ], - "description": "The get method name (e.g., \"seqno\", \"get_wallet_data\") or its numeric ID." + "description": "The get method name (e.g., \"`seqno`\", \"get_wallet_data\") or its numeric ID." }, "stack": { "type": "array", @@ -7191,9 +7204,9 @@ }, "description": "Input arguments as a TVM stack. Each entry is a typed object with `@type` discriminator: `tvm.stackEntryNumber` (decimal string), `tvm.stackEntryCell` (base64 BOC), `tvm.stackEntrySlice` (base64 BOC), `tvm.stackEntryTuple`, or `tvm.stackEntryList`." }, - "seqno": { + "`seqno`": { "type": "integer", - "description": "Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction." + "description": "Masterchain block sequence number. Run the get method against the contract state at this specific block height. If omitted, uses the current state." } } }, @@ -7266,7 +7279,7 @@ "exit_code": { "type": "integer", "format": "int32", - "description": "TVM exit code: 0 or 1 means success, other values indicate errors." + "description": "TVM exit code. `0` or `1` means success; other values indicate errors. See [exit codes](/tvm/exit-codes#exit-codes) for the full reference." } }, "description": "Result of executing a smart contract get method. Contains the TVM exit code (0 or 1 means success), gas consumed, and the output stack with typed return values." @@ -7379,7 +7392,7 @@ "format": "int32" } ], - "description": "The get method name (e.g., \"seqno\", \"get_wallet_data\") or its numeric ID." + "description": "The get method name (e.g., \"`seqno`\", \"get_wallet_data\") or its numeric ID." }, "stack": { "type": "array", @@ -7388,10 +7401,10 @@ }, "description": "Input arguments as a TVM stack. Each entry is a two-element array: `[type, value]` where type is `\"num\"` (decimal string), `\"cell\"` (base64 BOC), or `\"slice\"` (base64 BOC)." }, - "seqno": { + "`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": "Masterchain block sequence number. Run the get method against the contract state at this specific block height. If omitted, uses the current state." } }, "description": "Request to execute a smart contract get method. Specify address, method name/ID, and input stack." @@ -7431,7 +7444,7 @@ "exit_code": { "type": "integer", "format": "int32", - "description": "TVM exit code: 0 or 1 means success, other values indicate errors." + "description": "TVM exit code. `0` or `1` means success; other values indicate errors. See [exit codes](/tvm/exit-codes#exit-codes) for the full reference." }, "block_id": { "$ref": "#/components/schemas/TonBlockIdExt", @@ -7482,14 +7495,13 @@ }, "result": { "$ref": "#/components/schemas/DetectAddress", - "description": "The response data. Only present when `ok` is `true`." + "description": "Response data. Present only 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 address format variants." + } }, "DetectHashResponse": { "type": "object", @@ -7506,14 +7518,13 @@ }, "result": { "$ref": "#/components/schemas/DetectHash", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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." + } }, "PackAddressResponse": { "type": "object", @@ -7530,14 +7541,13 @@ }, "result": { "type": "string", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 packed base64 address." + } }, "UnpackAddressResponse": { "type": "object", @@ -7554,14 +7564,13 @@ }, "result": { "$ref": "#/components/schemas/UnpackedAddress", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 unpacked raw address components." + } }, "AddressInformationResponse": { "type": "object", @@ -7578,14 +7587,13 @@ }, "result": { "$ref": "#/components/schemas/AddressInformation", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 state, balance, code, and data." + } }, "ExtendedAddressInformationResponse": { "type": "object", @@ -7602,14 +7610,13 @@ }, "result": { "$ref": "#/components/schemas/ExtendedAddressInformation", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 extended account information with parsed wallet state." + } }, "WalletInformationResponse": { "type": "object", @@ -7626,14 +7633,13 @@ }, "result": { "$ref": "#/components/schemas/WalletInformation", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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." + } }, "AddressBalanceResponse": { "type": "object", @@ -7650,14 +7656,13 @@ }, "result": { "$ref": "#/components/schemas/Int256", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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." + } }, "AddressStateResponse": { "type": "object", @@ -7674,14 +7679,13 @@ }, "result": { "$ref": "#/components/schemas/AccountStateEnum", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 lifecycle state." + } }, "TokenDataResponse": { "type": "object", @@ -7698,14 +7702,13 @@ }, "result": { "$ref": "#/components/schemas/TokenData", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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." + } }, "MasterchainInfoResponse": { "type": "object", @@ -7722,14 +7725,13 @@ }, "result": { "$ref": "#/components/schemas/MasterchainInfo", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 current masterchain state and latest block." + } }, "MasterchainBlockSignaturesResponse": { "type": "object", @@ -7746,14 +7748,13 @@ }, "result": { "$ref": "#/components/schemas/MasterchainBlockSignatures", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 validator signatures for a masterchain block." + } }, "ShardBlockProofResponse": { "type": "object", @@ -7770,14 +7771,13 @@ }, "result": { "$ref": "#/components/schemas/ShardBlockProof", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 Merkle proof linking shard block to masterchain." + } }, "ConsensusBlockResponse": { "type": "object", @@ -7794,14 +7794,13 @@ }, "result": { "$ref": "#/components/schemas/ConsensusBlock", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 latest consensus block information." + } }, "LookupBlockResponse": { "type": "object", @@ -7818,14 +7817,13 @@ }, "result": { "$ref": "#/components/schemas/TonBlockIdExt", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 full block identifier." + } }, "ShardsResponse": { "type": "object", @@ -7842,7 +7840,7 @@ }, "result": { "$ref": "#/components/schemas/Shards", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only when `ok` is `true`." }, "@extra": { "type": "string", @@ -7866,14 +7864,13 @@ }, "result": { "$ref": "#/components/schemas/BlockHeader", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 block header information." + } }, "OutMsgQueueSizeResponse": { "type": "object", @@ -7889,15 +7886,13 @@ "description": "Returns `true` if the request succeeded; otherwise `false`. See the `error` field for details." }, "result": { - "$ref": "#/components/schemas/OutMsgQueueSizes", - "description": "The response data. Only present when `ok` is `true`. " + "$ref": "#/components/schemas/OutMsgQueueSizes" }, "@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 outbound message queue sizes." + } }, "BlockTransactionsResponse": { "type": "object", @@ -7914,14 +7909,13 @@ }, "result": { "$ref": "#/components/schemas/BlockTransactions", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 list of transactions in a block." + } }, "BlockTransactionsExtResponse": { "type": "object", @@ -7938,14 +7932,13 @@ }, "result": { "$ref": "#/components/schemas/BlockTransactionsExt", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 detailed transactions from a block." + } }, "TransactionsResponse": { "type": "object", @@ -7971,8 +7964,7 @@ "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 account transactions." + } }, "TransactionsV2Response": { "type": "object", @@ -7989,7 +7981,7 @@ }, "result": { "$ref": "#/components/schemas/TransactionsStd", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only when `ok` is `true`." }, "@extra": { "type": "string", @@ -8013,14 +8005,13 @@ }, "result": { "$ref": "#/components/schemas/Transaction", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 located transaction." + } }, "LocateResultTxResponse": { "type": "object", @@ -8037,14 +8028,13 @@ }, "result": { "$ref": "#/components/schemas/Transaction", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 result transaction." + } }, "LocateSourceTxResponse": { "type": "object", @@ -8061,14 +8051,13 @@ }, "result": { "$ref": "#/components/schemas/Transaction", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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." + } }, "ConfigParamResponse": { "type": "object", @@ -8085,14 +8074,13 @@ }, "result": { "$ref": "#/components/schemas/ConfigInfo", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 requested configuration parameter." + } }, "ConfigAllResponse": { "type": "object", @@ -8109,14 +8097,13 @@ }, "result": { "$ref": "#/components/schemas/ConfigInfo", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 configuration parameters." + } }, "LibrariesResponse": { "type": "object", @@ -8133,14 +8120,13 @@ }, "result": { "$ref": "#/components/schemas/LibraryResult", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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." + } }, "SendBocResponse": { "type": "object", @@ -8157,14 +8143,13 @@ }, "result": { "$ref": "#/components/schemas/ResultOk", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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." + } }, "SendBocReturnHashResponse": { "type": "object", @@ -8181,14 +8166,13 @@ }, "result": { "$ref": "#/components/schemas/ExtMessageInfo", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 message hash after broadcast." + } }, "EstimateFeeResponse": { "type": "object", @@ -8205,14 +8189,13 @@ }, "result": { "$ref": "#/components/schemas/QueryFees", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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 estimated transaction fees." + } }, "RunGetMethodResponse": { "type": "object", @@ -8229,14 +8212,13 @@ }, "result": { "$ref": "#/components/schemas/RunGetMethodResult", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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." + } }, "RunGetMethodStdResponse": { "type": "object", @@ -8253,14 +8235,13 @@ }, "result": { "$ref": "#/components/schemas/RunGetMethodStdResult", - "description": "The response data. Only present when `ok` is `true`. " + "description": "Response data. Present only 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." + } } } } From 0f941eccf248fc4ccfcec9e144ce53d270972c7d Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Thu, 5 Mar 2026 04:46:52 +0200 Subject: [PATCH 18/21] fixes --- ecosystem/api/toncenter/v2.json | 118 ++++++++++++++++---------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index 50be70bdc..8f983125f 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -29,7 +29,7 @@ "$ref": "#/components/parameters/address" }, { - "$ref": "#/components/parameters/`seqno`Optional" + "$ref": "#/components/parameters/seqnoOptional" } ], "responses": { @@ -82,7 +82,7 @@ "$ref": "#/components/parameters/address" }, { - "$ref": "#/components/parameters/`seqno`Optional" + "$ref": "#/components/parameters/seqnoOptional" } ], "responses": { @@ -135,7 +135,7 @@ "$ref": "#/components/parameters/address" }, { - "$ref": "#/components/parameters/`seqno`Optional" + "$ref": "#/components/parameters/seqnoOptional" } ], "responses": { @@ -188,7 +188,7 @@ "$ref": "#/components/parameters/address" }, { - "$ref": "#/components/parameters/`seqno`Optional" + "$ref": "#/components/parameters/seqnoOptional" } ], "responses": { @@ -241,7 +241,7 @@ "$ref": "#/components/parameters/address" }, { - "$ref": "#/components/parameters/`seqno`Optional" + "$ref": "#/components/parameters/seqnoOptional" } ], "responses": { @@ -353,7 +353,7 @@ "$ref": "#/components/parameters/shard" }, { - "$ref": "#/components/parameters/`seqno`" + "$ref": "#/components/parameters/seqno" }, { "$ref": "#/components/parameters/rootHashOptional" @@ -424,7 +424,7 @@ "$ref": "#/components/parameters/shard" }, { - "$ref": "#/components/parameters/`seqno`" + "$ref": "#/components/parameters/seqno" }, { "$ref": "#/components/parameters/rootHashOptional" @@ -841,7 +841,7 @@ "operationId": "getMasterchainBlockSignatures_get", "parameters": [ { - "$ref": "#/components/parameters/`seqno`" + "$ref": "#/components/parameters/seqno" } ], "responses": { @@ -897,10 +897,10 @@ "$ref": "#/components/parameters/shard" }, { - "$ref": "#/components/parameters/`seqno`" + "$ref": "#/components/parameters/seqno" }, { - "name": "from_`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, @@ -1006,7 +1006,7 @@ "$ref": "#/components/parameters/shard" }, { - "$ref": "#/components/parameters/`seqno`Optional" + "$ref": "#/components/parameters/seqnoOptional" }, { "name": "lt", @@ -1076,7 +1076,7 @@ "operationId": "getShards_get", "parameters": [ { - "$ref": "#/components/parameters/`seqno`", + "$ref": "#/components/parameters/seqno", "description": "Seqno of masterchain block" } ], @@ -1133,7 +1133,7 @@ "$ref": "#/components/parameters/shard" }, { - "$ref": "#/components/parameters/`seqno`" + "$ref": "#/components/parameters/seqno" }, { "$ref": "#/components/parameters/rootHashOptional" @@ -1725,7 +1725,7 @@ } }, { - "name": "`seqno`", + "name": "seqno", "in": "query", "description": "Block `seqno`", "required": false, @@ -1782,7 +1782,7 @@ "operationId": "getConfigAll_get", "parameters": [ { - "name": "`seqno`", + "name": "seqno", "in": "query", "description": "Block `seqno`", "required": false, @@ -2025,8 +2025,8 @@ "x-usrv-cpp-type": "std::int64_t" } }, - "`seqno`": { - "name": "`seqno`", + "seqno": { + "name": "seqno", "in": "query", "description": "Masterchain block sequence number (block height). Used to query state at a specific point in time. If omitted, returns the current state.", "required": true, @@ -2035,8 +2035,8 @@ "format": "int32" } }, - "`seqno`Optional": { - "name": "`seqno`", + "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, @@ -2378,8 +2378,8 @@ "enum": [ "empty address", "failed to parse address", - "failed to parse `seqno`", - "`seqno` should be positive" + "failed to parse seqno", + "seqno should be positive" ] }, "@extra": { @@ -2519,13 +2519,13 @@ "enum": [ "workchain required", "shard required", - "`seqno` required", + "seqno required", "failed to parse workchain", "failed to parse shard", "failed to parse root_hash", - "failed to parse `seqno`", - "`seqno` should be positive", - "from_`seqno` should be non-negative" + "failed to parse seqno", + "seqno should be positive", + "from_seqno should be non-negative" ] }, "@extra": { @@ -2570,7 +2570,7 @@ "enum": [ "failed to parse workchain", "failed to parse shard", - "exactly one of `seqno`, lt, unixtime should be specified", + "exactly one of seqno, lt, unixtime should be specified", "lt should be non-negative", "unixtime should be non-negative" ] @@ -2617,7 +2617,7 @@ "enum": [ "failed to parse workchain", "failed to parse shard", - "failed to parse `seqno`", + "failed to parse seqno", "after_lt and after_hash should be used together", "after_lt should be non-negative", "count should be positive", @@ -3181,7 +3181,7 @@ "address": { "$ref": "#/components/schemas/TonAddr" }, - "`seqno`": { + "seqno": { "oneOf": [ { "type": "string" @@ -3200,10 +3200,10 @@ "type": "object", "additionalProperties": false, "required": [ - "`seqno`" + "seqno" ], "properties": { - "`seqno`": { + "seqno": { "oneOf": [ { "type": "string" @@ -3270,7 +3270,7 @@ "required": [ "workchain", "shard", - "`seqno`" + "seqno" ], "properties": { "workchain": { @@ -3300,7 +3300,7 @@ "x-usrv-cpp-type": "std::int64_t", "description": "Shard identifier. A signed 64-bit integer. Masterchain uses -9223372036854775808." }, - "`seqno`": { + "seqno": { "oneOf": [ { "type": "string" @@ -3313,7 +3313,7 @@ "x-usrv-cpp-type": "std::int32_t", "description": "Shardchain block sequence number. Identifies a specific block within the given workchain and shard. Use together with `workchain` and `shard` to uniquely identify a block." }, - "from_`seqno`": { + "from_seqno": { "oneOf": [ { "type": "string" @@ -3366,7 +3366,7 @@ "x-usrv-cpp-type": "std::int64_t", "description": "Shard identifier. A signed 64-bit integer. Masterchain uses -9223372036854775808." }, - "`seqno`": { + "seqno": { "oneOf": [ { "type": "string" @@ -3418,7 +3418,7 @@ "required": [ "workchain", "shard", - "`seqno`" + "seqno" ], "properties": { "workchain": { @@ -3448,7 +3448,7 @@ "x-usrv-cpp-type": "std::int64_t", "description": "Shard identifier. A signed 64-bit integer. Masterchain uses -9223372036854775808." }, - "`seqno`": { + "seqno": { "oneOf": [ { "type": "string" @@ -3480,7 +3480,7 @@ "required": [ "workchain", "shard", - "`seqno`" + "seqno" ], "properties": { "workchain": { @@ -3510,7 +3510,7 @@ "x-usrv-cpp-type": "std::int64_t", "description": "Shard identifier. A signed 64-bit integer. Masterchain uses -9223372036854775808." }, - "`seqno`": { + "seqno": { "oneOf": [ { "type": "string" @@ -3704,7 +3704,7 @@ "x-usrv-cpp-type": "std::int32_t", "description": "Configuration parameter number. Each number controls different blockchain settings." }, - "`seqno`": { + "seqno": { "oneOf": [ { "type": "string" @@ -3723,7 +3723,7 @@ "type": "object", "additionalProperties": false, "properties": { - "`seqno`": { + "seqno": { "oneOf": [ { "type": "string" @@ -3897,7 +3897,7 @@ "x-usrv-cpp-type": "std::int64_t", "description": "Shard identifier as a signed 64-bit integer string. Masterchain uses `-9223372036854775808`." }, - "`seqno`": { + "seqno": { "type": "integer", "description": "Block sequence number within its workchain and shard. For the masterchain (workchain `-1`), this equals the global block height. For basechain shards (workchain `0`), this is the sequence number local to that specific shard, not a global height." }, @@ -3914,7 +3914,7 @@ "@type", "workchain", "shard", - "`seqno`", + "seqno", "root_hash", "file_hash" ], @@ -4056,7 +4056,7 @@ "format": "int64", "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. The default value is `0x29a9a317` (698983191) on both mainnet and testnet, derived from the first 4 bytes of the TON mainnet initial state hash. Note: v5 wallets use a different scheme with network-specific values to prevent cross-network transaction replay. See [wallet interaction guide](/standard/wallets/interact) for full details." }, - "`seqno`": { + "seqno": { "type": "integer", "format": "int32", "description": "Wallet contract sequence number. Used for replay protection: each outgoing transaction must include the current `seqno` and increments it by 1. Fetch the current value before sending a transaction." @@ -4065,7 +4065,7 @@ "required": [ "@type", "wallet_id", - "`seqno`" + "seqno" ], "title": "Wallet v3", "description": "Standard wallet contract version 3. Identified by `@type: wallet.v3.accountState`. The most widely deployed wallet type prior to v4." @@ -4087,7 +4087,7 @@ "format": "int64", "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. The default value is `0x29a9a317` (698983191) on both mainnet and testnet, derived from the first 4 bytes of the TON mainnet initial state hash. Note: v5 wallets use a different scheme with network-specific values to prevent cross-network transaction replay. See [wallet interaction guide](/standard/wallets/interact) for full details." }, - "`seqno`": { + "seqno": { "type": "integer", "format": "int32", "description": "Wallet contract sequence number. Used for replay protection: each outgoing transaction must include the current `seqno` and increments it by 1. Fetch the current value before sending a transaction." @@ -4096,7 +4096,7 @@ "required": [ "@type", "wallet_id", - "`seqno`" + "seqno" ], "title": "Wallet v4", "description": "Standard wallet contract version 4. Identified by `@type: wallet.v4.accountState`. Adds plugin support over v3." @@ -4118,7 +4118,7 @@ "format": "int64", "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. The default value is `0x29a9a317` (698983191) on both mainnet and testnet, derived from the first 4 bytes of the TON mainnet initial state hash. Note: v5 wallets use a different scheme with network-specific values to prevent cross-network transaction replay. See [wallet interaction guide](/standard/wallets/interact) for full details." }, - "`seqno`": { + "seqno": { "type": "integer", "format": "int32", "description": "Wallet contract sequence number. Used for replay protection: each outgoing transaction must include the current `seqno` and increments it by 1. Fetch the current value before sending a transaction." @@ -4127,7 +4127,7 @@ "required": [ "@type", "wallet_id", - "`seqno`" + "seqno" ], "title": "Highload wallet v1", "description": "High-throughput wallet contract version 1. Identified by `@type: wallet.highload.v1.accountState`. Designed for sending many transactions in a single block." @@ -4259,7 +4259,7 @@ "format": "int64", "description": "Subwallet ID for v3+ wallets. Allows creating multiple wallets from one key. The default value is `0x29a9a317` (698983191) on both mainnet and testnet, derived from the first 4 bytes of the TON mainnet initial state hash. Note: v5 wallets use a different scheme with network-specific values to prevent cross-network transaction replay. See [wallet interaction guide](/standard/wallets/interact) for full details." }, - "`seqno`": { + "seqno": { "type": "integer", "format": "int32", "description": "Wallet contract sequence number. Used for replay protection: each outgoing transaction must include the current `seqno` and increments it by 1. Fetch the current value before sending a transaction." @@ -4277,7 +4277,7 @@ "required": [ "@type", "wallet_id", - "`seqno`", + "seqno", "unlocked_balance", "config" ], @@ -6190,7 +6190,7 @@ ], "description": "Wallet contract version (e.g., `wallet v4 r2`, `wallet v5 r1`). Empty if not a recognized wallet." }, - "`seqno`": { + "seqno": { "type": "integer", "format": "int64", "description": "Wallet contract sequence number. Used for replay protection: each outgoing transaction must include the current `seqno` and increments it by 1. Fetch the current value before sending a transaction." @@ -6431,11 +6431,11 @@ "type": "integer", "description": "Short hash of the validator set active during this block." }, - "catchain_`seqno`": { + "catchain_seqno": { "type": "integer", "description": "Catchain sequence number used for validator consensus." }, - "min_ref_mc_`seqno`": { + "min_ref_mc_seqno": { "type": "integer", "description": "Minimum masterchain block `seqno` referenced by this block." }, @@ -6443,7 +6443,7 @@ "type": "boolean", "description": "Returns `true` if this is a key block containing validator set changes or config updates; otherwise `false`." }, - "prev_key_block_`seqno`": { + "prev_key_block_seqno": { "type": "integer", "description": "Sequence number of the previous key block." }, @@ -6480,10 +6480,10 @@ "want_merge", "want_split", "validator_list_hash_short", - "catchain_`seqno`", - "min_ref_mc_`seqno`", + "catchain_seqno", + "min_ref_mc_seqno", "is_key_block", - "prev_key_block_`seqno`", + "prev_key_block_seqno", "start_lt", "end_lt", "gen_utime", @@ -7204,7 +7204,7 @@ }, "description": "Input arguments as a TVM stack. Each entry is a typed object with `@type` discriminator: `tvm.stackEntryNumber` (decimal string), `tvm.stackEntryCell` (base64 BOC), `tvm.stackEntrySlice` (base64 BOC), `tvm.stackEntryTuple`, or `tvm.stackEntryList`." }, - "`seqno`": { + "seqno": { "type": "integer", "description": "Masterchain block sequence number. Run the get method against the contract state at this specific block height. If omitted, uses the current state." } @@ -7401,7 +7401,7 @@ }, "description": "Input arguments as a TVM stack. Each entry is a two-element array: `[type, value]` where type is `\"num\"` (decimal string), `\"cell\"` (base64 BOC), or `\"slice\"` (base64 BOC)." }, - "`seqno`": { + "seqno": { "type": "integer", "format": "int32", "description": "Masterchain block sequence number. Run the get method against the contract state at this specific block height. If omitted, uses the current state." From 0fcccaed9e6c261acf151ed033d9616016ffac14 Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Mon, 9 Mar 2026 06:31:33 +0200 Subject: [PATCH 19/21] fix broken pages --- .../api/toncenter/v2/accounts/get-wallet-information.mdx | 4 ++-- .../toncenter/v2/blocks/get-masterchain-block-signatures.mdx | 2 +- ecosystem/api/toncenter/v2/blocks/get-shard-block-proof.mdx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx b/ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx index 4ea25833e..0d14be6ae 100644 --- a/ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx +++ b/ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx @@ -1,3 +1,3 @@ --- -openapi: get /getWalletInformation ---- +openapi: get /api/v2/getWalletInformation +--- \ No newline at end of file diff --git a/ecosystem/api/toncenter/v2/blocks/get-masterchain-block-signatures.mdx b/ecosystem/api/toncenter/v2/blocks/get-masterchain-block-signatures.mdx index 739c79237..4d3d7e63a 100644 --- a/ecosystem/api/toncenter/v2/blocks/get-masterchain-block-signatures.mdx +++ b/ecosystem/api/toncenter/v2/blocks/get-masterchain-block-signatures.mdx @@ -1,3 +1,3 @@ --- -openapi: get /getMasterchainBlockSignatures +openapi: get /api/v2/getMasterchainBlockSignatures --- \ No newline at end of file diff --git a/ecosystem/api/toncenter/v2/blocks/get-shard-block-proof.mdx b/ecosystem/api/toncenter/v2/blocks/get-shard-block-proof.mdx index f844a88ea..7ef1e095b 100644 --- a/ecosystem/api/toncenter/v2/blocks/get-shard-block-proof.mdx +++ b/ecosystem/api/toncenter/v2/blocks/get-shard-block-proof.mdx @@ -1,3 +1,3 @@ --- -openapi: get /getShardBlockProof +openapi: get /api/v2/getShardBlockProof --- \ No newline at end of file From 6e98056bda04779e62a1519684ee5a29c1c5c954 Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Mon, 9 Mar 2026 06:53:14 +0200 Subject: [PATCH 20/21] add count parameter validation bounds --- ecosystem/api/toncenter/v2.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index 8f983125f..42ab00bfb 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -2093,7 +2093,9 @@ "schema": { "type": "integer", "format": "int64", - "default": 40 + "default": 40, + "minimum": 1, + "maximum": 10000 } }, "limitOptional": { From f83a1e81cf7ba3c95f2697373c9055d0a0dcc2e9 Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Thu, 12 Mar 2026 09:20:26 +0200 Subject: [PATCH 21/21] fix description --- ecosystem/api/toncenter/v2.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecosystem/api/toncenter/v2.json b/ecosystem/api/toncenter/v2.json index 42ab00bfb..49a869029 100644 --- a/ecosystem/api/toncenter/v2.json +++ b/ecosystem/api/toncenter/v2.json @@ -6819,7 +6819,7 @@ "items": { "$ref": "#/components/schemas/Fees" }, - "description": "Array of fee breakdowns charged on the receiving account. Each entry contains `in_fwd_fee`, `storage_fee`, `gas_fee`, and `fwd_fee` in nanotons (integers)." + "description": "Array of fee breakdowns charged on the receiving account(s). One entry per destination in multi-hop transactions." } }, "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)." @@ -8247,4 +8247,4 @@ } } } -} \ No newline at end of file +}