Skip to content

[Enhancement] - add nostr wallet connect #520

@islandbitcoin

Description

@islandbitcoin

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


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.ts
  • flash-mobile/app/navigation/root-navigator.tsx
  • flash-mobile/app/navigation/stack-param-lists.ts
  • flash-mobile/app/screens/wallet-connect-screen/index.ts
  • flash-mobile/app/i18n/en/wallet-connect.ts
  • flash-mobile/app/i18n/mapping.ts
  • flash-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.tsx
  • flash-mobile/app/screens/settings-screen/settings-screen.tsx
  • flash-mobile/app/screens/wallet-connect-screen/wallet-connect-list.tsx
  • flash-mobile/app/components/wallet-connect/connection-list-item.tsx
  • flash-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.tsx
  • flash-mobile/app/screens/wallet-connect-screen/wallet-connect-qr.tsx
  • flash-mobile/app/screens/wallet-connect-screen/wallet-connect-detail.tsx
  • flash-mobile/app/components/wallet-connect/nwc-uri-display.tsx
  • flash/docs/nwc-user-guide.md
  • flash/docs/nwc-developer-guide.md
  • flash-mobile/test/screens/wallet-connect-create.spec.tsx
  • flash-mobile/test/e2e/wallet-connect-flow.spec.ts

Deployment:

  • Complete feature available to users
  • Users can create, view, manage, and revoke NWC connections

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions