Get merkle proof of shard block
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>"
}
]
}
}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())
Workchain ID
Shard ID
Seqno of a block
Seqno of masterchain block starting from which proof is required. If not specified latest masterchain block is used
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>"
}
]
}
}