Module

Ctl.Internal.Partition

#Equipartition

class Equipartition (a :: Type)  where

Represents types whose values can be equally divided into several parts.

Members

Instances

#Partition

class Partition (a :: Type)  where

Members

Instances

#equipartitionValueWithTokenQuantityUpperBound

equipartitionValueWithTokenQuantityUpperBound :: BigInt -> Value -> NonEmptyArray Value

Partitions a Value into smaller Values, where the Ada amount and the quantity of each token is equipartitioned across the resultant Values, with the goal that no token quantity in any of the resultant Values exceeds the given upper bound. Taken from cardano-wallet: https://github.com/input-output-hk/cardano-wallet/blob/d4b30de073f2b5eddb25bf12c2453abb42e8b352/lib/wallet/src/Cardano/Wallet/Primitive/Types/TokenBundle.hs#L381

Modules