Author: Joost Jager 2021-09-21 11:25:41
Published on: 2021-09-21T11:25:41+00:00
The proposed payment scheme involves the sender locking an HTLC to a preimage that is computed using several inputs including the payment amount and encoded order details. The preimage is then hashed to produce an invoice hash, which serves as the lock for the HTLC. When the recipient receives the HTLC, they use the inputs provided by the sender to reconstruct the preimage, which is then hashed to verify that it matches the invoice hash. If it does, the recipient can settle the payment. The preimage also serves as proof of payment and is returned to the sender. It should be noted that this scheme is not a spontaneous payment protocol and the sender must request an invoice from the recipient via an ordinary HTTP request to learn the invoice hash. The goal of the scheme is to alleviate the recipient from storing the invoices that they generate.
Updated on: 2023-06-03T05:55:19.779594+00:00