Safe Haskell | None |
---|---|
Language | Haskell2010 |
Transactions in the context of a consensus mode, and other types used in the transaction submission protocol.
Synopsis
- data TxInMode where
- TxInMode :: forall era. ShelleyBasedEra era -> Tx era -> TxInMode
- TxInByronSpecial :: GenTx ByronBlock -> TxInMode
- fromConsensusGenTx :: CardanoBlock StandardCrypto ~ block => GenTx block -> TxInMode
- toConsensusGenTx :: CardanoBlock StandardCrypto ~ block => TxInMode -> GenTx block
- data TxIdInMode where
- TxIdInMode :: forall era. CardanoEra era -> TxId -> TxIdInMode
- toConsensusTxId :: CardanoBlock StandardCrypto ~ block => TxIdInMode -> TxId (GenTx block)
- data TxValidationError era where
- ByronTxValidationError :: forall era. ApplyTxErr ByronBlock -> TxValidationError era
- ShelleyTxValidationError :: forall era. ShelleyBasedEra era -> ApplyTxErr (ShelleyBlock (ConsensusProtocol era) (ShelleyLedgerEra era)) -> TxValidationError era
- data TxValidationErrorInCardanoMode where
- fromConsensusApplyTxErr :: CardanoBlock StandardCrypto ~ block => ApplyTxErr block -> TxValidationErrorInCardanoMode
Transaction in a consensus mode
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.
TxInMode :: forall era. 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. |
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
TxIdInMode :: forall era. 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.
ByronTxValidationError :: forall era. ApplyTxErr ByronBlock -> TxValidationError era | |
ShelleyTxValidationError :: forall era. ShelleyBasedEra era -> ApplyTxErr (ShelleyBlock (ConsensusProtocol era) (ShelleyLedgerEra era)) -> TxValidationError era |
Instances
data TxValidationErrorInCardanoMode where Source #
A TxValidationError
in one of the eras supported by a given protocol
mode.
This is used in the LocalStateQuery protocol.
TxValidationErrorInCardanoMode :: forall era. TxValidationError era -> TxValidationErrorInCardanoMode | |
TxValidationEraMismatch :: EraMismatch -> TxValidationErrorInCardanoMode |
Instances
ToJSON TxValidationErrorInCardanoMode Source # | |
Defined in Cardano.Api.InMode toJSON :: TxValidationErrorInCardanoMode -> Value # toEncoding :: TxValidationErrorInCardanoMode -> Encoding # toJSONList :: [TxValidationErrorInCardanoMode] -> Value # toEncodingList :: [TxValidationErrorInCardanoMode] -> Encoding # | |
Show TxValidationErrorInCardanoMode Source # | |
Defined in Cardano.Api.InMode |
fromConsensusApplyTxErr :: CardanoBlock StandardCrypto ~ block => ApplyTxErr block -> TxValidationErrorInCardanoMode Source #