Module time_locks

Source
Expand description

§Time locks

This module defines jets for checking time locks of Elements transactions.

Functions§

check_lock_distance
Assert that the value returned by tx_lock_distance is greater than or equal to the given value.
check_lock_duration
Assert that the value returned by tx_lock_duration is greater than or equal to the given value.
check_lock_height
Assert that the value returned by tx_lock_height is greater than or equal to the given value.
check_lock_time
Assert that the value returned by tx_lock_time is greater than or equal to the given value.
tx_is_final
Check if the sequence numbers of all transaction inputs are at their maximum value.
tx_lock_distance
If version returns 2 or greater, then return the greatest valid Distance value of any transaction input. Return zeroes otherwise.
tx_lock_duration
If version returns 2 or greater, then return the greatest valid Duration value of any transaction input. Return zeroes otherwise.
tx_lock_height
If tx_is_final returns false, then try to parse the transaction’s lock time as a Height value. Return zeroes otherwise.
tx_lock_time
If tx_is_final returns false, then try to parse the transaction’s lock time as a Time value. Return zeroes otherwise.