Skip to main content

gettxoutproof

POST

Returns a hex-encoded merkle proof that one or more transactions were included in a block.The returned proof can be verified with verifytxoutproof.

📘 When the target transaction no longer has an unspent output in the UTXO set, you must also pass blockhash.

param[0]
txidsarrayrequired
The transaction ids to prove. All transactions must be included in the same block.
param[1]
blockHashstringrequired
The hash of the block to look for the transactions in. The UTXO set is searched when omitted.
Responses
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://bitcoin-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "gettxoutproof",
"params": [
[
"4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"
],
"000000000000000000024bead8df69990852c202db0e0097c1a12ea637d7e96d"
]
}'