Bitcoin

Transaction – Can I apply my spending before the timestamp to Bitcoin UTXO?

You can do this by generating P2WSH output using the following script:

OP_IF
  <condition 1>
OP_ELSE
  <timestamp>
  OP_CHECKLOCKTIMEVERIFY
  OP_DROP
  <condition 2>
OP_ENDIF

Then depending on what conditions you accept 1 or 0 When spent, it is added on top of the initial stack.

You can also do this more privately (and in most cases, cheaper) by using P2TR and splitting the two conditions into separate tree leaves. If the first condition consists of a single public key (or a set of keys that can be aggregated), you can use that as an internal key and it doesn’t even need to be made public if you use that condition using a key path. script.

Related Articles

Back to top button