gettxoutproof

gettxoutproof ["txid",...] ( "blockhash" )

Returns a hex-encoded proof that the “txid” was included in a block.

NOTE: By default, this function may only work in some cases, specifically when there is an unspent output in the UTXO for this transaction. To ensure it works consistently, you need to maintain a transaction index using the -txindex command line option or manually specify the block containing the transaction (via blockhash).

Argument #1 – txids

Type: json array, required

The txids to filter

[
  "txid",    (string) A transaction hash
  ...
]

Argument #2 – blockhash

Type: string, optional

If provided, it searches for the txid in the block with the given hash.

Result

Name

Type

Description

str

string

A string that is a serialized, hex-encoded data for the proof.