js-tendermint
js-tendermint copied to clipboard
Verify tx inclusion proofs
Tendermint RPC has a /tx?hash=_&prove=_ endpoint which returns a proof that the transaction with the given hash made it into a block.
It would be nice if the LightNode class had a method to retrieve and verify these proofs.
Perhaps something like:
let tendermint = require('tendermint')
let lightClient = tendermint(nodeAddress, initialClientState)
let txIncluded = await lightClient.verifyTxInclusion(txHash) // `true` or `false`
Good idea, I think this concept makes sense. Is the use case for clients broadcasting transactions and checking to ensure it was included in a block?
Probably makes sense to include the relevant information about the transaction (height, result, etc.) since we're fetching it anyway.