# Converting bitoBTC to BTC

This sequence diagram describes the process of bridging bitoBTC on other blockchains, such as Ethereum, to the Bitcoin blockchain by the BitoBridge. This process involves several components, such as the BitoBridge Helper, RPC Nodes, BitoBridge Minter, BitoBridge Hub, ckBTC Ledger, and ckBTC Minter.&#x20;

<figure><img src="/files/FjBOx9exBU7UaDoiqSnS" alt=""><figcaption><p>bitoBTC => BTC sequence diagram</p></figcaption></figure>

The detailed breakdown of each step in the sequence is as follows:

1. **User Interaction**:
   * The user initiates the bridging process by calling the `bridge` function on the BitoBridge Helper, specifying the target blockchain (`target_btc`), the amount of bitoBTC (`amount`), and the recipient's address (`recipient`).
   * The BitoBridge Helper burns the corresponding bitoBTC and returns an "ok" response to the user.
2. **Event Emission**:
   * Following the burning of bitoBTC, the BitoBridge Helper emits an event labeled `Bridge(target_btc, amount, recipient, from)` to indicate that a bridging operation is set to occur. This event is picked up by the RPC Nodes involved in the process.
3. **Listening and Processing Events**:
   * RPC Nodes continuously listen for events related to bridging. They run a loop that checks for new events every three minutes.
   * Upon capturing the bridge event, the RPC Nodes forward this information to the BitoBridge Minter.
4. **BitoBridge Minter to BitoBridge Hub Communication**:
   * After receiving the event details from the RPC Nodes, the BitoBridge Minter communicates with the BitoBridge Hub to facilitate the actual token transfer. The BitoBridge Minter sends a bridge request (`bridge(target_btc, amount)`) to the Hub and receives  `ok`.
5. **Token Retrieval Approval**:
   * The BitoBridge Hub calls ckBTC Ledger's `approve()` to allow the ckBTC minter to withdraw the desired amount from a user-controlled account.&#x20;
6. **Bitcoin Retrieval**:
   * After receiving approval from the ckBTC Ledger, the ckBTC Minter performs the `retrieve_btc_with_approval` operation, specifying the recipient and the amount of Bitcoin to transfer. This operation also results in a `block_index` response, signifying the completion and recording of the transaction on the blockchain.
7. **Completion**:
   * The sequence completes with the retrieval of BTC, effectively bridging the bitoBTC from other blockchains, such as Ethereum, to its native environment as specified by the user in the initial request.


---

# Agent Instructions: 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:

```
GET https://bitobridge-doc.bitomni.io/converting-bitobtc-to-btc.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
