Bitcoin
Bitcoin
Bitcoin
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
gettxoutproof builds a hex-encoded Merkle proof showing that one or more given txids were included in a specific Bitcoin block. The proof is the small set of hashes a verifier needs to reconstruct the block's Merkle root from the listed transactions, which is how a light client confirms a BTC payment was actually mined without downloading the whole block. Pass the array of txids — and, on a node without -txindex, the block hash to look in — to https://bitcoin.therpc.io/YOUR_API_KEY. Hand the result to verifytxoutproof to check it.
verifytxoutproof so the recipient can confirm inclusion in a trust-minimised way.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | txids | array | Sí | Transaction ids to prove inclusion for. |
| 2 | blockhash | string | No | Block to look in (lets the node find txs without -txindex). |
| Tipo | Descripción |
|---|---|
| string | Hex-encoded Merkle proof; verify it with verifytxoutproof. |
| Código | Mensaje | Causa |
|---|---|---|
-5 | No such mempool or blockchain transaction | The txid is unknown to this node. For arbitrary historical txs the node must run -txindex, or you must pass the blockhash. |
-txindex you must pass the block hash, otherwise the node cannot locate the transaction and returns error -5.