⚡ We welcome businesses to test our enterprise-grade service

/

Nervos Network (CKB)

ckb
Nervos Network (CKB)

Method: POST get_block_by_number

dropdown

方法 RPC get_block_by_number 例如 Nervos Network (CKB)

POST get_block_by_number

返回具有特定块号的规范链中的块。

Parameters

block_number - 64位未签名的整数类型,编码为JSON中的0倍置换式六角字符串

块号

verbosity - 整数

结果格式允许0和2。(可选,默认值为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_block_by_number",
"params": ["0x75a843", null],
"id": "getblock.io"}'


Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "header": {
            "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"
        },
        "proposals": [
            "0x4bc90ac603531614f44a",
            "0xd260e44324493be4ad2c",
            "0xebb7245909026465114e"
        ],
        "transactions": [
            {
                "cell_deps": [
                    {
                        "dep_type": "code",
                        "out_point": {
                            "index": "0x0",
                            "tx_hash": "0xe9116d651c371662b6e29e2102422e23f90656b8619df82c48b782ff4db43a37"
                        }
                    },
                    {
                        "dep_type": "code",
                        "out_point": {
                            "index": "0x0",
                            "tx_hash": "0x5fe11c5033f7494667f23ae8759762f196105eb3240d26a65f805831b4b26a16"
                        }
                    },
                    {
                        "dep_type": "dep_group",
                        "out_point": {
                            "index": "0x0",
                            "tx_hash": "0x71a7ba8fc96349fea0ed3a5c47992e3b4084b031a42264a018e0072e8172e46c"
                        }
                    }
                ],
                "hash": "0x6676e2b8d46b4f89cb686c46b574ef758e255e7e88f2c16b7179f5019f0c94c6",
                "header_deps": [],
                "inputs": [
                    {
                        "previous_output": {
                            "index": "0x0",
                            "tx_hash": "0xf2803589065d052ea2d08e18937b5ec4b6754b3ea5d9bb649029a3408b215067"
                        },
                        "since": "0x0"
                    },
                    {
                        "previous_output": {
                            "index": "0x1",
                            "tx_hash": "0xf684d9e53d5b21e3a5f4a4661198dffb5b4755c69a95478c69c491135e029fd4"
                        },
                        "since": "0x0"
                    },
                    {
                        "previous_output": {
                            "index": "0x2",
                            "tx_hash": "0xda69de2ede713d4cbc59ecee6502dbfae939233afa6a9428cb5d734a2fda4c0d"
                        },
                        "since": "0x0"
                    }
                ],
                "outputs": [
                    {
                        "capacity": "0x9502f9000",
                        "lock": {
                            "args": "0xc45a83ea851eae30307ff47918ca3d2dabca7e52",
                            "code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
                            "hash_type": "type"
                        },
                        "type": {
                            "args": "0x00",
                            "code_hash": "0x3a468d53352eb855521dabed0dc7036929bfe72766ad58f801edfbae564f7b43",
                            "hash_type": "type"
                        }
                    },
                    {
                        "capacity": "0x9502f9000",
                        "lock": {
                            "args": "0xc45a83ea851eae30307ff47918ca3d2dabca7e52",
                            "code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
                            "hash_type": "type"
                        },
                        "type": {
                            "args": "0x00",
                            "code_hash": "0x9e537bf5b8ec044ca3f53355e879f3fd8832217e4a9b41d9994cf0c547241a79",
                            "hash_type": "type"
                        }
                    },
                    {
                        "capacity": "0x252e671710",
                        "lock": {
                            "args": "0xc45a83ea851eae30307ff47918ca3d2dabca7e52",
                            "code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
                            "hash_type": "type"
                        },
                        "type": null
                    }
                ],
                "outputs_data": [
                    "0x080c",
                    "0x08000000000000000f8c",
                    "0x"
                ],
                "version": "0x0",
                "witnesses": [
                    "0x55000000100000005500000055000000410000003d471e4c87cb3684adbea9c46564841981be6cab3d9c1deb1cba464aa46e72e01baa1196d379972a1f3eeb24a52f76d84275b6be6de318aa37054752486dba2001",
                    "0x10000000100000001000000010000000",
                    "0x10000000100000001000000010000000"
                ]
            }
        ],
        "uncles": []
    }
}