plutus-ledger-1.2.0.0: Wallet API
Safe HaskellNone
LanguageHaskell2010

Ledger.Tx.CardanoAPI

Description

Interface to the transaction types from 'cardano-api'

Synopsis

Documentation

newtype CardanoBuildTx Source #

Constructors

CardanoBuildTx 

Fields

Instances

Instances details
Eq CardanoBuildTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Show CardanoBuildTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Generic CardanoBuildTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Associated Types

type Rep CardanoBuildTx :: Type -> Type Source #

FromJSON CardanoBuildTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

parseJSON :: Value -> Parser CardanoBuildTx

parseJSONList :: Value -> Parser [CardanoBuildTx]

ToJSON CardanoBuildTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

toJSON :: CardanoBuildTx -> Value

toEncoding :: CardanoBuildTx -> Encoding

toJSONList :: [CardanoBuildTx] -> Value

toEncodingList :: [CardanoBuildTx] -> Encoding

Pretty CardanoBuildTx Source # 
Instance details

Defined in Ledger.Tx

Methods

pretty :: CardanoBuildTx -> Doc ann #

prettyList :: [CardanoBuildTx] -> Doc ann #

type Rep CardanoBuildTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

type Rep CardanoBuildTx = D1 ('MetaData "CardanoBuildTx" "Ledger.Tx.CardanoAPI.Internal" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'True) (C1 ('MetaCons "CardanoBuildTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getCardanoBuildTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TxBodyContent BuildTx BabbageEra))))

data CardanoTx where Source #

Cardano tx from any era.

Constructors

CardanoTx :: IsCardanoEra era => Tx era -> EraInMode era CardanoMode -> CardanoTx 

Instances

Instances details
Eq CardanoTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Show CardanoTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Serialise CardanoTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

encode :: CardanoTx -> Encoding

decode :: Decoder s CardanoTx

encodeList :: [CardanoTx] -> Encoding

decodeList :: Decoder s [CardanoTx]

FromJSON CardanoTx Source #

Converting CardanoTx to JSON.

If the "tx" field is from an unknown era, the JSON parser will print an error at runtime while parsing.

Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

parseJSON :: Value -> Parser CardanoTx

parseJSONList :: Value -> Parser [CardanoTx]

ToJSON CardanoTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

toJSON :: CardanoTx -> Value

toEncoding :: CardanoTx -> Encoding

toJSONList :: [CardanoTx] -> Value

toEncodingList :: [CardanoTx] -> Encoding

Pretty CardanoTx Source # 
Instance details

Defined in Ledger.Tx

Methods

pretty :: CardanoTx -> Doc ann #

prettyList :: [CardanoTx] -> Doc ann #

fromCardanoTxInsCollateral :: TxInsCollateral era -> [TxIn] Source #

fromCardanoTotalCollateral :: TxTotalCollateral BabbageEra -> Maybe Lovelace Source #

fromCardanoReturnCollateral :: TxReturnCollateral CtxTx BabbageEra -> Maybe TxOut Source #

toCardanoTotalCollateral :: Maybe Lovelace -> TxTotalCollateral BabbageEra Source #

toCardanoReturnCollateral :: Maybe TxOut -> TxReturnCollateral CtxTx BabbageEra Source #

toCardanoDatumWitness :: Maybe Datum -> ScriptDatum WitCtxTxIn Source #

data ToCardanoError Source #

Instances

Instances details
Eq ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Show ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Generic ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Associated Types

type Rep ToCardanoError :: Type -> Type Source #

FromJSON ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

parseJSON :: Value -> Parser ToCardanoError

parseJSONList :: Value -> Parser [ToCardanoError]

ToJSON ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

toJSON :: ToCardanoError -> Value

toEncoding :: ToCardanoError -> Encoding

toJSONList :: [ToCardanoError] -> Value

toEncodingList :: [ToCardanoError] -> Encoding

Pretty ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

pretty :: ToCardanoError -> Doc ann #

prettyList :: [ToCardanoError] -> Doc ann #

type Rep ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

type Rep ToCardanoError = D1 ('MetaData "ToCardanoError" "Ledger.Tx.CardanoAPI.Internal" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'False) (((C1 ('MetaCons "TxBodyError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: (C1 ('MetaCons "DeserialisationError" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InvalidValidityRange" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ValueNotPureAda" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OutputHasZeroAda" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "StakingPointersNotSupported" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SimpleScriptsNotSupportedToCardano" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "MissingInputValidator" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MissingDatum" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MissingMintingPolicy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ScriptPurposeNotSupported" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScriptTag)))) :+: ((C1 ('MetaCons "MissingMintingPolicyRedeemer" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MissingStakeValidator" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UnsupportedPlutusVersion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Language)) :+: C1 ('MetaCons "Tag" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ToCardanoError))))))

data FromCardanoError Source #

Instances

Instances details
Eq FromCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Show FromCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Generic FromCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Associated Types

type Rep FromCardanoError :: Type -> Type Source #

FromJSON FromCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

parseJSON :: Value -> Parser FromCardanoError

parseJSONList :: Value -> Parser [FromCardanoError]

ToJSON FromCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Pretty FromCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

pretty :: FromCardanoError -> Doc ann #

prettyList :: [FromCardanoError] -> Doc ann #

ToObject FromCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Methods

toObject :: TracingVerbosity -> FromCardanoError -> Object

textTransformer :: FromCardanoError -> Object -> Text

type Rep FromCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

type Rep FromCardanoError = D1 ('MetaData "FromCardanoError" "Ledger.Tx.CardanoAPI.Internal" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'False) (C1 ('MetaCons "SimpleScriptsNotSupported" 'PrefixI 'False) (U1 :: Type -> Type))

Conversion from Plutus types

fromPlutusIndex :: UtxoIndex -> UTxO (BabbageEra StandardCrypto) Source #

fromPlutusTxOut :: TxOut -> TxOut (BabbageEra StandardCrypto) Source #