shards | TON v2

The shards method retrieves information about shards for a specific masterchain block in the TON blockchain. This method provides details about the current state of shards at a given masterchain block height.

👍

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • seqno (integer, required) — The sequence number of the masterchain block. Example: 39064874.

JSON-RPC examples

curl -X POST \
  'https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/jsonRPC' \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "shards",
    "params": {
      "seqno": 39064874
    }
  }'

Response

  • shards (array of objects) — An array containing information about each shard, where each object includes:
    • workchain (integer) — The ID of the workchain to which the shard belongs.
    • shard (string) — The ID of the shard.
    • seqno (integer) — The sequence number of the shard block.
    • root_hash (string) — The root hash of the shard block.
    • file_hash (string) — The file hash of the shard block.

Use case

A possible use case for the shards method in TON is for applications or services that need to monitor or analyze the sharding structure of the TON blockchain. This method can be used to:

  1. Track the evolution of shards over time by querying this endpoint for different masterchain block heights.
  2. Implement shard-aware applications that need to route transactions or queries to specific shards.
  3. Analyze the load distribution across different shards in the TON network.
  4. Build block explorers that can display detailed shard information for each masterchain block.

Try the shards RPC method yourself

Language
Click Try It! to start a request and see the response here!