🛠

Build on Bitcoin Bridge

Anyone can call Relay to check the inclusion of a transaction in a certain block header. To do so, the Relay user should provide Relay with Merkle proof. The user also needs to pay the Relay fee.

Generate Merkle Proof

TODO.

Query Relay

The Bitcoin Relay has a function called checkTxProofthat can be used to check the inclusion of a transaction in a block:
function checkTxProof(
bytes32 txid,
uint blockHeight,
bytes calldata intermediateNodes,
uint index
) external payable returns (bool);
Where:
  • txid is the double hash of a Bitcoin transaction.
  • blockHeight is the height of the block that includes the transaction.
  • intermediateNodes is the Merkle inclusion proof of txid in the block.
  • index is the index of txid in the transactions of the block.