pub fn cltv_script(locktime: u32, pubkey_hash: &[u8; 20]) -> Vec<u8> ⓘExpand description
Build a CLTV (CheckLockTimeVerify, BIP-65) timelock script.
Script: <locktime> OP_CLTV OP_DROP <pubkey_hash> OP_CHECKSIG
The output can only be spent after the specified block height or time.
§Arguments
locktime— Block height (< 500_000_000) or Unix timestamppubkey_hash— 20-byte HASH160 of the recipient’s public key