Module

Contract.Value

#CurrencySymbol

type CurrencySymbol = ScriptHash

Deprecated, use Cardano.Types.ScriptHash

#TokenName

type TokenName = AssetName

Deprecated, use Cardano.Types.AssetName

Re-exports from Cardano.Types.AssetName

Re-exports from Cardano.Types.Coin

Re-exports from Cardano.Types.ScriptHash

Re-exports from Cardano.Types.Value

#Value

data Value

In Plutus, Ada is is stored inside the map (with currency symbol and token name being empty bytestrings). cardano-serialization-lib makes semantic distinction between native tokens and Ada, and we follow this convention.

Constructors

Instances

#valueToCoin

valueToCoin :: Value -> Coin

Get the Coin in the given Value.

#valueOf

#valueAssetClasses

#unionWith

unionWith :: (BigNum -> BigNum -> Maybe BigNum) -> Value -> Value -> Maybe Value

Combines Value with a binary function on BigInts.

#toCsl

#pprintValue

#mkValue

#minus

#lt

lt :: Value -> Value -> Boolean

Check whether one Value is strictly less than another. See Value for an explanation of how operations on Values work.

#lovelaceValueOf

lovelaceValueOf :: BigNum -> Value

Convert a BigInt to Ada-only Value

#leq

leq :: Value -> Value -> Boolean

Check whether one Value is less than or equal to another. See Value for an explanation of how operations on Values work.

#isZero

isZero :: Value -> Boolean

Check whether a Value is zero.

#isPositive

isPositive :: Value -> Boolean

Checks if every asset has positive quantity

#gt

gt :: Value -> Value -> Boolean

Check whether one Value is strictly greater than another. See Value for an explanation of how operations on Values work.

#getMultiAsset

#getCoin

#getAssetQuantity

#geq

geq :: Value -> Value -> Boolean

Check whether one Value is greater than or equal to another. See Value for an explanation of how operations on Values work.

#fromCsl

#empty

#coinToValue

coinToValue :: Coin -> Value

Create a Value containing only the given Coin.

#checkPred

#checkBinRel

#assetToValue

#add

Modules