Skip to content

feat: support lud16 parameter on NWC connection strings #2

@DoktorShift

Description

@DoktorShift

Goal

NWC connections can carry a Lightning Address via &lud16=user%40domain.com on the connection string. This is the foundation for Lightning Address integration; the address itself can come from anywhere (self-hosted, third-party).

Scope

  • Add lud16 field to connection data model
  • Accept it during connection creation (CLI + API)
  • Append to NWC string when present
  • Display in nutbits connections and TUI
  • Allow update/removal after creation

Hints

  • Follow how label flows through the codebase - same pattern
  • Validate format: user@domain
  • URL-encode the @ when appending to the NWC string
  • nostr-core LNURL module has fetchPayRequest() - use it to validate the address actually resolves before storing it. Good UX: don't let users attach a dead address.

Acceptance

  • nutbits connect optionally asks for a Lightning Address
  • POST /api/v1/connections accepts lud16
  • NWC string includes &lud16=... when provided
  • nutbits connections and TUI display the address
  • Can be updated/removed after creation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions