plutus-ledger-1.2.0.0: Wallet API
Safe HaskellNone
LanguageHaskell2010

Ledger.Value.CardanoAPI

Documentation

data Value #

Instances

Instances details
Eq Value 
Instance details

Defined in Cardano.Api.Value

Methods

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

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

Show Value 
Instance details

Defined in Cardano.Api.Value

Semigroup Value 
Instance details

Defined in Cardano.Api.Value

Monoid Value 
Instance details

Defined in Cardano.Api.Value

Serialise Value 
Instance details

Defined in Ledger.Value.Orphans

Methods

encode :: Value -> Encoding

decode :: Decoder s Value

encodeList :: [Value] -> Encoding

decodeList :: Decoder s [Value]

FromJSON Value 
Instance details

Defined in Cardano.Api.Value

Methods

parseJSON :: Value0 -> Parser Value

parseJSONList :: Value0 -> Parser [Value]

ToJSON Value 
Instance details

Defined in Cardano.Api.Value

Methods

toJSON :: Value -> Value0

toEncoding :: Value -> Encoding

toJSONList :: [Value] -> Value0

toEncodingList :: [Value] -> Encoding

JoinSemiLattice Value 
Instance details

Defined in Ledger.Value.CardanoAPI

Methods

(\/) :: Value -> Value -> Value

Pretty Value Source # 
Instance details

Defined in Ledger.Value.Orphans

Methods

pretty :: Value -> Doc ann #

prettyList :: [Value] -> Doc ann #

newtype Lovelace #

Constructors

Lovelace Integer 

Instances

Instances details
Enum Lovelace 
Instance details

Defined in Cardano.Api.Value

Eq Lovelace 
Instance details

Defined in Cardano.Api.Value

Integral Lovelace 
Instance details

Defined in Cardano.Api.Value

Num Lovelace 
Instance details

Defined in Cardano.Api.Value

Ord Lovelace 
Instance details

Defined in Cardano.Api.Value

Real Lovelace 
Instance details

Defined in Cardano.Api.Value

Show Lovelace 
Instance details

Defined in Cardano.Api.Value

Generic Lovelace Source # 
Instance details

Defined in Ledger.Orphans

Associated Types

type Rep Lovelace :: Type -> Type Source #

Semigroup Lovelace 
Instance details

Defined in Cardano.Api.Value

Monoid Lovelace 
Instance details

Defined in Cardano.Api.Value

Serialise Lovelace 
Instance details

Defined in Ledger.Value.Orphans

Methods

encode :: Lovelace -> Encoding

decode :: Decoder s Lovelace

encodeList :: [Lovelace] -> Encoding

decodeList :: Decoder s [Lovelace]

FromJSON Lovelace 
Instance details

Defined in Cardano.Api.Value

Methods

parseJSON :: Value -> Parser Lovelace

parseJSONList :: Value -> Parser [Lovelace]

ToJSON Lovelace 
Instance details

Defined in Cardano.Api.Value

Methods

toJSON :: Lovelace -> Value

toEncoding :: Lovelace -> Encoding

toJSONList :: [Lovelace] -> Value

toEncodingList :: [Lovelace] -> Encoding

Pretty Lovelace Source # 
Instance details

Defined in Ledger.Value.Orphans

Methods

pretty :: Lovelace -> Doc ann #

prettyList :: [Lovelace] -> Doc ann #

FromCBOR Lovelace 
Instance details

Defined in Cardano.Api.Value

Methods

fromCBOR :: Decoder s Lovelace

label :: Proxy Lovelace -> Text

ToCBOR Lovelace 
Instance details

Defined in Cardano.Api.Value

Methods

toCBOR :: Lovelace -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Lovelace -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Lovelace] -> Size

type Rep Lovelace Source # 
Instance details

Defined in Ledger.Orphans

type Rep Lovelace = D1 ('MetaData "Lovelace" "Cardano.Api.Value" "cardano-api-1.35.4-DlJBOMjUMEP4jWrRjidGIP" 'True) (C1 ('MetaCons "Lovelace" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))

data AssetId #

Instances

Instances details
Eq AssetId 
Instance details

Defined in Cardano.Api.Value

Ord AssetId 
Instance details

Defined in Cardano.Api.Value

Show AssetId 
Instance details

Defined in Cardano.Api.Value

Generic AssetId Source # 
Instance details

Defined in Ledger.Value.Orphans

Associated Types

type Rep AssetId :: Type -> Type Source #

Serialise AssetId 
Instance details

Defined in Ledger.Value.Orphans

Methods

encode :: AssetId -> Encoding

decode :: Decoder s AssetId

encodeList :: [AssetId] -> Encoding

decodeList :: Decoder s [AssetId]

FromJSON AssetId 
Instance details

Defined in Ledger.Value.Orphans

Methods

parseJSON :: Value -> Parser AssetId

parseJSONList :: Value -> Parser [AssetId]

ToJSON AssetId 
Instance details

Defined in Ledger.Value.Orphans

Methods

toJSON :: AssetId -> Value

toEncoding :: AssetId -> Encoding

toJSONList :: [AssetId] -> Value

toEncodingList :: [AssetId] -> Encoding

Pretty AssetId Source # 
Instance details

Defined in Ledger.Value.Orphans

Methods

pretty :: AssetId -> Doc ann #

prettyList :: [AssetId] -> Doc ann #

type Rep AssetId Source # 
Instance details

Defined in Ledger.Value.Orphans

type Rep AssetId = D1 ('MetaData "AssetId" "Cardano.Api.Value" "cardano-api-1.35.4-DlJBOMjUMEP4jWrRjidGIP" 'False) (C1 ('MetaCons "AdaAssetId" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AssetId" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PolicyId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AssetName)))

data PolicyId #

Instances

Instances details
Eq PolicyId 
Instance details

Defined in Cardano.Api.Value

Ord PolicyId 
Instance details

Defined in Cardano.Api.Value

Show PolicyId 
Instance details

Defined in Cardano.Api.Value

IsString PolicyId 
Instance details

Defined in Cardano.Api.Value

Generic PolicyId Source # 
Instance details

Defined in Ledger.Orphans

Associated Types

type Rep PolicyId :: Type -> Type Source #

Serialise PolicyId 
Instance details

Defined in Ledger.Value.Orphans

Methods

encode :: PolicyId -> Encoding

decode :: Decoder s PolicyId

encodeList :: [PolicyId] -> Encoding

decodeList :: Decoder s [PolicyId]

FromJSON PolicyId 
Instance details

Defined in Cardano.Api.Value

Methods

parseJSON :: Value -> Parser PolicyId

parseJSONList :: Value -> Parser [PolicyId]

FromJSONKey PolicyId 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

fromJSONKey :: FromJSONKeyFunction PolicyId

fromJSONKeyList :: FromJSONKeyFunction [PolicyId]

ToJSON PolicyId 
Instance details

Defined in Cardano.Api.Value

Methods

toJSON :: PolicyId -> Value

toEncoding :: PolicyId -> Encoding

toJSONList :: [PolicyId] -> Value

toEncodingList :: [PolicyId] -> Encoding

ToJSONKey PolicyId 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

toJSONKey :: ToJSONKeyFunction PolicyId

toJSONKeyList :: ToJSONKeyFunction [PolicyId]

HasTypeProxy PolicyId 
Instance details

Defined in Cardano.Api.Value

Associated Types

data AsType PolicyId

Methods

proxyToAsType :: Proxy PolicyId -> AsType PolicyId

SerialiseAsRawBytes PolicyId 
Instance details

Defined in Cardano.Api.Value

Methods

serialiseToRawBytes :: PolicyId -> ByteString

deserialiseFromRawBytes :: AsType PolicyId -> ByteString -> Maybe PolicyId

type Rep PolicyId Source # 
Instance details

Defined in Ledger.Orphans

type Rep PolicyId = D1 ('MetaData "PolicyId" "Cardano.Api.Value" "cardano-api-1.35.4-DlJBOMjUMEP4jWrRjidGIP" 'True) (C1 ('MetaCons "PolicyId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPolicyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScriptHash)))
data AsType PolicyId 
Instance details

Defined in Cardano.Api.Value

data AsType PolicyId = AsPolicyId

data AssetName #

Instances

Instances details
Eq AssetName 
Instance details

Defined in Cardano.Api.Value

Ord AssetName 
Instance details

Defined in Cardano.Api.Value

Show AssetName 
Instance details

Defined in Cardano.Api.Value

IsString AssetName 
Instance details

Defined in Cardano.Api.Value

Serialise AssetName 
Instance details

Defined in Ledger.Value.Orphans

Methods

encode :: AssetName -> Encoding

decode :: Decoder s AssetName

encodeList :: [AssetName] -> Encoding

decodeList :: Decoder s [AssetName]

FromJSON AssetName 
Instance details

Defined in Cardano.Api.Value

Methods

parseJSON :: Value -> Parser AssetName

parseJSONList :: Value -> Parser [AssetName]

FromJSONKey AssetName 
Instance details

Defined in Cardano.Api.Value

Methods

fromJSONKey :: FromJSONKeyFunction AssetName

fromJSONKeyList :: FromJSONKeyFunction [AssetName]

ToJSON AssetName 
Instance details

Defined in Cardano.Api.Value

Methods

toJSON :: AssetName -> Value

toEncoding :: AssetName -> Encoding

toJSONList :: [AssetName] -> Value

toEncodingList :: [AssetName] -> Encoding

ToJSONKey AssetName 
Instance details

Defined in Cardano.Api.Value

Methods

toJSONKey :: ToJSONKeyFunction AssetName

toJSONKeyList :: ToJSONKeyFunction [AssetName]

HasTypeProxy AssetName 
Instance details

Defined in Cardano.Api.Value

Associated Types

data AsType AssetName

SerialiseAsRawBytes AssetName 
Instance details

Defined in Cardano.Api.Value

Methods

serialiseToRawBytes :: AssetName -> ByteString

deserialiseFromRawBytes :: AsType AssetName -> ByteString -> Maybe AssetName

data AsType AssetName 
Instance details

Defined in Cardano.Api.Value

data AsType AssetName = AsAssetName

selectAsset :: Value -> AssetId -> Quantity #

valueToList :: Value -> [(AssetId, Quantity)] #

valueFromList :: [(AssetId, Quantity)] -> Value #

combine :: Monoid m => (AssetId -> Quantity -> Quantity -> m) -> Value -> Value -> m Source #

Orphan instances

JoinSemiLattice Value Source # 
Instance details

Methods

(\/) :: Value -> Value -> Value