This handles the full Bitcoin integration flow on ICP: generating unique BTC deposit addresses per user, minting ckBTC when Bitcoin arrives, transferring ckBTC at 10 satoshi fees, and burning ckBTC to withdraw back to real Bitcoin addresses. The source is thorough about the gotchas that actually break builds, like forgetting to call update_balance after a deposit, using Account Identifiers instead of ICRC-1 accounts, and the 50,000 satoshi minimum withdrawal. It covers both Motoko and Rust, includes mainnet and testnet canister IDs, and walks through the approve-then-retrieve pattern for withdrawals. If you're building anything that touches Bitcoin on ICP, this is the reference implementation.

skills.sh installs
280
GitHub stars
39
last updated
Aug 21, 2026

Install

$ npx -y skills add dfinity/icskills --skill ckbtc --agent claude-code

Installs into .claude/skills of the current project.

Files

Chain-Key Bitcoin (ckBTC) Integration

What This Is

ckBTC is a 1:1 BTC-backed token native to the Internet Computer. No bridges, no wrapping, no third-party custodians. The ckBTC minter canister holds real BTC and mints/burns ckBTC tokens. Transfers settle in 1-2 seconds with a 10 satoshi fee (versus minutes and thousands of satoshis on Bitcoin L1).

Prerequisites

  • For Motoko: mops package manager, core = "2.0.0" in mops.toml
  • For Rust: ic-cdk, icrc-ledger-types, candid, serde

Canister IDs

Bitcoin Mainnet

CanisterID
ckBTC Ledgermxzaz-hqaaa-aaaar-qaada-cai
ckBTC Mintermqygn-kiaaa-aaaar-qaadq-cai
ckBTC Indexn5wcd-faaaa-aaaar-qaaea-cai
ckBTC Checkeroltsj-fqaaa-aaaar-qal5q-cai

Bitcoin Testnet4

CanisterID
ckBTC Ledgermc6ru-gyaaa-aaaar-qaaaq-cai
ckBTC Minterml52i-qqaaa-aaaar-qaaba-cai
ckBTC Indexmm444-5iaaa-aaaar-qaabq-cai

How It Works

Deposit Flow (BTC -> ckBTC)

Sponsors

Details

Repository
github.com/dfinity/icskills
Category
Finance & Trading
First seen
Jun 3, 2026

More from dfinity/icskills

All 16
1trustwallet avatartrust-wallet-clitrustwallet/tw-agent-skillsTrust Wallet CLI (`twak`) — install, create wallets, check balances, send tokens, swap, view history, set price alerts, DCA automations, limit orders, manage ER277skills.sh installs
2sendaifun avatarmeteorasendaifun/skillsComplete Meteora DeFi SDK suite for building liquidity pools, AMMs, bonding curves, vaults, token launches, and zap operations on Solana. Use when integrating D275skills.sh installs
3thedivergentai avatargodot-economy-systemthedivergentai/gd-agentic-skillsExpert patterns for game economies including currency management (multi-currency, wallet system), shop systems (buy/sell prices, stock limits), dynamic pricing 271skills.sh installs
4octagonai avatarsec-footnotes-analysisoctagonai/skillsAnalyze footnotes and accounting policies from SEC filings using Octagon MCP. Use when researching revenue recognition policies, critical estimates, lease oblig254skills.sh installs
5sendaifun avatarcoingeckosendaifun/skillsComplete CoinGecko Solana API integration for token prices, DEX pool data, OHLCV charts, trades, and market analytics. Use for building trading bots, portfolio 239skills.sh installs
6mjunaidca avatarpolymarket-strategy-advisormjunaidca/polymarket-skillsUse this skill whenever the user wants trading strategy advice, trade recommendations, portfolio guidance, or prediction market analysis that leads to actionabl235skills.sh installs