> For the complete documentation index, see [llms.txt](https://docs.teleportdao.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.teleportdao.xyz/teleportdao-bridges/build-on-bitcoin-bridge.md).

# Build on Bitcoin bridge

Any application or user on the target chain can utilize the bridge to verify the inclusion of a particular transaction on Bitcoin. For instance, a user could demonstrate to a smart contract that a specific amount of BTC has been transferred to a particular address on Bitcoin. Additionally, a user might showcase ownership of a unique Ordinal on Bitcoin to the contract. To initiate a query to the bridge and confirm the inclusion of a specific transaction ID on Bitcoin, the user must pay the bridge fee, which is collected in the native token of the target chain.

## Transaction inclusion query

The Bitcoin Relay has a function called `checkTxProof` that can be used to check the inclusion of a transaction in a block:

```solidity
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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.teleportdao.xyz/teleportdao-bridges/build-on-bitcoin-bridge.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
