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

    Function maxFunds

    • The maxFunds algorithm is tailored for scenarios where the goal is to transfer all funds from specified UTXOs to a single recipient output. To utilize this function, specify the recipient output in the remainder argument. In this context, the remainder serves as the recipient of the funds.

      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.
      • Recipient of all funds is set to last position of the returned targets array.

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

      Parameters

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

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