Definition
WebLN is a JavaScript interface to the Bitcoin Lightning Network that lets a web application interact with the user's Lightning wallet through a window.webln provider object. A compatible client, usually a browser extension, injects the provider so front-end code can request payments and invoices without operating a backend Lightning node. Apps built this way are sometimes called LApps.
Core methods
After the page calls enable() to request permission, it can use a small set of functions: getInfo() returns information about the user's Lightning node, sendPayment() asks the wallet to pay an invoice, makeInvoice() requests an invoice to receive a payment, and signMessage() requests a signature over an arbitrary message. Each call surfaces a wallet prompt, so the user stays in control of approvals.
Why it matters
WebLN removes the friction of copying invoices between a web page and a wallet, while keeping custody with the user's own provider rather than the website. Because the wallet, not the page, holds the keys and confirms every action, a sovereign Bitcoiner can transact on the web without trusting the site with funds. It is complementary to LNURL-based flows: a site might present a WebLN payment to extension users and fall back to an LNURL QR for everyone else.
For receiving over a reusable identifier rather than a raw invoice, see Lightning Address. D-Central documents WebLN for builders wiring Lightning into web experiences.
In Simple Terms
WebLN is a JavaScript interface to the Bitcoin Lightning Network that lets a web application interact with the user’s Lightning wallet through a window.webln provider…
