GETGet shard block proof

TON Mainnethttps://ton-mainnet.nodit.io/api/v2/getShardBlockProof
CU50

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. Used by light clients and cross-chain bridges to verify shard data without trusting the API.

Query Parameters
workchaininteger (int32)required

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.

shardstringrequired

The shard identifier. Masterchain always uses -9223372036854775808. For basechain, shards split and merge dynamically. Use the shards endpoint to discover current shard configuration.

seqnointeger (int32)required

Block sequence number within the specified workchain and shard.

from_seqnointeger (int32)

Seqno of masterchain block starting from which proof is required. If not specified latest masterchain block is used

Responses
okbooleanrequired

Returns true if the request succeeded; otherwise false. See the error field for details.

@typestring (enum)required

TonLib type identifier for shard block proof chains. Refer to the TonLib type reference for a full list.

fromobjectrequired

The shard block being proven.

@typestring (enum)required

TonLib type identifier for full block identifiers. Refer to the TonLib type reference for a full list.

workchainintegerrequired

Workchain ID: -1 for masterchain, 0 for basechain.

shardstringrequired

Shard identifier as a signed 64-bit integer string. Masterchain uses -9223372036854775808.

seqnointegerrequired

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_hashstringrequired

Root hash of the block. Together with file_hash, uniquely identifies a block.

file_hashstringrequired

Hash of the serialized block file. Together with root_hash, uniquely identifies a block.

mc_idobjectrequired

Masterchain block used as trust anchor for the proof.

@typestring (enum)required

TonLib type identifier for full block identifiers. Refer to the TonLib type reference for a full list.

workchainintegerrequired

Workchain ID: -1 for masterchain, 0 for basechain.

shardstringrequired

Shard identifier as a signed 64-bit integer string. Masterchain uses -9223372036854775808.

seqnointegerrequired

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_hashstringrequired

Root hash of the block. Together with file_hash, uniquely identifies a block.

file_hashstringrequired

Hash of the serialized block file. Together with root_hash, uniquely identifies a block.

linksobject[]required

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).

@typestring (enum)required

TonLib type identifier for shard-to-masterchain proof links. Refer to the TonLib type reference for a full list.

idobjectrequired

Block identifier for this link in the proof chain.

@typestring (enum)required

TonLib type identifier for full block identifiers. Refer to the TonLib type reference for a full list.

workchainintegerrequired

Workchain ID: -1 for masterchain, 0 for basechain.

shardstringrequired

Shard identifier as a signed 64-bit integer string. Masterchain uses -9223372036854775808.

seqnointegerrequired

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_hashstringrequired

Root hash of the block. Together with file_hash, uniquely identifies a block.

file_hashstringrequired

Hash of the serialized block file. Together with root_hash, uniquely identifies a block.

proofstringrequired

Merkle proof data for this shard block link.

mc_proofobject[]required

Array of masterchain block link proofs. Each entry contains source and destination block identifiers with corresponding Merkle proofs (base64) and state proofs (base64).

@typestring (enum)required

TonLib type identifier for backward block link proofs. Refer to the TonLib type reference for a full list.

to_key_blockbooleanrequired

Returns true if the destination block is a key block; otherwise false.

fromobjectrequired

Source block in the proof chain.

@typestring (enum)required

TonLib type identifier for full block identifiers. Refer to the TonLib type reference for a full list.

workchainintegerrequired

Workchain ID: -1 for masterchain, 0 for basechain.

shardstringrequired

Shard identifier as a signed 64-bit integer string. Masterchain uses -9223372036854775808.

seqnointegerrequired

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_hashstringrequired

Root hash of the block. Together with file_hash, uniquely identifies a block.

file_hashstringrequired

Hash of the serialized block file. Together with root_hash, uniquely identifies a block.

toobjectrequired

Destination block in the proof chain.

@typestring (enum)required

TonLib type identifier for full block identifiers. Refer to the TonLib type reference for a full list.

workchainintegerrequired

Workchain ID: -1 for masterchain, 0 for basechain.

shardstringrequired

Shard identifier as a signed 64-bit integer string. Masterchain uses -9223372036854775808.

seqnointegerrequired

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_hashstringrequired

Root hash of the block. Together with file_hash, uniquely identifies a block.

file_hashstringrequired

Hash of the serialized block file. Together with root_hash, uniquely identifies a block.

dest_proofstringrequired

Cryptographic proof for the destination block.

proofstringrequired

Merkle proof linking the two blocks.

state_proofstringrequired

State proof validating the block link.

@extrastring

Optional request ID that can be passed in the request and received back in the response. Useful for matching async responses.

X-API-KEY
Request
cURL
curl -X GET "https://ton-mainnet.nodit.io/api/v2/getShardBlockProof?workchain=0&shard=-9223372036854775808&seqno=112794113" \
  -H "X-API-KEY: {YOUR_API_KEY}"
Response
Example · 200
{
  "ok": true,
  "result": {
    "@type": "blocks.shardBlockProof",
    "from": {
      "@type": "ton.blockIdExt",
      "workchain": -1,
      "shard": "-9223372036854775808",
      "seqno": 107892834,
      "root_hash": "zUNss/XPQJeQ6q1oZg9NaAu/LnOG4GqpSoDhYr0EjIQ=",
      "file_hash": "evpm0y15B/G/qVIV1K1fmUt25NeFNZfHdaGOqdHdhvw="
    },
    "mc_id": {
      "@type": "ton.blockIdExt",
      "workchain": -1,
      "shard": "-9223372036854775808",
      "seqno": 107892772,
      "root_hash": "CZ71j2Ea/GLWj3Nc4qYFjHwU5WKnoR6a8OucP1StF/s=",
      "file_hash": "EgSbEso6FAMwFTf3B3yI1KeEu6cu2JNiwr/yWJWlKgc="
    },
    "links": [
      {
        "@type": "blocks.shardBlockLink",
        "id": {
          "@type": "ton.blockIdExt",
          "workchain": 0,
          "shard": "-9223372036854775808",
          "seqno": 112794113,
          "root_hash": "7oWzAvaZmId7sAc6MlML5ClF17FiP3fcGRLRaq3o87g=",
          "file_hash": "pC8Wh0FYB5izJ2Wr5OFrvTaqPnmBjaoXtRhWOiweXFI="
        },
        "proof": "te6ccgECEAEAAh8ACUYDCZ71j2Ea/GLWj3Nc4qYFjHwU5WKnoR6a8OucP1StF/sAFQEkEBHvVar///8RAgMEBShIAQFEyT1VyKKEwWfGKbkcWG6CbbddrM7hwiQvJe5XbvqPuAABKEgBAd/YM7nq2CPVxKkoST6cd0I0vqxy4YsKXP7FKYSQJ/0UAAMoSAEBtkZW5RDe..."
      }
    ],
    "mc_proof": [
      {
        "@type": "blocks.blockLinkBack",
        "to_key_block": false,
        "from": {
          "@type": "ton.blockIdExt",
          "workchain": -1,
          "shard": "-9223372036854775808",
          "seqno": 107892834,
          "root_hash": "zUNss/XPQJeQ6q1oZg9NaAu/LnOG4GqpSoDhYr0EjIQ=",
          "file_hash": "evpm0y15B/G/qVIV1K1fmUt25NeFNZfHdaGOqdHdhvw="
        },
        "to": {
          "@type": "ton.blockIdExt",
          "workchain": -1,
          "shard": "-9223372036854775808",
          "seqno": 107892772,
          "root_hash": "CZ71j2Ea/GLWj3Nc4qYFjHwU5WKnoR6a8OucP1StF/s=",
          "file_hash": "EgSbEso6FAMwFTf3B3yI1KeEu6cu2JNiwr/yWJWlKgc="
        },
        "dest_proof": "te6ccgECBwEAAR8ACUYDCZ71j2Ea/GLWj3Nc4qYFjHwU5WKnoR6a8OucP1StF/sAFQEkEBHvVar///8RAgMEBSGgm8ephwAAAAAEAQZuUCQAAAABAP////8AAAAAAAAAAGsH9+8AAGxjqrvagAAAbGOqu9qEc0iouQANhmQGblAgBmzsMcQAAAASAAAAAAAAA+4GKEgB...",
        "proof": "te6ccgECCQEAAfoACUYDzUNss/XPQJeQ6q1oZg9NaAu/LnOG4GqpSoDhYr0EjIQAFQEkEBHvVar///8RAgMEBQGgm8ephwAAAAAEAQZuUGIAAAABAP////8AAAAAAAAAAGsH+AgAAGxjrn0oQAAAbGOufShEc0iouQANhmQGblBfBmzsMcQAAAASAAAAAAAAA+4GKEgB...",
        "state_proof": "te6ccgECYgEACyQACUYDKAYTZx2dF4y7Kq+o4FhKDj7CQbLWp/EqjKIQ8z4JQiwCBgEkW5Ajr+L///8RAP////8AAAAAAAAAAAZuUGIAAAABawf4CAAAbGOufShEBm5QX2ACAwQFKEgBAekoxgIHtD8p7LDk10BKvxRnFxQuGc6A2TkhPpVL8uE1AAEoSAEBWYK9CrK2..."
      }
    ]
  },
  "@extra": "1795684361:7:26.502"
}