-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
Feature: Nostr Wallet Connect (NWC / NIP-47) Support
Overview
Implement Nostr Wallet Connect (NIP-47) as a "wallet service" in the Flash stack, allowing external Nostr-enabled apps to send Lightning payments from a user's Flash wallet using a connection URI, subject to configurable spending limits.
Goals
- Users can create NWC connections from the Flash mobile app
- Each connection has independent spending limits (separate from account limits)
- External apps can use NWC URIs to send Lightning payments without manual confirmation
- Users can view, manage, and revoke connections at any time
- Full NIP-47 compliance with encryption (NIP-44/NIP-04)
References
- NIP-47 Spec: https://nips.nostr.com/47
- NWC Docs: https://docs.nwc.dev
- Flash Backend: https://github.com/lnflash/flash
- Flash Mobile: https://github.com/lnflash/flash-mobile
Implementation Plan - 7 PRs
Each PR is independently deployable and reviewable
PR #5: Mobile - GraphQL Integration & Navigation
~250 lines | Mobile
Deliverables:
- GraphQL mutation/query definitions (TypeScript)
- Navigation route definitions for NWC screens
- Placeholder/stub screen components
- i18n string definitions (English)
- TypeScript types for NWC operations
Files:
flash-mobile/app/graphql/nwc-operations.tsflash-mobile/app/navigation/root-navigator.tsxflash-mobile/app/navigation/stack-param-lists.tsflash-mobile/app/screens/wallet-connect-screen/index.tsflash-mobile/app/i18n/en/wallet-connect.tsflash-mobile/app/i18n/mapping.tsflash-mobile/test/graphql/nwc-operations.spec.ts
Deployment:
- Can merge without breaking app, no visible UI changes yet
PR #6: Mobile - Settings Integration & List Screen
~320 lines | Mobile
Deliverables:
- "Wallet Connect" settings row component
- Connection list screen with real data fetching
- Pull-to-refresh functionality
- Revoke connection with confirmation dialog
- Empty state UI
- Error handling and loading states
- Component tests
Files:
flash-mobile/app/screens/settings-screen/wallet-connect-settings-row.tsxflash-mobile/app/screens/settings-screen/settings-screen.tsxflash-mobile/app/screens/wallet-connect-screen/wallet-connect-list.tsxflash-mobile/app/components/wallet-connect/connection-list-item.tsxflash-mobile/test/screens/wallet-connect-list.spec.tsx
Deployment:
- Users can view NWC settings section (if feature enabled)
- Can view and revoke existing connections
- Can't create new connections yet (next PR)
PR #7: Mobile - Create Connection & QR Display
~420 lines | Mobile + Docs
Deliverables:
- Create connection form screen with validation
- QR code display screen
- Copy to clipboard functionality
- Share sheet integration
- Connection detail screen
- Error handling and loading states
- User documentation (how to use NWC)
- Developer documentation (architecture & API)
- E2E test for full flow
Files:
flash-mobile/app/screens/wallet-connect-screen/wallet-connect-create.tsxflash-mobile/app/screens/wallet-connect-screen/wallet-connect-qr.tsxflash-mobile/app/screens/wallet-connect-screen/wallet-connect-detail.tsxflash-mobile/app/components/wallet-connect/nwc-uri-display.tsxflash/docs/nwc-user-guide.mdflash/docs/nwc-developer-guide.mdflash-mobile/test/screens/wallet-connect-create.spec.tsxflash-mobile/test/e2e/wallet-connect-flow.spec.ts
Deployment:
- Complete feature available to users
- Users can create, view, manage, and revoke NWC connections