Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
PlutusCore.Value
Synopsis
- data Value
- type NestedMap = Map ByteString (Map ByteString Integer)
- unpack ∷ Value → NestedMap
- pack ∷ NestedMap → Value
- empty ∷ Value
- fromList ∷ [(ByteString, [(ByteString, Integer)])] → Value
- toList ∷ Value → [(ByteString, [(ByteString, Integer)])]
- totalSize ∷ Value → Int
- maxInnerSize ∷ Value → Int
Documentation
The underlying type of the UPLC built-in type Value
.
Instances
type NestedMap = Map ByteString (Map ByteString Integer) Source #
unpack ∷ Value → NestedMap Source #
Unpack a Value
into a map from (currency symbol, token name) to amount.
The map is guaranteed to not contain empty inner map or zero amount.
pack ∷ NestedMap → Value Source #
Pack a map from (currency symbol, token name) to amount into a Value
.
The map will be filtered so that it does not contain empty inner map or zero amount.
fromList ∷ [(ByteString, [(ByteString, Integer)])] → Value Source #
toList ∷ Value → [(ByteString, [(ByteString, Integer)])] Source #
totalSize ∷ Value → Int Source #
Total size, i.e., the number of distinct `(currency symbol, token name)` pairs
contained in the Value
.
maxInnerSize ∷ Value → Int Source #
Size of the largest inner map.