Nostr Wallet Connect
NIP-47 (Nostr Wallet Connect or NWC) allows Nostr apps to connect to your Lightning wallet for payments. Instead of copy-pasting invoices, apps can request payments directly while your wallet controls approval.
NIP-47: Nostr Wallet Connect
Status: Final Author: benthecarman Category: Payments
Overview
Nostr Wallet Connect (NWC) enables seamless Lightning payments in Nostr applications by creating a secure connection between apps and your Lightning wallet.
Instead of manually copy-pasting Lightning invoices:
- Apps request payments through the NWC protocol
- Your wallet approves each transaction
- Payments happen instantly with minimal friction
This transforms the payment UX from manual invoice handling to one-click transactions.
Why NWC Matters
Before NWC
- App generates a Lightning invoice
- You copy the invoice
- Open your wallet app
- Paste the invoice
- Confirm payment
- Return to the app
With NWC
- Click “Zap” in the app
- Your wallet requests approval (or auto-approves small amounts)
- Done!
NWC removes friction from Lightning payments, making zapping as easy as clicking a like button.
How It Works
Connection Flow
- Wallet generates connection string with public key and relay
- User shares connection with Nostr app (one-time setup)
- App sends payment requests via relay
- Wallet receives requests and processes them
- Results returned to app via relay
Connection String Format
nostr+walletconnect://wallet_pubkey?relay=wss://relay.example.com&secret=app_secret
- wallet_pubkey: Your wallet’s public key
- relay: Relay for communication
- secret: Shared secret for this connection (optional)
Supported Methods
NWC defines several methods for wallet operations:
Core Methods
| Method | Description |
|---|---|
pay_invoice | Pay a Lightning invoice |
make_invoice | Create a Lightning invoice |
lookup_invoice | Check invoice status |
get_balance | Get wallet balance |
get_info | Get wallet info |
list_transactions | List transaction history |
Payment Request Example
{
"method": "pay_invoice",
"params": {
"invoice": "lnbc100n1..."
}
}
Response Example
{
"result_type": "pay_invoice",
"result": {
"preimage": "abc123..."
}
}
Setting Up NWC
For Users
- Open your wallet that supports NWC (Alby, Mutiny, etc.)
- Create a connection - generates a connection string
- Set spending limits (optional but recommended)
- Copy connection string to your Nostr app
- Start zapping!
Recommended Settings
- Daily limit: Set a reasonable daily spending cap
- Per-transaction limit: Cap individual payments
- Auto-approve threshold: Auto-approve payments under X sats
Wallet Support
Wallets with NWC
| Wallet | Platform | Type |
|---|---|---|
| Alby | Browser Extension | Custodial/Self-custodial |
| Mutiny | Web/Mobile | Self-custodial |
| Primal | Mobile | Custodial |
| Phoenix | Mobile | Self-custodial (via plugin) |
| NWC Server | Self-hosted | Any Lightning node |
Apps with NWC Support
Most major Nostr clients support NWC for zapping:
- Damus
- Primal
- Amethyst
- Coracle
- noStrudel
- Snort
Security Considerations
Protection Measures
- Separate connection per app - Revoke individually
- Spending limits - Control maximum exposure
- Approval modes - Manual vs automatic
- Connection expiry - Time-limited access
Best Practices
- Review permissions before connecting
- Set conservative limits initially
- Monitor transactions regularly
- Revoke unused connections
- Use dedicated wallets for NWC if holding significant funds
Event Structure
NWC uses encrypted Nostr events for communication.
Request Event (App → Wallet)
{
"kind": 23194,
"pubkey": "app_pubkey",
"tags": [
["p", "wallet_pubkey"]
],
"content": "<encrypted request>"
}
Response Event (Wallet → App)
{
"kind": 23195,
"pubkey": "wallet_pubkey",
"tags": [
["p", "app_pubkey"],
["e", "request_event_id"]
],
"content": "<encrypted response>"
}
For Developers
Implementing NWC in Your App
import { nwc } from 'nostr-tools';
// Parse connection string
const connection = nwc.parseConnectionString(connectionString);
// Create NWC client
const client = new nwc.NWCClient(connection);
// Pay an invoice
const result = await client.payInvoice({
invoice: "lnbc100n1..."
});
if (result.preimage) {
console.log("Payment successful!");
}
Running Your Own NWC Server
For Lightning node operators:
- nwc-server - Connect any LND/CLN node
- Alby Hub - User-friendly NWC server
- LNbits - NWC extension available
Related NIPs
Common Questions
Is NWC safe?
Yes, when used properly. Apps never see your private keys - they only get permission to request payments. Spending limits provide additional protection.
Can I revoke access?
Yes, connections can be revoked from your wallet at any time. The app immediately loses payment access.
What if the relay goes down?
You need the relay to be online for payments to work. Use reliable relays. Some wallets support multiple relays for redundancy.
Does NWC work with any Lightning wallet?
Only wallets that implement NWC. Most modern wallets support it or have plans to add support.
Summary
Nostr Wallet Connect transforms Lightning payments in Nostr:
- Seamless UX - One-click payments
- Secure - App never sees your keys
- Configurable - Set your own limits
- Growing support - Most wallets and clients
If you’re using Nostr and Lightning, setting up NWC is highly recommended.
Last updated: January 2026 Official specification: GitHub
Client Support
This NIP is supported by the following clients: