TriportRPC

getBlockHeader

TON / https://triport.io/rpc/ton

Minimum tier: Pro

TON method guide

Last updated:

getBlockHeader reads metadata and proof material for a specific block. The block is addressed by workchain, shard, and sequence number, with optional root and file hashes when the caller already has a full cryptographic block ID.

Use this method to verify or inspect a block reference without transferring the serialized body returned by getBlock. If only a partial position or time is known, resolve the full ID with lookupBlock first.

Like other historical block reads, this call is limited by the selected liteserver's measured retention window. An old block that is outside that window produces a retention error rather than an empty object.

Parameters

getBlockHeader parameters
NameTypeRequiredDescription
workchainintegerYes
shardShardYes
seqnoSeqnoYes
root_hashHashNo
file_hashHashNo

Returns

getBlockHeader return value
FieldType
resultBlockHeader

Examples

curl https://triport.io/rpc/ton \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"jsonrpc":"2.0","id":1,"method":"getBlockHeader","params":["<workchain>","<shard>","<seqno>","<root_hash>","<file_hash>"]}'
const res = await fetch("https://triport.io/rpc/ton", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
  body: JSON.stringify({
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlockHeader",
  "params": [
    "<workchain>",
    "<shard>",
    "<seqno>",
    "<root_hash>",
    "<file_hash>"
  ]
}),
});
const data = await res.json();
import requests
resp = requests.post(
    "https://triport.io/rpc/ton",
    headers={"Authorization": "Bearer <api-key>"},
    json={"jsonrpc":"2.0","id":1,"method":"getBlockHeader","params":["<workchain>","<shard>","<seqno>","<root_hash>","<file_hash>"]},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Chain: TON.
  3. Clusters: mainnet.
  4. Credit cost: 5 per call.

FAQ

What does getBlockHeader do?
Returns block metadata and proof material without fetching the block body.
How many credits does getBlockHeader cost?
getBlockHeader costs 5 credit(s) per call on Triport by default.
Is getBlockHeader available over WebSocket?
getBlockHeader is an HTTP JSON-RPC method.