A Pay-to-Script-Hash (TimeLock) script is a P2SH output that includes a time-based condition in its redeemScript. It uses the OP_CHECKLOCKTIMEVERIFY (CLTV) opcode, also known as an absolute timelock, to enforce a condition where the Unspent Transaction Output (UTXO) remains unspendable until a specified block height or timestamp. The redeemScript in P2SH(Timelock) includes this time-based condition, with values below 500,000,000 representing block heights and higher values representing Unix timestamps.
OP_Code(s) Review
P2SH-TimeLock combines the P2SH structure with OP_CHECKLOCKTIMEVERIFY to create a time-bound spending condition. The redeemScript includes the timelock, a public key, and signature verification.
# ScriptSig
<signature>
<redeemScript>
# RedeemScript
<timelock>
OP_CHECKLOCKTIMEVERIFY
OP_DROP
<publicKey>
OP_CHECKSIG
Step 1
Push <signature> onto the stack