> 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/beth/concepts-and-reference/sdk-api-and-integration-reference.md).

# SDK, API, and integration reference

### Supported source libraries

* [`bitsafe-token-lib`](https://github.com/DLC-link/bitsafe-token-lib): BETH and CBTC workflows and examples.
* [`canton-lib`](https://github.com/DLC-link/canton-lib): shared Canton API clients, utilities, and the Token Standard operations that `bitsafe-token-lib` re-exports.

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              |
| BETH workflow functions  | Balance, transfer, mint, redeem, account, and credential operations           |
| BitSafe API client       | Retrieve approved account rules and token-standard contracts                  |
| Ethereum bridge call     | [Build the `depositETH` transaction for a deposit](/beth/guides/mint-beth.md) |
| Examples                 | Executable references for supported tasks                                     |

### Recommended integration pattern

1. Load configuration through a typed layer.
2. Create authenticated Canton and BitSafe API 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 Ethereum 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.

### Technical sources

* [`bitsafe-token-lib` examples guide at `v0.2.0`](https://github.com/DLC-link/bitsafe-token-lib/blob/v0.2.0/examples/README.md)
* [Ethereum bridge contract](https://github.com/DLC-link/evm-asset-bridge)

### Related pages

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

### Next step

👉 **Validate the integration:** [BETH developer Quick Start](/beth/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 by asking a question.

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

```
GET https://docs.bitsafe.finance/beth/concepts-and-reference/sdk-api-and-integration-reference.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.
