plutus-ledger-1.1.0.0: Wallet API
Safe HaskellNone
LanguageHaskell2010

Ledger.Tx.CardanoAPI.Internal

Description

Interface to the transaction types from 'cardano-api'

Synopsis

Documentation

data SomeCardanoApiTx where Source #

Cardano tx from any era.

Constructors

SomeTx :: IsCardanoEra era => Tx era -> EraInMode era CardanoMode -> SomeCardanoApiTx 

Instances

Instances details
Eq SomeCardanoApiTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Show SomeCardanoApiTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

ToJSON SomeCardanoApiTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

FromJSON SomeCardanoApiTx Source #

Converting SomeCardanoApiTx 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

ToSchema SomeCardanoApiTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Pretty SomeCardanoApiTx Source # 
Instance details

Defined in Ledger.Tx

Serialise SomeCardanoApiTx Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

fromCardanoAddressInEra :: AddressInEra era -> Address Source #

Deprecated: we now use Cardano address internally, if you need a plutus address use toPlutusAddress

fromCardanoAddress :: Address addrtype -> Address Source #

Deprecated: Shouldn't be used as we use Cardano address internally now

fromCardanoPaymentKeyHash :: Hash PaymentKey -> PubKeyHash Source #

Deprecated: Shouldn't be used as we use Cardano address internally now

fromTxScriptValidity :: TxScriptValidity era -> Bool Source #

Given a 'C.TxScriptValidity era', if the era supports scripts, return a True or False depending on script validity. If the era does not support scripts, always return True.

scriptDataFromCardanoTxBody :: TxBody era -> (Map DatumHash Datum, Redeemers) Source #

Given a 'C.TxBody from a 'C.Tx era', return the datums and redeemers along with their hashes.

plutusScriptsFromTxBody :: TxBody era -> Map ScriptHash (Versioned Script) Source #

Extract plutus scripts from a Cardano API tx body.

Note that Plutus scripts are only supported in Alonzo era and onwards.

toCardanoPlutusScript :: SerialiseAsRawBytes plutusScript => AsType plutusScript -> Script -> Either ToCardanoError plutusScript 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 #

ToJSON ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

FromJSON ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Pretty ToCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

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.1.0.0-JskZbcPMCdRJVHaAZ0to82" '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 #

ToJSON FromCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

FromJSON FromCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

Pretty FromCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

ToObject FromCardanoError Source # 
Instance details

Defined in Ledger.Tx.CardanoAPI.Internal

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.1.0.0-JskZbcPMCdRJVHaAZ0to82" 'False) (C1 ('MetaCons "SimpleScriptsNotSupported" 'PrefixI 'False) (U1 :: Type -> Type))

withIsCardanoEra :: EraInMode era CardanoMode -> (IsCardanoEra era => r) -> r Source #

Run code that needs an IsCardanoEra constraint while you only have an EraInMode value.

Orphan instances

Typeable era => ToSchema (Tx era) Source # 
Instance details

(Typeable era, Typeable mode) => ToSchema (EraInMode era mode) Source # 
Instance details