This app now supports Bitcoin Lightning payments through NWC (Nostr Wallet Connect) protocol.
- Wallet Connection: Connect any NWC-compatible Lightning wallet
- Instant Payments: Send Lightning payments instantly
- Balance Display: View your wallet balance in real-time
- Multiple Payment Methods:
- Pay Lightning invoices
- Keysend (direct payments without invoice)
- Generate payment requests
-
Get a NWC-compatible wallet:
- Alby
- Mutiny Wallet
- Any wallet supporting NWC protocol
-
Get your NWC connection string from your wallet (looks like
nostr+walletconnect://...) -
Click the Lightning wallet button in the app header and paste your connection string
The integration includes:
- NWC Service (
lib/nwc-service.ts): Core NWC protocol implementation - React Hook (
hooks/useNWC.ts): React integration for wallet management - UI Components:
components/LightningWallet.tsx: Wallet connection and balance displaycomponents/LightningPayment.tsx: Payment interface
import { LightningPayment } from '@/components/LightningPayment';
// Add Lightning payment button to any component
<LightningPayment
recipientName="Podcast Name"
recipientPubkey="lightning_address_or_pubkey"
defaultAmount={1000}
description="Support this podcast"
onSuccess={(preimage) => console.log('Payment successful:', preimage)}
onError={(error) => console.error('Payment failed:', error)}
/>NWC (Nostr Wallet Connect) is defined in NIP-47.
get_info: Get wallet informationget_balance: Check wallet balancepay_invoice: Pay a Lightning invoicemake_invoice: Create a payment requestpay_keysend: Send direct payment without invoicelist_transactions: View transaction history
- All communication is end-to-end encrypted using Nostr's NIP-04
- Connection strings should be kept private
- Wallet connections are stored in browser localStorage
- Use the Lightning payment buttons throughout the app
- Connect a testnet wallet for testing
- Use small amounts for initial testing
This Lightning integration enables Value4Value (V4V) payments for podcasts:
- Listeners can send tips while listening
- Support creators directly based on value received
- Enable premium content with Lightning payments
- Implement time-based splits for podcast segments
- Ensure your wallet is online and NWC is enabled
- Check that the connection string is complete and valid
- Try disconnecting and reconnecting
- Verify sufficient balance in your wallet
- Check that the invoice hasn't expired
- Ensure the recipient's node is online
If you encounter webpack module loading errors, the app now uses client-side only components with proper fallbacks to prevent SSR conflicts with nostr-tools.
- Podcast RSS value tag integration
- Automated value splits
- Streaming payments (pay per minute)
- Lightning address support
- LNURL support
- WebLN fallback