LaWalletdocs
Architecture

Courtesy NWC via lncurl

Courtesy-wallet provisioning via lncurl.

Overview

Courtesy NWC wallets are provisioned via lncurl (lncurl.lol). Today, the repo stores NWC URIs on RemoteWallet records and can optionally mint a courtesy wallet during user creation.

Planned Goal

Courtesy NWC connections would be provisioned via lncurl (lncurl.lol). A single HTTP call would create a wallet and return a Nostr Wallet Connect connection string.


Why This Page Exists

The roadmap uses this page to document the intended courtesy-wallet architecture so it can be implemented later without losing the target design.


Planned Flow

  1. User requests a courtesy NWC wallet from the platform
  2. Platform calls POST https://lncurl.lol to provision a new wallet
  3. lncurl returns an NWC connection string
  4. Connection string is linked to the user's lightning address
  5. User can later replace the courtesy NWC with their own wallet

Current Alternative

Courtesy wallets are provisioned via LNCurl during GET /api/users/me when lncurl_auto_create is enabled in settings. There is no Alby Hub sub-account client.


Planned Integration Sketch

curl -X POST https://lncurl.lol
{
  "connectionString": "nostr+walletconnect://...",
  "balance": 0
}

The future lawallet-web integration would look roughly like this:

const response = await fetch('https://lncurl.lol', { method: 'POST' })
const { connectionString } = await response.json()

// Planned future step
await linkNWCConnection(userId, connectionString)

Planned Configuration

VariableDescriptionDefault
LNCURL_URLPlanned lncurl instance URLhttps://lncurl.lol
COURTESY_NWC_ENABLEDPlanned feature flagtrue

On this page