> 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/get-started/developer-quick-start.md).

# Developer quick start

[CBTC overview](/cbtc-1/overview.md) · [CBTC environments and prerequisites](/cbtc-1/get-started/environments-and-prerequisites.md)

### What you will do

1. Prepare a supported Rust environment.
2. Check out a pinned `cbtc-lib` release.
3. Configure Canton and authentication values without committing secrets.
4. Run the balance-check example.
5. Verify that the response belongs to the intended party.

This read-only outcome is intentionally smaller than minting or transferring CBTC. It verifies the core connection before you create accounts or submit ledger changes.

### Prerequisites

* Access to an approved development or test environment.
* A supported Canton participant and party.
* Approved authentication credentials for that party.
* Git and a compatible Rust toolchain.
* Network access to the Canton participant and identity provider.
* A secure local method for storing environment values.

### 1. Check out the reviewed source

```bash
git clone <https://github.com/DLC-link/cbtc-lib.git>
cd cbtc-lib
git checkout v0.6.4
```

Use an approved release tag. Do not use `main` in production instructions.

### 2. Create local configuration

```bash
cp .env.example .env
```

Fill only the values required for the balance check:

* Canton Ledger API host.
* Target Canton party.
* Approved identity-provider and client values required by the selected authentication flow.
* Any environment selection required by the reviewed example.

Do not paste real credentials into documentation, issue reports, shell history, or source control.

### 3. Build the example

```bash
cargo build --example check_balance
```

A successful build confirms that the selected Rust toolchain can resolve the pinned CBTC and shared Canton dependencies.

### 4. Run the balance check

```bash
cargo run --example check_balance
```

### Expected result

The command should:

* Authenticate successfully.
* Query active CBTC holdings for the configured party.
* Report the party’s balance and holding count, including a valid zero-balance result where applicable.
* Exit without exposing access tokens or passwords.

{% hint style="info" %}
Output fields vary by supported release and environment. Verify the response belongs to the intended party, and never substitute a fabricated balance or contract identifier when testing an integration.
{% endhint %}

### If the check fails

| Symptom                  | Check                                                                     | Next action                                                                 |
| ------------------------ | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| Authentication fails     | Provider URL, realm or audience, client, grant type, secret, token claims | Use the canonical Authentication guide and confirm the party authorization. |
| Connection fails         | Ledger host, DNS, TLS, proxy, and network access                          | Verify the participant endpoint with the environment owner.                 |
| No holdings are returned | Target party, environment, and whether zero balance is valid              | Confirm the configured party before attempting a state-changing operation.  |
| Build or type errors     | Checked-out tag, Rust toolchain, lockfile, and shared library access      | Return to the approved compatibility matrix.                                |
| Response parsing fails   | Canton and library compatibility                                          | Capture sanitized output and escalate with the version set.                 |

### Next steps

After the balance check passes, choose one task:

* [Transfer and receive CBTC](/cbtc-1/guides/transfer-and-receive-cbtc.md).
* Create a deposit account and follow [Mint CBTC](/cbtc-1/guides/mint-cbtc.md).
* Create a withdrawal account and follow [Redeem CBTC](/cbtc-1/guides/redeem-cbtc.md).
* Use [CBTC SDK, API, and integration reference](/cbtc-1/concepts-and-reference/sdk-api-and-integration-reference.md) to integrate balance and transfer behavior into a wallet or application.

### Technical sources

* [`cbtc-lib` `v0.6.4`](https://github.com/DLC-link/cbtc-lib/tree/v0.6.4)
* [Balance-check example](https://github.com/DLC-link/cbtc-lib/blob/v0.6.4/examples/check_balance.rs)
* [Examples guide](https://github.com/DLC-link/cbtc-lib/blob/v0.6.4/examples/README.md)

### Related pages

* [Install and validate CBTC DARs](/cbtc-1/get-started/install-and-validate-dars.md)
* [CBTC authentication](/cbtc-1/get-started/authentication.md)
* [Mint CBTC](/cbtc-1/guides/mint-cbtc.md)
* [Redeem CBTC](/cbtc-1/guides/redeem-cbtc.md)
* [Transfer and receive CBTC](/cbtc-1/guides/transfer-and-receive-cbtc.md)
* [CBTC SDK, API, and integration reference](/cbtc-1/concepts-and-reference/sdk-api-and-integration-reference.md)
* [CBTC errors, retries, and troubleshooting](/cbtc-1/concepts-and-reference/errors-retries-and-troubleshooting.md)

### Next step

👉 **Build your first workflow:** [Transfer and receive CBTC](/cbtc-1/guides/transfer-and-receive-cbtc.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/get-started/developer-quick-start.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.
