git clone https://git.smesh.lol/lnurl-server.git
A lightweight LNURL-pay / Lightning Address server that creates invoices via a NIP-47 (NWC / Nostr Wallet Connect) wallet service.
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.
NWC_URI (required) - the nostr+walletconnect:// connection string for thewallet service.
LNURL_USERNAME (default me)LNURL_DOMAIN (default mleku.dev)PORT (default 8096)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.
#e) so only the response to thecurrent request matches.
subscription or goroutine.
go build -o lnurl-server .