Module

Cardano.Plutus.Types.Value

#coinToValue

coinToValue :: Coin -> Value

Create a Value containing only the given Coin.

#flattenMultiAssets

flattenMultiAssets :: Value -> Array (CurrencySymbol /\ TokenName /\ BigInt)

Converts a value to a simple list, keeping only the non-Ada assets with non-zero amounts.

#flattenValue

flattenValue :: Value -> Array (CurrencySymbol /\ TokenName /\ BigInt)

Converts a value to a simple list, keeping only the non-zero amounts.

#geq

geq :: Value -> Value -> Boolean

Checks whether one Value is greater than or equal to another.

#getLovelace

getLovelace :: Coin -> BigInt

Get the amount of lovelaces in Ada Coin.

#getValue

getValue :: Value -> Map CurrencySymbol (Map TokenName BigInt)

Gets the underlying Plutus.Types.AssocMap.Map.

#gt

gt :: Value -> Value -> Boolean

Checks whether one Value is strictly greater than another.

#isCoinZero

isCoinZero :: Coin -> Boolean

Check whether an 'Ada' value is zero.

#isZero

isZero :: Value -> Boolean

Checks whether a Value is zero.

#leq

leq :: Value -> Value -> Boolean

Checks whether one Value is less than or equal to another.

#lovelaceValueOf

lovelaceValueOf :: BigInt -> Value

A Value with the given amount of Lovelace (the currency unit).

#lt

lt :: Value -> Value -> Boolean

Checks whether one Value is strictly less than another.

#negation

#scale

scale :: BigInt -> Value -> Value

Returns a new Value with all amounts multiplied by s.

#singleton

singleton :: CurrencySymbol -> TokenName -> BigInt -> Value

Makes a Value containing only the given quantity of the given currency.

#split

split :: Value -> Value /\ Value

Splits a value into its positive and non-positive parts. The first element of the tuple contains the non-positive parts of the value, the second element contains the positive parts. The convention is non-positive parts are negated to make them positive in the output.

#symbols

symbols :: Value -> Array CurrencySymbol

The list of CurrencySymbols of a Value.

#unionWith

unionWith :: (BigInt -> BigInt -> BigInt) -> Value -> Value -> Value

Combines Value with a binary function on BigInts.

#valueOf

valueOf :: Value -> CurrencySymbol -> TokenName -> BigInt

Gets the quantity of the given currency in the Value.

#valueToCoin

valueToCoin :: Value -> Coin

Get the Coin in the given Value.

#valueToCoin'

valueToCoin' :: Value -> BigInt

Get the Coin in the given Value as a BigInt.

#pprintValue

pprintValue :: Value -> TagSet

Pretty-print a Plutus domain Value

#toCardano

#fromCardano

Modules