▲ | roasbeef 2 hours ago | |
> Free and open payments should be bitcoin based to be truely decentralized Agreed. Which is why 5 years ago, I developed L402 (formerly known as LSAT) to fill this very gap:
The x402 protocol as defined uses purely out of band payment verification. This trait makes the "one line of code" to add integration not entirely accurate, as there's still a substantial amount of code needed at both the client and server to verify payment receipt.L402 is more opinionated as utilizes the Lightning Network (LN) directly within the protocol. The server presents the client with a SHA 256 payment hash embedded within an LN invoice. The server requires the client to present the pre-image for said payment hash. The only way the client can obtain said pre-image is by paying the invoice on the Lightning Network (all payments are conditional payments where a pre-image needs to be revealed to complete a payment). L402 also adds a layer of macaroons, enabling the protocol handle both payment and fine-grained authentication. The advantages of LN over something like Coinbase's Base chain include:
|