Skip to content

Fix CBTC docs to match actual cbtc-lib and canton-lib APIs#22

Open
gyorgybalazsi wants to merge 2 commits intoreview-cbtc-docsfrom
fixed-cbtc-docs
Open

Fix CBTC docs to match actual cbtc-lib and canton-lib APIs#22
gyorgybalazsi wants to merge 2 commits intoreview-cbtc-docsfrom
fixed-cbtc-docs

Conversation

@gyorgybalazsi
Copy link

Summary

  • Verified all 11 documentation files against actual cbtc-lib source code (crate cbtc v0.1.0, tag v0.3.0) and canton-lib (v0.3.0)
  • Fixed 6 docs with inaccurate code examples, module paths, function signatures, version numbers, and environment variable names
  • Docs that were already accurate (Overview, Testnet Guide, Instrument ID Management, Integration Guides, Security Deep Dive) were left unchanged

Key fixes across all docs

Category Before (wrong) After (correct)
Versions v0.0.1 v0.3.0 (both cbtc-lib and canton-lib)
Crate name cbtc-lib / cbtc_lib cbtc
Auth function keycloak::login(url, id, secret, user, pass) keycloak::login::password(PasswordParams { client_id, username, password, url })
Non-existent modules cbtc_lib::deposit, cbtc_lib::balance, cbtc_lib::withdraw, cbtc_lib::utxo cbtc::mint_redeem::mint, cbtc::active_contracts, cbtc::mint_redeem::redeem, cbtc::consolidate
Function names get_deposit_address, get_active_contracts, transfer::send, accept::accept_transfer, redeem::burn_and_withdraw get_bitcoin_address, active_contracts::get, transfer::submit, accept::submit, redeem::create_withdraw_account + redeem::submit_withdraw
Function signatures Positional args Struct params (matching actual API)
Env vars KEYCLOAK_URL, KEYCLOAK_CLIENT_SECRET, LEDGER_PORT KEYCLOAK_HOST + KEYCLOAK_REALM, removed secret from password flow, LEDGER_HOST only
Attestor URLs attestor.bitsafe.dev etc. devnet.dlc.link/attestor-1 etc.
Daml templates CBTC.Issuance:DepositAccount CBTC.DepositAccount:CBTCDepositAccount

Test plan

  • Review code examples in each doc against actual source files in src/
  • Verify env var names match .env.example
  • Confirm Daml template names match constants in src/mint_redeem/constants.rs

🤖 Generated with Claude Code

gyorgybalazsi and others added 2 commits February 27, 2026 00:10
Verified all documentation against the actual source code in cbtc-lib
(crate: cbtc v0.1.0, tag v0.3.0) and canton-lib (v0.3.0). Key fixes:

- Fix version numbers: v0.0.1 → v0.3.0 for both cbtc-lib and canton-lib
- Fix crate name: cbtc_lib/cbtc-lib → cbtc (actual Cargo.toml name)
- Fix keycloak auth: keycloak::login() → keycloak::login::password(PasswordParams)
  with url built from password_url(host, realm)
- Fix non-existent modules: cbtc_lib::deposit, cbtc_lib::balance,
  cbtc_lib::withdraw, cbtc_lib::utxo → actual cbtc::mint_redeem::mint,
  cbtc::active_contracts, cbtc::mint_redeem::redeem, cbtc::consolidate
- Fix function names: get_deposit_address → get_bitcoin_address,
  get_active_contracts → get, transfer::send → transfer::submit,
  accept::accept_transfer → accept::submit,
  redeem::burn_and_withdraw → redeem::create_withdraw_account + submit_withdraw
- Fix all function signatures to use actual struct params
- Fix env vars: KEYCLOAK_URL → KEYCLOAK_HOST + KEYCLOAK_REALM,
  remove KEYCLOAK_CLIENT_SECRET from password flow, LEDGER_HOST:LEDGER_PORT → LEDGER_HOST
- Fix ATTESTOR_URL values: attestor.bitsafe.dev → devnet.dlc.link/attestor-1 etc.
- Add missing modules to module tables: cbtc::accept, cbtc::cancel_offers
- Fix Daml template names: CBTC.Issuance:* → CBTC.DepositAccount:CBTCDepositAccount etc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gyorgybalazsi gyorgybalazsi changed the base branch from main to review-cbtc-docs February 27, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants