TriportRPC

getBlockHeader

POSThttps://triport.io/rpc/ton

Returns block metadata and proof material without fetching the block body.

TON mainnetton:rpcfree+; ton_read_rpc_heavy: 15 / 20 / 100 / 250 RPS (free / basic / pro / business; default, unmeasured)

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

JSON-RPC params is a by-name object.

Params: object (by-name).

workchainintegerrequired
Signed 32-bit workchain ID.
shardstringrequired
Signed 64-bit shard ID encoded as decimal text.
seqnointegerrequired
Non-negative block sequence number.
root_hashstringoptional
Optional root hash accepted as base64, base64url, or hexadecimal text.
file_hashstringoptional
Optional file hash accepted as base64, base64url, or hexadecimal text.

Response

Response fields

FieldTypeDescription
jsonrpcstringJSON-RPC protocol version.
idnumber or stringCorrelates the response with the request.
resultobjectHeader and proof result.
result.idobjectFull block ID.
result.id.workchainintegerWorkchain ID.
result.id.shardstringSigned shard ID as decimal text.
result.id.seqnointegerBlock sequence number.
result.id.root_hashstringBlock root hash.
result.id.file_hashstringSerialized block file hash.
result.proofstringProof material returned by the liteserver.

The JSON is copied from the accepted live fixture. The fixture sanitizer replaces proof bytes, so the displayed proof value is evidence of the response shape only.

Errors

See TON errors for the shared envelope and retention handling.

CodeMeaningWhen it happens
-32602Invalid paramsRequired coordinates are missing, a coordinate is malformed, or params is positional.
beyond_retentionHeader unavailableThe requested block falls below the selected liteserver's retained window.
-32601Method not foundThe method is outside the published read-only catalog.
401UnauthorizedThe API key is missing or invalid.
429Rate limitedThe ton_read_rpc_heavy budget is exceeded.

Examples

const response = await fetch("https://triport.io/rpc/ton", {
  method: "POST",
  headers: { "x-token": process.env.TRIPORT_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: "header",
    method: "getBlockHeader",
    params: { workchain: -1, shard: "-9223372036854775808", seqno: 90110366 },
  }),
});
const { result } = await response.json();

Notes

  • The response may contain implementation-defined metadata in addition to the schema's required id field.
  • Pruned liteservers had a measured floor of 86 860 000. Two nodes answered from genesis, but ls-17 had a measured gap, so continuity is not universal.
  • TON has no published REST gateway or WebSocket header subscription here.
  • Related methods: getBlock, lookupBlock, and getMasterchainInfo.