⚡ Test Our Private Nodes of 40+ Blockchains just for $50!

coins coins coins coins
/

Nervos Network (CKB)

ckb
Nervos Network (CKB)

Method: POST get_header_by_number

dropdown

# get_header_by_number example for Nervos Network (CKB)

POST get_header_by_number

Returns the block header in the canonical chain with the specific block number.

Parameters

block_number - 64-bit unsigned integer type encoded as the 0x-prefixed hex string in JSON

the block number

verbosity - integer

result format which allows 0 and 2. (Optional, the default is 2.)

Request

curl --location --request POST 'https://ckb.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "get_header_by_number",
"params": ["0x75a843", null],
"id": "getblock.io"}'


Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "compact_target": "0x19129384",
        "dao": "0x3583b4d01a9b404300d0696f55d326006633b9b39fbbfa0300c9c2ce0e5f2107",
        "epoch": "0x4c300ec0016ee",
        "extra_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "hash": "0xe8038094a1e2c82c45401e2089ec28f0f99b0b71eb385307e4f3c3a54c643294",
        "nonce": "0x23746dab00000000b59000007f44020c",
        "number": "0x75a843",
        "parent_hash": "0xb1d7c5ae609ed8e168fdf6188ce697ced363b5cb7b7ac58745a7fadfa3eeeacb",
        "proposals_hash": "0x12efb0ca6d3aa1781085382057164e2c1836768a22b96e8807b9c935b8d6a737",
        "timestamp": "0x18234744d6e",
        "transactions_root": "0xfbfb8dd8da57bbbc0c4de3955a7edb4211c5615bc37b6adbf006bd5ed9028d7a",
        "version": "0x0"
    }
}