cardano-api-8.36.1.1: The cardano api
Safe HaskellNone
LanguageHaskell2010

Cardano.Api.InMode

Description

Transactions in the context of a consensus mode, and other types used in the transaction submission protocol.

Synopsis

Transaction in a consensus mode

data TxInMode where Source #

A Tx in one of the eras supported by a given protocol mode.

For multi-era modes such as the CardanoMode this type is a sum of the different transaction types for all the eras. It is used in the LocalTxSubmission protocol.

Constructors

TxInMode :: ShelleyBasedEra era -> Tx era -> TxInMode

Shelley based transactions.

TxInByronSpecial :: GenTx ByronBlock -> TxInMode

Legacy Byron transactions and things we can post to the chain which are not actually transactions. This covers: update proposals, votes and delegation certs.

Instances

Instances details
Show TxInMode Source # 
Instance details

Defined in Cardano.Api.InMode

fromConsensusGenTx :: CardanoBlock StandardCrypto ~ block => GenTx block -> TxInMode Source #

toConsensusGenTx :: CardanoBlock StandardCrypto ~ block => TxInMode -> GenTx block Source #

Transaction id in a consensus mode

data TxIdInMode where Source #

A TxId in one of the eras supported by a given protocol mode.

For multi-era modes such as the CardanoMode this type is a sum of the different transaction types for all the eras. It is used in the LocalTxMonitoring protocol.

TODO Rename to TxIdInEra

Constructors

TxIdInMode :: CardanoEra era -> TxId -> TxIdInMode 

toConsensusTxId :: CardanoBlock StandardCrypto ~ block => TxIdInMode -> TxId (GenTx block) Source #

Transaction validation errors

data TxValidationError era where Source #

The transaction validations errors that can occur from trying to submit a transaction to a local node. The errors are specific to an era.

Constructors

ByronTxValidationError :: ApplyTxErr ByronBlock -> TxValidationError era 
ShelleyTxValidationError :: ShelleyBasedEra era -> ApplyTxErr (ShelleyBlock (ConsensusProtocol era) (ShelleyLedgerEra era)) -> TxValidationError era 

Instances

Instances details
Show (TxValidationError era) Source # 
Instance details

Defined in Cardano.Api.InMode

Generic (TxValidationError era) Source # 
Instance details

Defined in Cardano.Api.InMode

Associated Types

type Rep (TxValidationError era) :: Type -> Type Source #

ToJSON (TxValidationError era) Source # 
Instance details

Defined in Cardano.Api.InMode

Methods

toJSON :: TxValidationError era -> Value #

toEncoding :: TxValidationError era -> Encoding #

toJSONList :: [TxValidationError era] -> Value #

toEncodingList :: [TxValidationError era] -> Encoding #

omitField :: TxValidationError era -> Bool #

type Rep (TxValidationError era) Source # 
Instance details

Defined in Cardano.Api.InMode

type Rep (TxValidationError era) = D1 ('MetaData "TxValidationError" "Cardano.Api.InMode" "cardano-api-8.36.1.1-1nzPjfRAlyMHXWNqpMkUqi-internal" 'False) (C1 ('MetaCons "ByronTxValidationError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ApplyTxErr ByronBlock))) :+: C1 ('MetaCons "ShelleyTxValidationError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ShelleyBasedEra era)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ApplyTxErr (ShelleyBlock (ConsensusProtocol era) (ShelleyLedgerEra era))))))

fromConsensusApplyTxErr :: CardanoBlock StandardCrypto ~ block => ApplyTxErr block -> TxValidationErrorInCardanoMode Source #