Expand description
Rust Bitcoin coin selection library.
Efficient algorithms for choosing an optimal UTXO set.
Modules§
- errors
- Possible returned error types if no match is found.
Structs§
- Weighted
Utxo - Represents the spendable conditions of a
UTXO
.
Functions§
- branch_
and_ bound - Performs a deterministic depth first branch and bound search for a changeless solution.
- select_
coins rand
- Attempt a match with
branch_and_bound
falling back tosingle_random_draw
. - single_
random_ draw rand
- Randomize the input set and select coins until the target is reached. If the maximum
weight is exceeded, then the least valuable inputs are removed from the selection using weight
as a tie breaker. In so doing, minimize the number of
UTXOs
included in the result by preferring UTXOs with higher value.