NIP-47

Nostr Wallet Connect

final payments

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.

Author
benthecarman
Last Updated
31 January 2026
Official Spec
View on GitHub →

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:

  1. Apps request payments through the NWC protocol
  2. Your wallet approves each transaction
  3. Payments happen instantly with minimal friction

This transforms the payment UX from manual invoice handling to one-click transactions.


Why NWC Matters

Before NWC

  1. App generates a Lightning invoice
  2. You copy the invoice
  3. Open your wallet app
  4. Paste the invoice
  5. Confirm payment
  6. Return to the app

With NWC

  1. Click “Zap” in the app
  2. Your wallet requests approval (or auto-approves small amounts)
  3. Done!

NWC removes friction from Lightning payments, making zapping as easy as clicking a like button.


How It Works

Connection Flow

  1. Wallet generates connection string with public key and relay
  2. User shares connection with Nostr app (one-time setup)
  3. App sends payment requests via relay
  4. Wallet receives requests and processes them
  5. 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

MethodDescription
pay_invoicePay a Lightning invoice
make_invoiceCreate a Lightning invoice
lookup_invoiceCheck invoice status
get_balanceGet wallet balance
get_infoGet wallet info
list_transactionsList 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

  1. Open your wallet that supports NWC (Alby, Mutiny, etc.)
  2. Create a connection - generates a connection string
  3. Set spending limits (optional but recommended)
  4. Copy connection string to your Nostr app
  5. Start zapping!
  • 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

WalletPlatformType
AlbyBrowser ExtensionCustodial/Self-custodial
MutinyWeb/MobileSelf-custodial
PrimalMobileCustodial
PhoenixMobileSelf-custodial (via plugin)
NWC ServerSelf-hostedAny Lightning node

Apps with NWC Support

Most major Nostr clients support NWC for zapping:

  • Damus
  • Primal
  • Amethyst
  • Coracle
  • noStrudel
  • Snort

Security Considerations

Protection Measures

  1. Separate connection per app - Revoke individually
  2. Spending limits - Control maximum exposure
  3. Approval modes - Manual vs automatic
  4. 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:

  1. nwc-server - Connect any LND/CLN node
  2. Alby Hub - User-friendly NWC server
  3. LNbits - NWC extension available

  • NIP-57 - Lightning Zaps
  • NIP-46 - Nostr Connect (remote signing)

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:

alby primal amethyst damus coracle nostrudel mutiny
View all clients →

Related NIPs

NIP-57 NIP-46
← Browse All NIPs