Skip to main content

build_locking_script

Function build_locking_script 

Source
pub fn build_locking_script(
    recipient: &[u8],
    lock_until: u64,
    amount: u64,
) -> Result<Vec<u8>, String>
Expand description

Build the TimeLockedGift covenant locking script, byte-identical to the sCrypt compiler. recipient must be a 33-byte compressed public key. lock_until is a unix timestamp (>= 500_000_000); amount is the satoshis paid to the recipient on claim.