Skip to main content

gettxoutproof

Overview

The 'gettxoutproof' RPC method facilitates the verification of transaction inclusion within a specific block, returning a serialized proof of transaction inclusion.

Request

wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY' \
--body-data '{"jsonrpc":"2.0","id":1,"method":"gettxoutproof","params": [ ]}' \
'https://bitcoin-mainnet.node.coinapi.io'

Request Parameters

'txids'

  • Type: JSON array
  • Requirement: Mandatory
  • Description: A JSON array that includes a collection of transaction identifiers (hashes).

'blockhash'

  • Type: String
  • Requirement: Optional
  • Description: When specified, the method searches for the transaction ID within the block associated with this particular hash.

Response

{
"id": 1,
"jsonrpc": "2.0",
"result": "01000000d5c7b5ec4cb293bdcfc9a3e51b8696870ab75a2ef9d2e7e1205732a06b19f594efadbb4901"
}
  • Type: String
  • Description: A string that embodies serialized, hex-encoded data representing the proof of transaction inclusion.