Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Security

- `cbtc::mint::get_bitcoin_address` no longer trusts the BitSafe API for the
deposit address. It derives the address locally from the attestor group key
that the crate pins for each network, and fails when the API returns a
different one. `get_deposit_account_status` gets the same check. A
compromised API, or a hijacked API domain, can no longer hand out an
address that the attestors do not control.

### Changed

- A new attestor key (a new DKG) needs a new release of this crate. Until
then, `get_bitcoin_address` fails with a mismatch error instead of
returning an address.
- The crate depends on `bitcoin` 0.32 for the address derivation.

## [0.3.0] - 2026-10-21

### Fixed
Expand Down
70 changes: 68 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ uninlined_format_args = "allow"
[dependencies]
alloy-primitives = { version = "1.7.3" }
alloy-sol-types = { version = "1.7.3" }
bitcoin = { version = "0.32.102" }
common = { git = "https://github.com/DLC-link/canton-lib", tag = "v0.12.0" }
ledger = { git = "https://github.com/DLC-link/canton-lib", tag = "v0.12.0" }
registry = { git = "https://github.com/DLC-link/canton-lib", tag = "v0.12.0" }
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ async fn main() -> Result<(), String> {
credential_cids: credential_cids.clone(),
})
.await?;
// The lib checks the API's address against a local derivation from the
// attestor key it pins, and fails on a mismatch.
let btc_address = mint::get_bitcoin_address(network, &account).await?;
println!("Send BTC to {btc_address}");

Expand Down
Loading
Loading