Nostr Wallet Connect (NWC)
Nostr Wallet Connect (NIP-47) lets an app or an AI agent ask your Lightning wallet to pay or create invoices over encrypted Nostr messages, within a budget you set, without ever holding the wallet's keys.
How it works
The wallet (for example Alby Hub) creates a connection: a URI with the wallet service's public key, relays and a secret. The app signs encrypted requests such as pay_invoice, make_invoice or get_balance and publishes them to the relay; the wallet answers. Each connection can carry its own spending budget and permissions and can be revoked at any time.
For AI agents this is a safe default: the agent gets a capped allowance, not the wallet. Alby's MCP server turns one NWC connection into tools an assistant can call, and services such as PPQ.ai use NWC to top up balances automatically.
See also
- Lightning NetworkLightning is a payment network built on top of Bitcoin. Two parties lock bitcoin in a shared channel and then pay each other instantly and cheaply off-chain; payments can hop across channels to reach anyone.
- L402L402 is a protocol for paying for web resources with Lightning inside an ordinary HTTP request. The server replies 402 "Payment Required" with an invoice and a token; the client pays, retries with the proof and gets access. It needs no account or API key, which suits software agents.
- CashuCashu is an open-source ecash protocol for Bitcoin. A mint holds bitcoin and issues blinded tokens that are private, instant and can be passed around as plain text; the trade-off is that the mint is custodial.
- AI agents and BitcoinAI agents are programs that do work on their own and increasingly need to pay for it: an API call, a page of data, a minute of compute. They cannot open a bank account, but they can hold a Bitcoin key and pay over Lightning in amounts far smaller than a card can handle. That is the case for why the next billion Bitcoin users may not be people. It is a strong argument with real caveats.
References
- NIP-47: Nostr Wallet Connect github.com
- nwc.dev nwc.dev
- Alby MCP server (GitHub) github.com