cardano-api-1.28.0
Safe HaskellNone
LanguageHaskell2010

Cardano.Api.TxBody

Description

Transaction bodies

Synopsis

Transaction bodies

data TxBody era where Source #

Constructors

ByronTxBody ∷ Annotated Tx ByteStringTxBody ByronEra 
ShelleyTxBody 

Fields

Bundled Patterns

pattern TxBodyTxBodyContent ViewTx era → TxBody era 

Instances

Instances details
Eq (TxBody era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxBody era → TxBody era → Bool #

(/=)TxBody era → TxBody era → Bool #

Show (TxBody era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntTxBody era → ShowS #

showTxBody era → String #

showList ∷ [TxBody era] → ShowS #

HasTypeProxy era ⇒ HasTypeProxy (TxBody era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Associated Types

data AsType (TxBody era) Source #

Methods

proxyToAsTypeProxy (TxBody era) → AsType (TxBody era) Source #

IsCardanoEra era ⇒ SerialiseAsCBOR (TxBody era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

serialiseToCBORTxBody era → ByteString Source #

deserialiseFromCBORAsType (TxBody era) → ByteStringEither DecoderError (TxBody era) Source #

IsCardanoEra era ⇒ HasTextEnvelope (TxBody era) Source # 
Instance details

Defined in Cardano.Api.TxBody

data AsType (TxBody era) Source # 
Instance details

Defined in Cardano.Api.TxBody

data AsType (TxBody era) = AsTxBody (AsType era)

data TxBodyScriptData era where Source #

Constructors

TxBodyNoScriptDataTxBodyScriptData era 
TxBodyScriptDataScriptDataSupportedInEra era → TxDats (ShelleyLedgerEra era) → Redeemers (ShelleyLedgerEra era) → TxBodyScriptData era 

Instances

Instances details
Eq (TxBodyScriptData era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxBodyScriptData era → TxBodyScriptData era → Bool #

(/=)TxBodyScriptData era → TxBodyScriptData era → Bool #

Show (TxBodyScriptData era) Source # 
Instance details

Defined in Cardano.Api.TxBody

data TxScriptValidity era where Source #

A representation of whether the era supports tx script validity.

The Mary and subsequent eras support script validity.

Constructors

TxScriptValidityNoneTxScriptValidity era 
TxScriptValidityTxScriptValiditySupportedInEra era → ScriptValidityTxScriptValidity era

Tx script validity is supported in transactions in the Alonzo era onwards.

Instances

Instances details
Eq (TxScriptValidity era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxScriptValidity era → TxScriptValidity era → Bool #

(/=)TxScriptValidity era → TxScriptValidity era → Bool #

Show (TxScriptValidity era) Source # 
Instance details

Defined in Cardano.Api.TxBody

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

Instances details
Eq ScriptValidity Source # 
Instance details

Defined in Cardano.Api.TxBody

Show ScriptValidity Source # 
Instance details

Defined in Cardano.Api.TxBody

FromCBOR ScriptValidity Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

fromCBOR ∷ Decoder s ScriptValidity #

labelProxy ScriptValidityText #

ToCBOR ScriptValidity Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

toCBORScriptValidity → Encoding #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ScriptValidity → Size #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ScriptValidity] → Size #

Transaction Ids

newtype TxId Source #

Constructors

TxId (Hash StandardCrypto EraIndependentTxBody) 

Instances

Instances details
Eq TxId Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxIdTxIdBool #

(/=)TxIdTxIdBool #

Ord TxId Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

compareTxIdTxIdOrdering #

(<)TxIdTxIdBool #

(<=)TxIdTxIdBool #

(>)TxIdTxIdBool #

(>=)TxIdTxIdBool #

maxTxIdTxIdTxId #

minTxIdTxIdTxId #

Show TxId Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntTxIdShowS #

showTxIdString #

showList ∷ [TxId] → ShowS #

IsString TxId Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

fromStringStringTxId #

FromJSON TxId Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

parseJSON ∷ Value → Parser TxId #

parseJSONList ∷ Value → Parser [TxId] #

ToJSON TxId Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

toJSONTxId → Value #

toEncodingTxId → Encoding #

toJSONList ∷ [TxId] → Value #

toEncodingList ∷ [TxId] → Encoding #

FromJSONKey TxId Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

fromJSONKey ∷ FromJSONKeyFunction TxId

fromJSONKeyList ∷ FromJSONKeyFunction [TxId]

ToJSONKey TxId Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

toJSONKey ∷ ToJSONKeyFunction TxId

toJSONKeyList ∷ ToJSONKeyFunction [TxId]

HasTypeProxy TxId Source # 
Instance details

Defined in Cardano.Api.TxBody

Associated Types

data AsType TxId Source #

SerialiseAsRawBytes TxId Source # 
Instance details

Defined in Cardano.Api.TxBody

data AsType TxId Source # 
Instance details

Defined in Cardano.Api.TxBody

getTxId ∷ ∀ era. TxBody era → TxId Source #

Calculate the transaction identifier for a TxBody.

Transaction inputs

data TxIn Source #

Constructors

TxIn TxId TxIx 

Instances

Instances details
Eq TxIn Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxInTxInBool #

(/=)TxInTxInBool #

Ord TxIn Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

compareTxInTxInOrdering #

(<)TxInTxInBool #

(<=)TxInTxInBool #

(>)TxInTxInBool #

(>=)TxInTxInBool #

maxTxInTxInTxIn #

minTxInTxInTxIn #

Show TxIn Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntTxInShowS #

showTxInString #

showList ∷ [TxIn] → ShowS #

ToJSON TxIn Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

toJSONTxIn → Value #

toEncodingTxIn → Encoding #

toJSONList ∷ [TxIn] → Value #

toEncodingList ∷ [TxIn] → Encoding #

ToJSONKey TxIn Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

toJSONKey ∷ ToJSONKeyFunction TxIn

toJSONKeyList ∷ ToJSONKeyFunction [TxIn]

newtype TxIx Source #

Constructors

TxIx Word 

Instances

Instances details
Enum TxIx Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

succTxIxTxIx #

predTxIxTxIx #

toEnumIntTxIx #

fromEnumTxIxInt #

enumFromTxIx → [TxIx] #

enumFromThenTxIxTxIx → [TxIx] #

enumFromToTxIxTxIx → [TxIx] #

enumFromThenToTxIxTxIxTxIx → [TxIx] #

Eq TxIx Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxIxTxIxBool #

(/=)TxIxTxIxBool #

Ord TxIx Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

compareTxIxTxIxOrdering #

(<)TxIxTxIxBool #

(<=)TxIxTxIxBool #

(>)TxIxTxIxBool #

(>=)TxIxTxIxBool #

maxTxIxTxIxTxIx #

minTxIxTxIxTxIx #

Show TxIx Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntTxIxShowS #

showTxIxString #

showList ∷ [TxIx] → ShowS #

FromJSON TxIx Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

parseJSON ∷ Value → Parser TxIx #

parseJSONList ∷ Value → Parser [TxIx] #

ToJSON TxIx Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

toJSONTxIx → Value #

toEncodingTxIx → Encoding #

toJSONList ∷ [TxIx] → Value #

toEncodingList ∷ [TxIx] → Encoding #

genesisUTxOPseudoTxInNetworkIdHash GenesisUTxOKeyTxIn 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

data TxOut era Source #

Constructors

TxOut (AddressInEra era) (TxOutValue era) (TxOutDatumHash era) 

Instances

Instances details
Eq (TxOut era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxOut era → TxOut era → Bool #

(/=)TxOut era → TxOut era → Bool #

Show (TxOut era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntTxOut era → ShowS #

showTxOut era → String #

showList ∷ [TxOut era] → ShowS #

Generic (TxOut era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Associated Types

type Rep (TxOut era) ∷ TypeType #

Methods

fromTxOut era → Rep (TxOut era) x #

toRep (TxOut era) x → TxOut era #

IsCardanoEra era ⇒ ToJSON (TxOut era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

toJSONTxOut era → Value #

toEncodingTxOut era → Encoding #

toJSONList ∷ [TxOut era] → Value #

toEncodingList ∷ [TxOut era] → Encoding #

type Rep (TxOut era) Source # 
Instance details

Defined in Cardano.Api.TxBody

data TxOutValue era where Source #

Instances

Instances details
Eq (TxOutValue era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxOutValue era → TxOutValue era → Bool #

(/=)TxOutValue era → TxOutValue era → Bool #

Show (TxOutValue era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntTxOutValue era → ShowS #

showTxOutValue era → String #

showList ∷ [TxOutValue era] → ShowS #

Generic (TxOutValue era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Associated Types

type Rep (TxOutValue era) ∷ TypeType #

Methods

fromTxOutValue era → Rep (TxOutValue era) x #

toRep (TxOutValue era) x → TxOutValue era #

ToJSON (TxOutValue era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

toJSONTxOutValue era → Value #

toEncodingTxOutValue era → Encoding #

toJSONList ∷ [TxOutValue era] → Value #

toEncodingList ∷ [TxOutValue era] → Encoding #

type Rep (TxOutValue era) Source # 
Instance details

Defined in Cardano.Api.TxBody

data TxOutDatumHash era where Source #

Instances

Instances details
Eq (TxOutDatumHash era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxOutDatumHash era → TxOutDatumHash era → Bool #

(/=)TxOutDatumHash era → TxOutDatumHash era → Bool #

Show (TxOutDatumHash era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntTxOutDatumHash era → ShowS #

showTxOutDatumHash era → String #

showList ∷ [TxOutDatumHash era] → ShowS #

Generic (TxOutDatumHash era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Associated Types

type Rep (TxOutDatumHash era) ∷ TypeType #

Methods

fromTxOutDatumHash era → Rep (TxOutDatumHash era) x #

toRep (TxOutDatumHash era) x → TxOutDatumHash era #

type Rep (TxOutDatumHash era) Source # 
Instance details

Defined in Cardano.Api.TxBody

type Rep (TxOutDatumHash era) = D1 ('MetaData "TxOutDatumHash" "Cardano.Api.TxBody" "cardano-api-1.28.0-inplace" 'False) (C1 ('MetaCons "TxOutDatumHashNone" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "TxOutDatumHash" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ScriptDataSupportedInEra era)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash ScriptData))))

data TxOutInAnyEra where Source #

Constructors

TxOutInAnyEraCardanoEra era → TxOut era → TxOutInAnyEra 

Instances

Instances details
Show TxOutInAnyEra Source # 
Instance details

Defined in Cardano.Api.TxBody

txOutInAnyEraIsCardanoEra era ⇒ TxOut era → TxOutInAnyEra Source #

Convenience constructor for TxOutInAnyEra

Other transaction body types

data TxInsCollateral era where Source #

Instances

Instances details
Eq (TxInsCollateral era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxInsCollateral era → TxInsCollateral era → Bool #

(/=)TxInsCollateral era → TxInsCollateral era → Bool #

Show (TxInsCollateral era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntTxInsCollateral era → ShowS #

showTxInsCollateral era → String #

showList ∷ [TxInsCollateral era] → ShowS #

data TxFee era where Source #

Constructors

TxFeeImplicitTxFeesImplicitInEra era → TxFee era 
TxFeeExplicitTxFeesExplicitInEra era → LovelaceTxFee era 

Instances

Instances details
Eq (TxFee era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxFee era → TxFee era → Bool #

(/=)TxFee era → TxFee era → Bool #

Show (TxFee era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntTxFee era → ShowS #

showTxFee era → String #

showList ∷ [TxFee era] → ShowS #

data TxValidityUpperBound era where Source #

This was formerly known as the TTL.

Instances

Instances details
Eq (TxValidityUpperBound era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Show (TxValidityUpperBound era) Source # 
Instance details

Defined in Cardano.Api.TxBody

data TxMetadataInEra era where Source #

Instances

Instances details
Eq (TxMetadataInEra era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxMetadataInEra era → TxMetadataInEra era → Bool #

(/=)TxMetadataInEra era → TxMetadataInEra era → Bool #

Show (TxMetadataInEra era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntTxMetadataInEra era → ShowS #

showTxMetadataInEra era → String #

showList ∷ [TxMetadataInEra era] → ShowS #

data TxAuxScripts era where Source #

Instances

Instances details
Eq (TxAuxScripts era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxAuxScripts era → TxAuxScripts era → Bool #

(/=)TxAuxScripts era → TxAuxScripts era → Bool #

Show (TxAuxScripts era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntTxAuxScripts era → ShowS #

showTxAuxScripts era → String #

showList ∷ [TxAuxScripts era] → ShowS #

data TxExtraScriptData era where Source #

Instances

Instances details
Eq (TxExtraScriptData era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Show (TxExtraScriptData era) Source # 
Instance details

Defined in Cardano.Api.TxBody

data TxWithdrawals build era where Source #

Instances

Instances details
Eq (TxWithdrawals build era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxWithdrawals build era → TxWithdrawals build era → Bool #

(/=)TxWithdrawals build era → TxWithdrawals build era → Bool #

Show (TxWithdrawals build era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntTxWithdrawals build era → ShowS #

showTxWithdrawals build era → String #

showList ∷ [TxWithdrawals build era] → ShowS #

data TxCertificates build era where Source #

Instances

Instances details
Eq (TxCertificates build era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxCertificates build era → TxCertificates build era → Bool #

(/=)TxCertificates build era → TxCertificates build era → Bool #

Show (TxCertificates build era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntTxCertificates build era → ShowS #

showTxCertificates build era → String #

showList ∷ [TxCertificates build era] → ShowS #

data TxUpdateProposal era where Source #

Instances

Instances details
Eq (TxUpdateProposal era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxUpdateProposal era → TxUpdateProposal era → Bool #

(/=)TxUpdateProposal era → TxUpdateProposal era → Bool #

Show (TxUpdateProposal era) Source # 
Instance details

Defined in Cardano.Api.TxBody

data TxMintValue build era where Source #

Constructors

TxMintNoneTxMintValue build era 
TxMintValueMultiAssetSupportedInEra era → ValueBuildTxWith build (Map PolicyId (ScriptWitness WitCtxMint era)) → TxMintValue build era 

Instances

Instances details
Eq (TxMintValue build era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)TxMintValue build era → TxMintValue build era → Bool #

(/=)TxMintValue build era → TxMintValue build era → Bool #

Show (TxMintValue build era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntTxMintValue build era → ShowS #

showTxMintValue build era → String #

showList ∷ [TxMintValue build era] → ShowS #

Building vs viewing transactions

data BuildTxWith build a where Source #

Constructors

ViewTxBuildTxWith ViewTx a 
BuildTxWith ∷ a → BuildTxWith BuildTx a 

Instances

Instances details
Eq a ⇒ Eq (BuildTxWith build a) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

(==)BuildTxWith build a → BuildTxWith build a → Bool #

(/=)BuildTxWith build a → BuildTxWith build a → Bool #

Show a ⇒ Show (BuildTxWith build a) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

showsPrecIntBuildTxWith build a → ShowS #

showBuildTxWith build a → String #

showList ∷ [BuildTxWith build a] → ShowS #

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.

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

MultiAssetInMaryEraMultiAssetSupportedInEra MaryEra

Multi-asset transactions are supported in the Mary era.

MultiAssetInAlonzoEraMultiAssetSupportedInEra AlonzoEra

Multi-asset transactions are supported in the Alonzo era.

Instances

Instances details
Eq (MultiAssetSupportedInEra era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Show (MultiAssetSupportedInEra era) Source # 
Instance details

Defined in Cardano.Api.TxBody

ToJSON (MultiAssetSupportedInEra era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

toJSONMultiAssetSupportedInEra era → Value #

toEncodingMultiAssetSupportedInEra era → Encoding #

toJSONList ∷ [MultiAssetSupportedInEra era] → Value #

toEncodingList ∷ [MultiAssetSupportedInEra era] → Encoding #

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.

Instances

Instances details
Eq (OnlyAdaSupportedInEra era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Show (OnlyAdaSupportedInEra era) Source # 
Instance details

Defined in Cardano.Api.TxBody

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.

Instances

Instances details
Eq (TxFeesExplicitInEra era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Show (TxFeesExplicitInEra era) Source # 
Instance details

Defined in Cardano.Api.TxBody

data TxFeesImplicitInEra era where Source #

A representation of whether the era requires implicitly specified fees in transactions.

This is the negation of TxFeesExplicitInEra.

Instances

Instances details
Eq (TxFeesImplicitInEra era) Source # 
Instance details

Defined in Cardano.Api.TxBody

Show (TxFeesImplicitInEra era) Source # 
Instance details

Defined in Cardano.Api.TxBody

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.

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.

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.

data TxMetadataSupportedInEra era where Source #

A representation of whether the era supports transaction metadata.

Transaction metadata is supported from the Shelley era onwards.

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.

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.

data ScriptDataSupportedInEra 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

ScriptDataInAlonzoEraScriptDataSupportedInEra AlonzoEra

Script data is supported in transactions in the Alonzo era.

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.

data UpdateProposalSupportedInEra era where Source #

A representation of whether the era supports UpdateProposals 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.

Feature availability functions

Inspecting ScriptWitnesses

data AnyScriptWitness era where Source #

A ScriptWitness in any WitCtx. This lets us handle heterogeneous collections of script witnesses from multiple contexts.

Constructors

AnyScriptWitnessScriptWitness 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 TxIds.

ScriptWitnessIndexMint !Word

The n'th minting PolicyId, in the order of the PolicyIds.

ScriptWitnessIndexCertificate !Word

The n'th certificate, in the list order of the certificates.

ScriptWitnessIndexWithdrawal !Word

The n'th withdrawal, in the order of the StakeAddresss.

mapTxScriptWitnesses ∷ ∀ era. (∀ witctx. ScriptWitnessIndexScriptWitness witctx era → ScriptWitness witctx era) → TxBodyContent BuildTx era → TxBodyContent BuildTx era Source #

Internal conversion functions & types

toShelleyTxIdTxId → TxId StandardCrypto Source #

toShelleyTxInTxIn → TxIn StandardCrypto Source #

toShelleyTxOut ∷ ∀ era ledgerera. ShelleyLedgerEra era ~ ledgerera ⇒ ShelleyBasedEra era → TxOut era → TxOut ledgerera Source #

fromShelleyTxId ∷ TxId StandardCrypto → TxId Source #

fromShelleyTxIn ∷ TxIn StandardCrypto → TxIn Source #

fromShelleyTxOutShelleyLedgerEra era ~ ledgerera ⇒ ShelleyBasedEra era → TxOut ledgerera → TxOut era Source #

fromByronTxIn ∷ TxIn → TxIn Source #

Data family instances

data family AsType t Source #

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.

Instances

Instances details
data AsType AlonzoEra Source # 
Instance details

Defined in Cardano.Api.Eras

data AsType MaryEra Source # 
Instance details

Defined in Cardano.Api.Eras

data AsType AllegraEra Source # 
Instance details

Defined in Cardano.Api.Eras

data AsType ShelleyEra Source # 
Instance details

Defined in Cardano.Api.Eras

data AsType ByronEra Source # 
Instance details

Defined in Cardano.Api.Eras

data AsType TextEnvelope Source # 
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

data AsType TxMetadata Source # 
Instance details

Defined in Cardano.Api.TxMetadata

data AsType StakePoolKey Source # 
Instance details

Defined in Cardano.Api.KeysShelley

data AsType GenesisUTxOKey Source # 
Instance details

Defined in Cardano.Api.KeysShelley

data AsType GenesisDelegateExtendedKey Source # 
Instance details

Defined in Cardano.Api.KeysShelley

data AsType GenesisDelegateKey Source # 
Instance details

Defined in Cardano.Api.KeysShelley

data AsType GenesisExtendedKey Source # 
Instance details

Defined in Cardano.Api.KeysShelley

data AsType GenesisKey Source # 
Instance details

Defined in Cardano.Api.KeysShelley

data AsType StakeExtendedKey Source # 
Instance details

Defined in Cardano.Api.KeysShelley

data AsType StakeKey Source # 
Instance details

Defined in Cardano.Api.KeysShelley

data AsType PaymentExtendedKey Source # 
Instance details

Defined in Cardano.Api.KeysShelley

data AsType PaymentKey Source # 
Instance details

Defined in Cardano.Api.KeysShelley

data AsType ScriptData Source # 
Instance details

Defined in Cardano.Api.ScriptData

data AsType ScriptHash Source # 
Instance details

Defined in Cardano.Api.Script

data AsType ScriptInAnyLang Source # 
Instance details

Defined in Cardano.Api.Script

data AsType PlutusScriptV1 Source # 
Instance details

Defined in Cardano.Api.Script

data AsType SimpleScriptV2 Source # 
Instance details

Defined in Cardano.Api.Script

data AsType SimpleScriptV1 Source # 
Instance details

Defined in Cardano.Api.Script

data AsType ByronKeyLegacy Source # 
Instance details

Defined in Cardano.Api.KeysByron

data AsType ByronKey Source # 
Instance details

Defined in Cardano.Api.KeysByron

data AsType ByronVote Source # 
Instance details

Defined in Cardano.Api.SpecialByron

data AsType ByronUpdateProposal Source # 
Instance details

Defined in Cardano.Api.SpecialByron

data AsType VrfKey Source # 
Instance details

Defined in Cardano.Api.KeysPraos

data AsType KesKey Source # 
Instance details

Defined in Cardano.Api.KeysPraos

data AsType StakePoolMetadata Source # 
Instance details

Defined in Cardano.Api.StakePoolMetadata

data AsType StakeAddress Source # 
Instance details

Defined in Cardano.Api.Address

data AsType AddressAny Source # 
Instance details

Defined in Cardano.Api.Address

data AsType ShelleyAddr Source # 
Instance details

Defined in Cardano.Api.Address

data AsType ByronAddr Source # 
Instance details

Defined in Cardano.Api.Address

data AsType AssetName Source # 
Instance details

Defined in Cardano.Api.Value

data AsType PolicyId Source # 
Instance details

Defined in Cardano.Api.Value

data AsType UpdateProposal Source # 
Instance details

Defined in Cardano.Api.ProtocolParameters

data AsType PraosNonce Source # 
Instance details

Defined in Cardano.Api.ProtocolParameters

data AsType Certificate Source # 
Instance details

Defined in Cardano.Api.Certificate

data AsType TxId Source # 
Instance details

Defined in Cardano.Api.TxBody

data AsType BlockHeader Source # 
Instance details

Defined in Cardano.Api.Block

data AsType OperationalCertificateIssueCounter Source # 
Instance details

Defined in Cardano.Api.OperationalCertificate

data AsType OperationalCertificate Source # 
Instance details

Defined in Cardano.Api.OperationalCertificate

data AsType (Hash a) Source # 
Instance details

Defined in Cardano.Api.Hash

data AsType (Hash a) = AsHash (AsType a)
data AsType (VerificationKey a) Source # 
Instance details

Defined in Cardano.Api.Key

data AsType (SigningKey a) Source # 
Instance details

Defined in Cardano.Api.Key

data AsType (PlutusScript lang) Source # 
Instance details

Defined in Cardano.Api.Script

data AsType (SimpleScript lang) Source # 
Instance details

Defined in Cardano.Api.Script

data AsType (ScriptInEra era) Source # 
Instance details

Defined in Cardano.Api.Script

data AsType (Script lang) Source # 
Instance details

Defined in Cardano.Api.Script

data AsType (Script lang) = AsScript (AsType lang)
data AsType (AddressInEra era) Source # 
Instance details

Defined in Cardano.Api.Address

data AsType (Address addrtype) Source # 
Instance details

Defined in Cardano.Api.Address

data AsType (Address addrtype) = AsAddress (AsType addrtype)
data AsType (TxBody era) Source # 
Instance details

Defined in Cardano.Api.TxBody

data AsType (TxBody era) = AsTxBody (AsType era)
data AsType (KeyWitness era) Source # 
Instance details

Defined in Cardano.Api.Tx

data AsType (Tx era) Source # 
Instance details

Defined in Cardano.Api.Tx

data AsType (Tx era) = AsTx (AsType era)