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

coins coins coins coins
/

Nervos Network (CKB)

ckb
Nervos Network (CKB)

Method: POST get_transaction_proof

dropdown

# get_transaction_proof example for Nervos Network (CKB)

POST get_transaction_proof

Returns a Merkle proof that transactions are included in a block.

Parameters

tx_hashes - array of strings

Transaction hashes, all transactions must be in the same block

block_hash - string

An optional parameter, if specified, looks for transactions in the block with this hash

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_transaction_proof",
"params": [["0xe8a106be755bdb9fa0b452297edb5785f6d901f8a3b5f74044ab2f5d8cfb0ed1", "0x66efb1d569ca38f5f505edaef3032d8c1727d2481638585806e6de497bc868d7", "0x6676e2b8d46b4f89cb686c46b574ef758e255e7e88f2c16b7179f5019f0c94c6"], null],
"id": "getblock.io"}'


Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "block_hash": "0xe8038094a1e2c82c45401e2089ec28f0f99b0b71eb385307e4f3c3a54c643294",
        "proof": {
            "indices": [
                "0x5",
                "0x4",
                "0x3"
            ],
            "lemmas": [
                "0xa01e11c5dd8c0b89eaa3f4f6340aa212dc24b7f5530dcfbe0b1c34400ef91947"
            ]
        },
        "witnesses_root": "0xa34817edae01ed9c44d25822a0cc998de2348558f79dc2c78ec113e775c98302"
    }
}