Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Cardano.Api.InMode
Description
Transactions in the context of a consensus mode, and other types used in the transaction submission protocol.
Synopsis
- data TxInMode mode where
- fromConsensusGenTx ∷ ConsensusBlockForMode mode ~ block ⇒ ConsensusMode mode → GenTx block → TxInMode mode
- toConsensusGenTx ∷ ConsensusBlockForMode mode ~ block ⇒ TxInMode mode → GenTx block
- data TxIdInMode mode where
- TxIdInMode ∷ TxId → EraInMode era mode → TxIdInMode mode
- toConsensusTxId ∷ ConsensusBlockForMode mode ~ block ⇒ TxIdInMode mode → TxId (GenTx block)
- data TxValidationError era where
- ByronTxValidationError ∷ ApplyTxErr ByronBlock → TxValidationError ByronEra
- ShelleyTxValidationError ∷ ShelleyBasedEra era → ApplyTxErr (ShelleyBlock (ConsensusProtocol era) (ShelleyLedgerEra era)) → TxValidationError era
- data TxValidationErrorInMode mode where
- TxValidationErrorInMode ∷ TxValidationError era → EraInMode era mode → TxValidationErrorInMode mode
- TxValidationEraMismatch ∷ EraMismatch → TxValidationErrorInMode mode
- fromConsensusApplyTxErr ∷ ConsensusBlockForMode mode ~ block ⇒ LedgerSupportsProtocol (ShelleyBlock (TPraos StandardCrypto) (ShelleyEra StandardCrypto)) ⇒ ConsensusMode mode → ApplyTxErr block → TxValidationErrorInMode mode
Transaction in a consensus mode
data TxInMode mode 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 ∷ Tx era → EraInMode era mode → TxInMode mode | Everything we consider a normal transaction. |
TxInByronSpecial ∷ GenTx ByronBlock → EraInMode ByronEra mode → TxInMode mode | Byron has various things we can post to the chain which are not actually transactions. This covers: update proposals, votes and delegation certs. |
fromConsensusGenTx ∷ ConsensusBlockForMode mode ~ block ⇒ ConsensusMode mode → GenTx block → TxInMode mode Source #
toConsensusGenTx ∷ ConsensusBlockForMode mode ~ block ⇒ TxInMode mode → GenTx block Source #
Transaction id in a consensus mode
data TxIdInMode mode 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.
Constructors
TxIdInMode ∷ TxId → EraInMode era mode → TxIdInMode mode |
toConsensusTxId ∷ ConsensusBlockForMode mode ~ block ⇒ TxIdInMode mode → 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 ByronEra | |
ShelleyTxValidationError ∷ ShelleyBasedEra era → ApplyTxErr (ShelleyBlock (ConsensusProtocol era) (ShelleyLedgerEra era)) → TxValidationError era |
Instances
Show (TxValidationError era) Source # | |
Defined in Cardano.Api.InMode |
data TxValidationErrorInMode mode where Source #
A TxValidationError
in one of the eras supported by a given protocol
mode.
This is used in the LocalStateQuery protocol.
Constructors
TxValidationErrorInMode ∷ TxValidationError era → EraInMode era mode → TxValidationErrorInMode mode | |
TxValidationEraMismatch ∷ EraMismatch → TxValidationErrorInMode mode |
Instances
Show (TxValidationErrorInMode mode) Source # | |
Defined in Cardano.Api.InMode |
fromConsensusApplyTxErr ∷ ConsensusBlockForMode mode ~ block ⇒ LedgerSupportsProtocol (ShelleyBlock (TPraos StandardCrypto) (ShelleyEra StandardCrypto)) ⇒ ConsensusMode mode → ApplyTxErr block → TxValidationErrorInMode mode Source #