The agent wallet runs a local daemon that leverages moneydevkit’s lightning infrastructure. No node management required.
Quick start
1
Initialize the wallet
~/.mdk-wallet/config.json. Back up the mnemonic — it controls your funds.2
Receive a payment
3
Send a payment
4
Check your balance
How it works
The CLI automatically starts a daemon on first command. The daemon:- Runs a local HTTP server on
localhost:3456, gated by a bearer token - Polls for incoming payments every 30 seconds
- Persists payment history to
~/.mdk-wallet/
Commands
Output format
All commands output JSON to stdout. Exit code0 means success, 1 means error.
Supported destinations
Thesend command auto-detects the destination type:
Amount is optional for bolt11 invoices that already include an amount.
Configuration
Config is stored in~/.mdk-wallet/config.json:
Local API security
The daemon’s local HTTP API is authenticated. Every route requires a bearer token from~/.mdk-wallet/auth.token (mode 0600, minted on first use), and requests
that do not come from local tooling get 401 UNAUTHORIZED. The CLI handles this
for you.
Guard auth.token like the mnemonic: whoever reads it can spend the balance. It
is not a boundary against code running as your own user, which can read the
mnemonic in the same directory. After upgrading, run restart so the new binary
serves the API.
AI agent integration
This wallet is designed for AI agents that need to send and receive Lightning payments. Every command outputs JSON for easy parsing, and the daemon auto-starts on first use.Paying L402 endpoints
The agent wallet pairs naturally with L402 pay-per-call APIs. Simply pay the invoice and return the token and preimage to unlock the API.Upgrading
~/.mdk-wallet/ are preserved across upgrades.

