> For the complete documentation index, see [llms.txt](https://docs.threshold.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.threshold.network/app-development/tbtc-sdk/architecture.md).

# Architecture

The following diagram presents the architecture of the tBTC SDK and its place in the ecosystem:

<figure><img src="https://2518393180-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWosjlL4zUGUMlcMfuSAp%2Fuploads%2Fz2G8pFeLD7t4KwhFUYCO%2FtBTC%20SDK%20Architecture%20Diagram.png?alt=media&amp;token=e362dc6b-1f6e-4ff2-8aaa-b0730d508179" alt=""><figcaption></figcaption></figure>

As you can see, the SDK consists of several major parts:

* `TBTC` component
* Feature services
* Shared libraries

### `TBTC` component

The `TBTC` component is the main entry point to the SDK. It provides different ways to initialize the SDK that are supposed to address the common use cases (see [Initialize SDK](/app-development/tbtc-sdk/guides/initialize-sdk.md) guide to learn more). Moreover, the `TBTC` component gives access to the SDK core features through feature services as well as low-level direct access to the underlying tBTC smart contracts and Bitcoin network client.

### Feature services

The SDK feature services provide seamless access to the core features of the tBTC bridge. The most important features of the SDK are:

* **Deposits:** deposit and mint flow for BTC depositors
* **Redemptions:** unmint and redeem flow for TBTC redeemers&#x20;
* **Maintenance:** authorized maintenance actions for maintainers (e.g. optimistic minting guardians)

### Shared libraries

Shared libraries are reusable modules that provide cross-cutting concerns leveraged by multiple feature services and the `TBTC` component. The main shared libraries of the SDK are:

* **Bitcoin**: interfaces and utilities necessary to interact with the Bitcoin chain
* **Contracts**: chain-agnostic interfaces allowing interaction with tBTC smart contracts
* **Electrum**: Electrum-based implementation of the Bitcoin client
* **Ethereum**: implementations of tBTC smart contract interfaces for the Ethereum chain
* **Utils**: general utility functions


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.threshold.network/app-development/tbtc-sdk/architecture.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
