Skip to main content

gettxoutproof

NOTE: By default, this feature is only occasionally functional. This is the case when the transaction's utxo has an unspent output. Maintaining a transaction index is necessary to ensure that it always functions. You can do this by using the -txindex command line option or by manually specifying the block in which the transaction is contained (by blockhash).

Example Request and Result for gettxoutproof method

In this section, we provide an illustrative example of a request made to retrieve details contents using the gettxoutproof method. Additionally, we present the resulting response containing information about the proof that "txid" was part of a block.

Parameters

FieldTypeDescription

txid*

array<string>The txids to filter
blockhashstringIf specified, looks for txid in the block with this hash
info

The example in this section uses a non-existing project id.

Make sure you replace it with your Bitcoin mainnet or Bitcoin Testnet endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Curl Request example

curl --location 'https://bitcoin-mainnet.blastapi.io/<project-id>gettxoutproof' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": "bwarelabs",
"method": "gettxoutproof",
"params": [
[
"ee652f0b40209bd02468de0c6336854f5efdd79fb865560aef2c46f4fa0b4a07",
"cee11bc3bb3d9db8c4813ed2072a14369a15fcfb9e6bc5cb37a0b5bcc6aa59aa"
],
null
]
}'