| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Bcc.Api.TxInMode
Description
Transactions in the context of a consensus mode, and other types used in the transaction submission protocol.
Synopsis
- data TxInMode mode where
 - toConsensusGenTx ∷ ConsensusBlockForMode mode ~ block ⇒ TxInMode mode → GenTx block
 - data TxValidationError era where
- ColeTxValidationError ∷ ApplyTxErr ColeBlock → TxValidationError ColeEra
 - SophieTxValidationError ∷ SophieBasedEra era → ApplyTxErr (SophieBlock (SophieLedgerEra era)) → TxValidationError era
 
 - data TxValidationErrorInMode mode where
- TxValidationErrorInMode ∷ TxValidationError era → EraInMode era mode → TxValidationErrorInMode mode
 - TxValidationEraMismatch ∷ EraMismatch → TxValidationErrorInMode mode
 
 - fromConsensusApplyTxErr ∷ ConsensusBlockForMode mode ~ block ⇒ 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 BccMode 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.  | 
| TxInColeSpecial ∷ GenTx ColeBlock → EraInMode ColeEra mode → TxInMode mode | Cole has various things we can post to the chain which are not actually transactions. This covers: update proposals, votes and delegation certs.  | 
toConsensusGenTx ∷ ConsensusBlockForMode mode ~ block ⇒ TxInMode mode → 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
| ColeTxValidationError ∷ ApplyTxErr ColeBlock → TxValidationError ColeEra | |
| SophieTxValidationError ∷ SophieBasedEra era → ApplyTxErr (SophieBlock (SophieLedgerEra era)) → TxValidationError era | 
Instances
| Show (TxValidationError era) Source # | |
Defined in Bcc.Api.TxInMode  | |
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 Bcc.Api.TxInMode  | |
fromConsensusApplyTxErr ∷ ConsensusBlockForMode mode ~ block ⇒ ConsensusMode mode → ApplyTxErr block → TxValidationErrorInMode mode Source #