getBlockHeader
TON / https://triport.io/rpc/ton
Minimum tier: Pro
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
| Name | Type | Required | Description |
|---|---|---|---|
| workchain | integer | Yes | |
| shard | Shard | Yes | |
| seqno | Seqno | Yes | |
| root_hash | Hash | No | |
| file_hash | Hash | No |
Returns
| Field | Type |
|---|---|
| result | BlockHeader |
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
- Transport: HTTP (JSON-RPC).
- Chain: TON.
- Clusters: mainnet.
- 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.