@bitcoinerlab/coinselect - v1.3.4
    Preparing search index...

    Function avoidChange

    • Seeks a selection of UTXOs that does not necessitate the creation of change. Although the function signature matches that of the standard coinselect, requiring a remainder, change is never generated. The remainder is used to assess if hypothetical change would NOT be considered dust, thereby rendering the solution unviable.

      Notes:

      • This function does not reorder UTXOs prior to selection.
      • UTXOs that do not provide enough value to cover their respective fee contributions are automatically excluded.

      Refer to coinselect for additional details on input parameters and expected returned values.

      Parameters

      • __namedParameters: {
            utxos: OutputWithValue[];
            targets: OutputWithValue[];
            remainder: {};
            feeRate: number;
            dustRelayFeeRate?: number;
        }
        • utxos: OutputWithValue[]
        • targets: OutputWithValue[]
        • remainder: {}

          This is the hypotetical change that this algo will check it would never be needed

        • feeRate: number
        • OptionaldustRelayFeeRate?: number

      Returns
          | {
              utxos: OutputWithValue[];
              targets: OutputWithValue[];
              fee: number;
              vsize: number;
          }
          | undefined