get https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/getBlockHeader
The getBlockHeader
method retrieves the header of a specific block in the TON blockchain. This method provides detailed metadata about a block, including its identifiers, state flags, and timing information.
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
workchain
(integer, required) β The ID of the workchain. Example:-1
for the masterchain.shard
(string, required) β The ID of the shard. Example:"-9223372036854775808"
for the masterchain.seqno
(integer, required) β The sequence number of the block. Example:39064874
.
JSON-RPC example
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": "getBlockHeader",
"params": {
"workchain": -1,
"shard": "-9223372036854775808",
"seqno": 39064874
}
}'
Response
id
(object) β The identifier of the block, containing:workchain
(integer) β The workchain ID of the block.shard
(string) β The shard ID of the block.seqno
(integer) β The sequence number of the block.root_hash
(string) β The root hash of the block.file_hash
(string) β The file hash of the block.
global_id
(integer) β The global ID of the block.version
(integer) β The version of the block.after_merge
(boolean) β Whether the block was created after a merge.before_split
(boolean) β Whether the block was created before a split.after_split
(boolean) β Whether the block was created after a split.want_merge
(boolean) β Whether the block wants to merge.want_split
(boolean) β Whether the block wants to split.validator_list_hash_short
(integer) β The short hash of the validator list.catchain_seqno
(integer) β The sequence number in the catchain.min_ref_mc_seqno
(integer) β The minimum referenced masterchain sequence number.is_key_block
(boolean) β Whether the block is a key block.prev_key_block_seqno
(integer) β The sequence number of the previous key block.start_lt
(string) β The start logical time of the block.end_lt
(string) β The end logical time of the block.gen_utime
(integer) β The generation time of the block.vert_seqno
(integer) β The vertical sequence number of the block.
Use case
A possible use case for the getBlockHeader
method in TON is for blockchain explorers, validators, or any application that needs detailed metadata about specific blocks. This method can be used to:
- Display comprehensive block information in a block explorer.
- Analyze the structure and evolution of the blockchain, including shard splits and merges.
- Verify the integrity and sequence of blocks in a custom validation process.
- Track key blocks and their relationships in the blockchain.
Try the getBlockHeader
RPC method yourself
getBlockHeader
RPC method yourself