{"skill":{"slug":"mdk-agent-wallet","displayName":"agent-wallet","summary":"Self-custodial Bitcoin Lightning wallet for AI agents. Use when the agent needs to send or receive bitcoin payments, check its balance, generate invoices, or...","description":"---\nname: agent-wallet\ndescription: Self-custodial Bitcoin Lightning wallet for AI agents. Use when the agent needs to send or receive bitcoin payments, check its balance, generate invoices, or manage its wallet. Supports bolt11, bolt12, LNURL, and lightning addresses. Zero config — one command to initialize.\nhomepage: https://docs.moneydevkit.com/agent-wallet\nrepository: https://github.com/moneydevkit/mdk-checkout\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"emoji\": \"₿\",\n        \"requires\": { \"bins\": [\"node\", \"npx\"] },\n        \"install\":\n          [\n            {\n              \"id\": \"agent-wallet-npm\",\n              \"kind\": \"npm\",\n              \"package\": \"@moneydevkit/agent-wallet\",\n              \"bins\": [\"agent-wallet\"],\n              \"label\": \"Install @moneydevkit/agent-wallet (npm)\",\n            },\n          ],\n        \"security\":\n          {\n            \"secrets\": [\"~/.mdk-wallet/config.json (BIP39 mnemonic)\"],\n            \"network\": [\"localhost:3456 (daemon HTTP server)\", \"MDK Lightning infrastructure via outbound connections\"],\n            \"persistence\": [\"~/.mdk-wallet/ (config, payment history)\"],\n            \"notes\": \"The wallet stores a BIP39 mnemonic to disk and runs a local daemon. The mnemonic controls real funds on mainnet. Back it up and restrict file permissions on ~/.mdk-wallet/.\"\n          }\n      },\n  }\n---\n\n# agent-wallet\n\nSelf-custodial Lightning wallet for AI agents, built by [MoneyDevKit](https://moneydevkit.com). One command to init. All output is JSON.\n\n**Source:** [@moneydevkit/agent-wallet on npm](https://www.npmjs.com/package/@moneydevkit/agent-wallet) · [GitHub](https://github.com/moneydevkit/mdk-checkout)\n\n## Security & Transparency\n\nThis skill runs `@moneydevkit/agent-wallet` — an npm package published by MoneyDevKit. What it does:\n\n- **Generates and stores a BIP39 mnemonic** at `~/.mdk-wallet/config.json` — this IS your private key. Treat it like a password.\n- **Runs a local daemon** on `localhost:3456` — HTTP server for wallet operations. Binds to localhost only (not externally accessible).\n- **Connects outbound** to MDK's Lightning infrastructure.\n- **Persists payment history** to `~/.mdk-wallet/`.\n\nNo data is sent to external servers beyond standard Lightning protocol operations. You can verify this by inspecting the [source code](https://github.com/moneydevkit/mdk-checkout) or the published npm tarball.\n\n**Recommended:** Pin a version (`npx @moneydevkit/agent-wallet@0.11.0`) in production.\n\n## Quick Start\n\n```bash\n# Initialize wallet (generates mnemonic)\nnpx @moneydevkit/agent-wallet init\n\n# Get balance\nnpx @moneydevkit/agent-wallet balance\n\n# Create invoice\nnpx @moneydevkit/agent-wallet receive 1000\n\n# Pay someone\nnpx @moneydevkit/agent-wallet send user@getalby.com 500\n```\n\n## How It Works\n\nThe CLI automatically starts a daemon on first command. The daemon:\n- Runs a local HTTP server on `localhost:3456`\n- Connects to MDK's Lightning infrastructure\n- Polls for incoming payments every 30 seconds\n- Persists payment history to `~/.mdk-wallet/`\n\nNo webhook endpoint needed — the daemon handles everything locally.\n\n## Setup\n\n### First-time initialization\n\n```bash\nnpx @moneydevkit/agent-wallet init\n```\n\nThis command:\n1. **Generates a BIP39 mnemonic** — 12-word seed phrase that IS your wallet\n2. **Creates config** at `~/.mdk-wallet/config.json`\n3. **Derives a walletId** — deterministic 8-char hex ID from your mnemonic\n4. **Starts the daemon** — local Lightning node on port 3456\n\nThe wallet is ready immediately. No API keys, no signup, no accounts. The agent holds its own keys.\n\n### View existing config\n\n```bash\nnpx @moneydevkit/agent-wallet init --show\n```\n\nReturns `{ \"mnemonic\": \"...\", \"network\": \"mainnet\", \"walletId\": \"...\" }`.\n\n**Note:** `init` will refuse to overwrite an existing wallet. To reinitialize:\n\n```bash\nnpx @moneydevkit/agent-wallet stop\nrm -rf ~/.mdk-wallet  # WARNING: backup mnemonic first!\nnpx @moneydevkit/agent-wallet init\n```\n\n## Commands\n\nAll commands return JSON on stdout. Exit 0 on success, 1 on error.\n\n| Command | Description |\n|---------|-------------|\n| `init` | Generate mnemonic, create config |\n| `init --show` | Show config (mnemonic redacted) |\n| `start` | Start the daemon |\n| `balance` | Get balance in sats |\n| `receive <amount>` | Generate invoice |\n| `receive` | Generate variable-amount invoice |\n| `receive <amount> --description \"...\"` | Invoice with custom description |\n| `receive-bolt12` | Generate a BOLT12 offer (variable amount, reusable) |\n| `send <destination> [amount]` | Pay bolt11, bolt12, lnurl, or lightning address |\n| `payments` | List payment history |\n| `status` | Check if daemon is running |\n| `stop` | Stop the daemon |\n| `restart` | Restart the daemon |\n\n### Balance\n\n```bash\nnpx @moneydevkit/agent-wallet balance\n```\n→ `{ \"balance_sats\": 3825 }`\n\n### Receive (generate invoice)\n\n```bash\n# Fixed amount\nnpx @moneydevkit/agent-wallet receive 1000\n\n# Variable amount (payer chooses)\nnpx @moneydevkit/agent-wallet receive\n\n# With description\nnpx @moneydevkit/agent-wallet receive 1000 --description \"payment for service\"\n```\n→ `{ \"invoice\": \"lnbc...\", \"payment_hash\": \"...\", \"expires_at\": \"...\" }`\n\n### Receive BOLT12 Offer\n\n```bash\nnpx @moneydevkit/agent-wallet receive-bolt12\n```\n→ `{ \"offer\": \"lno1...\" }`\n\nBOLT12 offers are reusable and don't expire — share one offer and receive unlimited payments to it. Unlike BOLT11 invoices, the payer chooses the amount.\n\n### Send\n\n```bash\nnpx @moneydevkit/agent-wallet send <destination> [amount_sats]\n```\n\nDestination auto-detection:\n- **bolt11 invoice**: `lnbc10n1...` (amount encoded, no arg needed)\n- **bolt12 offer**: `lno1...`\n- **lightning address**: `user@example.com`\n- **LNURL**: `lnurl1...`\n\nFor lightning addresses and LNURL, amount is required:\n```bash\nnpx @moneydevkit/agent-wallet send user@getalby.com 500\n```\n\n### Payment History\n\n```bash\nnpx @moneydevkit/agent-wallet payments\n```\n→ `{ \"payments\": [{ \"paymentHash\": \"...\", \"amountSats\": 1000, \"direction\": \"inbound\"|\"outbound\", \"timestamp\": ..., \"destination\": \"...\" }] }`\n\n## Upgrading\n\n```bash\n# Stop the running daemon\nnpx @moneydevkit/agent-wallet stop\n\n# Run with @latest to pull the newest version\nnpx @moneydevkit/agent-wallet@latest start\n```\n\nYour wallet config and payment history in `~/.mdk-wallet/` are preserved across upgrades.\n\n## Usage Notes\n\n- **Denomination**: use ₿ prefix with sats (e.g. ₿1,000 not \"1,000 sats\")\n- **Self-custodial**: the mnemonic IS the wallet. Back it up. Lose it, lose funds.\n- **Daemon**: runs a local Lightning node on `:3456`. Auto-starts, persists to disk.\n- **Agent-to-agent payments**: any agent with this wallet can pay any other agent's invoice or lightning address.\n\n## What's Next?\n\n**Want to accept payments from customers?** Use the [moneydevkit skill](https://clawhub.ai/satbot-mdk/moneydevkit) to add checkouts to any website. Agent-wallet handles agent-to-agent payments; moneydevkit handles customer-to-agent payments. Together they give your agent full payment superpowers.\n","topics":["Wallet"],"tags":{"latest":"0.3.3"},"stats":{"comments":0,"downloads":2416,"installsAllTime":91,"installsCurrent":0,"stars":5,"versions":12},"createdAt":1769899216044,"updatedAt":1779076529779},"latestVersion":{"version":"0.3.3","createdAt":1772064896771,"changelog":"Fix repository URL to moneydevkit/mdk-checkout, revert to 0.2.6 content","license":null},"metadata":{"setup":[],"os":null,"systems":null},"owner":{"handle":"satbot-mdk","userId":"s17ags00wkp3z7cvkhxyskbm7h885ezm","displayName":"Satbot","image":"https://avatars.githubusercontent.com/u/258118994?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779922044611}}