pair_ledger_btc
Enumerate Bitcoin addresses (legacy, segwit, native segwit, taproot) from a connected Ledger device via USB, scanning receive and change chains with BIP44 gap-limit logic.
Instructions
Pair the host's directly-connected Ledger device for Bitcoin signing. REQUIREMENTS: Ledger plugged in over USB, device unlocked, the 'Bitcoin' app open on-screen. Ledger Live's WalletConnect relay does NOT expose bip122 accounts to dApps, so Bitcoin signing goes over USB HID via @ledgerhq/hw-app-btc (same USB path as Solana / TRON). ONE CALL ENUMERATES ALL FOUR ADDRESS TYPES for the requested accountIndex (default 0): legacy P2PKH (44'/0'/<n>'/0/0 → 1...), P2SH-wrapped segwit (49'/0'/<n>'/0/0 → 3...), native segwit P2WPKH (84'/0'/<n>'/0/0 → bc1q...), and taproot P2TR (86'/0'/<n>'/0/0 → bc1p...). All four are cached so get_ledger_status can report them under the bitcoin: [...] section. Call again with a different accountIndex to expose additional accounts. Read-only on the device — the Ledger BTC app does not prompt during getWalletPublicKey by default. Phase 1 is mainnet-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accountIndex | No | Ledger Bitcoin account slot. One call enumerates ALL FOUR address types for the given index (legacy at `44'/0'/<n>'/...`, p2sh-segwit at `49'/0'/<n>'/...`, native segwit at `84'/0'/<n>'/...`, taproot at `86'/0'/<n>'/...`) AND walks both the receive (`/0/i`) and change (`/1/i`) chains using BIP44 gap-limit scanning so a previously-used wallet's later-index funds aren't missed. 0 = first Bitcoin account, 1 = second, etc. Omit for the default (index 0). Call again with a different index to expose more accounts; calling with the same index refreshes the cache. | |
| gapLimit | No | BIP44 gap limit — stop walking each (type, chain) after this many consecutive addresses with zero on-chain history. Default 20 (matches Electrum / Sparrow / Trezor Suite / Ledger Live). Lower values speed the scan up but risk missing funds across larger gaps; raise it for wallets that may have skipped indices. Capped at 100. |