plutarch-ledger-api
Safe HaskellNone
LanguageHaskell2010

Plutarch.LedgerApi.Value

Synopsis

Types

newtype PRawValue (s :: S) Source #

Represents Values without any guarantees.

Values of this type may be unsorted, have duplicate keys, contain empty token maps, and include entries with zero token quantities.

Since: 3.5.0

Constructors

PRawValue (Term s (PUnsortedMap PCurrencySymbol (PUnsortedMap PTokenName PInteger))) 

Instances

Instances details
PIsData PRawValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData PRawValue) -> Term s PRawValue

pdataImpl :: forall (s :: S). Term s PRawValue -> Term s PData

PLiftable PRawValue Source # 
Instance details

Defined in Plutarch.LedgerApi.Value

Associated Types

type AsHaskell PRawValue

Since: plutarch-ledger-api-3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type AsHaskell PRawValue = AsHaskell (DeriveNewtypePLiftable PRawValue Value)
type PlutusRepr PRawValue 
Instance details

Defined in Plutarch.LedgerApi.Value

type PlutusRepr PRawValue = PlutusRepr (DeriveNewtypePLiftable PRawValue Value)

Methods

haskToRepr :: AsHaskell PRawValue -> PlutusRepr PRawValue

reprToHask :: PlutusRepr PRawValue -> Either LiftError (AsHaskell PRawValue)

reprToPlut :: forall (s :: S). PlutusRepr PRawValue -> PLifted s PRawValue

plutToRepr :: (forall (s :: S). PLifted s PRawValue) -> Either LiftError (PlutusRepr PRawValue)

PValidateData PRawValue Source #

Since: 3.6.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

pwithValidated :: forall (s :: S). Term s PData -> forall (r :: S -> Type). Term s r -> Term s r

PlutusType PRawValue Source # 
Instance details

Defined in Plutarch.LedgerApi.Value

Associated Types

type PInner PRawValue

Since: plutarch-ledger-api-3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type PInner PRawValue = PInner (DeriveNewtypePlutusType PRawValue)

Methods

pcon' :: forall (s :: S). PRawValue s -> Term s (PInner PRawValue)

pmatch' :: forall (s :: S) (b :: S -> Type). Term s (PInner PRawValue) -> (PRawValue s -> Term s b) -> Term s b

PShow PRawValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

pshow' :: forall (s :: S). Bool -> Term s PRawValue -> Term s PString

PTryFrom PData (PAsData PRawValue) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Associated Types

type PTryFromExcess PData (PAsData PRawValue) 
Instance details

Defined in Plutarch.LedgerApi.Value

type PTryFromExcess PData (PAsData PRawValue) = PTryFromExcess PData (PInner (PAsData PRawValue))

Methods

ptryFrom' :: forall (s :: S) (r :: S -> Type). Term s PData -> ((Term s (PAsData PRawValue), Reduce (PTryFromExcess PData (PAsData PRawValue) s)) -> Term s r) -> Term s r

Generic (PRawValue s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value

Associated Types

type Rep (PRawValue s)

Since: plutarch-ledger-api-3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type Rep (PRawValue s) = D1 ('MetaData "PRawValue" "Plutarch.LedgerApi.Value" "plutarch-ledger-api-3.6.0-JzNzlZYfKM24p3vIfYHfrb" 'True) (C1 ('MetaCons "PRawValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PUnsortedMap PCurrencySymbol (PUnsortedMap PTokenName PInteger))))))

Methods

from :: PRawValue s -> Rep (PRawValue s) x Source #

to :: Rep (PRawValue s) x -> PRawValue s Source #

Generic (PRawValue s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value

Associated Types

type Code (PRawValue s)

Since: plutarch-ledger-api-3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type Code (PRawValue s) = GCode (PRawValue s)

Methods

from :: PRawValue s -> Rep (PRawValue s)

to :: Rep (PRawValue s) -> PRawValue s

type AsHaskell PRawValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type AsHaskell PRawValue = AsHaskell (DeriveNewtypePLiftable PRawValue Value)
type PlutusRepr PRawValue Source # 
Instance details

Defined in Plutarch.LedgerApi.Value

type PlutusRepr PRawValue = PlutusRepr (DeriveNewtypePLiftable PRawValue Value)
type PInner PRawValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type PInner PRawValue = PInner (DeriveNewtypePlutusType PRawValue)
type PTryFromExcess PData (PAsData PRawValue) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value

type PTryFromExcess PData (PAsData PRawValue) = PTryFromExcess PData (PInner (PAsData PRawValue))
type Rep (PRawValue s) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type Rep (PRawValue s) = D1 ('MetaData "PRawValue" "Plutarch.LedgerApi.Value" "plutarch-ledger-api-3.6.0-JzNzlZYfKM24p3vIfYHfrb" 'True) (C1 ('MetaCons "PRawValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PUnsortedMap PCurrencySymbol (PUnsortedMap PTokenName PInteger))))))
type Code (PRawValue s) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type Code (PRawValue s) = GCode (PRawValue s)

data PSortedValue (s :: S) Source #

Represents sorted, well-formed Values without empty token maps.

Duplicate currency symbols or duplicate token names within the same token map are not allowed (since wip).

Compared to PRawValue, this type provides stronger guarantees, though PSortedValues may still contain entries with zero token quantities.

Since: 3.5.0

Instances

Instances details
PEq PSortedValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

(#==) :: forall (s :: S). Term s PSortedValue -> Term s PSortedValue -> Term s PBool

PIsData PSortedValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData PSortedValue) -> Term s PSortedValue

pdataImpl :: forall (s :: S). Term s PSortedValue -> Term s PData

PValidateData PSortedValue Source #

Checks that we have a valid PSortedValue. The underlying map must be sorted and contain no empty token maps.

Since: 3.6.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

pwithValidated :: forall (s :: S). Term s PData -> forall (r :: S -> Type). Term s r -> Term s r

PlutusType PSortedValue Source # 
Instance details

Defined in Plutarch.LedgerApi.Value

Associated Types

type PInner PSortedValue

Since: plutarch-ledger-api-3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type PInner PSortedValue = PInner (DeriveNewtypePlutusType PSortedValue)

Methods

pcon' :: forall (s :: S). PSortedValue s -> Term s (PInner PSortedValue)

pmatch' :: forall (s :: S) (b :: S -> Type). Term s (PInner PSortedValue) -> (PSortedValue s -> Term s b) -> Term s b

PMonoid PSortedValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

pmempty :: forall (s :: S). Term s PSortedValue

pmtimes :: forall (s :: S). Term s PNatural -> Term s PSortedValue -> Term s PSortedValue

PSemigroup PSortedValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

(#<>) :: forall (s :: S). Term s PSortedValue -> Term s PSortedValue -> Term s PSortedValue

pstimes :: forall (s :: S). Term s PPositive -> Term s PSortedValue -> Term s PSortedValue

PShow PSortedValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

pshow' :: forall (s :: S). Bool -> Term s PSortedValue -> Term s PString

PTryFrom PData (PAsData PSortedValue) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Associated Types

type PTryFromExcess PData (PAsData PSortedValue) 
Instance details

Defined in Plutarch.LedgerApi.Value

type PTryFromExcess PData (PAsData PSortedValue) = PTryFromExcess PData (PInner (PAsData PSortedValue))

Methods

ptryFrom' :: forall (s :: S) (r :: S -> Type). Term s PData -> ((Term s (PAsData PSortedValue), Reduce (PTryFromExcess PData (PAsData PSortedValue) s)) -> Term s r) -> Term s r

Generic (PSortedValue s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value

Associated Types

type Rep (PSortedValue s)

Since: plutarch-ledger-api-3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type Rep (PSortedValue s) = D1 ('MetaData "PSortedValue" "Plutarch.LedgerApi.Value" "plutarch-ledger-api-3.6.0-JzNzlZYfKM24p3vIfYHfrb" 'True) (C1 ('MetaCons "PSortedValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PSortedMap PCurrencySymbol (PSortedMap PTokenName PInteger))))))
Generic (PSortedValue s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value

Associated Types

type Code (PSortedValue s)

Since: plutarch-ledger-api-3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type Code (PSortedValue s) = GCode (PSortedValue s)

Methods

from :: PSortedValue s -> Rep (PSortedValue s)

to :: Rep (PSortedValue s) -> PSortedValue s

Monoid (Term s PSortedValue) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

mempty :: Term s PSortedValue Source #

mappend :: Term s PSortedValue -> Term s PSortedValue -> Term s PSortedValue Source #

mconcat :: [Term s PSortedValue] -> Term s PSortedValue Source #

Semigroup (Term s PSortedValue) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

(<>) :: Term s PSortedValue -> Term s PSortedValue -> Term s PSortedValue Source #

sconcat :: NonEmpty (Term s PSortedValue) -> Term s PSortedValue Source #

stimes :: Integral b => b -> Term s PSortedValue -> Term s PSortedValue Source #

Group (Term s PSortedValue) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

inv :: Term s PSortedValue -> Term s PSortedValue

Monoid (Term s PSortedValue) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

mempty :: Term s PSortedValue

Semigroup (Term s PSortedValue) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

(<>) :: Term s PSortedValue -> Term s PSortedValue -> Term s PSortedValue

type PInner PSortedValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type PInner PSortedValue = PInner (DeriveNewtypePlutusType PSortedValue)
type PTryFromExcess PData (PAsData PSortedValue) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value

type PTryFromExcess PData (PAsData PSortedValue) = PTryFromExcess PData (PInner (PAsData PSortedValue))
type Rep (PSortedValue s) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type Rep (PSortedValue s) = D1 ('MetaData "PSortedValue" "Plutarch.LedgerApi.Value" "plutarch-ledger-api-3.6.0-JzNzlZYfKM24p3vIfYHfrb" 'True) (C1 ('MetaCons "PSortedValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PSortedMap PCurrencySymbol (PSortedMap PTokenName PInteger))))))
type Code (PSortedValue s) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type Code (PSortedValue s) = GCode (PSortedValue s)

data PLedgerValue (s :: S) Source #

Represents sorted, well-formed Values with a mandatory Ada entry.

Duplicate currency symbols or duplicate token names within the same token map are not allowed (since wip).

Like PSortedValue, but requires the presence of an Ada entry, which may have a zero quantity. Values of this type may still contain entries with zero token quantities.

Since: 3.5.0

Instances

Instances details
PEq PLedgerValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

(#==) :: forall (s :: S). Term s PLedgerValue -> Term s PLedgerValue -> Term s PBool

PIsData PLedgerValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData PLedgerValue) -> Term s PLedgerValue

pdataImpl :: forall (s :: S). Term s PLedgerValue -> Term s PData

PValidateData PLedgerValue Source #

Checks that we have a valid PLedgerValue. The underlying map must be sorted, contain no empty token maps, and include an ADA entry.

Since: 3.6.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

pwithValidated :: forall (s :: S). Term s PData -> forall (r :: S -> Type). Term s r -> Term s r

PlutusType PLedgerValue Source # 
Instance details

Defined in Plutarch.LedgerApi.Value

Associated Types

type PInner PLedgerValue

Since: plutarch-ledger-api-3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type PInner PLedgerValue = PInner (DeriveNewtypePlutusType PLedgerValue)

Methods

pcon' :: forall (s :: S). PLedgerValue s -> Term s (PInner PLedgerValue)

pmatch' :: forall (s :: S) (b :: S -> Type). Term s (PInner PLedgerValue) -> (PLedgerValue s -> Term s b) -> Term s b

PMonoid PLedgerValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

pmempty :: forall (s :: S). Term s PLedgerValue

pmtimes :: forall (s :: S). Term s PNatural -> Term s PLedgerValue -> Term s PLedgerValue

PSemigroup PLedgerValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

(#<>) :: forall (s :: S). Term s PLedgerValue -> Term s PLedgerValue -> Term s PLedgerValue

pstimes :: forall (s :: S). Term s PPositive -> Term s PLedgerValue -> Term s PLedgerValue

PShow PLedgerValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

pshow' :: forall (s :: S). Bool -> Term s PLedgerValue -> Term s PString

PTryFrom PData (PAsData PLedgerValue) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Associated Types

type PTryFromExcess PData (PAsData PLedgerValue) 
Instance details

Defined in Plutarch.LedgerApi.Value

type PTryFromExcess PData (PAsData PLedgerValue) = PTryFromExcess PData (PInner (PAsData PLedgerValue))

Methods

ptryFrom' :: forall (s :: S) (r :: S -> Type). Term s PData -> ((Term s (PAsData PLedgerValue), Reduce (PTryFromExcess PData (PAsData PLedgerValue) s)) -> Term s r) -> Term s r

Generic (PLedgerValue s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value

Associated Types

type Rep (PLedgerValue s)

Since: plutarch-ledger-api-3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type Rep (PLedgerValue s) = D1 ('MetaData "PLedgerValue" "Plutarch.LedgerApi.Value" "plutarch-ledger-api-3.6.0-JzNzlZYfKM24p3vIfYHfrb" 'True) (C1 ('MetaCons "PLedgerValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s PSortedValue))))
Generic (PLedgerValue s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value

Associated Types

type Code (PLedgerValue s)

Since: plutarch-ledger-api-3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type Code (PLedgerValue s) = GCode (PLedgerValue s)

Methods

from :: PLedgerValue s -> Rep (PLedgerValue s)

to :: Rep (PLedgerValue s) -> PLedgerValue s

Monoid (Term s PLedgerValue) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

mempty :: Term s PLedgerValue Source #

mappend :: Term s PLedgerValue -> Term s PLedgerValue -> Term s PLedgerValue Source #

mconcat :: [Term s PLedgerValue] -> Term s PLedgerValue Source #

Semigroup (Term s PLedgerValue) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

(<>) :: Term s PLedgerValue -> Term s PLedgerValue -> Term s PLedgerValue Source #

sconcat :: NonEmpty (Term s PLedgerValue) -> Term s PLedgerValue Source #

stimes :: Integral b => b -> Term s PLedgerValue -> Term s PLedgerValue Source #

Group (Term s PLedgerValue) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

inv :: Term s PLedgerValue -> Term s PLedgerValue

Monoid (Term s PLedgerValue) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

mempty :: Term s PLedgerValue

Semigroup (Term s PLedgerValue) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

Methods

(<>) :: Term s PLedgerValue -> Term s PLedgerValue -> Term s PLedgerValue

type PInner PLedgerValue Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type PInner PLedgerValue = PInner (DeriveNewtypePlutusType PLedgerValue)
type PTryFromExcess PData (PAsData PLedgerValue) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value

type PTryFromExcess PData (PAsData PLedgerValue) = PTryFromExcess PData (PInner (PAsData PLedgerValue))
type Rep (PLedgerValue s) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type Rep (PLedgerValue s) = D1 ('MetaData "PLedgerValue" "Plutarch.LedgerApi.Value" "plutarch-ledger-api-3.6.0-JzNzlZYfKM24p3vIfYHfrb" 'True) (C1 ('MetaCons "PLedgerValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s PSortedValue))))
type Code (PLedgerValue s) Source #

Since: 3.5.0

Instance details

Defined in Plutarch.LedgerApi.Value

type Code (PLedgerValue s) = GCode (PLedgerValue s)

newtype PCurrencySymbol (s :: S) Source #

Since: 2.0.0

Constructors

PCurrencySymbol (Term s PByteString) 

Instances

Instances details
PEq PCurrencySymbol Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

Methods

(#==) :: forall (s :: S). Term s PCurrencySymbol -> Term s PCurrencySymbol -> Term s PBool

PIsData PCurrencySymbol Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData PCurrencySymbol) -> Term s PCurrencySymbol

pdataImpl :: forall (s :: S). Term s PCurrencySymbol -> Term s PData

PLiftable PCurrencySymbol Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

Associated Types

type AsHaskell PCurrencySymbol 
Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

type AsHaskell PCurrencySymbol = CurrencySymbol
type PlutusRepr PCurrencySymbol 
Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

type PlutusRepr PCurrencySymbol = ByteString

Methods

haskToRepr :: AsHaskell PCurrencySymbol -> PlutusRepr PCurrencySymbol

reprToHask :: PlutusRepr PCurrencySymbol -> Either LiftError (AsHaskell PCurrencySymbol)

reprToPlut :: forall (s :: S). PlutusRepr PCurrencySymbol -> PLifted s PCurrencySymbol

plutToRepr :: (forall (s :: S). PLifted s PCurrencySymbol) -> Either LiftError (PlutusRepr PCurrencySymbol)

POrd PCurrencySymbol Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

Methods

(#<=) :: forall (s :: S). Term s PCurrencySymbol -> Term s PCurrencySymbol -> Term s PBool

(#<) :: forall (s :: S). Term s PCurrencySymbol -> Term s PCurrencySymbol -> Term s PBool

pmax :: forall (s :: S). Term s PCurrencySymbol -> Term s PCurrencySymbol -> Term s PCurrencySymbol

pmin :: forall (s :: S). Term s PCurrencySymbol -> Term s PCurrencySymbol -> Term s PCurrencySymbol

PValidateData PCurrencySymbol Source #

Checks that we have a PCurrencySymbol of valid length. The underlying PByteString must be exactly 28 bytes, as Cardano minting policies are hashed with BLAKE2b-224.

Since: 3.6.0

Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

Methods

pwithValidated :: forall (s :: S). Term s PData -> forall (r :: S -> Type). Term s r -> Term s r

PlutusType PCurrencySymbol Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

Associated Types

type PInner PCurrencySymbol

Since: plutarch-ledger-api-3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

type PInner PCurrencySymbol = PInner (DeriveNewtypePlutusType PCurrencySymbol)

Methods

pcon' :: forall (s :: S). PCurrencySymbol s -> Term s (PInner PCurrencySymbol)

pmatch' :: forall (s :: S) (b :: S -> Type). Term s (PInner PCurrencySymbol) -> (PCurrencySymbol s -> Term s b) -> Term s b

PShow PCurrencySymbol Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

Methods

pshow' :: forall (s :: S). Bool -> Term s PCurrencySymbol -> Term s PString

PTryFrom PData (PAsData PCurrencySymbol) Source #

Since: 3.4.0

Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

Associated Types

type PTryFromExcess PData (PAsData PCurrencySymbol) 
Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

type PTryFromExcess PData (PAsData PCurrencySymbol) = PTryFromExcess PData (PInner (PAsData PCurrencySymbol))

Methods

ptryFrom' :: forall (s :: S) (r :: S -> Type). Term s PData -> ((Term s (PAsData PCurrencySymbol), Reduce (PTryFromExcess PData (PAsData PCurrencySymbol) s)) -> Term s r) -> Term s r

Generic (PCurrencySymbol s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

Associated Types

type Rep (PCurrencySymbol s)

Since: plutarch-ledger-api-2.0.0

Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

type Rep (PCurrencySymbol s) = D1 ('MetaData "PCurrencySymbol" "Plutarch.LedgerApi.Value.CurrencySymbol" "plutarch-ledger-api-3.6.0-JzNzlZYfKM24p3vIfYHfrb" 'True) (C1 ('MetaCons "PCurrencySymbol" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s PByteString))))
Generic (PCurrencySymbol s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

Associated Types

type Code (PCurrencySymbol s)

Since: plutarch-ledger-api-3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

type Code (PCurrencySymbol s) = GCode (PCurrencySymbol s)
type AsHaskell PCurrencySymbol Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

type AsHaskell PCurrencySymbol = CurrencySymbol
type PlutusRepr PCurrencySymbol Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

type PlutusRepr PCurrencySymbol = ByteString
type PInner PCurrencySymbol Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

type PInner PCurrencySymbol = PInner (DeriveNewtypePlutusType PCurrencySymbol)
type PTryFromExcess PData (PAsData PCurrencySymbol) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

type PTryFromExcess PData (PAsData PCurrencySymbol) = PTryFromExcess PData (PInner (PAsData PCurrencySymbol))
type Rep (PCurrencySymbol s) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

type Rep (PCurrencySymbol s) = D1 ('MetaData "PCurrencySymbol" "Plutarch.LedgerApi.Value.CurrencySymbol" "plutarch-ledger-api-3.6.0-JzNzlZYfKM24p3vIfYHfrb" 'True) (C1 ('MetaCons "PCurrencySymbol" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s PByteString))))
type Code (PCurrencySymbol s) Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.CurrencySymbol

type Code (PCurrencySymbol s) = GCode (PCurrencySymbol s)

newtype PTokenName (s :: S) Source #

Since: 2.0.0

Constructors

PTokenName (Term s PByteString) 

Instances

Instances details
PEq PTokenName Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

Methods

(#==) :: forall (s :: S). Term s PTokenName -> Term s PTokenName -> Term s PBool

PIsData PTokenName Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData PTokenName) -> Term s PTokenName

pdataImpl :: forall (s :: S). Term s PTokenName -> Term s PData

PLiftable PTokenName Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

Associated Types

type AsHaskell PTokenName 
Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

type AsHaskell PTokenName = TokenName
type PlutusRepr PTokenName 
Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

type PlutusRepr PTokenName = ByteString

Methods

haskToRepr :: AsHaskell PTokenName -> PlutusRepr PTokenName

reprToHask :: PlutusRepr PTokenName -> Either LiftError (AsHaskell PTokenName)

reprToPlut :: forall (s :: S). PlutusRepr PTokenName -> PLifted s PTokenName

plutToRepr :: (forall (s :: S). PLifted s PTokenName) -> Either LiftError (PlutusRepr PTokenName)

POrd PTokenName Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

Methods

(#<=) :: forall (s :: S). Term s PTokenName -> Term s PTokenName -> Term s PBool

(#<) :: forall (s :: S). Term s PTokenName -> Term s PTokenName -> Term s PBool

pmax :: forall (s :: S). Term s PTokenName -> Term s PTokenName -> Term s PTokenName

pmin :: forall (s :: S). Term s PTokenName -> Term s PTokenName -> Term s PTokenName

PValidateData PTokenName Source #

Checks that we have a PTokenName of valid length. The underlying PByteString must not exceed 32 bytes.

Since: 3.6.0

Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

Methods

pwithValidated :: forall (s :: S). Term s PData -> forall (r :: S -> Type). Term s r -> Term s r

PlutusType PTokenName Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

Associated Types

type PInner PTokenName

Since: plutarch-ledger-api-3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

type PInner PTokenName = PInner (DeriveNewtypePlutusType PTokenName)

Methods

pcon' :: forall (s :: S). PTokenName s -> Term s (PInner PTokenName)

pmatch' :: forall (s :: S) (b :: S -> Type). Term s (PInner PTokenName) -> (PTokenName s -> Term s b) -> Term s b

PShow PTokenName Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

Methods

pshow' :: forall (s :: S). Bool -> Term s PTokenName -> Term s PString

PTryFrom PData (PAsData PTokenName) Source #

Since: 3.4.0

Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

Associated Types

type PTryFromExcess PData (PAsData PTokenName) 
Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

type PTryFromExcess PData (PAsData PTokenName) = PTryFromExcess PData (PInner (PAsData PTokenName))

Methods

ptryFrom' :: forall (s :: S) (r :: S -> Type). Term s PData -> ((Term s (PAsData PTokenName), Reduce (PTryFromExcess PData (PAsData PTokenName) s)) -> Term s r) -> Term s r

Generic (PTokenName s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

Associated Types

type Rep (PTokenName s)

Since: plutarch-ledger-api-2.0.0

Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

type Rep (PTokenName s) = D1 ('MetaData "PTokenName" "Plutarch.LedgerApi.Value.TokenName" "plutarch-ledger-api-3.6.0-JzNzlZYfKM24p3vIfYHfrb" 'True) (C1 ('MetaCons "PTokenName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s PByteString))))

Methods

from :: PTokenName s -> Rep (PTokenName s) x Source #

to :: Rep (PTokenName s) x -> PTokenName s Source #

Generic (PTokenName s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

Associated Types

type Code (PTokenName s)

Since: plutarch-ledger-api-3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

type Code (PTokenName s) = GCode (PTokenName s)

Methods

from :: PTokenName s -> Rep (PTokenName s)

to :: Rep (PTokenName s) -> PTokenName s

type AsHaskell PTokenName Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

type AsHaskell PTokenName = TokenName
type PlutusRepr PTokenName Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

type PlutusRepr PTokenName = ByteString
type PInner PTokenName Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

type PInner PTokenName = PInner (DeriveNewtypePlutusType PTokenName)
type PTryFromExcess PData (PAsData PTokenName) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

type PTryFromExcess PData (PAsData PTokenName) = PTryFromExcess PData (PInner (PAsData PTokenName))
type Rep (PTokenName s) Source #

Since: 2.0.0

Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

type Rep (PTokenName s) = D1 ('MetaData "PTokenName" "Plutarch.LedgerApi.Value.TokenName" "plutarch-ledger-api-3.6.0-JzNzlZYfKM24p3vIfYHfrb" 'True) (C1 ('MetaCons "PTokenName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s PByteString))))
type Code (PTokenName s) Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.TokenName

type Code (PTokenName s) = GCode (PTokenName s)

newtype PLovelace (s :: S) Source #

Since: 2.2.0

Constructors

PLovelace (Term s PInteger) 

Instances

Instances details
PEq PLovelace Source #

Since: 2.2.0

Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

Methods

(#==) :: forall (s :: S). Term s PLovelace -> Term s PLovelace -> Term s PBool

PIsData PLovelace Source #

Since: 2.2.0

Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData PLovelace) -> Term s PLovelace

pdataImpl :: forall (s :: S). Term s PLovelace -> Term s PData

PLiftable PLovelace Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

Associated Types

type AsHaskell PLovelace

Since: plutarch-ledger-api-3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

type AsHaskell PLovelace = AsHaskell (DeriveNewtypePLiftable PLovelace Lovelace)
type PlutusRepr PLovelace 
Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

type PlutusRepr PLovelace = PlutusRepr (DeriveNewtypePLiftable PLovelace Lovelace)

Methods

haskToRepr :: AsHaskell PLovelace -> PlutusRepr PLovelace

reprToHask :: PlutusRepr PLovelace -> Either LiftError (AsHaskell PLovelace)

reprToPlut :: forall (s :: S). PlutusRepr PLovelace -> PLifted s PLovelace

plutToRepr :: (forall (s :: S). PLifted s PLovelace) -> Either LiftError (PlutusRepr PLovelace)

POrd PLovelace Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

Methods

(#<=) :: forall (s :: S). Term s PLovelace -> Term s PLovelace -> Term s PBool

(#<) :: forall (s :: S). Term s PLovelace -> Term s PLovelace -> Term s PBool

pmax :: forall (s :: S). Term s PLovelace -> Term s PLovelace -> Term s PLovelace

pmin :: forall (s :: S). Term s PLovelace -> Term s PLovelace -> Term s PLovelace

PValidateData PLovelace Source #

Since: 3.6.0

Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

Methods

pwithValidated :: forall (s :: S). Term s PData -> forall (r :: S -> Type). Term s r -> Term s r

PlutusType PLovelace Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

Associated Types

type PInner PLovelace

Since: plutarch-ledger-api-3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

type PInner PLovelace = PInner (DeriveNewtypePlutusType PLovelace)

Methods

pcon' :: forall (s :: S). PLovelace s -> Term s (PInner PLovelace)

pmatch' :: forall (s :: S) (b :: S -> Type). Term s (PInner PLovelace) -> (PLovelace s -> Term s b) -> Term s b

PShow PLovelace Source #

Since: 2.2.0

Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

Methods

pshow' :: forall (s :: S). Bool -> Term s PLovelace -> Term s PString

PTryFrom PData (PAsData PLovelace) Source #

Since: 3.4.0

Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

Associated Types

type PTryFromExcess PData (PAsData PLovelace) 
Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

type PTryFromExcess PData (PAsData PLovelace) = PTryFromExcess PData (PInner (PAsData PLovelace))

Methods

ptryFrom' :: forall (s :: S) (r :: S -> Type). Term s PData -> ((Term s (PAsData PLovelace), Reduce (PTryFromExcess PData (PAsData PLovelace) s)) -> Term s r) -> Term s r

Generic (PLovelace s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

Associated Types

type Rep (PLovelace s)

Since: plutarch-ledger-api-2.2.0

Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

type Rep (PLovelace s) = D1 ('MetaData "PLovelace" "Plutarch.LedgerApi.Value.Lovelace" "plutarch-ledger-api-3.6.0-JzNzlZYfKM24p3vIfYHfrb" 'True) (C1 ('MetaCons "PLovelace" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s PInteger))))

Methods

from :: PLovelace s -> Rep (PLovelace s) x Source #

to :: Rep (PLovelace s) x -> PLovelace s Source #

Generic (PLovelace s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

Associated Types

type Code (PLovelace s)

Since: plutarch-ledger-api-3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

type Code (PLovelace s) = GCode (PLovelace s)

Methods

from :: PLovelace s -> Rep (PLovelace s)

to :: Rep (PLovelace s) -> PLovelace s

type AsHaskell PLovelace Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

type AsHaskell PLovelace = AsHaskell (DeriveNewtypePLiftable PLovelace Lovelace)
type PlutusRepr PLovelace Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

type PlutusRepr PLovelace = PlutusRepr (DeriveNewtypePLiftable PLovelace Lovelace)
type PInner PLovelace Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

type PInner PLovelace = PInner (DeriveNewtypePlutusType PLovelace)
type PTryFromExcess PData (PAsData PLovelace) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

type PTryFromExcess PData (PAsData PLovelace) = PTryFromExcess PData (PInner (PAsData PLovelace))
type Rep (PLovelace s) Source #

Since: 2.2.0

Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

type Rep (PLovelace s) = D1 ('MetaData "PLovelace" "Plutarch.LedgerApi.Value.Lovelace" "plutarch-ledger-api-3.6.0-JzNzlZYfKM24p3vIfYHfrb" 'True) (C1 ('MetaCons "PLovelace" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s PInteger))))
type Code (PLovelace s) Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.Lovelace

type Code (PLovelace s) = GCode (PLovelace s)

newtype PAssetClass (s :: S) Source #

Since: 3.3.0

Constructors

PAssetClass (Term s (PBuiltinPair (PAsData PCurrencySymbol) (PAsData PTokenName))) 

Instances

Instances details
PEq PAssetClass Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

Methods

(#==) :: forall (s :: S). Term s PAssetClass -> Term s PAssetClass -> Term s PBool

PIsData PAssetClass Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

Methods

pfromDataImpl :: forall (s :: S). Term s (PAsData PAssetClass) -> Term s PAssetClass

pdataImpl :: forall (s :: S). Term s PAssetClass -> Term s PData

PLiftable PAssetClass Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

Associated Types

type AsHaskell PAssetClass

Since: plutarch-ledger-api-3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

type AsHaskell PAssetClass = AsHaskell (DeriveNewtypePLiftable PAssetClass AssetClass)
type PlutusRepr PAssetClass 
Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

type PlutusRepr PAssetClass = PlutusRepr (DeriveNewtypePLiftable PAssetClass AssetClass)

Methods

haskToRepr :: AsHaskell PAssetClass -> PlutusRepr PAssetClass

reprToHask :: PlutusRepr PAssetClass -> Either LiftError (AsHaskell PAssetClass)

reprToPlut :: forall (s :: S). PlutusRepr PAssetClass -> PLifted s PAssetClass

plutToRepr :: (forall (s :: S). PLifted s PAssetClass) -> Either LiftError (PlutusRepr PAssetClass)

POrd PAssetClass Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

Methods

(#<=) :: forall (s :: S). Term s PAssetClass -> Term s PAssetClass -> Term s PBool

(#<) :: forall (s :: S). Term s PAssetClass -> Term s PAssetClass -> Term s PBool

pmax :: forall (s :: S). Term s PAssetClass -> Term s PAssetClass -> Term s PAssetClass

pmin :: forall (s :: S). Term s PAssetClass -> Term s PAssetClass -> Term s PAssetClass

PValidateData PAssetClass Source #

Since: 3.6.0

Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

Methods

pwithValidated :: forall (s :: S). Term s PData -> forall (r :: S -> Type). Term s r -> Term s r

PlutusType PAssetClass Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

Associated Types

type PInner PAssetClass

Since: plutarch-ledger-api-3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

type PInner PAssetClass = PInner (DeriveNewtypePlutusType PAssetClass)

Methods

pcon' :: forall (s :: S). PAssetClass s -> Term s (PInner PAssetClass)

pmatch' :: forall (s :: S) (b :: S -> Type). Term s (PInner PAssetClass) -> (PAssetClass s -> Term s b) -> Term s b

PShow PAssetClass Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

Methods

pshow' :: forall (s :: S). Bool -> Term s PAssetClass -> Term s PString

PTryFrom PData (PAsData PAssetClass) Source #

Since: 3.4.0

Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

Associated Types

type PTryFromExcess PData (PAsData PAssetClass) 
Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

type PTryFromExcess PData (PAsData PAssetClass) = PTryFromExcess PData (PInner (PAsData PAssetClass))

Methods

ptryFrom' :: forall (s :: S) (r :: S -> Type). Term s PData -> ((Term s (PAsData PAssetClass), Reduce (PTryFromExcess PData (PAsData PAssetClass) s)) -> Term s r) -> Term s r

Generic (PAssetClass s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

Associated Types

type Rep (PAssetClass s)

Since: plutarch-ledger-api-3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

type Rep (PAssetClass s) = D1 ('MetaData "PAssetClass" "Plutarch.LedgerApi.Value.AssetClass" "plutarch-ledger-api-3.6.0-JzNzlZYfKM24p3vIfYHfrb" 'True) (C1 ('MetaCons "PAssetClass" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PBuiltinPair (PAsData PCurrencySymbol) (PAsData PTokenName))))))
Generic (PAssetClass s) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

Associated Types

type Code (PAssetClass s)

Since: plutarch-ledger-api-3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

type Code (PAssetClass s) = GCode (PAssetClass s)

Methods

from :: PAssetClass s -> Rep (PAssetClass s)

to :: Rep (PAssetClass s) -> PAssetClass s

type AsHaskell PAssetClass Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

type AsHaskell PAssetClass = AsHaskell (DeriveNewtypePLiftable PAssetClass AssetClass)
type PlutusRepr PAssetClass Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

type PlutusRepr PAssetClass = PlutusRepr (DeriveNewtypePLiftable PAssetClass AssetClass)
type PInner PAssetClass Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

type PInner PAssetClass = PInner (DeriveNewtypePlutusType PAssetClass)
type PTryFromExcess PData (PAsData PAssetClass) Source # 
Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

type PTryFromExcess PData (PAsData PAssetClass) = PTryFromExcess PData (PInner (PAsData PAssetClass))
type Rep (PAssetClass s) Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

type Rep (PAssetClass s) = D1 ('MetaData "PAssetClass" "Plutarch.LedgerApi.Value.AssetClass" "plutarch-ledger-api-3.6.0-JzNzlZYfKM24p3vIfYHfrb" 'True) (C1 ('MetaCons "PAssetClass" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Term s (PBuiltinPair (PAsData PCurrencySymbol) (PAsData PTokenName))))))
type Code (PAssetClass s) Source #

Since: 3.3.0

Instance details

Defined in Plutarch.LedgerApi.Value.AssetClass

type Code (PAssetClass s) = GCode (PAssetClass s)

Functions

Creation

PRawValue

pemptyRawValue :: forall (s :: S). Term s PRawValue Source #

Construct an empty PRawValue.

Since: 3.5.0

psingletonRawValue :: forall (s :: S). Term s (PCurrencySymbol :--> (PTokenName :--> (PInteger :--> PRawValue))) Source #

Construct a singleton PRawValue containing only the given quantity of the given currency.

Since: 3.5.0

psingletonRawValueData :: forall (s :: S). Term s (PAsData PCurrencySymbol :--> (PAsData PTokenName :--> (PAsData PInteger :--> PRawValue))) Source #

Construct a singleton PRawValue containing only the given quantity of the given currency, taking data-encoded parameters.

Since: 3.5.0

PSortedValue

pemptySortedValue :: forall (s :: S). Term s PSortedValue Source #

Construct an empty PSortedValue.

Since: 3.5.0

psingletonSortedValue :: forall (s :: S). Term s (PCurrencySymbol :--> (PTokenName :--> (PInteger :--> PSortedValue))) Source #

Construct a singleton PSortedValue containing only the given quantity of the given currency.

Since: 3.5.0

psingletonSortedValueData :: forall (s :: S). Term s (PAsData PCurrencySymbol :--> (PAsData PTokenName :--> (PAsData PInteger :--> PSortedValue))) Source #

Like psingletonSortedValue, but accepts data-encoded arguments.

Since: 3.5.0

PLedgerValue

pemptyLedgerValue :: forall (s :: S). Term s PLedgerValue Source #

Construct an empty PLedgerValue with a mandatory zero Ada entry.

Since: 3.5.0

psingletonLedgerValue :: forall (s :: S). Term s (PCurrencySymbol :--> (PTokenName :--> (PInteger :--> PLedgerValue))) Source #

Construct a singleton PLedgerValue containing the given quantity of the given currency, together with a mandatory Ada entry (which may be zero).

Since: 3.5.0

psingletonLedgerValueData :: forall (s :: S). Term s (PAsData PCurrencySymbol :--> (PAsData PTokenName :--> (PAsData PInteger :--> PLedgerValue))) Source #

Like psingletonLedgerValue, but accepts data-encoded arguments.

Since: 3.5.0

PCurrencySymbol

padaSymbol :: forall (s :: S). Term s PCurrencySymbol Source #

The PCurrencySymbol of the Ada currency.

Since: 2.1.1

padaSymbolData :: forall (s :: S). Term s (PAsData PCurrencySymbol) Source #

Data-encoded PCurrencySymbol of the Ada currency.

Since: 2.1.1

PTokenName

padaToken :: forall (s :: S). Term s PTokenName Source #

The PTokenName of the Ada currency.

Since: 2.1.1

Transformation

passertSorted :: forall (s :: S). Term s (PRawValue :--> PSortedValue) Source #

Deprecated: Use ppromoteToSortedValue instead

Attempt to promote a PRawValue to PSortedValue.

The conversion succeeds only if the input Value is already sorted and does not contain empty token maps. Otherwise, the function fails with an error.

Since: 2.1.1

ppromoteToSortedValue :: forall (s :: S). Term s (PRawValue :--> PSortedValue) Source #

Attempt to promote a PRawValue to PSortedValue.

The conversion succeeds only if the input Value is already sorted and does not contain empty token maps. Otherwise, the function fails with an error.

Since: 3.6.0

pforgetSorted :: forall (s :: S). Term s PSortedValue -> Term s PRawValue Source #

Safely demote a PSortedValue to a PRawValue.

Since: 3.5.0

ptoLedgerValue :: forall (s :: S). Term s (PSortedValue :--> PLedgerValue) Source #

Convert a PSortedValue to a PLedgerValue, inserting the mandatory Ada entry if missing.

Since: 3.5.0

Partial ordering

plt :: forall (s :: S). Term s PSortedValue -> Term s PSortedValue -> Term s PBool Source #

Mimics the lt operation on plutus-ledger-api's Value.

Since: 3.5.0

pleq :: forall (s :: S). Term s PSortedValue -> Term s PSortedValue -> Term s PBool Source #

Mimics the leq operation on plutus-ledger-api's Value.

Since: 3.5.0

pcheckBinRel :: forall (s :: S). Term s ((PInteger :--> (PInteger :--> PBool)) :--> (PSortedValue :--> (PSortedValue :--> PBool))) Source #

Given a description of a relation on amounts, check whether that relation holds over PSortedValues.

Important note

This is intended for use with boolean comparison functions, which must define at least a partial order (total orders and equivalences are acceptable as well). Use of this with anything else is not guaranteed to give anything resembling a sensible answer. Use with extreme care.

Since: 2.0.0

Combination

pleftBiasedCurrencyUnion :: forall (s :: S). Term s (PSortedValue :--> (PSortedValue :--> PSortedValue)) Source #

Combine two PSortedValues, taking the tokens from the left only, if a currency occurs on both sides.

Since: 2.1.1

pleftBiasedTokenUnion :: forall (s :: S). Term s (PSortedValue :--> (PSortedValue :--> PSortedValue)) Source #

Combine two PSortedValues, taking the tokens from the left only, if a token name of the same currency occurs on both sides.

Since: 2.1.1

punionWith :: forall (s :: S). Term s ((PInteger :--> (PInteger :--> PInteger)) :--> (PSortedValue :--> (PSortedValue :--> PSortedValue))) Source #

Combine two PSortedValues applying the given function to any pair of quantities with the same asset class.

Since: 3.5.0

punionWithData :: forall (s :: S). Term s ((PAsData PInteger :--> (PAsData PInteger :--> PAsData PInteger)) :--> (PSortedValue :--> (PSortedValue :--> PSortedValue))) Source #

Combine two PSortedValues applying the given function to any pair of data-encoded quantities with the same asset class.

Since: 3.5.0

Queries

pvalueOf :: forall (s :: S). Term s (PSortedValue :--> (PCurrencySymbol :--> (PTokenName :--> PInteger))) Source #

Get the quantity of the given currency in the PSortedValue.

Since: 3.6.0

plovelaceValueOf :: forall (s :: S). Term s (PSortedValue :--> PInteger) Source #

Get the amount of Lovelace in the PSortedValue.

Since: 2.1.1

pisAdaOnlyValue :: forall (s :: S). Term s (PSortedValue :--> PBool) Source #

Test if the PSortedValue contains nothing except an Ada entry.

Note

This function does not verify that Ada is positive and may return PTrue for zero or negative Ada amounts.

Since: 2.1.1

phasZeroTokenQuantities :: forall (s :: S). Term s (PRawValue :--> PBool) Source #

Check if the given Value contains zero token quantities.

Since: 3.6.0

phasAdaEntry :: forall (s :: S). Term s (PSortedValue :--> PBool) Source #

Check if the given PSortedValue contains an ADA entry (can be zero).

Since: 3.6.0

phasZeroAdaEntry :: forall (s :: S). Term s (PSortedValue :--> PBool) Source #

Check if the given PSortedValue has a zero ADA entry.

Since: 3.6.0

Misc (internal use)

pinsertAdaEntry :: forall (s :: S). Term s (PSortedValue :--> PSortedValue) Source #

Ensure that the given PSortedValue contains an Ada entry. If missing, a zero Ada entry is inserted at the head of the underlying sorted map.

pnormalizeNoAdaNonZeroTokens :: forall (s :: S). Term s (PSortedValue :--> PSortedValue) Source #

Normalize the argument to contain no Ada entries and no zero token quantities.

pmapAmounts :: forall (s :: S). Term s ((PInteger :--> PInteger) :--> (PRawValue :--> PRawValue)) Source #