Closed FrancisPouliot closed 2 years ago
Is there more to this issue than adding the endpoint and calling the watcher node with https://bitcoincore.org/en/doc/0.16.0/rpc/blockchain/gettxoutproof/ ?
Indeed, I think it's a pretty straightforward feature that will simply delegate the request to Bitcoin Core. I guess for Cyphernode v0 API, it's ok to just respond as is Bitcoin Core's response.
This is useful for claiming pegins with elements
gettxoutproof ["txid",...] ( "blockhash" )
Returns a hex-encoded proof that "txid" was included in a block.
NOTE: By default this function only works sometimes. This is when there is an unspent output in the utxo for this transaction. To make it always work, you need to maintain a transaction index, using the -txindex command line option or specify the block in which the transaction is included manually (by blockhash).
Arguments:
Result: "data" (string) A string that is a serialized, hex-encoded data for the proof.