Lightning wallet access for your Hermes Agent — pay invoices, check balance, create invoices, and read transaction history over Nostr Wallet Connect (NIP-47).
Same NIP-47 wire protocol as the human-facing Alby / Mutiny / LNbits
clients and the OpenClaw pip install nostrwalletconnect SDK.
v0.1.0 — five async tools (get_info, balance, pay_invoice,
make_invoice, list_transactions). Vendors nostrwalletconnect +
nostrkey so the plugin is self-contained.
A sovereign agent needs to handle money the same way it handles identity — directly, without a platform middleman. NIP-47 lets your wallet (running anywhere) delegate signing authority to a connection URI; your agent uses that URI to send payment requests over Nostr. The wallet stays in your control. The agent never sees private keys beyond the URI itself.
What your Hermes can do once it's connected:
- Pay BOLT11 invoices — an agent can settle for services it consumes (API calls, content, compute) without you in the loop.
- Issue invoices — an agent can charge for services it provides (analysis, content generation, automation).
- Track its own books — list transactions to reconcile what was spent and earned across a session.
- Confirm wallet capabilities —
get_inforeturns the supported NIP-47 methods so the agent can self-check before attempting.
hermes plugins install HumanjavaEnterprises/nwc.app.HA-python.srcOr drop the repo directly into $HERMES_HOME/plugins/:
git clone https://github.com/HumanjavaEnterprises/nwc.app.HA-python.src \
$HERMES_HOME/plugins/nwcThis plugin requires the NWC_URI env var pointing at a connection
string from your wallet service:
export NWC_URI="nostr+walletconnect://<wallet-pubkey>?relay=wss://...&secret=..."Get a URI from any NIP-47 wallet:
- Alby — Settings → Wallet Connections
- Mutiny — Settings → Connections
- LNbits — Extensions → NWC Service Provider
- Self-hosted: any NIP-47-capable wallet daemon
Restart Hermes after setting the env var, then /reload-skills or
restart your chat session.
> What's my Lightning balance?
> Pay this invoice: lnbc500u1p...
The agent calls nwc_balance or nwc_pay_invoice automatically.
| Tool | Purpose |
|---|---|
nwc_get_info |
Wallet capabilities (alias, supported methods, network) |
nwc_balance |
Current balance in msats and sats |
nwc_pay_invoice |
Pay a BOLT11 invoice; returns preimage |
nwc_make_invoice |
Create a BOLT11 invoice for receiving |
nwc_list_transactions |
Recent transaction history |
- The URI is sensitive. It carries a delegated signing key for your wallet. Treat it like an API token — never paste it into the chat. This plugin reads it only from the env var, never from a tool argument, so it never enters the LLM context.
pay_invoicespends real funds. When the model decides to call it, the operator is in the loop via Hermes's command-approval flow (unless--yolois set). For agentic flows where the model pays autonomously, set spending limits at the wallet level (NWC supports per-connection budget caps).- Use a dedicated wallet for agents — don't connect your full custodial balance. Spin up a hot wallet, fund it with a daily budget, rotate the URI when needed.
OpenClaw build of the same library:
nwc.app.OC-python.src
ships as pip install nostrwalletconnect. Both repos vendor the same
core SDK — bugfixes need to land in both.
MIT — see LICENSE.