Skip to main content

Module scripts

Module scripts 

Source
Expand description

Bitcoin script helpers: HTLC, Timelock (CLTV/CSV), and Coin Selection.

Structs§

CoinSelectionResult
Result of coin selection.
Utxo
A UTXO available for spending.

Functions§

cltv_script
Build a CLTV (CheckLockTimeVerify, BIP-65) timelock script.
csv_script
Build a CSV (CheckSequenceVerify, BIP-112) relative timelock script.
htlc_claim_witness
Build the witness for claiming an HTLC (hashlock path).
htlc_payment_hash
Compute the SHA-256 hash of a preimage for HTLC usage.
htlc_refund_witness
Build the witness for refunding an HTLC (timelock path).
htlc_script
Build an HTLC (Hash Time-Locked Contract) script.
is_block_height_locktime
Check if a locktime value represents a block height or Unix timestamp.
select_coins_bnb
Select coins using Branch and Bound (BnB) algorithm.
select_coins_srd
Select coins using Single Random Draw (SRD) algorithm.