cooked-validators
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.Skeleton.Value

Description

This modules exposes optics around Value and Lovelace that we use in our TxSkel and are not defined anywhere else.

Synopsis

Optics

valueAssetClassAmountL :: ToMintingPolicyHash mp => mp -> TokenName -> Lens' Value Integer Source #

A lens to get or set the amount of tokens of a certain AssetClass from a given Value. This removes the entry if the new amount is 0.

valueLovelaceL :: Lens' Value Lovelace Source #

Focus the Lovelace part in a value.

valueAssetClassAmountP :: ToMintingPolicyHash mp => mp -> TokenName -> Prism' Value Integer Source #

A prism to build a value from an asset class and amount, or retrieves the amount from this asset class if it is not zero

lovelaceIntegerI :: Iso' Lovelace Integer Source #

Isomorphism between Lovelace and integers

Orphan instances

Ord Value Source # 
Instance details

Methods

compare :: Value -> Value -> Ordering #

(<) :: Value -> Value -> Bool #

(<=) :: Value -> Value -> Bool #

(>) :: Value -> Value -> Bool #

(>=) :: Value -> Value -> Bool #

max :: Value -> Value -> Value #

min :: Value -> Value -> Value #