link_wallet_xpub
BITCOIN, ZCASH (transparent) AND DOGECOIN ONLY. Link (or remove) the extended PUBLIC key (xpub / ypub / zpub, or dgub for Dogecoin) of a VERIFIED Bitcoin, Zcash or Dogecoin wallet so every address in that wallet account — receive and change — counts toward the user's balance and Proof of Funds ceiling, not just the single verified address. Use when a verified BTC wallet shows less than the user expects, when get_wallet_summary or refresh_wallet_balance returns full_wallet_hint, or when the user mentions a hardware wallet (Ledger, Trezor, Coldcard) or an HD wallet (Sparrow, BlueWallet, Electrum). The wallet can be verified OR not yet verified. Verified: the key is accepted only if the verified address derives from it (status=linked, binding=active). Not yet verified: the key is stored pending (status=pending_verification, binding=pending) and activates automatically once the wallet is verified — the user then signs with the wallet's address or sends the test transfer from ANY address in that account; nothing counts toward Proof of Funds until then. Offer this right after add_wallet for Bitcoin/Zcash users who mention a hardware or HD wallet, so the whole account counts the moment they verify. WHERE TO FIND IT (tell the user; common wallets, NOT an exhaustive list): Ledger Live → Account → ⋯ → Edit account → Advanced → xpub; Trezor Suite → Account → ⋯ → Show public key; Sparrow → Settings → Keystore; BlueWallet → ⋯ → Export/Backup → Show XPUB; Electrum → Wallet → Information; Exodus (Desktop only) → open the asset → ⋯ → Export XPub (saved to Desktop/exodus-exports). Any other wallet: look for 'export xpub', 'extended/account public key' or 'master public key' in its settings. Ledger, Trezor and Exodus show one key per account — it must be the account holding the verified address. Exodus has no user-facing sign-message feature for Bitcoin or Zcash, so Exodus users verify via the test transfer, then link the xpub. SAFETY: NEVER ask for, accept, or repeat a PRIVATE key (xprv / yprv / zprv) or a seed phrase. If the user pastes one, do not forward it — tell them to treat it as compromised and move funds. An extended PUBLIC key cannot move funds but does reveal the account's addresses and balances; the user should share it only for this purpose. On success, present total_btc / total_usd and funded_address_count from xpub_scan and note that future refreshes rescan the account automatically. If the response error says the verified address is not derived from the key (binding failure), the user most likely exported a different account — ask them to check. Pass unlink: true to remove a previously linked key. MULTISIG (Bitcoin only): a multisig wallet (Sparrow/Nunchuk/Unchained/Casa-style k-of-n) has no single xpub — pass its output descriptor or Unchained wallet config instead; RealOpen derives every receive/change address of the multisig account. Multisig addresses cannot sign messages, so the wallet is verified by the test transfer (verify_wallet_transfer) and the descriptor binds to that transfer's input address; it can be attached before verification (pending) exactly like an xpub.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"wallet_id": "<wallet_id>"
},
"name": "link_wallet_xpub"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xpub | No | The extended PUBLIC key exactly as exported by the wallet (starts with xpub, ypub, zpub or dgub; ~111 characters) — OR, for a Bitcoin MULTISIG wallet, its full output descriptor (e.g. wsh(sortedmulti(2,[fp/48h/0h/0h/2h]xpub…/<0;1>/*,…)) — Sparrow: Settings → Export → Output Descriptor; Nunchuk: Export → BSMS) or the Unchained/Caravan wallet configuration JSON. A lone Ypub/Zpub is one cosigner and is NOT enough. Omit when unlink is true. NEVER pass anything containing xprv/yprv/zprv/Yprv/Zprv/dgpv. | |
| unlink | No | Set true to remove a previously linked extended key; the balance then reverts to the verified address (plus transfer-proven addresses). | |
| wallet_id | Yes | Internal wallet UUID of the verified Bitcoin, Zcash or Dogecoin wallet, from get_wallet_summary. Do NOT show this ID to the user. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assets | No | ||
| status | Yes | linked | pending_verification | unlinked | |
| address | No | ||
| binding | No | active (bound to a proven address) | pending (activates when the wallet is verified) | |
| message | No | ||
| total_usd | No | ||
| wallet_id | No | ||
| xpub_scan | No | Scan summary: total_btc, total_usd, funded_address_count, addresses_scanned, truncated, scanned_at | |
| blockchain | No | ||
| bound_path | No | chain/index of the verified address within the account, e.g. 0/3 | |
| script_type | No | Address type the key derives: p2wpkh (bc1q), p2tr (bc1p), p2sh-p2wpkh (3…), p2pkh (1…) |