Represents an LNURL, with methods to fetch details and generate invoices.
new
LNURL(url: URL,opts?: { fetch: globalThis.fetch; },)
getDetails(opts?: { signal?: AbortSignal; }): Promise<LNURLDetails>
Resolve an LNURL to its details.
getInvoice(opts: { amount: number; nostr?: NostrEvent; signal?: AbortSignal; }): Promise<LNURLCallback>
Generate an LNURL invoice from the params.
fromLightningAddress(ln: string,opts?: { fetch: globalThis.fetch; },): LNURL
Create an LNURL object from a lightning address (email-like format). Throws if the value is not a valid lightning address.
fromString(value: string,opts?: { fetch: globalThis.fetch; },): LNURL
Create an LNURL object from a bech32 lnurl1... string.
Throws if the value is not a valid lnurl.
lnurlCallbackSchema(): z.ZodType<LNURLCallback>
LNURL callback schema.
lnurlDetailsSchema(): z.ZodType<LNURLDetails>
LNURL response schema.