| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cooked.Skeleton.Value
Contents
Description
Synopsis
- valueAssetClassesI :: Iso' Value [(CurrencySymbol, TokenName, Integer)]
- valueAssetClassAmountL :: ToMintingPolicyHash mp => mp -> TokenName -> Lens' Value Integer
- valueLovelaceL :: Lens' Value Lovelace
- valueAssetClassAmountP :: ToMintingPolicyHash mp => mp -> TokenName -> Prism' Value Integer
- valueLovelaceP :: Prism' Value Lovelace
- lovelaceIntegerI :: Iso' Lovelace Integer
Optics
valueAssetClassesI :: Iso' Value [(CurrencySymbol, TokenName, Integer)] Source #
An isomorphism between a value and its flattened representation. The
flattened representation is always sorted by asset class (as produced by
flattenValue), and building a value back from a list canonicalises it
the same way, so that the internal map ordering of the resulting value does
not depend on the order of the input list.
valueAssetClassAmountL :: ToMintingPolicyHash mp => mp -> TokenName -> Lens' Value Integer Source #
Focuses on the amount of tokens of a certain AssetClass
in a given Value. This removes the entry if the new amount is 0.
valueAssetClassAmountP :: ToMintingPolicyHash mp => mp -> TokenName -> Prism' Value Integer Source #
Builds or retrieves the amount of tokens of a certain AssetClass in an
Value, treating a zero amount as absent