@cashu/cashu-ts
    Preparing search index...

    Function splitAmount

    • Splits the amount into denominations of the provided keyset.

      Parameters

      • value: number

        Amount to split.

      • keyset: Keys

        Keys to look up split amounts.

      • Optionalsplit: number[]
      • Optionalorder: "desc" | "asc"

      Returns number[]

      Array of split amounts.

      Partial splits will be filled up to value using minimum splits required. Sorting is only applied if a fill was made - exact custom splits are always returned in the same order.

      Error if split sum is greater than value or mint does not have keys for requested split.