What Is The Lightning HTTP 402 Protocol, And Why Is It Important?
Lightning HTTP 402 Protocol, also known as L402, is a way to charge for services and authenticate users in distributed networks. It combines two powerful tools — Macaroons, and of course, the Lightning Network.Macaroons...
Archive context
Older archive item. Useful for background and entity history, but not a fresh market-moving signal.
Lightning HTTP 402 Protocol, also known as L402, is a way to charge for services and authenticate users in distributed networks. It combines two powerful tools — Macaroons, and of course, the Lightning Network.
Macaroons are special tokens used for authentication. They include permissions and can be verified using a root key. The documentation states this is important for systems where we want to avoid or cannot go about looking up the validity of each token.
Lightning is a Layer 2 solution for making fast and secure bitcoin payments. L402 leverages the capabilities of Macaroons and Lightning to create a mechanism that allows users to authenticate and make payments without needing a central database.
In L402, a Macaroon includes a payment hash. To be valid, the user needs to present the Macaroon and the preimage corresponding to the payment hash in the Macaroon. The preimage is obtained by paying a Lightning Network invoice.
A newly introduced software called Aperture acts as a middleman between the user and the service's API. It forwards requests with valid L402 to the relevant API endpoint and can issue new Macaroons and Lightning invoices to new users.
L402 allows for metered APIs, where services can charge for their usage without requiring logins or passwords. The Macaroon, together with the preimage, guarantees that the payer has made the payment.
The L402 specification includes different characteristics such as the version of the Macaroon, a unique user identifier and a payment hash that links the Macaroon to the Lightning invoice. The Macaroon can also include caveats that define access to specific services, service capabilities and service constraints.
When verifying the L402, the server uses the root key to check that the Macaroon was issued by the appropriate authority and that each caveat was properly amended. The preimage is also verified against the payment hash to ensure that all outstanding invoices have been paid.
In summary, L402 is a protocol that combines Macaroons and the Lightning Network to enable charging for services and authenticating users. It allows for secure payments and authentication without relying on a central database. Aperture is a software that helps handle the process and allows services to issue Macaroons and Lightning Network invoices.
Why this matters
This bitcoin story adds another data point to the current market tape and is useful when read alongside nearby source coverage.
Original source
Read on Bitcoin MagazineRelated market context
Polygon Extends Open Money Stack to Solana for Stablecoin Payment Flows
TL;DR: The company said customers can fund accounts through bank transfers, cards, cash or digital assets, then route supported to...
Circle Asks SEC to Clarify Cash Treatment for Qualifying Payment Stablecoins
TL;DR: Circle’s comment letter asks the SEC to align its crypto-asset proposal with payment-stablecoin rules. The company’s reques...
Uniswap Opens TJAR Fee Conversion Beyond Protocol as Robinhood Joins
TL;DR: Searchers compete to exchange the chosen payout token for assets accumulated in the jar. Open searcher competition does not...
Binance Restores 15 Networks After $6.3B Hack While Outflows Surge to $5.8B
Key Takeaways: Binance was able to resume withdrawals for 15 blockchain networks. More than $5.8 billion in net withdrawals were s...
Coinbase (COIN) Misses Revenue Estimates as Users Fall, Armstrong Sets Up New Share Sales
Bitcoin Magazine Coinbase (COIN) Misses Revenue Estimates as Users Fall, Armstrong Sets Up New Share Sales Coinbase had a mixed th...
Ethena Pay Adds Earn+ Through Aave V4 Lending on Avalanche
TL;DR: Ethena Pay’s Earn+ routes deposits into an Upshift vault curated by Steakhouse and using Aave V4 on Avalanche. The layered...