> For the complete documentation index, see [llms.txt](https://docs.bitsafe.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bitsafe.finance/cbtc-1/concepts-and-reference/sdk-api-and-integration-reference.md).

# SDK, API, and integration reference

### Supported source libraries

* [`cbtc-lib`](https://github.com/DLC-link/cbtc-lib): CBTC workflows and examples.
* [`canton-lib`](https://github.com/DLC-link/canton-lib): shared Canton API clients and utilities.

Pin approved release tags and keep their compatibility row together.

### Integration layers

| Layer                    | Use                                                                 |
| ------------------------ | ------------------------------------------------------------------- |
| Generated Canton clients | Authenticate, query contracts, submit commands, and read updates    |
| CBTC workflow functions  | Balance, transfer, mint, redeem, account, and credential operations |
| BitSafe API client       | Retrieve approved account and Bitcoin workflow data                 |
| Examples                 | Executable references for supported tasks                           |

### Recommended integration pattern

1. Load configuration through a typed layer.
2. Create authenticated Canton and BitSafe clients.
3. Verify the party with a read-only query.
4. Query current contracts and runtime rules.
5. Validate the business request.
6. Submit one command with a unique reference where supported.
7. Read the authoritative result.
8. Reconcile Canton, application, and Bitcoin identifiers.

### API reference policy

Generated type and method documentation should remain in the repository or generated reference site. Public task guides should link to exact release documentation instead of copying full schemas.

### Examples to preserve

Balance checks, sending, incoming and outgoing offers, accepting or cancelling offers, credentials, minting, redemption, account inspection, batch transfers, and UTXO management.

### Related pages

* [CBTC developer Quick Start](/cbtc-1/get-started/developer-quick-start.md)
* [CBTC authentication](/cbtc-1/get-started/authentication.md)
* [Transfer and receive CBTC](/cbtc-1/guides/transfer-and-receive-cbtc.md)
* [Mint CBTC](/cbtc-1/guides/mint-cbtc.md)
* [Redeem CBTC](/cbtc-1/guides/redeem-cbtc.md)
* [CBTC errors, retries, and troubleshooting](/cbtc-1/concepts-and-reference/errors-retries-and-troubleshooting.md)
* [CBTC compatibility and release notes](/cbtc-1/concepts-and-reference/compatibility-and-release-notes.md)

### Next step

👉 **Validate the integration:** [CBTC developer Quick Start](/cbtc-1/get-started/developer-quick-start.md).


---

# 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.bitsafe.finance/cbtc-1/concepts-and-reference/sdk-api-and-integration-reference.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.
