cardano-coin-selection-1.0.1: Algorithms for coin selection and fee balancing.

Cardano.CoinSelection.Algorithm

Description

Submodules of this module provide implementations of coin selection algorithms.

Algorithms can be divided into two categories:

# Generalized Algorithms

The following algorithms implement the general CoinSelectionAlgorithm interface:

• Cardano.CoinSelection.Algorithm.LargestFirst

Provides an implementation of the Largest-First algorithm.

When selecting inputs from a given set of UTxO entries, this algorithm always selects the largest entries first.

• Cardano.CoinSelection.Algorithm.RandomImprove

Provides an implementation of the Random-Improve algorithm.

When selecting inputs from a given set of UTxO entries, this algorithm always selects entries at random.

Once selections have been made, a second phase attempts to improve on each of the existing selections in order to optimize change outputs.

For guidance on choosing an algorithm that's appropriate for your scenario, please consult the following article:

https://iohk.io/blog/self-organisation-in-coin-selection/

# Specialized Algorithms

The following algorithms provide functionality suited to specialized purposes: