How could I verify my transaction from the root of Merkle Tree.

  • You can't with just the root of the tree. You need both the root and the path to have a proof. May 4, 2020 at 10:28
  • @vrnvav97 the tx that you want verify is on mainnet or testnet? If yes could you post the tx id so we can show a complete working example?
    – aqquadro
    May 4, 2020 at 10:38
  • @darosior ok so i need a path also to verify my tx.
    – vrnvav97
    May 4, 2020 at 12:13
  • @aqquadro its nowhere, i was clearing my doubts. But can u show any other working example?
    – vrnvav97
    May 4, 2020 at 12:14

1 Answer 1


First of all, you need to use gettxoutproof

$ bitcoin-cli help gettxoutproof
gettxoutproof ["txid",...] ( "blockhash" )

Returns a hex-encoded proof that "txid" was included in a block.

you receive data including your transaction id with another txids (privacy purpose). then you need create empty merkle tree and place txids inside leafs, check this link to know how you can do it. You need to work even with little and big endian

After that you have to concat leafs and do SHA256 twice until the merkle root.

Not the answer you're looking for? Browse other questions tagged or ask your own question.