@@ -59,7 +59,7 @@ export interface LargeFirstSelectorProps {
59
59
/**
60
60
* Input selector that implements a "large-first" strategy.
61
61
*
62
- * This strategy selects the largest UTXOs per asset, one asset at a time, until the requirements
62
+ * This strategy selects the largest UTxOs per asset, one asset at a time, until the requirements
63
63
* of all assets in the outputs + fees and implicit values are satisfied.
64
64
*/
65
65
export class LargeFirstSelector implements InputSelector {
@@ -72,11 +72,11 @@ export class LargeFirstSelector implements InputSelector {
72
72
73
73
/**
74
74
* Selects inputs using a large-first strategy:
75
- * Selects largest UTXOs per asset until target is met
76
- * Then selects largest UTxOs by ADA
75
+ * Selects largest UTxOs per asset until target is met
76
+ * Then selects largest UTxOs by Ada
77
77
* Then iteratively adds more UTxOs if needed to cover fees
78
78
*
79
- * @param params Input selection parameters (available UTXOs , outputs, constraints, etc.)
79
+ * @param params Input selection parameters (available UTxOs , outputs, constraints, etc.)
80
80
* @returns A complete selection including inputs, outputs, change, and fee.
81
81
* @throws {InputSelectionError } If the selection cannot satisfy the outputs and fees.
82
82
*/
@@ -197,7 +197,7 @@ export class LargeFirstSelector implements InputSelector {
197
197
* Minting and burning are treated as negative or positive contributions to input balance,
198
198
* and are subtracted from the output requirements.
199
199
*
200
- * @param inputs The full set of selected UTXOs (including pre-selected).
200
+ * @param inputs The full set of selected UTxOs (including pre-selected).
201
201
* @param outputs The transaction outputs.
202
202
* @param implicitValue Optional implicit values including deposits, withdrawals, and minting.
203
203
* @returns An object with:
@@ -235,12 +235,12 @@ export class LargeFirstSelector implements InputSelector {
235
235
}
236
236
237
237
/**
238
- * Selects the largest UTXOs per required asset until each target amount is fulfilled.
238
+ * Selects the largest UTxOs per required asset until each target amount is fulfilled.
239
239
*
240
240
* @param requiredAssets The asset quantities required by the transaction outputs.
241
- * @param allAvailable All available UTXOs (including preselected ones).
242
- * @param preSelected The UTXOs already selected for the transaction.
243
- * @returns A set of selected UTXOs covering the asset requirements.
241
+ * @param allAvailable All available UTxOs (including preselected ones).
242
+ * @param preSelected The UTxOs already selected for the transaction.
243
+ * @returns A set of selected UTxOs covering the asset requirements.
244
244
* @throws {InputSelectionError } If any asset cannot be sufficiently fulfilled.
245
245
*/
246
246
#selectAssets(
@@ -270,13 +270,13 @@ export class LargeFirstSelector implements InputSelector {
270
270
}
271
271
272
272
/**
273
- * Selects UTXOs (largest ADA first) until the total Lovelace covers the target amount.
273
+ * Selects UTxOs (largest Ada first) until the total Lovelace covers the target amount.
274
274
*
275
275
* @param target The required amount of Lovelace.
276
- * @param allAvailable All available UTXOs .
277
- * @param selected The current set of already selected UTXOs .
276
+ * @param allAvailable All available UTxOs .
277
+ * @param selected The current set of already selected UTxOs .
278
278
* @param implicitCoinInput The implicit coin input amount.
279
- * @returns A new set including the original selected UTXOs plus any added for ADA coverage.
279
+ * @returns A new set including the original selected UTxOs plus any added for Ada coverage.
280
280
* @throws {InputSelectionError } If the Lovelace requirement cannot be fulfilled.
281
281
*/
282
282
#selectLovelace(
@@ -311,26 +311,26 @@ export class LargeFirstSelector implements InputSelector {
311
311
}
312
312
313
313
/**
314
- * Computes the UTXOs that were not selected, given the original list and selected set.
314
+ * Computes the UTxOs that were not selected, given the original list and selected set.
315
315
*
316
- * @param original The original list of available UTXOs (excluding preselected).
317
- * @param used The set of selected UTXOs .
318
- * @returns A new set of UTXOs that were not consumed in the transaction.
316
+ * @param original The original list of available UTxOs (excluding preselected).
317
+ * @param used The set of selected UTxOs .
318
+ * @returns A new set of UTxOs that were not consumed in the transaction.
319
319
*/
320
320
#computeRemainingUtxo( original : Cardano . Utxo [ ] , used : Set < Cardano . Utxo > ) : Set < Cardano . Utxo > {
321
321
const usedTxIns = new Set ( [ ...used ] . map ( ( [ txIn ] ) => txIn ) ) ;
322
322
return new Set ( original . filter ( ( [ txIn ] ) => ! usedTxIns . has ( txIn ) ) ) ;
323
323
}
324
324
325
325
/**
326
- * Select additional UTXOs until the fee and min-ADA requirements are
326
+ * Select additional UTxOs until the fee and min-Ada requirements are
327
327
* satisfied, then build the final change outputs.
328
328
*
329
- * @param initialInputs The UTXOs already chosen for assets and/or pre-selected by the wallet.
329
+ * @param initialInputs The UTxOs already chosen for assets and/or pre-selected by the wallet.
330
330
* @param outputs The explicit transaction outputs.
331
- * @param allAvailable Every UTXO the wallet can spend (pre-selected ∪ utxo).
332
- * @param requiredAssets Aggregate asset requirements computed from `outputs` + burn. Used for fee/ADA expansion.
333
- * @param constraints Network / wallet selection constraints (min-ADA , fee estimator, bundle size, limit…).
331
+ * @param allAvailable Every UTxO the wallet can spend (pre-selected ∪ utxo).
332
+ * @param requiredAssets Aggregate asset requirements computed from `outputs` + burn. Used for fee/Ada expansion.
333
+ * @param constraints Network / wallet selection constraints (min-Ada , fee estimator, bundle size, limit…).
334
334
* @param changeAddressResolver Callback that assigns addresses (or further splits) for the provisional change bundles returned by the fee engine.
335
335
* @param implicitValue Optional implicit components (deposits, withdrawals, mint or burn)
336
336
* @returns 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.
@@ -347,7 +347,7 @@ export class LargeFirstSelector implements InputSelector {
347
347
const utxoSelectedArr = [ ...initialInputs ] ;
348
348
const utxoRemainingArr = allAvailable
349
349
. filter ( ( u ) => ! initialInputs . has ( u ) )
350
- . sort ( ( [ , a ] , [ , b ] ) => sortByCoins ( a , b ) ) ; // ADA -descending
350
+ . sort ( ( [ , a ] , [ , b ] ) => sortByCoins ( a , b ) ) ; // Ada -descending
351
351
352
352
const outputValues = toValues ( [ ...outputs ] ) ;
353
353
0 commit comments