gettxoutproof
Returns a Merkle proof that one or more transactions are included in a block. This method uses 80 credits from your daily balance.
A proof lets a client confirm that a transaction is in a block using only the block header.
Parameters
txids: (array) [required] - IDs of the transactions to prove. All must be in the same block.blockhash: (string) [optional] - Hash of the block that contains the transactions. Withoutblockhash, the node looks up the block using an unspent output of the transaction or the transaction index.
Returns
result: (string) - Serialized Merkle block proof, as a hex-encoded string.
Request
- curl
curl https://bitcoin-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "gettxoutproof", "params": [["0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098"], "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048"]}'
Response
- JSON
{
"jsonrpc": "2.0",
"id": 1,
"result": "010000006fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000982051fd1e4ba744bbbe680e1fee14677ba1a3c3540bf7b1cdb606e857233e0e61bc6649ffff001d01e362990100000001982051fd1e4ba744bbbe680e1fee14677ba1a3c3540bf7b1cdb606e857233e0e0101"
}