Skip to main content

verifytxoutproof

Command#

pacprotocol-cli 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#

proof *#

(string, required)

The hex-encoded proof generated by gettxoutproof

Examples#

pacprotocol-cli verifytxoutproof "proof"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettxoutproof", "params": ["proof"] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/

Result#

["txid"] #(array, strings) The txid#(s) which the proof commits to, or empty array if the proof can not be validated.

Running following help command

pacprotocol-cli help verifytxoutproof

Will produce following output:

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:
["txid"] (array, strings) The txid(s) which the proof commits to, or empty array if the proof can not be validated.
Examples:
> pacprotocol-cli verifytxoutproof "proof"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettxoutproof", "params": ["proof"] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/