Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Cardano.Api.TxBody
Description
Transaction bodies
Synopsis
- parseTxId ∷ Parser TxId
- data TxBody era where
- ByronTxBody ∷ Annotated Tx ByteString → TxBody ByronEra
- ShelleyTxBody ∷ ShelleyBasedEra era → TxBody (ShelleyLedgerEra era) → [Script (ShelleyLedgerEra era)] → TxBodyScriptData era → Maybe (AuxiliaryData (ShelleyLedgerEra era)) → TxScriptValidity era → TxBody era
- pattern TxBody ∷ TxBodyContent ViewTx era → TxBody era
- makeTransactionBody ∷ ∀ era. IsCardanoEra era ⇒ TxBodyContent BuildTx era → Either TxBodyError (TxBody era)
- createTransactionBody ∷ ShelleyBasedEra era → TxBodyContent BuildTx era → TxBody era
- createAndValidateTransactionBody ∷ ∀ era. IsCardanoEra era ⇒ TxBodyContent BuildTx era → Either TxBodyError (TxBody era)
- data TxBodyContent build era = TxBodyContent {
- txIns ∷ TxIns build era
- txInsCollateral ∷ TxInsCollateral era
- txInsReference ∷ TxInsReference build era
- txOuts ∷ [TxOut CtxTx era]
- txTotalCollateral ∷ TxTotalCollateral era
- txReturnCollateral ∷ TxReturnCollateral CtxTx era
- txFee ∷ TxFee era
- txValidityRange ∷ (TxValidityLowerBound era, TxValidityUpperBound era)
- txMetadata ∷ TxMetadataInEra era
- txAuxScripts ∷ TxAuxScripts era
- txExtraKeyWits ∷ TxExtraKeyWitnesses era
- txProtocolParams ∷ BuildTxWith build (Maybe ProtocolParameters)
- txWithdrawals ∷ TxWithdrawals build era
- txCertificates ∷ TxCertificates build era
- txUpdateProposal ∷ TxUpdateProposal era
- txMintValue ∷ TxMintValue build era
- txScriptValidity ∷ TxScriptValidity era
- data TxBodyError
- data TxBodyScriptData era where
- TxBodyNoScriptData ∷ TxBodyScriptData era
- TxBodyScriptData ∷ ScriptDataSupportedInEra era → TxDats (ShelleyLedgerEra era) → Redeemers (ShelleyLedgerEra era) → TxBodyScriptData era
- data TxScriptValidity era where
- data TxScriptValiditySupportedInEra era where
- data ScriptValidity
- scriptValidityToIsValid ∷ ScriptValidity → IsValid
- isValidToScriptValidity ∷ IsValid → ScriptValidity
- scriptValidityToTxScriptValidity ∷ ShelleyBasedEra era → ScriptValidity → TxScriptValidity era
- txScriptValidityToIsValid ∷ TxScriptValidity era → IsValid
- txScriptValidityToScriptValidity ∷ TxScriptValidity era → ScriptValidity
- newtype TxId = TxId (Hash StandardCrypto EraIndependentTxBody)
- getTxId ∷ ∀ era. TxBody era → TxId
- getTxIdShelley ∷ Crypto (ShelleyLedgerEra era) ~ StandardCrypto ⇒ EraTxBody (ShelleyLedgerEra era) ⇒ ShelleyBasedEra era → TxBody (ShelleyLedgerEra era) → TxId
- data TxIn = TxIn TxId TxIx
- type TxIns build era = [(TxIn, BuildTxWith build (Witness WitCtxTxIn era))]
- newtype TxIx = TxIx Word
- genesisUTxOPseudoTxIn ∷ NetworkId → Hash GenesisUTxOKey → TxIn
- data CtxTx
- data CtxUTxO
- data TxOut ctx era = TxOut (AddressInEra era) (TxOutValue era) (TxOutDatum ctx era) (ReferenceScript era)
- data TxOutValue era where
- TxOutAdaOnly ∷ OnlyAdaSupportedInEra era → Lovelace → TxOutValue era
- TxOutValue ∷ MultiAssetSupportedInEra era → Value → TxOutValue era
- data TxOutDatum ctx era where
- TxOutDatumNone ∷ TxOutDatum ctx era
- TxOutDatumHash ∷ ScriptDataSupportedInEra era → Hash ScriptData → TxOutDatum ctx era
- TxOutDatumInline ∷ ReferenceTxInsScriptsInlineDatumsSupportedInEra era → HashableScriptData → TxOutDatum ctx era
- pattern TxOutDatumInTx ∷ ScriptDataSupportedInEra era → HashableScriptData → TxOutDatum CtxTx era
- toCtxUTxOTxOut ∷ TxOut CtxTx era → TxOut CtxUTxO era
- lovelaceToTxOutValue ∷ IsCardanoEra era ⇒ Lovelace → TxOutValue era
- prettyRenderTxOut ∷ TxOutInAnyEra → Text
- txOutValueToLovelace ∷ TxOutValue era → Lovelace
- txOutValueToValue ∷ TxOutValue era → Value
- parseHash ∷ SerialiseAsRawBytes (Hash a) ⇒ AsType (Hash a) → Parser (Hash a)
- data TxOutInAnyEra where
- TxOutInAnyEra ∷ CardanoEra era → TxOut CtxTx era → TxOutInAnyEra
- txOutInAnyEra ∷ IsCardanoEra era ⇒ TxOut CtxTx era → TxOutInAnyEra
- data TxInsCollateral era where
- TxInsCollateralNone ∷ TxInsCollateral era
- TxInsCollateral ∷ CollateralSupportedInEra era → [TxIn] → TxInsCollateral era
- data TxInsReference build era where
- TxInsReferenceNone ∷ TxInsReference build era
- TxInsReference ∷ ReferenceTxInsScriptsInlineDatumsSupportedInEra era → [TxIn] → TxInsReference build era
- data TxReturnCollateral ctx era where
- TxReturnCollateralNone ∷ TxReturnCollateral ctx era
- TxReturnCollateral ∷ TxTotalAndReturnCollateralSupportedInEra era → TxOut ctx era → TxReturnCollateral ctx era
- data TxTotalCollateral era where
- data TxFee era where
- TxFeeImplicit ∷ TxFeesImplicitInEra era → TxFee era
- TxFeeExplicit ∷ TxFeesExplicitInEra era → Lovelace → TxFee era
- data TxValidityLowerBound era where
- data TxValidityUpperBound era where
- data TxMetadataInEra era where
- TxMetadataNone ∷ TxMetadataInEra era
- TxMetadataInEra ∷ TxMetadataSupportedInEra era → TxMetadata → TxMetadataInEra era
- data TxAuxScripts era where
- TxAuxScriptsNone ∷ TxAuxScripts era
- TxAuxScripts ∷ AuxScriptsSupportedInEra era → [ScriptInEra era] → TxAuxScripts era
- data TxExtraKeyWitnesses era where
- data TxWithdrawals build era where
- TxWithdrawalsNone ∷ TxWithdrawals build era
- TxWithdrawals ∷ WithdrawalsSupportedInEra era → [(StakeAddress, Lovelace, BuildTxWith build (Witness WitCtxStake era))] → TxWithdrawals build era
- data TxCertificates build era where
- TxCertificatesNone ∷ TxCertificates build era
- TxCertificates ∷ CertificatesSupportedInEra era → [Certificate] → BuildTxWith build (Map StakeCredential (Witness WitCtxStake era)) → TxCertificates build era
- data TxUpdateProposal era where
- data TxMintValue build era where
- TxMintNone ∷ TxMintValue build era
- TxMintValue ∷ MultiAssetSupportedInEra era → Value → BuildTxWith build (Map PolicyId (ScriptWitness WitCtxMint era)) → TxMintValue build era
- data BuildTxWith build a where
- ViewTx ∷ BuildTxWith ViewTx a
- BuildTxWith ∷ a → BuildTxWith BuildTx a
- data BuildTx
- data ViewTx
- data CollateralSupportedInEra era where
- data MultiAssetSupportedInEra era where
- data OnlyAdaSupportedInEra era where
- data TxFeesExplicitInEra era where
- TxFeesExplicitInShelleyEra ∷ TxFeesExplicitInEra ShelleyEra
- TxFeesExplicitInAllegraEra ∷ TxFeesExplicitInEra AllegraEra
- TxFeesExplicitInMaryEra ∷ TxFeesExplicitInEra MaryEra
- TxFeesExplicitInAlonzoEra ∷ TxFeesExplicitInEra AlonzoEra
- TxFeesExplicitInBabbageEra ∷ TxFeesExplicitInEra BabbageEra
- TxFeesExplicitInConwayEra ∷ TxFeesExplicitInEra ConwayEra
- data TxFeesImplicitInEra era where
- data ValidityUpperBoundSupportedInEra era where
- ValidityUpperBoundInShelleyEra ∷ ValidityUpperBoundSupportedInEra ShelleyEra
- ValidityUpperBoundInAllegraEra ∷ ValidityUpperBoundSupportedInEra AllegraEra
- ValidityUpperBoundInMaryEra ∷ ValidityUpperBoundSupportedInEra MaryEra
- ValidityUpperBoundInAlonzoEra ∷ ValidityUpperBoundSupportedInEra AlonzoEra
- ValidityUpperBoundInBabbageEra ∷ ValidityUpperBoundSupportedInEra BabbageEra
- ValidityUpperBoundInConwayEra ∷ ValidityUpperBoundSupportedInEra ConwayEra
- data ValidityNoUpperBoundSupportedInEra era where
- ValidityNoUpperBoundInByronEra ∷ ValidityNoUpperBoundSupportedInEra ByronEra
- ValidityNoUpperBoundInAllegraEra ∷ ValidityNoUpperBoundSupportedInEra AllegraEra
- ValidityNoUpperBoundInMaryEra ∷ ValidityNoUpperBoundSupportedInEra MaryEra
- ValidityNoUpperBoundInAlonzoEra ∷ ValidityNoUpperBoundSupportedInEra AlonzoEra
- ValidityNoUpperBoundInBabbageEra ∷ ValidityNoUpperBoundSupportedInEra BabbageEra
- ValidityNoUpperBoundInConwayEra ∷ ValidityNoUpperBoundSupportedInEra ConwayEra
- data ValidityLowerBoundSupportedInEra era where
- ValidityLowerBoundInAllegraEra ∷ ValidityLowerBoundSupportedInEra AllegraEra
- ValidityLowerBoundInMaryEra ∷ ValidityLowerBoundSupportedInEra MaryEra
- ValidityLowerBoundInAlonzoEra ∷ ValidityLowerBoundSupportedInEra AlonzoEra
- ValidityLowerBoundInBabbageEra ∷ ValidityLowerBoundSupportedInEra BabbageEra
- ValidityLowerBoundInConwayEra ∷ ValidityLowerBoundSupportedInEra ConwayEra
- data TxMetadataSupportedInEra era where
- TxMetadataInShelleyEra ∷ TxMetadataSupportedInEra ShelleyEra
- TxMetadataInAllegraEra ∷ TxMetadataSupportedInEra AllegraEra
- TxMetadataInMaryEra ∷ TxMetadataSupportedInEra MaryEra
- TxMetadataInAlonzoEra ∷ TxMetadataSupportedInEra AlonzoEra
- TxMetadataInBabbageEra ∷ TxMetadataSupportedInEra BabbageEra
- TxMetadataInConwayEra ∷ TxMetadataSupportedInEra ConwayEra
- data AuxScriptsSupportedInEra era where
- data TxExtraKeyWitnessesSupportedInEra era where
- data ScriptDataSupportedInEra era where
- data WithdrawalsSupportedInEra era where
- WithdrawalsInShelleyEra ∷ WithdrawalsSupportedInEra ShelleyEra
- WithdrawalsInAllegraEra ∷ WithdrawalsSupportedInEra AllegraEra
- WithdrawalsInMaryEra ∷ WithdrawalsSupportedInEra MaryEra
- WithdrawalsInAlonzoEra ∷ WithdrawalsSupportedInEra AlonzoEra
- WithdrawalsInBabbageEra ∷ WithdrawalsSupportedInEra BabbageEra
- WithdrawalsInConwayEra ∷ WithdrawalsSupportedInEra ConwayEra
- data CertificatesSupportedInEra era where
- CertificatesInShelleyEra ∷ CertificatesSupportedInEra ShelleyEra
- CertificatesInAllegraEra ∷ CertificatesSupportedInEra AllegraEra
- CertificatesInMaryEra ∷ CertificatesSupportedInEra MaryEra
- CertificatesInAlonzoEra ∷ CertificatesSupportedInEra AlonzoEra
- CertificatesInBabbageEra ∷ CertificatesSupportedInEra BabbageEra
- CertificatesInConwayEra ∷ CertificatesSupportedInEra ConwayEra
- data UpdateProposalSupportedInEra era where
- UpdateProposalInShelleyEra ∷ UpdateProposalSupportedInEra ShelleyEra
- UpdateProposalInAllegraEra ∷ UpdateProposalSupportedInEra AllegraEra
- UpdateProposalInMaryEra ∷ UpdateProposalSupportedInEra MaryEra
- UpdateProposalInAlonzoEra ∷ UpdateProposalSupportedInEra AlonzoEra
- UpdateProposalInBabbageEra ∷ UpdateProposalSupportedInEra BabbageEra
- UpdateProposalInConwayEra ∷ UpdateProposalSupportedInEra ConwayEra
- data TxTotalAndReturnCollateralSupportedInEra era where
- collateralSupportedInEra ∷ CardanoEra era → Maybe (CollateralSupportedInEra era)
- multiAssetSupportedInEra ∷ CardanoEra era → Either (OnlyAdaSupportedInEra era) (MultiAssetSupportedInEra era)
- txFeesExplicitInEra ∷ CardanoEra era → Either (TxFeesImplicitInEra era) (TxFeesExplicitInEra era)
- validityUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityUpperBoundSupportedInEra era)
- validityNoUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityNoUpperBoundSupportedInEra era)
- validityLowerBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityLowerBoundSupportedInEra era)
- txMetadataSupportedInEra ∷ CardanoEra era → Maybe (TxMetadataSupportedInEra era)
- auxScriptsSupportedInEra ∷ CardanoEra era → Maybe (AuxScriptsSupportedInEra era)
- extraKeyWitnessesSupportedInEra ∷ CardanoEra era → Maybe (TxExtraKeyWitnessesSupportedInEra era)
- scriptDataSupportedInEra ∷ CardanoEra era → Maybe (ScriptDataSupportedInEra era)
- withdrawalsSupportedInEra ∷ CardanoEra era → Maybe (WithdrawalsSupportedInEra era)
- certificatesSupportedInEra ∷ CardanoEra era → Maybe (CertificatesSupportedInEra era)
- updateProposalSupportedInEra ∷ CardanoEra era → Maybe (UpdateProposalSupportedInEra era)
- txScriptValiditySupportedInShelleyBasedEra ∷ ShelleyBasedEra era → Maybe (TxScriptValiditySupportedInEra era)
- txScriptValiditySupportedInCardanoEra ∷ CardanoEra era → Maybe (TxScriptValiditySupportedInEra era)
- totalAndReturnCollateralSupportedInEra ∷ CardanoEra era → Maybe (TxTotalAndReturnCollateralSupportedInEra era)
- data AnyScriptWitness era where
- AnyScriptWitness ∷ ScriptWitness witctx era → AnyScriptWitness era
- data ScriptWitnessIndex
- renderScriptWitnessIndex ∷ ScriptWitnessIndex → String
- collectTxBodyScriptWitnesses ∷ ∀ era. TxBodyContent BuildTx era → [(ScriptWitnessIndex, AnyScriptWitness era)]
- scriptDataToInlineDatum ∷ HashableScriptData → Datum ledgerera
- toByronTxId ∷ TxId → TxId
- toShelleyTxId ∷ TxId → TxId StandardCrypto
- toShelleyTxIn ∷ TxIn → TxIn StandardCrypto
- toShelleyTxOut ∷ ∀ era ledgerera. ShelleyLedgerEra era ~ ledgerera ⇒ ShelleyBasedEra era → TxOut CtxUTxO era → TxOut ledgerera
- toShelleyTxOutAny ∷ ∀ ctx era ledgerera. ShelleyLedgerEra era ~ ledgerera ⇒ ShelleyBasedEra era → TxOut ctx era → TxOut ledgerera
- fromShelleyTxId ∷ TxId StandardCrypto → TxId
- fromShelleyTxIn ∷ TxIn StandardCrypto → TxIn
- fromShelleyTxOut ∷ ShelleyLedgerEra era ~ ledgerera ⇒ ShelleyBasedEra era → TxOut ledgerera → TxOut ctx era
- toAlonzoRdmrPtr ∷ ScriptWitnessIndex → RdmrPtr
- fromAlonzoRdmrPtr ∷ RdmrPtr → ScriptWitnessIndex
- fromByronTxIn ∷ TxIn → TxIn
- fromLedgerTxOuts ∷ ∀ era. ShelleyBasedEra era → TxBody (ShelleyLedgerEra era) → TxBodyScriptData era → [TxOut CtxTx era]
- renderTxIn ∷ TxIn → Text
- calculateExecutionUnitsLovelace ∷ ExecutionUnitPrices → ExecutionUnits → Maybe Lovelace
- orderStakeAddrs ∷ [(StakeAddress, x, v)] → [(StakeAddress, x, v)]
- orderTxIns ∷ [(TxIn, v)] → [(TxIn, v)]
- data family AsType t
Documentation
Transaction bodies
data TxBody era where Source #
Constructors
ByronTxBody ∷ Annotated Tx ByteString → TxBody ByronEra | |
ShelleyTxBody | |
Fields
|
Bundled Patterns
pattern TxBody ∷ TxBodyContent ViewTx era → TxBody era |
Instances
Show (TxBody era) Source # | |
HasTypeProxy era ⇒ HasTypeProxy (TxBody era) Source # | |
IsCardanoEra era ⇒ SerialiseAsCBOR (TxBody era) Source # | |
Defined in Cardano.Api.TxBody Methods serialiseToCBOR ∷ TxBody era → ByteString Source # deserialiseFromCBOR ∷ AsType (TxBody era) → ByteString → Either DecoderError (TxBody era) Source # | |
IsCardanoEra era ⇒ HasTextEnvelope (TxBody era) Source # | |
Defined in Cardano.Api.TxBody Methods textEnvelopeType ∷ AsType (TxBody era) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ TxBody era → TextEnvelopeDescr Source # | |
Eq (TxBody era) Source # | |
data AsType (TxBody era) Source # | |
Defined in Cardano.Api.TxBody |
makeTransactionBody ∷ ∀ era. IsCardanoEra era ⇒ TxBodyContent BuildTx era → Either TxBodyError (TxBody era) Source #
Deprecated: Use createAndValidateTransactionBody.
createTransactionBody ∷ ShelleyBasedEra era → TxBodyContent BuildTx era → TxBody era Source #
createAndValidateTransactionBody ∷ ∀ era. IsCardanoEra era ⇒ TxBodyContent BuildTx era → Either TxBodyError (TxBody era) Source #
data TxBodyContent build era Source #
Constructors
TxBodyContent | |
Fields
|
Instances
Show (TxBodyContent build era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxBodyContent build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxBodyContent build era → TxBodyContent build era → Bool Source # (/=) ∷ TxBodyContent build era → TxBodyContent build era → Bool Source # |
data TxBodyError Source #
Constructors
Instances
Show TxBodyError Source # | |
Defined in Cardano.Api.TxBody | |
Error TxBodyError Source # | |
Defined in Cardano.Api.TxBody Methods | |
Eq TxBodyError Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxBodyError → TxBodyError → Bool Source # (/=) ∷ TxBodyError → TxBodyError → Bool Source # |
data TxBodyScriptData era where Source #
Constructors
TxBodyNoScriptData ∷ TxBodyScriptData era | |
TxBodyScriptData ∷ ScriptDataSupportedInEra era → TxDats (ShelleyLedgerEra era) → Redeemers (ShelleyLedgerEra era) → TxBodyScriptData era |
Instances
Show (TxBodyScriptData era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxBodyScriptData era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxBodyScriptData era → TxBodyScriptData era → Bool Source # (/=) ∷ TxBodyScriptData era → TxBodyScriptData era → Bool Source # |
data TxScriptValidity era where Source #
A representation of whether the era supports tx script validity.
The Alonzo and subsequent eras support script validity.
Constructors
TxScriptValidityNone ∷ TxScriptValidity era | |
TxScriptValidity ∷ TxScriptValiditySupportedInEra era → ScriptValidity → TxScriptValidity era | Tx script validity is supported in transactions in the |
Instances
Show (TxScriptValidity era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxScriptValidity era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxScriptValidity era → TxScriptValidity era → Bool Source # (/=) ∷ TxScriptValidity era → TxScriptValidity era → Bool Source # |
data TxScriptValiditySupportedInEra era where Source #
Constructors
Instances
Show (TxScriptValiditySupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxScriptValiditySupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxScriptValiditySupportedInEra era → TxScriptValiditySupportedInEra era → Bool Source # (/=) ∷ TxScriptValiditySupportedInEra era → TxScriptValiditySupportedInEra era → Bool Source # |
data ScriptValidity Source #
Indicates whether a script is expected to fail or pass validation.
Constructors
ScriptInvalid | Script is expected to fail validation. Transactions marked as such can include scripts that fail validation. Such transactions may be submitted to the chain, in which case the collateral will be taken upon on chain script validation failure. |
ScriptValid | Script is expected to pass validation. Transactions marked as such cannot include scripts that fail validation. |
Instances
Show ScriptValidity Source # | |
Defined in Cardano.Api.TxBody | |
FromCBOR ScriptValidity Source # | |
Defined in Cardano.Api.TxBody | |
ToCBOR ScriptValidity Source # | |
Defined in Cardano.Api.TxBody Methods toCBOR ∷ ScriptValidity → Encoding # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ScriptValidity → Size # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ScriptValidity] → Size # | |
Eq ScriptValidity Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ScriptValidity → ScriptValidity → Bool Source # (/=) ∷ ScriptValidity → ScriptValidity → Bool Source # |
scriptValidityToIsValid ∷ ScriptValidity → IsValid Source #
isValidToScriptValidity ∷ IsValid → ScriptValidity Source #
scriptValidityToTxScriptValidity ∷ ShelleyBasedEra era → ScriptValidity → TxScriptValidity era Source #
txScriptValidityToIsValid ∷ TxScriptValidity era → IsValid Source #
Transaction Ids
Constructors
TxId (Hash StandardCrypto EraIndependentTxBody) |
Instances
FromJSON TxId Source # | |
Defined in Cardano.Api.TxIn | |
FromJSONKey TxId Source # | |
Defined in Cardano.Api.TxIn | |
ToJSON TxId Source # | |
Defined in Cardano.Api.TxIn Methods toEncoding ∷ TxId → Encoding # toJSONList ∷ [TxId] → Value # toEncodingList ∷ [TxId] → Encoding # | |
ToJSONKey TxId Source # | |
Defined in Cardano.Api.TxIn | |
IsString TxId Source # | |
Defined in Cardano.Api.TxIn Methods fromString ∷ String → TxId Source # | |
Show TxId Source # | |
HasTypeProxy TxId Source # | |
SerialiseAsRawBytes TxId Source # | |
Defined in Cardano.Api.TxIn | |
Eq TxId Source # | |
Ord TxId Source # | |
data AsType TxId Source # | |
Defined in Cardano.Api.TxIn |
getTxIdShelley ∷ Crypto (ShelleyLedgerEra era) ~ StandardCrypto ⇒ EraTxBody (ShelleyLedgerEra era) ⇒ ShelleyBasedEra era → TxBody (ShelleyLedgerEra era) → TxId Source #
Transaction inputs
Instances
FromJSON TxIn Source # | |
Defined in Cardano.Api.TxIn | |
FromJSONKey TxIn Source # | |
Defined in Cardano.Api.TxIn | |
ToJSON TxIn Source # | |
Defined in Cardano.Api.TxIn Methods toEncoding ∷ TxIn → Encoding # toJSONList ∷ [TxIn] → Value # toEncodingList ∷ [TxIn] → Encoding # | |
ToJSONKey TxIn Source # | |
Defined in Cardano.Api.TxIn | |
Show TxIn Source # | |
Eq TxIn Source # | |
Ord TxIn Source # | |
type TxIns build era = [(TxIn, BuildTxWith build (Witness WitCtxTxIn era))] Source #
Instances
FromJSON TxIx Source # | |
Defined in Cardano.Api.TxIn | |
ToJSON TxIx Source # | |
Defined in Cardano.Api.TxIn Methods toEncoding ∷ TxIx → Encoding # toJSONList ∷ [TxIx] → Value # toEncodingList ∷ [TxIx] → Encoding # | |
Enum TxIx Source # | |
Defined in Cardano.Api.TxIn | |
Show TxIx Source # | |
Eq TxIx Source # | |
Ord TxIx Source # | |
genesisUTxOPseudoTxIn ∷ NetworkId → Hash GenesisUTxOKey → TxIn Source #
Compute the TxIn
of the initial UTxO pseudo-transaction corresponding
to the given address in the genesis initial funds.
The Shelley initial UTxO is constructed from the sgInitialFunds
which
is not a full UTxO but just a map from addresses to coin values.
This gets turned into a UTxO by making a pseudo-transaction for each address,
with the 0th output being the coin value. So to spend from the initial UTxO
we need this same TxIn
to use as an input to the spending transaction.
Transaction outputs
The context is a transaction body
Instances
IsShelleyBasedEra era ⇒ FromJSON (TxOut CtxTx era) Source # | |
Defined in Cardano.Api.TxBody |
The context is the UTxO
Instances
IsShelleyBasedEra era ⇒ FromJSON (TxOut CtxUTxO era) Source # | |
Defined in Cardano.Api.TxBody |
Constructors
TxOut (AddressInEra era) (TxOutValue era) (TxOutDatum ctx era) (ReferenceScript era) |
Instances
EraCast (TxOut ctx) Source # | |
Defined in Cardano.Api.TxBody Methods eraCast ∷ (IsCardanoEra fromEra, IsCardanoEra toEra) ⇒ CardanoEra toEra → TxOut ctx fromEra → Either EraCastError (TxOut ctx toEra) Source # | |
IsShelleyBasedEra era ⇒ FromJSON (TxOut CtxTx era) Source # | |
Defined in Cardano.Api.TxBody | |
IsShelleyBasedEra era ⇒ FromJSON (TxOut CtxUTxO era) Source # | |
Defined in Cardano.Api.TxBody | |
IsCardanoEra era ⇒ ToJSON (TxOut ctx era) Source # | |
Defined in Cardano.Api.TxBody Methods toJSON ∷ TxOut ctx era → Value # toEncoding ∷ TxOut ctx era → Encoding # toJSONList ∷ [TxOut ctx era] → Value # toEncodingList ∷ [TxOut ctx era] → Encoding # | |
Show (TxOut ctx era) Source # | |
Eq (TxOut ctx era) Source # | |
data TxOutValue era where Source #
Constructors
TxOutAdaOnly ∷ OnlyAdaSupportedInEra era → Lovelace → TxOutValue era | |
TxOutValue ∷ MultiAssetSupportedInEra era → Value → TxOutValue era |
Instances
data TxOutDatum ctx era where Source #
Constructors
TxOutDatumNone ∷ TxOutDatum ctx era | |
TxOutDatumHash ∷ ScriptDataSupportedInEra era → Hash ScriptData → TxOutDatum ctx era | A transaction output that only specifies the hash of the datum, but not the full datum value. |
TxOutDatumInline ∷ ReferenceTxInsScriptsInlineDatumsSupportedInEra era → HashableScriptData → TxOutDatum ctx era | A transaction output that specifies the whole datum instead of the datum hash. Note that the datum map will not be updated with this datum, it only exists at the transaction output. |
Bundled Patterns
pattern TxOutDatumInTx ∷ ScriptDataSupportedInEra era → HashableScriptData → TxOutDatum CtxTx era |
Instances
EraCast (TxOutDatum ctx) Source # | |
Defined in Cardano.Api.TxBody Methods eraCast ∷ (IsCardanoEra fromEra, IsCardanoEra toEra) ⇒ CardanoEra toEra → TxOutDatum ctx fromEra → Either EraCastError (TxOutDatum ctx toEra) Source # | |
Show (TxOutDatum ctx era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxOutDatum ctx era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxOutDatum ctx era → TxOutDatum ctx era → Bool Source # (/=) ∷ TxOutDatum ctx era → TxOutDatum ctx era → Bool Source # |
lovelaceToTxOutValue ∷ IsCardanoEra era ⇒ Lovelace → TxOutValue era Source #
txOutValueToLovelace ∷ TxOutValue era → Lovelace Source #
txOutValueToValue ∷ TxOutValue era → Value Source #
data TxOutInAnyEra where Source #
Constructors
TxOutInAnyEra ∷ CardanoEra era → TxOut CtxTx era → TxOutInAnyEra |
Instances
Show TxOutInAnyEra Source # | |
Defined in Cardano.Api.TxBody | |
Eq TxOutInAnyEra Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxOutInAnyEra → TxOutInAnyEra → Bool Source # (/=) ∷ TxOutInAnyEra → TxOutInAnyEra → Bool Source # |
txOutInAnyEra ∷ IsCardanoEra era ⇒ TxOut CtxTx era → TxOutInAnyEra Source #
Convenience constructor for TxOutInAnyEra
Other transaction body types
data TxInsCollateral era where Source #
Constructors
TxInsCollateralNone ∷ TxInsCollateral era | |
TxInsCollateral ∷ CollateralSupportedInEra era → [TxIn] → TxInsCollateral era |
Instances
Show (TxInsCollateral era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxInsCollateral era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxInsCollateral era → TxInsCollateral era → Bool Source # (/=) ∷ TxInsCollateral era → TxInsCollateral era → Bool Source # |
data TxInsReference build era where Source #
Constructors
TxInsReferenceNone ∷ TxInsReference build era | |
TxInsReference ∷ ReferenceTxInsScriptsInlineDatumsSupportedInEra era → [TxIn] → TxInsReference build era |
Instances
Show (TxInsReference build era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxInsReference build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxInsReference build era → TxInsReference build era → Bool Source # (/=) ∷ TxInsReference build era → TxInsReference build era → Bool Source # |
data TxReturnCollateral ctx era where Source #
Constructors
TxReturnCollateralNone ∷ TxReturnCollateral ctx era | |
TxReturnCollateral ∷ TxTotalAndReturnCollateralSupportedInEra era → TxOut ctx era → TxReturnCollateral ctx era |
Instances
Show (TxReturnCollateral ctx era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxReturnCollateral ctx era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxReturnCollateral ctx era → TxReturnCollateral ctx era → Bool Source # (/=) ∷ TxReturnCollateral ctx era → TxReturnCollateral ctx era → Bool Source # |
data TxTotalCollateral era where Source #
Constructors
TxTotalCollateralNone ∷ TxTotalCollateral era | |
TxTotalCollateral ∷ TxTotalAndReturnCollateralSupportedInEra era → Lovelace → TxTotalCollateral era |
Instances
Show (TxTotalCollateral era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxTotalCollateral era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxTotalCollateral era → TxTotalCollateral era → Bool Source # (/=) ∷ TxTotalCollateral era → TxTotalCollateral era → Bool Source # |
Constructors
TxFeeImplicit ∷ TxFeesImplicitInEra era → TxFee era | |
TxFeeExplicit ∷ TxFeesExplicitInEra era → Lovelace → TxFee era |
data TxValidityLowerBound era where Source #
Constructors
TxValidityNoLowerBound ∷ TxValidityLowerBound era | |
TxValidityLowerBound ∷ ValidityLowerBoundSupportedInEra era → SlotNo → TxValidityLowerBound era |
Instances
Show (TxValidityLowerBound era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxValidityLowerBound era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxValidityLowerBound era → TxValidityLowerBound era → Bool Source # (/=) ∷ TxValidityLowerBound era → TxValidityLowerBound era → Bool Source # |
data TxValidityUpperBound era where Source #
This was formerly known as the TTL.
Constructors
TxValidityNoUpperBound ∷ ValidityNoUpperBoundSupportedInEra era → TxValidityUpperBound era | |
TxValidityUpperBound ∷ ValidityUpperBoundSupportedInEra era → SlotNo → TxValidityUpperBound era |
Instances
Show (TxValidityUpperBound era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxValidityUpperBound era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxValidityUpperBound era → TxValidityUpperBound era → Bool Source # (/=) ∷ TxValidityUpperBound era → TxValidityUpperBound era → Bool Source # |
data TxMetadataInEra era where Source #
Constructors
TxMetadataNone ∷ TxMetadataInEra era | |
TxMetadataInEra ∷ TxMetadataSupportedInEra era → TxMetadata → TxMetadataInEra era |
Instances
Show (TxMetadataInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxMetadataInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMetadataInEra era → TxMetadataInEra era → Bool Source # (/=) ∷ TxMetadataInEra era → TxMetadataInEra era → Bool Source # |
data TxAuxScripts era where Source #
Constructors
TxAuxScriptsNone ∷ TxAuxScripts era | |
TxAuxScripts ∷ AuxScriptsSupportedInEra era → [ScriptInEra era] → TxAuxScripts era |
Instances
Show (TxAuxScripts era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxAuxScripts era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxAuxScripts era → TxAuxScripts era → Bool Source # (/=) ∷ TxAuxScripts era → TxAuxScripts era → Bool Source # |
data TxExtraKeyWitnesses era where Source #
Constructors
TxExtraKeyWitnessesNone ∷ TxExtraKeyWitnesses era | |
TxExtraKeyWitnesses ∷ TxExtraKeyWitnessesSupportedInEra era → [Hash PaymentKey] → TxExtraKeyWitnesses era |
Instances
Show (TxExtraKeyWitnesses era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxExtraKeyWitnesses era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxExtraKeyWitnesses era → TxExtraKeyWitnesses era → Bool Source # (/=) ∷ TxExtraKeyWitnesses era → TxExtraKeyWitnesses era → Bool Source # |
data TxWithdrawals build era where Source #
Constructors
TxWithdrawalsNone ∷ TxWithdrawals build era | |
TxWithdrawals ∷ WithdrawalsSupportedInEra era → [(StakeAddress, Lovelace, BuildTxWith build (Witness WitCtxStake era))] → TxWithdrawals build era |
Instances
Show (TxWithdrawals build era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxWithdrawals build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxWithdrawals build era → TxWithdrawals build era → Bool Source # (/=) ∷ TxWithdrawals build era → TxWithdrawals build era → Bool Source # |
data TxCertificates build era where Source #
Constructors
TxCertificatesNone ∷ TxCertificates build era | |
TxCertificates ∷ CertificatesSupportedInEra era → [Certificate] → BuildTxWith build (Map StakeCredential (Witness WitCtxStake era)) → TxCertificates build era |
Instances
Show (TxCertificates build era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxCertificates build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxCertificates build era → TxCertificates build era → Bool Source # (/=) ∷ TxCertificates build era → TxCertificates build era → Bool Source # |
data TxUpdateProposal era where Source #
Constructors
TxUpdateProposalNone ∷ TxUpdateProposal era | |
TxUpdateProposal ∷ UpdateProposalSupportedInEra era → UpdateProposal → TxUpdateProposal era |
Instances
Show (TxUpdateProposal era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxUpdateProposal era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxUpdateProposal era → TxUpdateProposal era → Bool Source # (/=) ∷ TxUpdateProposal era → TxUpdateProposal era → Bool Source # |
data TxMintValue build era where Source #
Constructors
TxMintNone ∷ TxMintValue build era | |
TxMintValue ∷ MultiAssetSupportedInEra era → Value → BuildTxWith build (Map PolicyId (ScriptWitness WitCtxMint era)) → TxMintValue build era |
Instances
Show (TxMintValue build era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxMintValue build era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMintValue build era → TxMintValue build era → Bool Source # (/=) ∷ TxMintValue build era → TxMintValue build era → Bool Source # |
Building vs viewing transactions
data BuildTxWith build a where Source #
Constructors
ViewTx ∷ BuildTxWith ViewTx a | |
BuildTxWith ∷ a → BuildTxWith BuildTx a |
Instances
Show a ⇒ Show (BuildTxWith build a) Source # | |
Defined in Cardano.Api.TxBody | |
Eq a ⇒ Eq (BuildTxWith build a) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ BuildTxWith build a → BuildTxWith build a → Bool Source # (/=) ∷ BuildTxWith build a → BuildTxWith build a → Bool Source # |
Era-dependent transaction body features
data CollateralSupportedInEra era where Source #
A representation of whether the era supports transactions with inputs used only for collateral for script fees.
The Alonzo and subsequent eras support collateral inputs.
Constructors
CollateralInAlonzoEra ∷ CollateralSupportedInEra AlonzoEra | |
CollateralInBabbageEra ∷ CollateralSupportedInEra BabbageEra | |
CollateralInConwayEra ∷ CollateralSupportedInEra ConwayEra |
Instances
Show (CollateralSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (CollateralSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ CollateralSupportedInEra era → CollateralSupportedInEra era → Bool Source # (/=) ∷ CollateralSupportedInEra era → CollateralSupportedInEra era → Bool Source # |
data MultiAssetSupportedInEra era where Source #
A representation of whether the era supports multi-asset transactions.
The Mary and subsequent eras support multi-asset transactions.
The negation of this is OnlyAdaSupportedInEra
.
Constructors
MultiAssetInMaryEra ∷ MultiAssetSupportedInEra MaryEra | Multi-asset transactions are supported in the |
MultiAssetInAlonzoEra ∷ MultiAssetSupportedInEra AlonzoEra | Multi-asset transactions are supported in the |
MultiAssetInBabbageEra ∷ MultiAssetSupportedInEra BabbageEra | Multi-asset transactions are supported in the |
MultiAssetInConwayEra ∷ MultiAssetSupportedInEra ConwayEra | Multi-asset transactions are supported in the |
Instances
ToJSON (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods toJSON ∷ MultiAssetSupportedInEra era → Value # toEncoding ∷ MultiAssetSupportedInEra era → Encoding # toJSONList ∷ [MultiAssetSupportedInEra era] → Value # toEncodingList ∷ [MultiAssetSupportedInEra era] → Encoding # | |
Show (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ MultiAssetSupportedInEra era → MultiAssetSupportedInEra era → Bool Source # (/=) ∷ MultiAssetSupportedInEra era → MultiAssetSupportedInEra era → Bool Source # |
data OnlyAdaSupportedInEra era where Source #
A representation of whether the era supports only ada transactions.
Prior to the Mary era only ada transactions are supported. Multi-assets are supported from the Mary era onwards.
This is the negation of MultiAssetSupportedInEra
. It exists since we need
evidence to be positive.
Constructors
AdaOnlyInByronEra ∷ OnlyAdaSupportedInEra ByronEra | |
AdaOnlyInShelleyEra ∷ OnlyAdaSupportedInEra ShelleyEra | |
AdaOnlyInAllegraEra ∷ OnlyAdaSupportedInEra AllegraEra |
Instances
Show (OnlyAdaSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (OnlyAdaSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ OnlyAdaSupportedInEra era → OnlyAdaSupportedInEra era → Bool Source # (/=) ∷ OnlyAdaSupportedInEra era → OnlyAdaSupportedInEra era → Bool Source # |
data TxFeesExplicitInEra era where Source #
A representation of whether the era requires explicitly specified fees in transactions.
The Byron era tx fees are implicit (as the difference bettween the sum of outputs and sum of inputs), but all later eras the fees are specified in the transaction explicitly.
Constructors
Instances
Show (TxFeesExplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxFeesExplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxFeesExplicitInEra era → TxFeesExplicitInEra era → Bool Source # (/=) ∷ TxFeesExplicitInEra era → TxFeesExplicitInEra era → Bool Source # |
data TxFeesImplicitInEra era where Source #
A representation of whether the era requires implicitly specified fees in transactions.
This is the negation of TxFeesExplicitInEra
.
Constructors
TxFeesImplicitInByronEra ∷ TxFeesImplicitInEra ByronEra |
Instances
Show (TxFeesImplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxFeesImplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxFeesImplicitInEra era → TxFeesImplicitInEra era → Bool Source # (/=) ∷ TxFeesImplicitInEra era → TxFeesImplicitInEra era → Bool Source # |
data ValidityUpperBoundSupportedInEra era where Source #
A representation of whether the era supports transactions with an upper bound on the range of slots in which they are valid.
The Shelley and subsequent eras support an upper bound on the validity range. In the Shelley era specifically it is actually required. It is optional in later eras.
Constructors
Instances
Show (ValidityUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (ValidityUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityUpperBoundSupportedInEra era → ValidityUpperBoundSupportedInEra era → Bool Source # (/=) ∷ ValidityUpperBoundSupportedInEra era → ValidityUpperBoundSupportedInEra era → Bool Source # |
data ValidityNoUpperBoundSupportedInEra era where Source #
A representation of whether the era supports transactions having no upper bound on the range of slots in which they are valid.
Note that the ShelleyEra
does not support omitting a validity upper
bound. It was introduced as a required field in Shelley and then made
optional in Allegra and subsequent eras.
The Byron era supports this by virtue of the fact that it does not support validity ranges at all.
Constructors
Instances
Show (ValidityNoUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (ValidityNoUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityNoUpperBoundSupportedInEra era → ValidityNoUpperBoundSupportedInEra era → Bool Source # (/=) ∷ ValidityNoUpperBoundSupportedInEra era → ValidityNoUpperBoundSupportedInEra era → Bool Source # |
data ValidityLowerBoundSupportedInEra era where Source #
A representation of whether the era supports transactions with a lower bound on the range of slots in which they are valid.
The Allegra and subsequent eras support an optional lower bound on the
validity range. No equivalent of ValidityNoUpperBoundSupportedInEra
is
needed since all eras support having no lower bound.
Constructors
Instances
Show (ValidityLowerBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (ValidityLowerBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityLowerBoundSupportedInEra era → ValidityLowerBoundSupportedInEra era → Bool Source # (/=) ∷ ValidityLowerBoundSupportedInEra era → ValidityLowerBoundSupportedInEra era → Bool Source # |
data TxMetadataSupportedInEra era where Source #
A representation of whether the era supports transaction metadata.
Transaction metadata is supported from the Shelley era onwards.
Constructors
Instances
Show (TxMetadataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxMetadataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMetadataSupportedInEra era → TxMetadataSupportedInEra era → Bool Source # (/=) ∷ TxMetadataSupportedInEra era → TxMetadataSupportedInEra era → Bool Source # |
data AuxScriptsSupportedInEra era where Source #
A representation of whether the era supports auxiliary scripts in transactions.
Auxiliary scripts are supported from the Allegra era onwards.
Constructors
Instances
Show (AuxScriptsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (AuxScriptsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ AuxScriptsSupportedInEra era → AuxScriptsSupportedInEra era → Bool Source # (/=) ∷ AuxScriptsSupportedInEra era → AuxScriptsSupportedInEra era → Bool Source # |
data TxExtraKeyWitnessesSupportedInEra era where Source #
A representation of whether the era supports transactions that specify in the body that they need extra key witnesses, and where this fact is visible to scripts.
Extra key witnesses visible to scripts are supported from the Alonzo era onwards.
Constructors
Instances
Show (TxExtraKeyWitnessesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxExtraKeyWitnessesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxExtraKeyWitnessesSupportedInEra era → TxExtraKeyWitnessesSupportedInEra era → Bool Source # (/=) ∷ TxExtraKeyWitnessesSupportedInEra era → TxExtraKeyWitnessesSupportedInEra era → Bool Source # |
data ScriptDataSupportedInEra era where Source #
A representation of whether the era supports script data in transactions.
Constructors
ScriptDataInAlonzoEra ∷ ScriptDataSupportedInEra AlonzoEra | Script data is supported in transactions in the |
ScriptDataInBabbageEra ∷ ScriptDataSupportedInEra BabbageEra | |
ScriptDataInConwayEra ∷ ScriptDataSupportedInEra ConwayEra |
Instances
Show (ScriptDataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (ScriptDataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ScriptDataSupportedInEra era → ScriptDataSupportedInEra era → Bool Source # (/=) ∷ ScriptDataSupportedInEra era → ScriptDataSupportedInEra era → Bool Source # |
data WithdrawalsSupportedInEra era where Source #
A representation of whether the era supports withdrawals from reward accounts.
The Shelley and subsequent eras support stake addresses, their associated reward accounts and support for withdrawals from them.
Constructors
Instances
Show (WithdrawalsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (WithdrawalsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ WithdrawalsSupportedInEra era → WithdrawalsSupportedInEra era → Bool Source # (/=) ∷ WithdrawalsSupportedInEra era → WithdrawalsSupportedInEra era → Bool Source # |
data CertificatesSupportedInEra era where Source #
A representation of whether the era supports Certificate
s embedded in
transactions.
The Shelley and subsequent eras support such certificates.
Constructors
Instances
Show (CertificatesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (CertificatesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ CertificatesSupportedInEra era → CertificatesSupportedInEra era → Bool Source # (/=) ∷ CertificatesSupportedInEra era → CertificatesSupportedInEra era → Bool Source # |
data UpdateProposalSupportedInEra era where Source #
A representation of whether the era supports UpdateProposal
s embedded in
transactions.
The Shelley and subsequent eras support such update proposals. They Byron era has a notion of an update proposal, but it is a standalone chain object and not embedded in a transaction.
Constructors
Instances
Show (UpdateProposalSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (UpdateProposalSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ UpdateProposalSupportedInEra era → UpdateProposalSupportedInEra era → Bool Source # (/=) ∷ UpdateProposalSupportedInEra era → UpdateProposalSupportedInEra era → Bool Source # |
data TxTotalAndReturnCollateralSupportedInEra era where Source #
Constructors
TxTotalAndReturnCollateralInBabbageEra ∷ TxTotalAndReturnCollateralSupportedInEra BabbageEra | |
TxTotalAndReturnCollateralInConwayEra ∷ TxTotalAndReturnCollateralSupportedInEra ConwayEra |
Instances
Show (TxTotalAndReturnCollateralSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody | |
Eq (TxTotalAndReturnCollateralSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody |
Feature availability functions
collateralSupportedInEra ∷ CardanoEra era → Maybe (CollateralSupportedInEra era) Source #
multiAssetSupportedInEra ∷ CardanoEra era → Either (OnlyAdaSupportedInEra era) (MultiAssetSupportedInEra era) Source #
txFeesExplicitInEra ∷ CardanoEra era → Either (TxFeesImplicitInEra era) (TxFeesExplicitInEra era) Source #
validityUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityUpperBoundSupportedInEra era) Source #
validityNoUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityNoUpperBoundSupportedInEra era) Source #
validityLowerBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityLowerBoundSupportedInEra era) Source #
txMetadataSupportedInEra ∷ CardanoEra era → Maybe (TxMetadataSupportedInEra era) Source #
auxScriptsSupportedInEra ∷ CardanoEra era → Maybe (AuxScriptsSupportedInEra era) Source #
extraKeyWitnessesSupportedInEra ∷ CardanoEra era → Maybe (TxExtraKeyWitnessesSupportedInEra era) Source #
scriptDataSupportedInEra ∷ CardanoEra era → Maybe (ScriptDataSupportedInEra era) Source #
withdrawalsSupportedInEra ∷ CardanoEra era → Maybe (WithdrawalsSupportedInEra era) Source #
certificatesSupportedInEra ∷ CardanoEra era → Maybe (CertificatesSupportedInEra era) Source #
txScriptValiditySupportedInShelleyBasedEra ∷ ShelleyBasedEra era → Maybe (TxScriptValiditySupportedInEra era) Source #
txScriptValiditySupportedInCardanoEra ∷ CardanoEra era → Maybe (TxScriptValiditySupportedInEra era) Source #
totalAndReturnCollateralSupportedInEra ∷ CardanoEra era → Maybe (TxTotalAndReturnCollateralSupportedInEra era) Source #
Inspecting ScriptWitness
es
data AnyScriptWitness era where Source #
A ScriptWitness
in any WitCtx
. This lets us handle heterogeneous
collections of script witnesses from multiple contexts.
Constructors
AnyScriptWitness ∷ ScriptWitness witctx era → AnyScriptWitness era |
data ScriptWitnessIndex Source #
Identify the location of a ScriptWitness
within the context of a
TxBody
. These are indexes of the objects within the transaction that
need or can use script witnesses: inputs, minted assets, withdrawals and
certificates. These are simple numeric indices, enumerated from zero.
Thus the indices are not stable if the transaction body is modified.
Constructors
ScriptWitnessIndexTxIn !Word | The n'th transaction input, in the order of the |
ScriptWitnessIndexMint !Word | |
ScriptWitnessIndexCertificate !Word | The n'th certificate, in the list order of the certificates. |
ScriptWitnessIndexWithdrawal !Word | The n'th withdrawal, in the order of the |
Instances
Show ScriptWitnessIndex Source # | |
Defined in Cardano.Api.TxBody | |
Eq ScriptWitnessIndex Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ScriptWitnessIndex → ScriptWitnessIndex → Bool Source # (/=) ∷ ScriptWitnessIndex → ScriptWitnessIndex → Bool Source # | |
Ord ScriptWitnessIndex Source # | |
Defined in Cardano.Api.TxBody Methods compare ∷ ScriptWitnessIndex → ScriptWitnessIndex → Ordering Source # (<) ∷ ScriptWitnessIndex → ScriptWitnessIndex → Bool Source # (<=) ∷ ScriptWitnessIndex → ScriptWitnessIndex → Bool Source # (>) ∷ ScriptWitnessIndex → ScriptWitnessIndex → Bool Source # (>=) ∷ ScriptWitnessIndex → ScriptWitnessIndex → Bool Source # max ∷ ScriptWitnessIndex → ScriptWitnessIndex → ScriptWitnessIndex Source # min ∷ ScriptWitnessIndex → ScriptWitnessIndex → ScriptWitnessIndex Source # |
collectTxBodyScriptWitnesses ∷ ∀ era. TxBodyContent BuildTx era → [(ScriptWitnessIndex, AnyScriptWitness era)] Source #
Conversion to inline data
scriptDataToInlineDatum ∷ HashableScriptData → Datum ledgerera Source #
Conversion of ScriptData to binary data which allows for the storage of data onchain within a transaction output.
Internal conversion functions & types
toByronTxId ∷ TxId → TxId Source #
toShelleyTxId ∷ TxId → TxId StandardCrypto Source #
toShelleyTxIn ∷ TxIn → TxIn StandardCrypto Source #
This function may overflow on the transaction index. Call sites must ensure that all uses of this function are appropriately guarded.
toShelleyTxOut ∷ ∀ era ledgerera. ShelleyLedgerEra era ~ ledgerera ⇒ ShelleyBasedEra era → TxOut CtxUTxO era → TxOut ledgerera Source #
toShelleyTxOutAny ∷ ∀ ctx era ledgerera. ShelleyLedgerEra era ~ ledgerera ⇒ ShelleyBasedEra era → TxOut ctx era → TxOut ledgerera Source #
A variant of 'toShelleyTxOutAny that is used only internally to this module
that works with a TxOut
in any context (including CtxTx) by ignoring
embedded datums (taking only their hash).
fromShelleyTxId ∷ TxId StandardCrypto → TxId Source #
fromShelleyTxIn ∷ TxIn StandardCrypto → TxIn Source #
fromShelleyTxOut ∷ ShelleyLedgerEra era ~ ledgerera ⇒ ShelleyBasedEra era → TxOut ledgerera → TxOut ctx era Source #
toAlonzoRdmrPtr ∷ ScriptWitnessIndex → RdmrPtr Source #
fromAlonzoRdmrPtr ∷ RdmrPtr → ScriptWitnessIndex Source #
fromByronTxIn ∷ TxIn → TxIn Source #
fromLedgerTxOuts ∷ ∀ era. ShelleyBasedEra era → TxBody (ShelleyLedgerEra era) → TxBodyScriptData era → [TxOut CtxTx era] Source #
renderTxIn ∷ TxIn → Text Source #
Misc helpers
orderStakeAddrs ∷ [(StakeAddress, x, v)] → [(StakeAddress, x, v)] Source #
orderTxIns ∷ [(TxIn, v)] → [(TxIn, v)] Source #
Data family instances
A family of singleton types used in this API to indicate which type to use where it would otherwise be ambiguous or merely unclear.
Values of this type are passed to deserialisation functions for example.