Lesson Ready to Start
Foundational
Lightning Addresses and LNURL
Technologies that bring email-like simplicity to Lightning payments, including LNURL-pay, LNURL-withdraw, LNURL-auth, and how Lightning Addresses work behind the scenes.
Transcript
Welcome back! We've covered invoices and keysend. Now let's explore technologies that make Lightning user-friendly: Lightning Addresses and LNURL — bringing email-like simplicity to Lightning payments.
The UX Problem
Lightning has a user experience challenge. Invoices are long, ugly strings that expire quickly, requiring a new invoice for each payment. Node pubkeys are unwieldy 66-character hex strings. None of this is user-friendly for mainstream adoption. LNURL and Lightning Addresses fix this.
What Is LNURL?
LNURL (Lightning Network URL) is a set of protocols that enable several user-friendly features including reusable payment requests, human-readable QR codes, withdrawals through LNURL-withdraw, authentication via LNURL-auth, and static payment addresses using LNURL-pay. Instead of one-time invoices, LNURL creates persistent endpoints that generate invoices on-demand.
How LNURL-pay Works
The process flows as follows. The receiver sets up an LNURL-pay endpoint (a URL). When a sender scans or clicks the LNURL, their wallet contacts the URL. The server returns payment parameters including minimum and maximum amounts and a description. The sender then specifies an amount, the server generates a fresh invoice, and finally the sender pays the invoice. The sender interacts with a static link, but receives a fresh invoice each time.
What Is a Lightning Address?
A Lightning Address is designed to look and function exactly like a standard email address, such as alice at domain dot com. Behind the scenes, this simple address resolves to a specific LNURL-pay endpoint, for instance, domain dot com slash dot com slash l n u r l p slash alice. This system provides users with a simple, memorable, and static address for receiving payments, making it as easy to share as a common email address.
Lightning Address Benefits
Lightning Addresses offer several significant advantages. They are human readable, using simple formats like `alice@example.com` instead of complex invoice strings. They are memorable, allowing you to share them verbally or put them on business cards. They are static with no expiration, working forever for unlimited payments. They follow a standard format supported by many wallets and services.
Getting a Lightning Address
You can obtain a Lightning Address through several methods. From custodial services like Wallet of Satoshi offering `username@walletofsatoshi.com`, Blink with `username@blink.sv`, or Strike providing `username@strike.me`. From self-hosted solutions such as Alby Hub where you configure your own address, LNbits for hosting your own LNURL service, or Satdress as a self-hosted Lightning Address server. You can also get them from node-attached services, as many node dashboards support Lightning Addresses that attach to your existing node.
LNURL Protocol Family
The LNURL protocol includes several variants for different purposes. LNURL-pay is used to request payments and is what Lightning Addresses use. LNURL-withdraw allows someone to withdraw funds from you, useful for faucets and rewards. LNURL-auth enables login with your Lightning wallet without passwords. LNURL-channel lets you request someone to open a channel to you. Each variant solves a specific UX problem in the Lightning ecosystem.
LNURL-withdraw: Receiving Sats
Instead of generating an invoice and sending it, LNURL-withdraw lets you show a QR code or LNURL to someone. They scan it with their wallet, their wallet generates the invoice, and you pay their invoice (they "withdraw"). Use cases include event faucets, reward redemption, gift cards, and refunds.
LNURL-auth: Passwordless Login
Login to websites using your Lightning wallet follows a simple flow. The site shows an LNURL-auth QR code, you scan it with your wallet, your wallet signs a challenge cryptographically, the site verifies the signature, and you're logged in with no password or email required. Benefits include no passwords to remember, privacy-preserving authentication, cryptographically secure verification, and no personal data shared.
Comments and Metadata
LNURL-pay can request additional data from senders. Comments allow the sender to attach a message to their payment. Payer data can optionally request information like name or email. This enables useful features such as donation messages, order details, and customer information.
Setting Up Your Lightning Address
The simplest path is to use a custodial service with instant setup where they handle everything. For a self-hosted technical setup, set up LNbits, Satdress, or similar software, configure DNS for your domain, set up HTTPS (which is required), point to your Lightning node, and test thoroughly. A hybrid approach uses a service that connects to your own node like Alby Hub.
Security Considerations
Regarding trust in providers, custodial addresses mean trusting the service, while self-hosted means trusting your own infrastructure. For privacy, understand that the domain owner knows your payments and some metadata may be logged, so consider the privacy implications. Availability is also a factor since your address only works if the service is up, and self-hosted solutions require your server to be online.
Best Practices
For users, use Lightning Addresses for convenience while understanding custody tradeoffs. Have backup receiving methods and test your address periodically. For receivers, choose an appropriate service or host yourself, monitor for issues, communicate your address clearly, and consider multiple addresses for different purposes.
The Future: LNURL + BOLT 12
LNURL and BOLT 12 Offers solve similar problems differently. LNURL is HTTP-based, web-native, and requires a server. BOLT 12 is native to the Lightning protocol and requires no HTTP. Both will likely coexist, with BOLT 12 growing as implementations mature.
In this lesson, we've learned about LNURL and Lightning Addresses — the technologies making Lightning as easy as email. These are essential for mainstream adoption and everyday use.
In our next lesson, we'll explore Receiving Tips and Donations on Lightning — practical ways to accept payments as a creator, business, or individual.
The UX Problem
Lightning has a user experience challenge. Invoices are long, ugly strings that expire quickly, requiring a new invoice for each payment. Node pubkeys are unwieldy 66-character hex strings. None of this is user-friendly for mainstream adoption. LNURL and Lightning Addresses fix this.
What Is LNURL?
LNURL (Lightning Network URL) is a set of protocols that enable several user-friendly features including reusable payment requests, human-readable QR codes, withdrawals through LNURL-withdraw, authentication via LNURL-auth, and static payment addresses using LNURL-pay. Instead of one-time invoices, LNURL creates persistent endpoints that generate invoices on-demand.
How LNURL-pay Works
The process flows as follows. The receiver sets up an LNURL-pay endpoint (a URL). When a sender scans or clicks the LNURL, their wallet contacts the URL. The server returns payment parameters including minimum and maximum amounts and a description. The sender then specifies an amount, the server generates a fresh invoice, and finally the sender pays the invoice. The sender interacts with a static link, but receives a fresh invoice each time.
What Is a Lightning Address?
A Lightning Address is designed to look and function exactly like a standard email address, such as alice at domain dot com. Behind the scenes, this simple address resolves to a specific LNURL-pay endpoint, for instance, domain dot com slash dot com slash l n u r l p slash alice. This system provides users with a simple, memorable, and static address for receiving payments, making it as easy to share as a common email address.
Lightning Address Benefits
Lightning Addresses offer several significant advantages. They are human readable, using simple formats like `alice@example.com` instead of complex invoice strings. They are memorable, allowing you to share them verbally or put them on business cards. They are static with no expiration, working forever for unlimited payments. They follow a standard format supported by many wallets and services.
Getting a Lightning Address
You can obtain a Lightning Address through several methods. From custodial services like Wallet of Satoshi offering `username@walletofsatoshi.com`, Blink with `username@blink.sv`, or Strike providing `username@strike.me`. From self-hosted solutions such as Alby Hub where you configure your own address, LNbits for hosting your own LNURL service, or Satdress as a self-hosted Lightning Address server. You can also get them from node-attached services, as many node dashboards support Lightning Addresses that attach to your existing node.
LNURL Protocol Family
The LNURL protocol includes several variants for different purposes. LNURL-pay is used to request payments and is what Lightning Addresses use. LNURL-withdraw allows someone to withdraw funds from you, useful for faucets and rewards. LNURL-auth enables login with your Lightning wallet without passwords. LNURL-channel lets you request someone to open a channel to you. Each variant solves a specific UX problem in the Lightning ecosystem.
LNURL-withdraw: Receiving Sats
Instead of generating an invoice and sending it, LNURL-withdraw lets you show a QR code or LNURL to someone. They scan it with their wallet, their wallet generates the invoice, and you pay their invoice (they "withdraw"). Use cases include event faucets, reward redemption, gift cards, and refunds.
LNURL-auth: Passwordless Login
Login to websites using your Lightning wallet follows a simple flow. The site shows an LNURL-auth QR code, you scan it with your wallet, your wallet signs a challenge cryptographically, the site verifies the signature, and you're logged in with no password or email required. Benefits include no passwords to remember, privacy-preserving authentication, cryptographically secure verification, and no personal data shared.
Comments and Metadata
LNURL-pay can request additional data from senders. Comments allow the sender to attach a message to their payment. Payer data can optionally request information like name or email. This enables useful features such as donation messages, order details, and customer information.
Setting Up Your Lightning Address
The simplest path is to use a custodial service with instant setup where they handle everything. For a self-hosted technical setup, set up LNbits, Satdress, or similar software, configure DNS for your domain, set up HTTPS (which is required), point to your Lightning node, and test thoroughly. A hybrid approach uses a service that connects to your own node like Alby Hub.
Security Considerations
Regarding trust in providers, custodial addresses mean trusting the service, while self-hosted means trusting your own infrastructure. For privacy, understand that the domain owner knows your payments and some metadata may be logged, so consider the privacy implications. Availability is also a factor since your address only works if the service is up, and self-hosted solutions require your server to be online.
Best Practices
For users, use Lightning Addresses for convenience while understanding custody tradeoffs. Have backup receiving methods and test your address periodically. For receivers, choose an appropriate service or host yourself, monitor for issues, communicate your address clearly, and consider multiple addresses for different purposes.
The Future: LNURL + BOLT 12
LNURL and BOLT 12 Offers solve similar problems differently. LNURL is HTTP-based, web-native, and requires a server. BOLT 12 is native to the Lightning protocol and requires no HTTP. Both will likely coexist, with BOLT 12 growing as implementations mature.
In this lesson, we've learned about LNURL and Lightning Addresses — the technologies making Lightning as easy as email. These are essential for mainstream adoption and everyday use.
In our next lesson, we'll explore Receiving Tips and Donations on Lightning — practical ways to accept payments as a creator, business, or individual.
Views:
5
Comment below with questions, suggestions and corrections.
Go to Comments