This is a quick demo of a WebLN enabled websites. It shows how to programatically request a lightning payment from a visitor through JavaScript.
- website requests an invoice from the server
- In this example the server uses a lightning address / LNURL to request an invoice This has the advantage that the app does not need to know any credentials to the lightning node
- On the client WebLN JavaScript is used to request the payment from the visitor
- The visitor confirms the payment in the wallet
- The preimage is returned to the website JavaScript
- The website can validate the preimage