Language

Choose a language

/build/rpc / btc

verifytxoutproof

verifytxoutproof "proof" Verifies that a proof points to a transaction in a block, returning the transaction it commits to and throwing an RPC error if the block is not in our best chain Arguments: 1. proof (string, required) The hex-encoded proof generated by gettxoutproof Result: [ (json array) "hex", (string) The txid(s) which the proof commits to, or empty array if the proof cannot be validated. ... ]

Signature

verifytxoutproof(proof: string) → any

Code samples

curl --user "$RPC_USER:$RPC_PASS" \
  --data-binary '{"jsonrpc":"1.0","id":"docs","method":"verifytxoutproof","params":["\"<proof>\""]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
proofstringyesThe hex-encoded proof generated by gettxoutproof

Result

Type:  any

[ (json array) "hex", (string) The txid(s) which the proof commits to, or empty array if the proof cannot be validated. ... ]

Source: services/core-node/bcore/src/rpc/txoutproof.cpp:128

C++ symbol: verifytxoutproof