Creates a new instance of the LargeFirstSelector.
Private
#propsPrivate
#aggregateCompute two token maps:
{ required, available }
Values contained in the UTxOs selected so far.
Values required by the user’s explicit transaction outputs.
Optional
implicit: ImplicitValueOptional mint
map (positive = forge, negative = burn).
Private
#aggregateAggregate Lovelace that enters and leaves the transaction, taking implicit withdrawals / deposits into account.
An object with
totalIn
— Lovelace provided by UTxOs + withdrawals
totalOut
— Lovelace required for explicit outputs + deposits
Array of Value
s held by the selected UTxOs.
Array of explicit transaction outputs.
Optional
implicit: ImplicitValueOptional implicit values.
Private
#computeComputes the total Lovelace and asset output requirements, including the effects of implicit values such as key deposits, withdrawals, and minting/burning.
Minting and burning are treated as negative or positive contributions to input balance, and are subtracted from the output requirements.
An object with:
totalLovelaceInput
: Sum of all input Lovelace, including withdrawals.
totalLovelaceOutput
: Sum of all output Lovelace, including deposits.
outputAssets
: Asset requirements after accounting for minting/burning.
If balance is insufficient to satisfy the target.
The full set of selected UTxOs (including pre-selected).
The transaction outputs.
Optional
implicitValue: ImplicitValueOptional implicit values including deposits, withdrawals, and minting.
Private
#computePrivate
#expandSelect additional UTxOs until the fee and min-Ada requirements are satisfied, then build the final change outputs.
An object containing Set of all inputs that will appear in the tx body, minimum fee returned by the cost model and an Array of change outputs.
The UTxOs already chosen for assets and/or pre-selected by the wallet.
The explicit transaction outputs.
Every UTxO the wallet can spend (pre-selected ∪ utxo).
Aggregate asset requirements computed from outputs
+ burn. Used for fee/Ada expansion.
Network / wallet selection constraints (min-Ada, fee estimator, bundle size, limit…).
Callback that assigns addresses (or further splits) for the provisional change bundles returned by the fee engine.
Optional
implicitValue: ImplicitValueOptional implicit components (deposits, withdrawals, mint or burn)
Private
#selectSelects the largest UTxOs per required asset until each target amount is fulfilled.
A set of selected UTxOs covering the asset requirements.
If any asset cannot be sufficiently fulfilled.
Private
#selectSelects UTxOs (largest Ada first) until the total Lovelace covers the target amount.
A new set including the original selected UTxOs plus any added for Ada coverage.
If the Lovelace requirement cannot be fulfilled.
Selects inputs using a large-first strategy: Selects largest UTxOs per asset until target is met Then selects largest UTxOs by Ada Then iteratively adds more UTxOs if needed to cover fees
A complete selection including inputs, outputs, change, and fee.
If the selection cannot satisfy the outputs and fees.
Input selection parameters (available UTxOs, outputs, constraints, etc.)
Generated using TypeDoc
Input selector that implements a "large-first" strategy.
This strategy selects the largest UTxOs per asset, one asset at a time, until the requirements of all assets in the outputs + fees and implicit values are satisfied.