
What’s BOLT 12? Properly, it’s quite a lot of completely different options and shifting items put collectively to perform a number of various things — static QR codes, modular invoices, privateness for the particular person receiving the cost.
However what’s the entire package deal? It is a approach to have a single QR code, an “supply,” help you seize invoices from a node in a privateness preserving manner, whereas additionally permitting for issues like requesting {that a} distant node pay your bill.
Now, anybody acquainted with LNURL ought to already be pondering, “This sounds loads like LNURL.” However for these of you who do not know what LNURL is or the way it works, this is a fast breakdown.
What Is LNURL?
LNURL is a stack of straightforward protocols for coordinating info wanted to make funds over the Lightning Community utilizing HTTP. The complete listing of LNURL protocol items might be discovered right here, however I am simply going to enter a couple of core makes use of that overlap with BOLT 12.
Three core items of the LNURL protocol are an authentication scheme, the place a public key can be utilized to log in to a service, an bill request scheme the place a pockets can ping a server by a static QR code and retrieve an bill, and a withdraw request scheme the place a pockets can ping a server and request that the server pays an bill supplied by the pockets. Lightning invoices are for much longer than on-chain Bitcoin addresses, the cost itself is already an interactive course of requiring each events to be on-line, so coordinating cost particulars interactively over a community connection is smart.
The authentication protocol is successfully simply the server offering a randomly generated quantity which the person’s pockets indicators with a newly generated key. After the signed random worth is obtained by the server, it saves the related key for use in future logins.
The bill request performance is a manner to offer info to a person a few cost they want to make in a format that isn’t an bill. This gives an outline of the cost, the minimal and most quantity the service expects to be paid, and a URL for the pockets from which to request an precise bill. From right here, the pockets shows this info to the person, permitting them to set a closing quantity and request an bill. After sending the bill request and receiving one again from the server, the pockets verifies that the quantities match what the person set and pays the bill.
The withdrawal request works by pinging the service, and receiving in response an outline, a URL to ship an bill to, a random string (or deterministic to tie to an account or person), and a minimal quantity and most quantity that may be withdrawn. After filling within the acceptable worth, the pockets returns an bill to the server, and whether it is legitimate and throughout the quantity parameters, the service pays the bill. The LNURL authenticate protocol can be utilized along with this to make sure that solely the meant person can efficiently withdraw utilizing the LNURL hyperlink.
LNURL has smoothed over and improved a lot of the UX expertise round utilizing the Lightning Community, nevertheless it requires using an internet server in an effort to be utilized. All the requests and responses are dealt with by HTTP, and extra infrastructure past the Lightning node itself is required to deal with these streamlined methods of coordinating and making funds. It is a completely cheap requirement for any on-line service supplier or service provider, who’s realistically going to wish an internet server anyway to offer their service or merchandise on-line. Nevertheless, for a non-technical finish person at house who merely desires such a streamlined expertise, a road vendor, a bodily store or different customers who don’t already require using an internet server, this could be a burdensome and probably dangerous requirement.
What Is BOLT 12?
BOLT 12 gives an try to realize a number of the core performance that LNURL gives with out requiring using an internet server. A suggestion encodes the information mandatory to succeed in a node to request an bill to make a cost, both a node_id, or a blinded path (the previous few hops in an onion route, pre-computed and encrypted) to that node utilizing onion messages. It can also encode a minimal quantity for a cost, the forex being paid in, an expiry time and minimal/most amount numbers (for buying a number of objects).
That is the entire info essential to fetch an precise bill from the node that issued the supply. Somebody who desires to pay an bill does so over onion messages, one of many core options of BOLT 12. It permits nodes to make a direct, end-to-end-encrypted connection between one another that doesn’t contain a Lightning channel. Similar to Lightning funds, these can be utilized to onion route messages. After acquiring a suggestion, a payer will use the data encoded in it to ship an invoice_request message. The creator of the supply will then reply again with an precise bill.
There’s additionally assist for producing distinctive per person gives that permit the receiver to request a cost from the creator of the supply, just like LNURL’s withdrawal request characteristic. BOLT 12 invoices decide to a singular payer key — this can be utilized within the case of issuing refunds to show you’re the one that really paid the bill. This may also be utilized in mixture with the withdrawal supply to ensure that solely the right particular person can achieve getting an bill paid by the creator, versus whoever is ready to get a replica of the supply.
These two makes use of of gives successfully fulfill the identical performance because the bill and withdrawal requests of LNURL, with out the necessity to run an internet server.
LNURL Or BOLT 12? It is All About Tradeoffs
LNURL and BOLT 12 each accomplish the identical basic performance, so what is actually the distinction between them? What’s the want for BOLT 12 if LNURL already exists? The important thing distinction is the online server. An internet server requires operating extra infrastructure, a site title, a TLS certificates and the experience to handle these items.
Whereas this isn’t a difficulty even value mentioning for many companies and providers, as these items are wanted to function any on-line enterprise within the first place, this can be a large subject on your typical non-technical finish person. It’s not an affordable expectation for a person to take care of further infrastructure bolted on prime of their Lightning node in an effort to have entry to a streamlined and easy person expertise. There’s additionally the query of the centralization of DNS; a site just isn’t one thing that may ever be actually managed by the proprietor.
These points apart, each can co-exist. LNURL works simply advantageous, and is already very extensively adopted within the Lightning ecosystem, it’s simply not a practical resolution for customers apart from companies or providers. BOLT 12 as it’s adopted can fill that hole, and supply the identical streamlined person expertise for finish customers at house who aren’t companies.
Each options accomplish roughly the identical factor for 2 completely different courses of customers, and that’s OK.
It is a visitor put up by Shinobi. Opinions expressed are solely their very own and don’t essentially mirror these of BTC Inc or Bitcoin Journal.






