LNURL .NET — API Reference
Welcome to the API documentation for the LNURL .NET library, a comprehensive implementation of the LNURL protocol for the Bitcoin Lightning Network.
Packages
| Package | Description |
|---|---|
| LNURL.Core | Core types and System.Text.Json support (no Newtonsoft.Json runtime dependency) |
| LNURL | Full package — re-exports everything from Core with Newtonsoft.Json runtime support |
Getting Started
# System.Text.Json only (lighter dependency)
dotnet add package LNURL.Core
# Or: with Newtonsoft.Json support
dotnet add package LNURL
Then start with the main entry point — the LNURL static class:
var result = await LNURL.LNURL.FetchInformation(uri, httpClient);
Core Classes
| Class | Description |
|---|---|
LNURL |
Main entry point — parse, encode, and fetch LNURL endpoints |
LNURLPayRequest |
LNURL-pay flow (LUD-06) |
LNURLWithdrawRequest |
LNURL-withdraw flow (LUD-03) |
LNAuthRequest |
LNURL-auth (LUD-04) |
LNURLChannelRequest |
LNURL-channel (LUD-02) |
LNURLVerifyResponse |
Payment verification (LUD-21) |
LNURLJsonOptions |
System.Text.Json support |
BoltCardHelper |
NFC BoltCard support |
JSON Serialization
The library supports both Newtonsoft.Json (via [JsonProperty] attributes, requires the LNURL package) and System.Text.Json (via LNURLJsonOptions, works with either package).