Safe Haskell | None |
---|---|
Language | Haskell2010 |
Transaction bodies
Synopsis
- data TxBody era where
- ColeTxBody ∷ Annotated Tx ByteString → TxBody ColeEra
- SophieTxBody ∷ SophieBasedEra era → TxBody (SophieLedgerEra era) → [Script (SophieLedgerEra era)] → TxBodyScriptData era → Maybe (AuxiliaryData (SophieLedgerEra era)) → TxScriptValidity era → TxBody era
- pattern TxBody ∷ TxBodyContent ViewTx era → TxBody era
- makeTransactionBody ∷ ∀ era. IsBccEra era ⇒ TxBodyContent BuildTx era → Either TxBodyError (TxBody era)
- data TxBodyContent build era = TxBodyContent {
- txIns ∷ TxIns build era
- txInsCollateral ∷ TxInsCollateral era
- txOuts ∷ [TxOut era]
- txFee ∷ TxFee era
- txValidityRange ∷ (TxValidityLowerBound era, TxValidityUpperBound era)
- txMetadata ∷ TxMetadataInEra era
- txAuxScripts ∷ TxAuxScripts era
- txExtraScriptData ∷ BuildTxWith build (TxExtraScriptData 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 (SophieLedgerEra era) → Redeemers (SophieLedgerEra era) → TxBodyScriptData era
- data TxScriptValidity era where
- data TxScriptValiditySupportedInEra era where
- data ScriptValidity
- scriptValidityToIsValid ∷ ScriptValidity → IsValid
- isValidToScriptValidity ∷ IsValid → ScriptValidity
- scriptValidityToTxScriptValidity ∷ SophieBasedEra era → ScriptValidity → TxScriptValidity era
- txScriptValidityToIsValid ∷ TxScriptValidity era → IsValid
- txScriptValidityToScriptValidity ∷ TxScriptValidity era → ScriptValidity
- newtype TxId = TxId (Hash StandardCrypto EraIndependentTxBody)
- getTxId ∷ ∀ era. TxBody era → TxId
- getTxIdSophie ∷ Crypto (SophieLedgerEra era) ~ StandardCrypto ⇒ UsesTxBody (SophieLedgerEra era) ⇒ SophieBasedEra era → TxBody (SophieLedgerEra era) → TxId
- data TxIn = TxIn TxId TxIx
- newtype TxIx = TxIx Word
- genesisUTxOPseudoTxIn ∷ NetworkId → Hash GenesisUTxOKey → TxIn
- data TxOut era = TxOut (AddressInEra era) (TxOutValue era) (TxOutDatumHash era)
- data TxOutValue era where
- TxOutBccOnly ∷ OnlyBccSupportedInEra era → Entropic → TxOutValue era
- TxOutValue ∷ MultiAssetSupportedInEra era → Value → TxOutValue era
- entropicToTxOutValue ∷ IsBccEra era ⇒ Entropic → TxOutValue era
- prettyRenderTxOut ∷ TxOutInAnyEra → Text
- txOutValueToEntropic ∷ TxOutValue era → Entropic
- txOutValueToValue ∷ TxOutValue era → Value
- serialiseAddressForTxOut ∷ AddressInEra era → Text
- data TxOutDatumHash era where
- TxOutDatumHashNone ∷ TxOutDatumHash era
- TxOutDatumHash ∷ ScriptDataSupportedInEra era → Hash ScriptData → TxOutDatumHash era
- data TxOutInAnyEra where
- TxOutInAnyEra ∷ BccEra era → TxOut era → TxOutInAnyEra
- txOutInAnyEra ∷ IsBccEra era ⇒ TxOut era → TxOutInAnyEra
- data TxInsCollateral era where
- TxInsCollateralNone ∷ TxInsCollateral era
- TxInsCollateral ∷ CollateralSupportedInEra era → [TxIn] → TxInsCollateral era
- data TxFee era where
- TxFeeImplicit ∷ TxFeesImplicitInEra era → TxFee era
- TxFeeExplicit ∷ TxFeesExplicitInEra era → Entropic → 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 TxExtraScriptData era where
- data TxExtraKeyWitnesses era where
- data TxWithdrawals build era where
- TxWithdrawalsNone ∷ TxWithdrawals build era
- TxWithdrawals ∷ WithdrawalsSupportedInEra era → [(StakeAddress, Entropic, 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 OnlyBccSupportedInEra era where
- data TxFeesExplicitInEra era where
- data TxFeesImplicitInEra era where
- data ValidityUpperBoundSupportedInEra era where
- data ValidityNoUpperBoundSupportedInEra era where
- data ValidityLowerBoundSupportedInEra era where
- data TxMetadataSupportedInEra era where
- data AuxScriptsSupportedInEra era where
- data TxExtraKeyWitnessesSupportedInEra era where
- data ScriptDataSupportedInEra era where
- data WithdrawalsSupportedInEra era where
- data CertificatesSupportedInEra era where
- data UpdateProposalSupportedInEra era where
- collateralSupportedInEra ∷ BccEra era → Maybe (CollateralSupportedInEra era)
- multiAssetSupportedInEra ∷ BccEra era → Either (OnlyBccSupportedInEra era) (MultiAssetSupportedInEra era)
- txFeesExplicitInEra ∷ BccEra era → Either (TxFeesImplicitInEra era) (TxFeesExplicitInEra era)
- validityUpperBoundSupportedInEra ∷ BccEra era → Maybe (ValidityUpperBoundSupportedInEra era)
- validityNoUpperBoundSupportedInEra ∷ BccEra era → Maybe (ValidityNoUpperBoundSupportedInEra era)
- validityLowerBoundSupportedInEra ∷ BccEra era → Maybe (ValidityLowerBoundSupportedInEra era)
- txMetadataSupportedInEra ∷ BccEra era → Maybe (TxMetadataSupportedInEra era)
- auxScriptsSupportedInEra ∷ BccEra era → Maybe (AuxScriptsSupportedInEra era)
- extraKeyWitnessesSupportedInEra ∷ BccEra era → Maybe (TxExtraKeyWitnessesSupportedInEra era)
- scriptDataSupportedInEra ∷ BccEra era → Maybe (ScriptDataSupportedInEra era)
- withdrawalsSupportedInEra ∷ BccEra era → Maybe (WithdrawalsSupportedInEra era)
- certificatesSupportedInEra ∷ BccEra era → Maybe (CertificatesSupportedInEra era)
- updateProposalSupportedInEra ∷ BccEra era → Maybe (UpdateProposalSupportedInEra era)
- txScriptValiditySupportedInSophieBasedEra ∷ SophieBasedEra era → Maybe (TxScriptValiditySupportedInEra era)
- txScriptValiditySupportedInBccEra ∷ BccEra era → Maybe (TxScriptValiditySupportedInEra era)
- data AnyScriptWitness era where
- AnyScriptWitness ∷ ScriptWitness witctx era → AnyScriptWitness era
- data ScriptWitnessIndex
- renderScriptWitnessIndex ∷ ScriptWitnessIndex → String
- collectTxBodyScriptWitnesses ∷ ∀ era. TxBodyContent BuildTx era → [(ScriptWitnessIndex, AnyScriptWitness era)]
- mapTxScriptWitnesses ∷ ∀ era. (∀ witctx. ScriptWitnessIndex → ScriptWitness witctx era → ScriptWitness witctx era) → TxBodyContent BuildTx era → TxBodyContent BuildTx era
- toSophieTxId ∷ TxId → TxId StandardCrypto
- toSophieTxIn ∷ TxIn → TxIn StandardCrypto
- toSophieTxOut ∷ ∀ era ledgerera. SophieLedgerEra era ~ ledgerera ⇒ SophieBasedEra era → TxOut era → TxOut ledgerera
- fromSophieTxId ∷ TxId StandardCrypto → TxId
- fromSophieTxIn ∷ TxIn StandardCrypto → TxIn
- fromSophieTxOut ∷ SophieLedgerEra era ~ ledgerera ⇒ SophieBasedEra era → TxOut ledgerera → TxOut era
- toAurumRdmrPtr ∷ ScriptWitnessIndex → RdmrPtr
- fromAurumRdmrPtr ∷ RdmrPtr → ScriptWitnessIndex
- fromColeTxIn ∷ TxIn → TxIn
- fromLedgerTxOuts ∷ SophieBasedEra era → TxBody (SophieLedgerEra era) → [TxOut era]
- renderTxIn ∷ TxIn → Text
- data family AsType t
Transaction bodies
data TxBody era where Source #
ColeTxBody ∷ Annotated Tx ByteString → TxBody ColeEra | |
SophieTxBody | |
|
pattern TxBody ∷ TxBodyContent ViewTx era → TxBody era |
Instances
Eq (TxBody era) Source # | |
Show (TxBody era) Source # | |
HasTypeProxy era ⇒ HasTypeProxy (TxBody era) Source # | |
IsBccEra era ⇒ SerialiseAsCBOR (TxBody era) Source # | |
Defined in Bcc.Api.TxBody serialiseToCBOR ∷ TxBody era → ByteString Source # deserialiseFromCBOR ∷ AsType (TxBody era) → ByteString → Either DecoderError (TxBody era) Source # | |
IsBccEra era ⇒ HasTextEnvelope (TxBody era) Source # | |
Defined in Bcc.Api.TxBody textEnvelopeType ∷ AsType (TxBody era) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ TxBody era → TextEnvelopeDescr Source # | |
data AsType (TxBody era) Source # | |
Defined in Bcc.Api.TxBody |
makeTransactionBody ∷ ∀ era. IsBccEra era ⇒ TxBodyContent BuildTx era → Either TxBodyError (TxBody era) Source #
data TxBodyContent build era Source #
TxBodyContent | |
|
data TxBodyError Source #
Instances
Show TxBodyError Source # | |
Defined in Bcc.Api.TxBody | |
Error TxBodyError Source # | |
Defined in Bcc.Api.TxBody |
data TxBodyScriptData era where Source #
TxBodyNoScriptData ∷ TxBodyScriptData era | |
TxBodyScriptData ∷ ScriptDataSupportedInEra era → TxDats (SophieLedgerEra era) → Redeemers (SophieLedgerEra era) → TxBodyScriptData era |
Instances
Eq (TxBodyScriptData era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxBodyScriptData era → TxBodyScriptData era → Bool Source # (/=) ∷ TxBodyScriptData era → TxBodyScriptData era → Bool Source # | |
Show (TxBodyScriptData era) Source # | |
Defined in Bcc.Api.TxBody |
data TxScriptValidity era where Source #
A representation of whether the era supports tx script validity.
The Jen and subsequent eras support script validity.
TxScriptValidityNone ∷ TxScriptValidity era | |
TxScriptValidity ∷ TxScriptValiditySupportedInEra era → ScriptValidity → TxScriptValidity era | Tx script validity is supported in transactions in the |
Instances
Eq (TxScriptValidity era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxScriptValidity era → TxScriptValidity era → Bool Source # (/=) ∷ TxScriptValidity era → TxScriptValidity era → Bool Source # | |
Show (TxScriptValidity era) Source # | |
Defined in Bcc.Api.TxBody |
data TxScriptValiditySupportedInEra era where Source #
Instances
Eq (TxScriptValiditySupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxScriptValiditySupportedInEra era → TxScriptValiditySupportedInEra era → Bool Source # (/=) ∷ TxScriptValiditySupportedInEra era → TxScriptValiditySupportedInEra era → Bool Source # | |
Show (TxScriptValiditySupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody |
data ScriptValidity Source #
Indicates whether a script is expected to fail or pass validation.
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
Eq ScriptValidity Source # | |
Defined in Bcc.Api.TxBody (==) ∷ ScriptValidity → ScriptValidity → Bool Source # (/=) ∷ ScriptValidity → ScriptValidity → Bool Source # | |
Show ScriptValidity Source # | |
Defined in Bcc.Api.TxBody | |
FromCBOR ScriptValidity Source # | |
Defined in Bcc.Api.TxBody fromCBOR ∷ Decoder s ScriptValidity # label ∷ Proxy ScriptValidity → Text # | |
ToCBOR ScriptValidity Source # | |
Defined in Bcc.Api.TxBody toCBOR ∷ ScriptValidity → Encoding # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ScriptValidity → Size # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ScriptValidity] → Size # |
scriptValidityToIsValid ∷ ScriptValidity → IsValid Source #
isValidToScriptValidity ∷ IsValid → ScriptValidity Source #
scriptValidityToTxScriptValidity ∷ SophieBasedEra era → ScriptValidity → TxScriptValidity era Source #
txScriptValidityToIsValid ∷ TxScriptValidity era → IsValid Source #
Transaction Ids
TxId (Hash StandardCrypto EraIndependentTxBody) |
Instances
Eq TxId Source # | |
Ord TxId Source # | |
Show TxId Source # | |
IsString TxId Source # | |
Defined in Bcc.Api.TxBody fromString ∷ String → TxId Source # | |
FromJSON TxId Source # | |
Defined in Bcc.Api.TxBody | |
ToJSON TxId Source # | |
Defined in Bcc.Api.TxBody | |
FromJSONKey TxId Source # | |
Defined in Bcc.Api.TxBody fromJSONKey ∷ FromJSONKeyFunction TxId fromJSONKeyList ∷ FromJSONKeyFunction [TxId] | |
ToJSONKey TxId Source # | |
Defined in Bcc.Api.TxBody toJSONKey ∷ ToJSONKeyFunction TxId toJSONKeyList ∷ ToJSONKeyFunction [TxId] | |
HasTypeProxy TxId Source # | |
SerialiseAsRawBytes TxId Source # | |
Defined in Bcc.Api.TxBody | |
data AsType TxId Source # | |
Defined in Bcc.Api.TxBody |
getTxIdSophie ∷ Crypto (SophieLedgerEra era) ~ StandardCrypto ⇒ UsesTxBody (SophieLedgerEra era) ⇒ SophieBasedEra era → TxBody (SophieLedgerEra era) → TxId Source #
Transaction inputs
Instances
Eq TxIn Source # | |
Ord TxIn Source # | |
Show TxIn Source # | |
ToJSON TxIn Source # | |
Defined in Bcc.Api.TxBody | |
ToJSONKey TxIn Source # | |
Defined in Bcc.Api.TxBody toJSONKey ∷ ToJSONKeyFunction TxIn toJSONKeyList ∷ ToJSONKeyFunction [TxIn] |
Instances
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 Sophie 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
TxOut (AddressInEra era) (TxOutValue era) (TxOutDatumHash era) |
Instances
Eq (TxOut era) Source # | |
Show (TxOut era) Source # | |
Generic (TxOut era) Source # | |
IsBccEra era ⇒ ToJSON (TxOut era) Source # | |
Defined in Bcc.Api.TxBody toEncoding ∷ TxOut era → Encoding # toJSONList ∷ [TxOut era] → Value # toEncodingList ∷ [TxOut era] → Encoding # | |
type Rep (TxOut era) Source # | |
Defined in Bcc.Api.TxBody type Rep (TxOut era) = D1 ('MetaData "TxOut" "Bcc.Api.TxBody" "bcc-api-1.99.0-inplace" 'False) (C1 ('MetaCons "TxOut" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AddressInEra era)) :*: (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TxOutValue era)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TxOutDatumHash era))))) |
data TxOutValue era where Source #
TxOutBccOnly ∷ OnlyBccSupportedInEra era → Entropic → TxOutValue era | |
TxOutValue ∷ MultiAssetSupportedInEra era → Value → TxOutValue era |
Instances
entropicToTxOutValue ∷ IsBccEra era ⇒ Entropic → TxOutValue era Source #
txOutValueToEntropic ∷ TxOutValue era → Entropic Source #
txOutValueToValue ∷ TxOutValue era → Value Source #
serialiseAddressForTxOut ∷ AddressInEra era → Text Source #
data TxOutDatumHash era where Source #
TxOutDatumHashNone ∷ TxOutDatumHash era | |
TxOutDatumHash ∷ ScriptDataSupportedInEra era → Hash ScriptData → TxOutDatumHash era |
Instances
Eq (TxOutDatumHash era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxOutDatumHash era → TxOutDatumHash era → Bool Source # (/=) ∷ TxOutDatumHash era → TxOutDatumHash era → Bool Source # | |
Show (TxOutDatumHash era) Source # | |
Defined in Bcc.Api.TxBody | |
Generic (TxOutDatumHash era) Source # | |
Defined in Bcc.Api.TxBody from ∷ TxOutDatumHash era → Rep (TxOutDatumHash era) x Source # to ∷ Rep (TxOutDatumHash era) x → TxOutDatumHash era Source # | |
type Rep (TxOutDatumHash era) Source # | |
Defined in Bcc.Api.TxBody type Rep (TxOutDatumHash era) = D1 ('MetaData "TxOutDatumHash" "Bcc.Api.TxBody" "bcc-api-1.99.0-inplace" 'False) (C1 ('MetaCons "TxOutDatumHashNone" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "TxOutDatumHash" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ScriptDataSupportedInEra era)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash ScriptData)))) |
data TxOutInAnyEra where Source #
TxOutInAnyEra ∷ BccEra era → TxOut era → TxOutInAnyEra |
Instances
Show TxOutInAnyEra Source # | |
Defined in Bcc.Api.TxBody |
txOutInAnyEra ∷ IsBccEra era ⇒ TxOut era → TxOutInAnyEra Source #
Convenience constructor for TxOutInAnyEra
Other transaction body types
data TxInsCollateral era where Source #
TxInsCollateralNone ∷ TxInsCollateral era | |
TxInsCollateral ∷ CollateralSupportedInEra era → [TxIn] → TxInsCollateral era |
Instances
Eq (TxInsCollateral era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxInsCollateral era → TxInsCollateral era → Bool Source # (/=) ∷ TxInsCollateral era → TxInsCollateral era → Bool Source # | |
Show (TxInsCollateral era) Source # | |
Defined in Bcc.Api.TxBody |
TxFeeImplicit ∷ TxFeesImplicitInEra era → TxFee era | |
TxFeeExplicit ∷ TxFeesExplicitInEra era → Entropic → TxFee era |
data TxValidityLowerBound era where Source #
TxValidityNoLowerBound ∷ TxValidityLowerBound era | |
TxValidityLowerBound ∷ ValidityLowerBoundSupportedInEra era → SlotNo → TxValidityLowerBound era |
Instances
Eq (TxValidityLowerBound era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxValidityLowerBound era → TxValidityLowerBound era → Bool Source # (/=) ∷ TxValidityLowerBound era → TxValidityLowerBound era → Bool Source # | |
Show (TxValidityLowerBound era) Source # | |
Defined in Bcc.Api.TxBody |
data TxValidityUpperBound era where Source #
This was formerly known as the TTL.
TxValidityNoUpperBound ∷ ValidityNoUpperBoundSupportedInEra era → TxValidityUpperBound era | |
TxValidityUpperBound ∷ ValidityUpperBoundSupportedInEra era → SlotNo → TxValidityUpperBound era |
Instances
Eq (TxValidityUpperBound era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxValidityUpperBound era → TxValidityUpperBound era → Bool Source # (/=) ∷ TxValidityUpperBound era → TxValidityUpperBound era → Bool Source # | |
Show (TxValidityUpperBound era) Source # | |
Defined in Bcc.Api.TxBody |
data TxMetadataInEra era where Source #
TxMetadataNone ∷ TxMetadataInEra era | |
TxMetadataInEra ∷ TxMetadataSupportedInEra era → TxMetadata → TxMetadataInEra era |
Instances
Eq (TxMetadataInEra era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxMetadataInEra era → TxMetadataInEra era → Bool Source # (/=) ∷ TxMetadataInEra era → TxMetadataInEra era → Bool Source # | |
Show (TxMetadataInEra era) Source # | |
Defined in Bcc.Api.TxBody |
data TxAuxScripts era where Source #
TxAuxScriptsNone ∷ TxAuxScripts era | |
TxAuxScripts ∷ AuxScriptsSupportedInEra era → [ScriptInEra era] → TxAuxScripts era |
Instances
Eq (TxAuxScripts era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxAuxScripts era → TxAuxScripts era → Bool Source # (/=) ∷ TxAuxScripts era → TxAuxScripts era → Bool Source # | |
Show (TxAuxScripts era) Source # | |
Defined in Bcc.Api.TxBody |
data TxExtraScriptData era where Source #
TxExtraScriptDataNone ∷ TxExtraScriptData era | |
TxExtraScriptData ∷ ScriptDataSupportedInEra era → [ScriptData] → TxExtraScriptData era |
Instances
Eq (TxExtraScriptData era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxExtraScriptData era → TxExtraScriptData era → Bool Source # (/=) ∷ TxExtraScriptData era → TxExtraScriptData era → Bool Source # | |
Show (TxExtraScriptData era) Source # | |
Defined in Bcc.Api.TxBody |
data TxExtraKeyWitnesses era where Source #
TxExtraKeyWitnessesNone ∷ TxExtraKeyWitnesses era | |
TxExtraKeyWitnesses ∷ TxExtraKeyWitnessesSupportedInEra era → [Hash PaymentKey] → TxExtraKeyWitnesses era |
Instances
Eq (TxExtraKeyWitnesses era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxExtraKeyWitnesses era → TxExtraKeyWitnesses era → Bool Source # (/=) ∷ TxExtraKeyWitnesses era → TxExtraKeyWitnesses era → Bool Source # | |
Show (TxExtraKeyWitnesses era) Source # | |
Defined in Bcc.Api.TxBody |
data TxWithdrawals build era where Source #
TxWithdrawalsNone ∷ TxWithdrawals build era | |
TxWithdrawals ∷ WithdrawalsSupportedInEra era → [(StakeAddress, Entropic, BuildTxWith build (Witness WitCtxStake era))] → TxWithdrawals build era |
Instances
Eq (TxWithdrawals build era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxWithdrawals build era → TxWithdrawals build era → Bool Source # (/=) ∷ TxWithdrawals build era → TxWithdrawals build era → Bool Source # | |
Show (TxWithdrawals build era) Source # | |
Defined in Bcc.Api.TxBody |
data TxCertificates build era where Source #
TxCertificatesNone ∷ TxCertificates build era | |
TxCertificates ∷ CertificatesSupportedInEra era → [Certificate] → BuildTxWith build (Map StakeCredential (Witness WitCtxStake era)) → TxCertificates build era |
Instances
Eq (TxCertificates build era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxCertificates build era → TxCertificates build era → Bool Source # (/=) ∷ TxCertificates build era → TxCertificates build era → Bool Source # | |
Show (TxCertificates build era) Source # | |
Defined in Bcc.Api.TxBody |
data TxUpdateProposal era where Source #
TxUpdateProposalNone ∷ TxUpdateProposal era | |
TxUpdateProposal ∷ UpdateProposalSupportedInEra era → UpdateProposal → TxUpdateProposal era |
Instances
Eq (TxUpdateProposal era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxUpdateProposal era → TxUpdateProposal era → Bool Source # (/=) ∷ TxUpdateProposal era → TxUpdateProposal era → Bool Source # | |
Show (TxUpdateProposal era) Source # | |
Defined in Bcc.Api.TxBody |
data TxMintValue build era where Source #
TxMintNone ∷ TxMintValue build era | |
TxMintValue ∷ MultiAssetSupportedInEra era → Value → BuildTxWith build (Map PolicyId (ScriptWitness WitCtxMint era)) → TxMintValue build era |
Instances
Eq (TxMintValue build era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxMintValue build era → TxMintValue build era → Bool Source # (/=) ∷ TxMintValue build era → TxMintValue build era → Bool Source # | |
Show (TxMintValue build era) Source # | |
Defined in Bcc.Api.TxBody |
Building vs viewing transactions
data BuildTxWith build a where Source #
ViewTx ∷ BuildTxWith ViewTx a | |
BuildTxWith ∷ a → BuildTxWith BuildTx a |
Instances
Eq a ⇒ Eq (BuildTxWith build a) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ BuildTxWith build a → BuildTxWith build a → Bool Source # (/=) ∷ BuildTxWith build a → BuildTxWith build a → Bool Source # | |
Show a ⇒ Show (BuildTxWith build a) Source # | |
Defined in Bcc.Api.TxBody |
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 Aurum and subsequent eras support collateral inputs.
Instances
Eq (CollateralSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ CollateralSupportedInEra era → CollateralSupportedInEra era → Bool Source # (/=) ∷ CollateralSupportedInEra era → CollateralSupportedInEra era → Bool Source # | |
Show (CollateralSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody |
data MultiAssetSupportedInEra era where Source #
A representation of whether the era supports multi-asset transactions.
The Jen and subsequent eras support multi-asset transactions.
The negation of this is OnlyBccSupportedInEra
.
MultiAssetInJenEra ∷ MultiAssetSupportedInEra JenEra | Multi-asset transactions are supported in the |
MultiAssetInAurumEra ∷ MultiAssetSupportedInEra AurumEra | Multi-asset transactions are supported in the |
Instances
Eq (MultiAssetSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ MultiAssetSupportedInEra era → MultiAssetSupportedInEra era → Bool Source # (/=) ∷ MultiAssetSupportedInEra era → MultiAssetSupportedInEra era → Bool Source # | |
Show (MultiAssetSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody | |
ToJSON (MultiAssetSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody toJSON ∷ MultiAssetSupportedInEra era → Value # toEncoding ∷ MultiAssetSupportedInEra era → Encoding # toJSONList ∷ [MultiAssetSupportedInEra era] → Value # toEncodingList ∷ [MultiAssetSupportedInEra era] → Encoding # |
data OnlyBccSupportedInEra era where Source #
A representation of whether the era supports only bcc transactions.
Prior to the Jen era only bcc transactions are supported. Multi-assets are supported from the Jen era onwards.
This is the negation of MultiAssetSupportedInEra
. It exists since we need
evidence to be positive.
BccOnlyInColeEra ∷ OnlyBccSupportedInEra ColeEra | |
BccOnlyInSophieEra ∷ OnlyBccSupportedInEra SophieEra | |
BccOnlyInEvieEra ∷ OnlyBccSupportedInEra EvieEra |
Instances
Eq (OnlyBccSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ OnlyBccSupportedInEra era → OnlyBccSupportedInEra era → Bool Source # (/=) ∷ OnlyBccSupportedInEra era → OnlyBccSupportedInEra era → Bool Source # | |
Show (OnlyBccSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody |
data TxFeesExplicitInEra era where Source #
A representation of whether the era requires explicitly specified fees in transactions.
The Cole 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
Eq (TxFeesExplicitInEra era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxFeesExplicitInEra era → TxFeesExplicitInEra era → Bool Source # (/=) ∷ TxFeesExplicitInEra era → TxFeesExplicitInEra era → Bool Source # | |
Show (TxFeesExplicitInEra era) Source # | |
Defined in Bcc.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
Eq (TxFeesImplicitInEra era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxFeesImplicitInEra era → TxFeesImplicitInEra era → Bool Source # (/=) ∷ TxFeesImplicitInEra era → TxFeesImplicitInEra era → Bool Source # | |
Show (TxFeesImplicitInEra era) Source # | |
Defined in Bcc.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 Sophie and subsequent eras support an upper bound on the validity range. In the Sophie era specifically it is actually required. It is optional in later eras.
Instances
Eq (ValidityUpperBoundSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody | |
Show (ValidityUpperBoundSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody |
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 SophieEra
does not support omitting a validity upper
bound. It was introduced as a required field in Sophie and then made
optional in Evie and subsequent eras.
The Cole era supports this by virtue of the fact that it does not support validity ranges at all.
Instances
Eq (ValidityNoUpperBoundSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody | |
Show (ValidityNoUpperBoundSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody |
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 Evie 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.
Instances
Eq (ValidityLowerBoundSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody | |
Show (ValidityLowerBoundSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody |
data TxMetadataSupportedInEra era where Source #
A representation of whether the era supports transaction metadata.
Transaction metadata is supported from the Sophie era onwards.
Instances
Eq (TxMetadataSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ TxMetadataSupportedInEra era → TxMetadataSupportedInEra era → Bool Source # (/=) ∷ TxMetadataSupportedInEra era → TxMetadataSupportedInEra era → Bool Source # | |
Show (TxMetadataSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody |
data AuxScriptsSupportedInEra era where Source #
A representation of whether the era supports auxiliary scripts in transactions.
Auxiliary scripts are supported from the Evie era onwards.
AuxScriptsInEvieEra ∷ AuxScriptsSupportedInEra EvieEra | |
AuxScriptsInJenEra ∷ AuxScriptsSupportedInEra JenEra | |
AuxScriptsInAurumEra ∷ AuxScriptsSupportedInEra AurumEra |
Instances
Eq (AuxScriptsSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ AuxScriptsSupportedInEra era → AuxScriptsSupportedInEra era → Bool Source # (/=) ∷ AuxScriptsSupportedInEra era → AuxScriptsSupportedInEra era → Bool Source # | |
Show (AuxScriptsSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody |
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 Aurum era onwards.
Instances
Eq (TxExtraKeyWitnessesSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody | |
Show (TxExtraKeyWitnessesSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody |
data ScriptDataSupportedInEra era where Source #
A representation of whether the era supports multi-asset transactions.
The Jen and subsequent eras support multi-asset transactions.
The negation of this is OnlyBccSupportedInEra
.
ScriptDataInAurumEra ∷ ScriptDataSupportedInEra AurumEra | Script data is supported in transactions in the |
Instances
Eq (ScriptDataSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ ScriptDataSupportedInEra era → ScriptDataSupportedInEra era → Bool Source # (/=) ∷ ScriptDataSupportedInEra era → ScriptDataSupportedInEra era → Bool Source # | |
Show (ScriptDataSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody |
data WithdrawalsSupportedInEra era where Source #
A representation of whether the era supports withdrawals from reward accounts.
The Sophie and subsequent eras support stake addresses, their associated reward accounts and support for withdrawals from them.
Instances
Eq (WithdrawalsSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ WithdrawalsSupportedInEra era → WithdrawalsSupportedInEra era → Bool Source # (/=) ∷ WithdrawalsSupportedInEra era → WithdrawalsSupportedInEra era → Bool Source # | |
Show (WithdrawalsSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody |
data CertificatesSupportedInEra era where Source #
A representation of whether the era supports Certificate
s embedded in
transactions.
The Sophie and subsequent eras support such certificates.
Instances
Eq (CertificatesSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ CertificatesSupportedInEra era → CertificatesSupportedInEra era → Bool Source # (/=) ∷ CertificatesSupportedInEra era → CertificatesSupportedInEra era → Bool Source # | |
Show (CertificatesSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody |
data UpdateProposalSupportedInEra era where Source #
A representation of whether the era supports UpdateProposal
s embedded in
transactions.
The Sophie and subsequent eras support such update proposals. They Cole era has a notion of an update proposal, but it is a standalone chain object and not embedded in a transaction.
Instances
Eq (UpdateProposalSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody (==) ∷ UpdateProposalSupportedInEra era → UpdateProposalSupportedInEra era → Bool Source # (/=) ∷ UpdateProposalSupportedInEra era → UpdateProposalSupportedInEra era → Bool Source # | |
Show (UpdateProposalSupportedInEra era) Source # | |
Defined in Bcc.Api.TxBody |
Feature availability functions
collateralSupportedInEra ∷ BccEra era → Maybe (CollateralSupportedInEra era) Source #
multiAssetSupportedInEra ∷ BccEra era → Either (OnlyBccSupportedInEra era) (MultiAssetSupportedInEra era) Source #
txFeesExplicitInEra ∷ BccEra era → Either (TxFeesImplicitInEra era) (TxFeesExplicitInEra era) Source #
validityUpperBoundSupportedInEra ∷ BccEra era → Maybe (ValidityUpperBoundSupportedInEra era) Source #
validityNoUpperBoundSupportedInEra ∷ BccEra era → Maybe (ValidityNoUpperBoundSupportedInEra era) Source #
validityLowerBoundSupportedInEra ∷ BccEra era → Maybe (ValidityLowerBoundSupportedInEra era) Source #
txMetadataSupportedInEra ∷ BccEra era → Maybe (TxMetadataSupportedInEra era) Source #
auxScriptsSupportedInEra ∷ BccEra era → Maybe (AuxScriptsSupportedInEra era) Source #
extraKeyWitnessesSupportedInEra ∷ BccEra era → Maybe (TxExtraKeyWitnessesSupportedInEra era) Source #
scriptDataSupportedInEra ∷ BccEra era → Maybe (ScriptDataSupportedInEra era) Source #
withdrawalsSupportedInEra ∷ BccEra era → Maybe (WithdrawalsSupportedInEra era) Source #
certificatesSupportedInEra ∷ BccEra era → Maybe (CertificatesSupportedInEra era) Source #
updateProposalSupportedInEra ∷ BccEra era → Maybe (UpdateProposalSupportedInEra era) Source #
txScriptValiditySupportedInSophieBasedEra ∷ SophieBasedEra era → Maybe (TxScriptValiditySupportedInEra era) Source #
txScriptValiditySupportedInBccEra ∷ BccEra era → Maybe (TxScriptValiditySupportedInEra 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.
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.
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
collectTxBodyScriptWitnesses ∷ ∀ era. TxBodyContent BuildTx era → [(ScriptWitnessIndex, AnyScriptWitness era)] Source #
mapTxScriptWitnesses ∷ ∀ era. (∀ witctx. ScriptWitnessIndex → ScriptWitness witctx era → ScriptWitness witctx era) → TxBodyContent BuildTx era → TxBodyContent BuildTx era Source #
Internal conversion functions & types
toSophieTxId ∷ TxId → TxId StandardCrypto Source #
toSophieTxIn ∷ TxIn → TxIn StandardCrypto Source #
toSophieTxOut ∷ ∀ era ledgerera. SophieLedgerEra era ~ ledgerera ⇒ SophieBasedEra era → TxOut era → TxOut ledgerera Source #
fromSophieTxId ∷ TxId StandardCrypto → TxId Source #
fromSophieTxIn ∷ TxIn StandardCrypto → TxIn Source #
fromSophieTxOut ∷ SophieLedgerEra era ~ ledgerera ⇒ SophieBasedEra era → TxOut ledgerera → TxOut era Source #
toAurumRdmrPtr ∷ ScriptWitnessIndex → RdmrPtr Source #
fromAurumRdmrPtr ∷ RdmrPtr → ScriptWitnessIndex Source #
fromColeTxIn ∷ TxIn → TxIn Source #
fromLedgerTxOuts ∷ SophieBasedEra era → TxBody (SophieLedgerEra era) → [TxOut era] Source #
renderTxIn ∷ TxIn → Text 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.