receiver
, such that the payment sender
is fully committed, and cancelled or executed conditionally at a later time.sender
other than it will have a longer-than-normal expiry
parameter.receiver
exposes a preimage that hashes to a payment_hash
of an Invoice and withdrawing the locked funds. When a sender
's funds are committed there is no option but to wait until hashlock resolution (completing the payment) or timelock tl
expiration (canceling the payment). By setting a long enough tl
, a payment receiver
has the option to withhold (or cancel) resolution after funds have been committed until a time t
such that t < tl
, otherwise tl
expires (t >= tl
) and funds are returned back to the sender
. The conditions by which the receiver
settles or cancels the invoice can be arbitrary or cryptographically conditional (ie. the receiver
does not know the preimage and must obtain it to settle the payment).item
delivery Shop, a Customer could generate a hash
of a preimage
and send it to the Shop. The Shop generates an invoice with payment_hash
equal to hash
and Customer pays it, however the Shop cannot settle it without preimage
. Upon item
delivery the Customer reveals the preimage
to the Shop Courier who then settles the invoice.item
Shop, an independent Courier, and a shop Customer:preimage
and sends hash
of preimage
to the Shopinvoice0
and Customer pays ithash
to the Courier who creates another hodl invoice invoice1
(for delivery costs) with the same payment_hash
and Shop pays itpreimage
to the Courier who settles invoice1
revealing the preimage to Shop who then settles invoice0
.preimage
and sends hash
to Bobpayment_hash
equal to hash
preimage
to settle the hodl invoicepayment_hash
across multiple invoices to create conditional payment chains incurs risk for all parties receiving the preimage
after it has been revealed once as intermediate nodes on mutual payment paths will access the preimage
that can be used to claim funds before the respective HTLC resolution is complete, thereby potentially blocking settlement by the hodl invoice holder.