npx skills add ...
npx skills add aibtcdev/skills --skill wallet
Manage encrypted BIP39 wallets stored at ~/.aibtc/. Create, import, unlock, lock, list, switch, delete, export, rotate passwords, set auto-lock timeouts, and check status or info for Stacks and Bitcoin addresses.
npx skills add aibtcdev/skills --skill wallet
Manages encrypted BIP39 wallets stored locally at ~/.aibtc/. Provides full lifecycle operations for Stacks L2 and Bitcoin L1 (native SegWit + Taproot) addresses. Wallets are AES-GCM encrypted with a password and never stored in plaintext.
Create a new wallet with a generated 24-word BIP39 mnemonic.
Options:
--name (required) — Label for the wallet (e.g. "main", "trading")--password (required, min 8 chars) — Encryption password (sensitive)--network (optional) — mainnet or testnet (default: testnet)Output:
Import an existing wallet from a BIP39 mnemonic phrase.
Options:
--name (required) — Label for the wallet--mnemonic (required) — 24-word BIP39 mnemonic (sensitive)--password (required, min 8 chars) — Encryption password (sensitive)--network (optional) — mainnet or testnet (default: testnet)Output:
Unlock a wallet to enable transactions. Session persists in-process memory until locked or timeout.
Options:
--password (required) — Wallet password (sensitive)--wallet-id (optional) — Wallet ID to unlock (uses active wallet if omitted)Output:
Lock the wallet, clearing sensitive key material from memory.
Output:
List all available wallets with metadata (no sensitive data).
Output:
Switch the active wallet (requires unlock after switching).
Options:
--wallet-id (required) — Wallet ID to activateOutput:
Permanently delete a wallet (requires password + confirmation).
Options:
--wallet-id (required) — Wallet ID to delete--password (required) — Wallet password for verification (sensitive)--confirm (required) — Must be exactly DELETEOutput:
Export the mnemonic phrase for a wallet (requires password + safety acknowledgment).
Options:
--password (required) — Wallet password (sensitive)--confirm (required) — Must be exactly I_UNDERSTAND_THE_RISKS--wallet-id (optional) — Wallet ID (uses active wallet if omitted)Output:
Change the wallet encryption password (atomic with backup/verify/rollback).
Options:
--old-password (required) — Current password (sensitive)--new-password (required, min 8 chars) — New password (sensitive)--wallet-id (optional) — Wallet ID (uses active wallet if omitted)Output:
Set the auto-lock timeout in minutes (0 = never auto-lock).
Options:
--minutes (required) — Minutes until auto-lock (0 = disabled)Output:
Get wallet readiness status: whether a wallet exists, is active, and is unlocked.
Output:
Get the active wallet's address and session info.
Output:
Get the STX balance for a wallet address.
Options:
--address (optional) — Stacks address to check (uses active wallet if omitted)Output:
lock after sensitive operations to clear keys from memoryexport and delete require explicit confirmation strings to prevent accidentsrotate-password is atomic: original keystore is backed up and restored on failurebun run wallet/wallet.ts import --name <name> --mnemonic "<24 words>" --password <password> [--network mainnet|testnet]{
"success": true,
"walletId": "...",
"Bitcoin (L1)": { "Native SegWit": "bc1q...", "Taproot": "bc1p..." },
"Stacks (L2)": { "Address": "SP..." },
"network": "testnet"
}{
"success": true,
"walletId": "...",
"Bitcoin (L1)": { "Native SegWit": "bc1q...", "Taproot": "bc1p..." },
"Stacks (L2)": { "Address": "SP..." },
"network": "testnet"
}bun run wallet/wallet.ts unlock --password <password> [--wallet-id <id>]bun run wallet/wallet.ts lock{ "success": true, "message": "Wallet is now locked." }bun run wallet/wallet.ts list{
"wallets": [
{
"id": "...",
"name": "main",
"btcAddress": "bc1q...",
"address": "SP...",
"network": "testnet",
"createdAt": "2024-01-01T00:00:00.000Z",
"isActive": true,
"isUnlocked": false
}
],
"totalCount": 1
}bun run wallet/wallet.ts switch --wallet-id <id>{
"success": true,
"activeWalletId": "...",
"address": "SP...",
"network": "testnet"
}bun run wallet/wallet.ts delete --wallet-id <id> --password <password> --confirm DELETE{
"success": true,
"deletedWalletId": "...",
"message": "Wallet deleted permanently."
}bun run wallet/wallet.ts export --password <password> --confirm I_UNDERSTAND_THE_RISKS [--wallet-id <id>]{
"walletId": "...",
"mnemonic": "word1 word2 ... word24",
"warning": "SECURITY WARNING: ..."
}bun run wallet/wallet.ts rotate-password --old-password <pass> --new-password <pass> [--wallet-id <id>]{
"success": true,
"walletId": "...",
"message": "Password rotated. Use unlock with the new password."
}bun run wallet/wallet.ts set-timeout --minutes <n>{
"success": true,
"autoLockMinutes": 15,
"message": "Auto-lock set to 15 minutes."
}bun run wallet/wallet.ts status{
"message": "Wallet is locked. Unlock to perform transactions.",
"readyForTransactions": false,
"isUnlocked": false,
"currentNetwork": "testnet",
"wallet": { "id": "...", "address": "SP...", "btcAddress": "bc1q..." }
}bun run wallet/wallet.ts info{
"status": "ready",
"network": "testnet",
"Stacks (L2)": { "Address": "SP..." },
"Bitcoin (L1)": { "Native SegWit": "bc1q...", "Taproot": "bc1p..." }
}bun run wallet/wallet.ts stx-balance [--address <addr>]{
"address": "SP...",
"network": "testnet",
"balance": { "stx": "100 STX", "microStx": "100000000" },
"locked": { "stx": "0 STX", "microStx": "0" }
}