Skip to main content
GET
/
api
/
v2
/
getShardBlockProof
Get Shard Block Proof
curl --request GET \
  --url https://toncenter.com/api/v2/getShardBlockProof
{
  "ok": true,
  "result": {
    "@type": "blocks.shardBlockProof",
    "from": {
      "@type": "ton.blockIdExt",
      "workchain": 123,
      "shard": "<string>",
      "seqno": 123,
      "root_hash": "<string>",
      "file_hash": "<string>"
    },
    "mc_id": {
      "@type": "ton.blockIdExt",
      "workchain": 123,
      "shard": "<string>",
      "seqno": 123,
      "root_hash": "<string>",
      "file_hash": "<string>"
    },
    "links": [
      {
        "@type": "blocks.shardBlockLink",
        "id": {
          "@type": "ton.blockIdExt",
          "workchain": 123,
          "shard": "<string>",
          "seqno": 123,
          "root_hash": "<string>",
          "file_hash": "<string>"
        },
        "proof": "<string>"
      }
    ],
    "mc_proof": [
      {
        "@type": "blocks.blockLinkBack",
        "to_key_block": true,
        "from": {
          "@type": "ton.blockIdExt",
          "workchain": 123,
          "shard": "<string>",
          "seqno": 123,
          "root_hash": "<string>",
          "file_hash": "<string>"
        },
        "to": {
          "@type": "ton.blockIdExt",
          "workchain": 123,
          "shard": "<string>",
          "seqno": 123,
          "root_hash": "<string>",
          "file_hash": "<string>"
        },
        "dest_proof": "<string>",
        "proof": "<string>",
        "state_proof": "<string>"
      }
    ]
  }
}

SDK Usage

import asyncio

from toncenter.rest import ToncenterRestClient
from toncenter.types import Network

WORKCHAIN = 0
SHARD = "-9223372036854775808"
SEQNO = 49560770


async def main() -> None:
    async with ToncenterRestClient(network=Network.MAINNET) as client:
        result = await client.v2.blocks.get_shard_block_proof(
            WORKCHAIN,
            SHARD,
            SEQNO,
        )
        print(result.model_dump_json(indent=4))


if __name__ == "__main__":
    asyncio.run(main())

Query Parameters

workchain
integer<int32>
required

Workchain ID

shard
string
required

Shard ID

seqno
integer<int32>
required

Seqno of a block

from_seqno
integer<int32>

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

Response

OK

ok
boolean
required
Example:

true

result
ShardBlockProof · object
required