Module locktime
Expand description
Provides type LockTime
that implements the logic around nLockTime/OP_CHECKLOCKTIMEVERIFY.
There are two types of lock time: lock-by-blockheight and lock-by-blocktime, distinguished by
whether LockTime < LOCKTIME_THRESHOLD
.
Structs§
- Conversion
Error - An error that occurs when converting a
u32
to a lock time variant. - Height
- An absolute block height, guaranteed to always contain a valid height value.
- Packed
Lock Time - Packed lock time wraps a
LockTime
consensus value i.e., the rawu32
used by the network. - Time
- A UNIX timestamp, seconds since epoch, guaranteed to always contain a valid time value.
Enums§
- Error
- Catchall type for errors that relate to time locks.
- Lock
Time - A lock time value, representing either a block height or a UNIX timestamp (seconds since epoch).
- Operation
Error - Errors than occur when operating on lock times.
Constants§
- LOCK_
TIME_ THRESHOLD - The Threshold for deciding whether a lock time value is a height or a time (see Bitcoin Core).