Protected ReadonlyDUST_Protected ReadonlyINPUT_Protected ReadonlyOUTPUT_Protected ReadonlyTRANSACTION_ProtectedcalculateCalculate change amount
ProtectedcalculateProtectedcheckCheck if options are valid and return failure result if not
ProtectedcreateEstimate transaction fee
ProtectedestimateEstimate transaction size in vBytes
ProtectedfilterFilter UTXOs with protection and confirmation checks
ProtectedfilterGet algorithm statistics
ProtectedisCheck if amount is dust
OptionaldustThreshold: numberOptimized selection for specific target amounts Uses dynamic programming approach for better performance
ProtectedsortProtectedsortProtectedsumProtectedvalidate
Blackjack UTXO Selection Algorithm - Exact value matching optimization
The Blackjack algorithm is inspired by the card game where the goal is to get as close to a target value as possible without going over. This selector prioritizes finding UTXO combinations that exactly match the target amount plus fees, minimizing change outputs and transaction waste.
Remarks
The algorithm works in two phases:
Key features:
Performance characteristics:
Example