README.md raw

lnurl-server

A lightweight LNURL-pay / Lightning Address server that creates invoices via a NIP-47 (NWC / Nostr Wallet Connect) wallet service.

What it does

Serves /.well-known/lnurlp/<username> and /.well-known/lnurlp/<username>/callback. When a wallet requests a payment, the callback asks the NWC wallet service for a make_invoice and returns the bolt11 invoice to the payer.

Configuration (env)

wallet service.

Why this version

The original implementation opened a fresh WebSocket connection to the relay for every single invoice request (nostr.RelayConnect per callback), which churned TCP/TLS/WebSocket connections and leaked them into CLOSE-WAIT / FIN-WAIT-2 on the relay under load. This version:

automatic reconnect if it drops.

cannot cross-talk on the shared connection.

current request matches.

subscription or goroutine.

Build

go build -o lnurl-server .