| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Api.Compatible.Tx
Description
This module provides minimal transaction-building support across all Shelley-based eras, aimed at internal testing (e.g. tx-generator). The experimental API only covers the current and next era.
Synopsis
- data AnyProtocolUpdate era where
- ProtocolUpdate :: forall era. ShelleyToBabbageEra era -> UpdateProposal era -> AnyProtocolUpdate era
- ProposalProcedures :: forall era. ConwayEraOnwards era -> TxProposalProcedures (ShelleyLedgerEra era) -> AnyProtocolUpdate era
- NoPParamsUpdate :: forall era. ShelleyBasedEra era -> AnyProtocolUpdate era
- data AnyVote era where
- VotingProcedures :: forall era. ConwayEraOnwards era -> TxVotingProcedures (ShelleyLedgerEra era) -> AnyVote era
- NoVotes :: forall era. AnyVote era
- data CompatibleTxBodyContent era = CompatibleTxBodyContent {
- compatibleTxIns :: [(TxIn, AnyWitness (ShelleyLedgerEra era))]
- compatibleTxOuts :: [TxOut (ShelleyLedgerEra era)]
- compatibleTxSupplementalDatums :: Map DataHash (Data (ShelleyLedgerEra era))
- compatibleTxFee :: Lovelace
- compatibleTxProtocolUpdate :: AnyProtocolUpdate era
- compatibleTxVotingProcedures :: AnyVote era
- compatibleTxCertificates :: TxCertificates (ShelleyLedgerEra era)
- compatibleTxInsCollateral :: [TxIn]
- compatibleTxProtocolParams :: Maybe (PParams (ShelleyLedgerEra era))
- compatibleTxMetadata :: TxMetadataInEra era
- compatibleTxValidityUpperBound :: Maybe SlotNo
- data CompatibleTxError = CompatibleTxMissingScriptIntegrityPParams
- defaultCompatibleTxBodyContent :: ShelleyBasedEra era -> CompatibleTxBodyContent era
- createCompatibleTx :: ShelleyBasedEra era -> CompatibleTxBodyContent era -> Either CompatibleTxError (Tx era)
- addWitnesses :: [KeyWitness era] -> Tx era -> Tx era
Documentation
data AnyProtocolUpdate era where Source #
Constructors
| ProtocolUpdate :: forall era. ShelleyToBabbageEra era -> UpdateProposal era -> AnyProtocolUpdate era | |
| ProposalProcedures :: forall era. ConwayEraOnwards era -> TxProposalProcedures (ShelleyLedgerEra era) -> AnyProtocolUpdate era | |
| NoPParamsUpdate :: forall era. ShelleyBasedEra era -> AnyProtocolUpdate era |
data AnyVote era where Source #
Constructors
| VotingProcedures :: forall era. ConwayEraOnwards era -> TxVotingProcedures (ShelleyLedgerEra era) -> AnyVote era | |
| NoVotes :: forall era. AnyVote era |
data CompatibleTxBodyContent era Source #
The content of a transaction createCompatibleTx builds.
Constructors
| CompatibleTxBodyContent | |
Fields
| |
data CompatibleTxError Source #
Errors that can occur while assembling a Tx with createCompatibleTx.
Constructors
| CompatibleTxMissingScriptIntegrityPParams | Plutus script witnesses are present, but |
Instances
| Error CompatibleTxError Source # | |
Defined in Cardano.Api.Compatible.Tx Methods prettyError :: CompatibleTxError -> Doc ann Source # | |
| Show CompatibleTxError Source # | |
Defined in Cardano.Api.Compatible.Tx | |
defaultCompatibleTxBodyContent :: ShelleyBasedEra era -> CompatibleTxBodyContent era Source #
CompatibleTxBodyContent with everything empty: no inputs, outputs,
certificates, votes, protocol update, collateral, protocol parameters,
metadata or validity upper bound.
The ShelleyBasedEra witness is only needed to build the default
NoPParamsUpdate.
createCompatibleTx :: ShelleyBasedEra era -> CompatibleTxBodyContent era -> Either CompatibleTxError (Tx era) Source #
Create a transaction in any shelley based era
Arguments
| :: [KeyWitness era] | |
| -> Tx era | |
| -> Tx era | a signed transaction |
Add provided witnesses to the transaction