Get shards information by given masterchain block seqno
cURL
curl --request GET \ --url https://toncenter.com/api/v2/getShards
200
Example
{ "ok": true, "result": { "@type": "blocks.shards", "shards": [ { "@type": "ton.blockIdExt", "workchain": 123, "shard": "<string>", "seqno": 123, "root_hash": "<string>", "file_hash": "<string>" } ] } }
import asyncio from toncenter.rest import ToncenterRestClient from toncenter.types import Network SEQNO = 57981181 async def main() -> None: async with ToncenterRestClient(network=Network.MAINNET) as client: result = await client.v2.blocks.get_shards( SEQNO, ) print(result.model_dump_json(indent=4)) if __name__ == "__main__": asyncio.run(main())
Seqno of a block
OK
true
Show child attributes