Cashu-TS - v4.13.0
    Preparing search index...

    Function splitAmount

    • Splits the amount into denominations of the provided keyset.

      Parameters

      • value: AmountLike

        Amount to split.

      • keyset: Keys

        Keys to look up split amounts.

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

      Returns Amount[]

      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, the keyset lacks requested denominations, or the fill would exceed an internal output cap (coarse denominations over a large value).