verifytxoutproof

Bitcoin RPC

Overview

The verifytxoutproof RPC method verifies the given transaction proof (in the form of a Merkle block) and returns an array of transaction hashes contained in the verified Merkle block. This method can be used to confirm that specific transactions are included in a block without having to download the entire block.

Parameters

  • proof: The hex-encoded proof generated by the gettxoutproof RPC method.

Returns

An array of transaction hashes contained in the verified Merkle block.

Request Example

curl --location 'https://api.tatum.io/v3/blockchain/node/bitcoin-mainnet/' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {API_KEY}' \
--data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "verifytxoutproof",
  "params": [
    "00000020fc61cc9f1bda9ef9e5d6bcccc7f210a0e87e7ccbc017d8487031b91d0000000047451bc9b84a546eafbe39baedb3cda967ea57cf1ab650b24d88395f2e4e3d413e4f22e8d9d9ea1c000000000102000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0100f2052a01000000434104e70b81e35e7cf03f6238471f7d9c903d48aea7c1d067e3010b9000000000000"
  ]
}'
// yarn add @tatumio/tatum

import { TatumSDK, Bitcoin, Network } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Bitcoin>({ network: Network.BITCOIN })

const result = await tatum.rpc.verifyTxOutProof('')

await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs