TON
getBlockHeader20 crédits
Returns the header of a block.
Paramètres
| Nom | Type | Description |
|---|---|---|
| workchain | number | Workchain id: -1 for the masterchain, 0 for the basechain. |
| shard | number | Shard id (int64). Pass it as a string, as JSON numbers lose precision beyond 2^53: "-9223372036854775808" is the masterchain shard. |
| seqno | number | Block seqno. |
| root_hash | string | Block root hash (base64), to check the block against. (facultatif) |
| file_hash | string | Block file hash (base64), to check the block against. (facultatif) |
Valeur renvoyée
Type
Object
id, global_id, version, flags, after_merge, after_split, before_split, want_merge, want_split, validator_list_hash_short, catchain_seqno, min_ref_mc_seqno, is_key_block, prev_key_block_seqno, start_lt, end_lt, gen_utime, vert_seqno, prev_blocks.
Exemples de code
curl https://holy-burned-sky-ton-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
-X POST \
-H 'content-type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBlockHeader",
"params": {
"workchain": -1,
"shard": "-9223372036854775808",
"seqno": 40000000
}
}'