mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2025-06-25 01:18:59 +00:00
parent
d5e2316438
commit
1aa56ce982
@ -426,13 +426,13 @@ IF
|
|||||||
ELSE
|
ELSE
|
||||||
# Refund after timeout.
|
# Refund after timeout.
|
||||||
<locktime> CHECKLOCKTIMEVERIFY DROP
|
<locktime> CHECKLOCKTIMEVERIFY DROP
|
||||||
<Payee Pubic Key> CHECKSIG
|
<Payer Pubic Key> CHECKSIG
|
||||||
ENDIF
|
ENDIF
|
||||||
----
|
----
|
||||||
|
|
||||||
Anyone who knows the secret +R+, which when hashed equals to +H+, can redeem this output by exercising the first clause of the +IF+ flow.
|
Anyone who knows the secret +R+, which when hashed equals to +H+, can redeem this output by exercising the first clause of the +IF+ flow.
|
||||||
|
|
||||||
If the secret is not revealed and the HTLC claimed, after a certain number of blocks the payee can claim a refund using the second clause in the +IF+ flow.
|
If the secret is not revealed and the HTLC claimed, after a certain number of blocks the payer can claim a refund using the second clause in the +IF+ flow.
|
||||||
|
|
||||||
This is a basic implementation of an HTLC. This type of HTLC can be redeemed by _anyone_ who has the secret +R+. An HTLC can take many different forms with slight variations to the script. For example, adding a +CHECKSIG+ operator and a public key in the first clause restricts redemption of the hash to a named recipient, who must also know the secret +R+.((("", startref="BCApayment12")))
|
This is a basic implementation of an HTLC. This type of HTLC can be redeemed by _anyone_ who has the secret +R+. An HTLC can take many different forms with slight variations to the script. For example, adding a +CHECKSIG+ operator and a public key in the first clause restricts redemption of the hash to a named recipient, who must also know the secret +R+.((("", startref="BCApayment12")))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user