Starting from this text at https://en.bitcoin.it/wiki/Script:

"The script for a typical Bitcoin transfer to destination Bitcoin address D simply encumbers future spending of the bitcoins with two things: the spender must provide 1. a public key that, when hashed, yields destination address D embedded in the script ..."

and then looking at the HTLC script:

    [HASHOP] <digest> OP_EQUALVERIFY OP_DUP OP_HASH160 <seller pubkey hash>            
    <num> [TIMEOUTOP] OP_DROP OP_DUP OP_HASH160 <buyer pubkey hash>

My original thought was that the HTLC could only be redeemed to the address behind <seller pubkey hash> or <buyer pubkey hash>: they are the only data relating to addresses embedded in the script so must be the "destination address" referred to above. I understand this to be wrong.

Am I now correct in thinking:

  1. That the two pubkey hashes merely establish the right of the redeemer to take the respective branch;
  2. There is in fact no "destination address D embedded in the script" for an HTLC;
  3. That the seller or buyer may redeem to any address they like;
  4. And that address can remain undecided through the funding and life of the HTLC until the moments before redemption?

1 Answer 1


The inputs of a transaction have absolutely no ability to effect the outputs in any situation. They can only define who can spend, not the conditions for how they go about spending it.

  • It had not occurred to me before now that the redeemScript is one of the inputs, so thank you for that - that's obvious to me now it's pointed out. I suspect I was conflating "the script" used on the page in the narrower sense of "redeemScript". Mar 22, 2019 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.