diff --git a/src/algos/addUntilReach.ts b/src/algos/addUntilReach.ts index 0a4a10f..214b784 100644 --- a/src/algos/addUntilReach.ts +++ b/src/algos/addUntilReach.ts @@ -22,14 +22,14 @@ import { isDust } from '../dust'; * * Refer to {@link coinselect coinselect} for additional details on input parameters and expected returned values. */ -export function addUntilReach({ +export function addUntilReach({ utxos, targets, remainder, feeRate, dustRelayFeeRate = DUST_RELAY_FEE_RATE }: { - utxos: Array; + utxos: Array; targets: Array; remainder: OutputInstance; feeRate: number; @@ -42,7 +42,7 @@ export function addUntilReach({ validateFeeRate(dustRelayFeeRate); const targetsValue = targets.reduce((a, target) => a + target.value, 0); - const utxosSoFar: Array = []; + const utxosSoFar: Array = []; for (const candidate of utxos) { const txSizeSoFar = vsize( diff --git a/src/algos/avoidChange.ts b/src/algos/avoidChange.ts index 141a6e4..f71db53 100644 --- a/src/algos/avoidChange.ts +++ b/src/algos/avoidChange.ts @@ -23,14 +23,14 @@ import { isDust } from '../dust'; * * Refer to {@link coinselect coinselect} for additional details on input parameters and expected returned values. */ -export function avoidChange({ +export function avoidChange({ utxos, targets, remainder, feeRate, dustRelayFeeRate = DUST_RELAY_FEE_RATE }: { - utxos: Array; + utxos: Array; targets: Array; /** * This is the hypotetical change that this algo will check it would @@ -47,7 +47,7 @@ export function avoidChange({ validateFeeRate(dustRelayFeeRate); const targetsValue = targets.reduce((a, target) => a + target.value, 0); - const utxosSoFar: Array = []; + const utxosSoFar: Array = []; for (const candidate of utxos) { const utxosSoFarValue = utxosSoFar.reduce((a, utxo) => a + utxo.value, 0); diff --git a/src/algos/maxFunds.ts b/src/algos/maxFunds.ts index afb925d..9e2e903 100644 --- a/src/algos/maxFunds.ts +++ b/src/algos/maxFunds.ts @@ -22,14 +22,14 @@ import { isDust } from '../dust'; * * Refer to {@link coinselect coinselect} for additional details on input parameters and expected returned values. */ -export function maxFunds({ +export function maxFunds({ utxos, targets, remainder, feeRate, dustRelayFeeRate = DUST_RELAY_FEE_RATE }: { - utxos: Array; + utxos: Array; targets: Array; /** * Recipient to send maxFunds diff --git a/src/coinselect.ts b/src/coinselect.ts index 498a436..df5793c 100644 --- a/src/coinselect.ts +++ b/src/coinselect.ts @@ -70,7 +70,7 @@ function utxoTransferredValue( * * @see {@link https://bitcoinerlab.com/modules/descriptors} for descriptor info. */ -export function coinselect({ +export function coinselect({ utxos, targets, remainder, @@ -81,7 +81,7 @@ export function coinselect({ * Array of UTXOs for the transaction. Each UTXO includes an `OutputInstance` * and its value. */ - utxos: Array; + utxos: Array; /** * Array of transaction targets. If specified, `remainder` is used * as the change address.