getShardBlockProof | TON v2

The getShardBlockProof method retrieves the proof of a specific shard block in the TON blockchain. This method is crucial for verifying the authenticity and inclusion of shard blocks within the overall TON blockchain structure.

πŸ‘

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.

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": "getShardBlockProof",
    "params": {
      "workchain": -1,
      "shard": "-9223372036854775808",
      "seqno": 39064874
    }
  }'

Parameters

  • workchain (integer, required) β€” The ID of the workchain. Example: -1 for the masterchain.
  • shard (integer, required) β€” The ID of the shard. Example: -9223372036854775808 for the masterchain.
  • seqno (integer, required) β€” The sequence number of the block. Example: 39064874.

Response

  • masterchain_block_root_hash (string) β€” The root hash of the masterchain block that includes this shard block.
  • masterchain_block_seq_no (integer) β€” The sequence number of the masterchain block.
  • links (array of objects) β€” An array of link objects, each containing:
    • from (string) β€” The source block hash.
    • to (string) β€” The destination block hash.
    • dest_proof (string) β€” The proof of the destination block.
    • proof (string) β€” The proof of the link.
  • block_header (string) β€” The header of the shard block.

Use case

A possible use case for the getShardBlockProof method in TON is for applications or services that need to verify the authenticity and inclusion of shard blocks within the TON blockchain. This method can be used to:

  1. Implement light clients that can verify shard blocks without downloading the entire blockchain.
  2. Provide cryptographic proof of a shard block's inclusion in the blockchain.
  3. Verify cross-shard transactions by proving the existence of blocks in different shards.
  4. Build block explorers that can show detailed proof information for each block.

Try the getShardBlockProof RPC method yourself

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