> For the complete documentation index, see [llms.txt](https://tgbtc.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tgbtc.gitbook.io/docs/whitepaper/key-concepts/peg-in-btc-deposit/transaction-confirmation-processing-and-tgbtc-minting.md).

# Transaction Confirmation, Processing and tgBTC minting

Once the block containing the user’s transaction attains the status of confirmed, the next stage of the Peg-in process begins. The user, or any other network participant, can submit the completed transaction to the TON Teleport BTC system, accompanied by cryptographic proof of the transaction’s inclusion in the confirmed block. This proof is most commonly provided through a Merkle proof. This step ensures that the transaction was indeed part of the Bitcoin blockchain and confirmed by the network.

Smart contracts within TON Teleport BTC then verify the submitted data. They confirm that the transaction is contained within the specified block and extract the necessary information from the transaction, including the amount of BTC transferred and the recipient’s address in the TON blockchain, which was encoded in the BTC deposit address. Upon confirmation of these details, the system mints an equivalent amount of tgBTC into the recipient’s account in TON.

The entire logic for processing Bitcoin transactions is implemented through smart contracts in TON. For the TON blockchain, Bitcoin transactions are essentially just a set of bits. However, specialized smart contracts in TON Teleport BTC are capable of interpreting these data; they ”read” Bitcoin transactions, understand their content, extract necessary information, and use it to execute operations within the TON blockchain.

These smart contracts function similarly to nodes in the Bitcoin network or standard Bitcoin wallets, processing transactions and maintaining conformity between the two distinct blockchains. This functionality allows TON Teleport BTC to automatically and securely manage cryptocurrency assets, transferring them from one network to another. This system is unique and valuable for users who wish to utilize their BTC across a broader spectrum of applications and services within the TON ecosystem.


---

# 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://tgbtc.gitbook.io/docs/whitepaper/key-concepts/peg-in-btc-deposit/transaction-confirmation-processing-and-tgbtc-minting.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.
