Helios API/ API Reference/ Namespaces/
CoinSelection
Collection of common coin selection algorithms.
Index
Functions
selectExtremumFirst
▸ selectExtremumFirst(utxos
, amount
, largestFirst
): [TxInput
[], TxInput
[]]
Parameters
Returns
- [picked, not picked that can be used as spares]
selectLargestFirst
▸ selectLargestFirst(utxos
, amount
): [TxInput
[], TxInput
[]]
- Selects UTxOs from a list by iterating through the tokens in the given
Value
and picking the UTxOs containing the largest corresponding amount first.
Parameters
Returns
selectSmallestFirst
▸ selectSmallestFirst(utxos
, amount
): [TxInput
[], TxInput
[]]
Selects UTxOs from a list by iterating through the tokens in the given Value
and picking the UTxOs containing the smallest corresponding amount first.
This method can be used to eliminate dust UTxOs from a wallet.