| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Ledger.Alonzo.Tx
Contents
Description
This module exports implementations of many of the functions outlined in the Alonzo specification. The link to source of the specification https://github.com/intersectmbo/cardano-ledger/tree/master/eras/alonzo/formal-spec The most recent version of the document can be found here: https://github.com/intersectmbo/cardano-ledger/releases/latest/download/alonzo-ledger.pdf The functions can be found in Figures in that document, and sections of this code refer to those figures.
Synopsis
- data CostModel
- getLanguageView ∷ AlonzoEraPParams era ⇒ PParams era → Language → LangDepView
- data Data era
- type DataHash = SafeHash EraIndependentData
- newtype IsValid = IsValid Bool
- hashData ∷ Data era → DataHash
- nonNativeLanguages ∷ [Language]
- hashScriptIntegrity ∷ Era era ⇒ ScriptIntegrity era → ScriptIntegrityHash
- data EraIndependentScriptIntegrity
- data ScriptIntegrity era = ScriptIntegrity !(Redeemers era) !(TxDats era) !(Set LangDepView)
- type ScriptIntegrityHash = SafeHash EraIndependentScriptIntegrity
- data AlonzoTx (l ∷ TxLevel) era where
- data family Tx (l ∷ TxLevel) era
- class (EraTx era, AlonzoEraTxBody era, AlonzoEraTxWits era, AlonzoEraScript era) ⇒ AlonzoEraTx era where
- isValidTxL ∷ Lens' (Tx 'TopTx era) IsValid
- mkBasicAlonzoTx ∷ ∀ era (l ∷ TxLevel). (EraTx era, STxLevel l era ~ STxTopLevel l era) ⇒ TxBody l era → AlonzoTx l era
- bodyAlonzoTxL ∷ ∀ (l ∷ TxLevel) era f. Functor f ⇒ (TxBody l era → f (TxBody l era)) → AlonzoTx l era → f (AlonzoTx l era)
- witsAlonzoTxL ∷ ∀ (l ∷ TxLevel) era f. Functor f ⇒ (TxWits era → f (TxWits era)) → AlonzoTx l era → f (AlonzoTx l era)
- auxDataAlonzoTxL ∷ ∀ (l ∷ TxLevel) era f. Functor f ⇒ (StrictMaybe (TxAuxData era) → f (StrictMaybe (TxAuxData era))) → AlonzoTx l era → f (AlonzoTx l era)
- sizeAlonzoTxF ∷ ∀ era (l ∷ TxLevel). (HasCallStack, EraTx era) ⇒ SimpleGetter (AlonzoTx l era) Word32
- isValidAlonzoTxL ∷ ∀ (l ∷ TxLevel) era f. Functor f ⇒ (IsValid → f IsValid) → AlonzoTx l era → f (AlonzoTx l era)
- txrdmrs ∷ AlonzoEraScript era ⇒ AlonzoTxWits era → Redeemers era
- data family TxBody (l ∷ TxLevel) era
- totExUnits ∷ ∀ era (l ∷ TxLevel). (EraTx era, AlonzoEraTxWits era) ⇒ Tx l era → ExUnits
- alonzoMinFeeTx ∷ ∀ era (l ∷ TxLevel). (EraTx era, AlonzoEraTxWits era, AlonzoEraPParams era) ⇒ PParams era → Tx l era → Coin
- txouts ∷ ∀ era (l ∷ TxLevel). EraTxBody era ⇒ TxBody l era → UTxO era
- toCBORForSizeComputation ∷ ∀ (l ∷ TxLevel) era. (EncCBOR (TxBody l era), EncCBOR (TxWits era), EncCBOR (TxAuxData era)) ⇒ AlonzoTx l era → Encoding
- toCBORForMempoolSubmission ∷ ∀ (l ∷ TxLevel) era. (EncCBOR (TxBody l era), EncCBOR (TxWits era), EncCBOR (TxAuxData era)) ⇒ AlonzoTx l era → Encoding
- alonzoTxEqRaw ∷ ∀ era (l ∷ TxLevel). (AlonzoEraTx era, STxLevel l era ~ STxTopLevel l era) ⇒ Tx l era → Tx l era → Bool
- mkScriptIntegrity ∷ ∀ era (l ∷ TxLevel). (AlonzoEraPParams era, AlonzoEraTxWits era, EraUTxO era) ⇒ PParams era → Tx l era → ScriptsProvided era → Set ScriptHash → StrictMaybe (ScriptIntegrity era)
Documentation
A language dependent cost model for the Plutus evaluator.
Note that the EvaluationContext is entirely dependent on the
cost model parameters (ie the Map Text Integer) and that
this type uses the smart constructor mkCostModel
to hide the evaluation context.
Instances
| ToJSON CostModel | |||||
| NFData CostModel | |||||
Defined in Cardano.Ledger.Plutus.CostModels | |||||
| Generic CostModel | |||||
Defined in Cardano.Ledger.Plutus.CostModels Associated Types
| |||||
| Show CostModel | |||||
| Eq CostModel | Note that this Eq instance ignores the evaluation context, which is
entirely dependent on the cost model parameters and is guarded by the
smart constructor | ||||
| Ord CostModel | Note that this Ord instance ignores the evaluation context, which is
entirely dependent on the cost model parameters and is guarded by the
smart constructor | ||||
Defined in Cardano.Ledger.Plutus.CostModels | |||||
| NoThunks CostModel | |||||
| type Rep CostModel | |||||
Defined in Cardano.Ledger.Plutus.CostModels type Rep CostModel = D1 ('MetaData "CostModel" "Cardano.Ledger.Plutus.CostModels" "cardano-ledger-core-1.19.0.0-inplace" 'False) (C1 ('MetaCons "CostModel" 'PrefixI 'True) (S1 ('MetaSel ('Just "cmLanguage") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Language) :*: (S1 ('MetaSel ('Just "cmValues") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Int64]) :*: S1 ('MetaSel ('Just "cmEvalCtx") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EvaluationContext)))) | |||||
getLanguageView ∷ AlonzoEraPParams era ⇒ PParams era → Language → LangDepView Source #
Instances
type DataHash = SafeHash EraIndependentData Source #
Tag indicating whether non-native scripts in this transaction are expected to validate. This is added by the block creator when constructing the block.
Instances
| ToJSON IsValid Source # | |||||
| ToCBOR IsValid Source # | |||||
| DecCBOR IsValid Source # | |||||
| EncCBOR IsValid Source # | |||||
| NFData IsValid Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx | |||||
| Generic IsValid Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx Associated Types
| |||||
| Show IsValid Source # | |||||
| Eq IsValid Source # | |||||
| NoThunks IsValid Source # | |||||
| type Rep IsValid Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx | |||||
hashScriptIntegrity ∷ Era era ⇒ ScriptIntegrity era → ScriptIntegrityHash Source #
data EraIndependentScriptIntegrity Source #
Instances
| Era era ⇒ HashAnnotated (ScriptIntegrity era) EraIndependentScriptIntegrity Source # | |
Defined in Cardano.Ledger.Alonzo.Tx Methods hashAnnotated ∷ ScriptIntegrity era → SafeHash EraIndependentScriptIntegrity Source # | |
data ScriptIntegrity era Source #
A ScriptIntegrityHash is the hash of three things. The first two come from the witnesses and the last comes from the Protocol Parameters.
Constructors
| ScriptIntegrity !(Redeemers era) !(TxDats era) !(Set LangDepView) |
Instances
| Era era ⇒ SafeToHash (ScriptIntegrity era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx Methods originalBytes ∷ ScriptIntegrity era → ByteString Source # originalBytesSize ∷ ScriptIntegrity era → Int Source # makeHashWithExplicitProxys ∷ Proxy i → ScriptIntegrity era → SafeHash i Source # | |||||
| Generic (ScriptIntegrity era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx Associated Types
Methods from ∷ ScriptIntegrity era → Rep (ScriptIntegrity era) x # to ∷ Rep (ScriptIntegrity era) x → ScriptIntegrity era # | |||||
| AlonzoEraScript era ⇒ Show (ScriptIntegrity era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx Methods showsPrec ∷ Int → ScriptIntegrity era → ShowS # show ∷ ScriptIntegrity era → String # showList ∷ [ScriptIntegrity era] → ShowS # | |||||
| AlonzoEraScript era ⇒ Eq (ScriptIntegrity era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx Methods (==) ∷ ScriptIntegrity era → ScriptIntegrity era → Bool # (/=) ∷ ScriptIntegrity era → ScriptIntegrity era → Bool # | |||||
| AlonzoEraScript era ⇒ NoThunks (ScriptIntegrity era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx | |||||
| Era era ⇒ HashAnnotated (ScriptIntegrity era) EraIndependentScriptIntegrity Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx Methods hashAnnotated ∷ ScriptIntegrity era → SafeHash EraIndependentScriptIntegrity Source # | |||||
| type Rep (ScriptIntegrity era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx type Rep (ScriptIntegrity era) = D1 ('MetaData "ScriptIntegrity" "Cardano.Ledger.Alonzo.Tx" "cardano-ledger-alonzo-1.15.0.0-inplace" 'False) (C1 ('MetaCons "ScriptIntegrity" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Redeemers era)) :*: (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (TxDats era)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set LangDepView))))) | |||||
data AlonzoTx (l ∷ TxLevel) era where Source #
Constructors
| AlonzoTx | |
Instances
| (Typeable l, Era era, Typeable (TxBody l era), Typeable (TxWits era), Typeable (TxAuxData era), DecCBOR (Annotator (TxBody l era)), DecCBOR (Annotator (TxWits era)), DecCBOR (Annotator (TxAuxData era))) ⇒ DecCBOR (Annotator (AlonzoTx l era)) Source # | |
| (Era era, EncCBOR (TxBody l era), EncCBOR (TxAuxData era), EncCBOR (TxWits era), Typeable l) ⇒ ToCBOR (AlonzoTx l era) Source # | |
| (Era era, EncCBOR (TxBody l era), EncCBOR (TxAuxData era), EncCBOR (TxWits era)) ⇒ EncCBOR (AlonzoTx l era) Source # | |
| (Era era, NFData (TxWits era), NFData (TxAuxData era), NFData (TxBody l era)) ⇒ NFData (AlonzoTx l era) Source # | |
Defined in Cardano.Ledger.Alonzo.Tx | |
| (Era era, Show (TxBody l era), Show (TxAuxData era), Show (Script era), Show (TxWits era)) ⇒ Show (AlonzoTx l era) Source # | |
| (Era era, Eq (TxBody l era), Eq (TxWits era), Eq (TxAuxData era)) ⇒ Eq (AlonzoTx l era) Source # | |
| (Typeable era, Typeable l) ⇒ NoThunks (AlonzoTx l era) Source # | |
data family Tx (l ∷ TxLevel) era Source #
Instances
| HasEraTxLevel Tx AllegraEra | |||||
Defined in Cardano.Ledger.Allegra.Tx Methods toSTxLevel ∷ ∀ (l ∷ TxLevel). Tx l AllegraEra → STxLevel l AllegraEra Source # | |||||
| HasEraTxLevel Tx AlonzoEra Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx | |||||
| HasEraTxLevel Tx MaryEra | |||||
Defined in Cardano.Ledger.Mary.Tx | |||||
| HasEraTxLevel Tx ShelleyEra | |||||
Defined in Cardano.Ledger.Shelley.Tx Methods toSTxLevel ∷ ∀ (l ∷ TxLevel). Tx l ShelleyEra → STxLevel l ShelleyEra Source # | |||||
| TranslateEra AllegraEra (Tx 'TopTx) | |||||
Defined in Cardano.Ledger.Allegra.Translation Associated Types
Methods translateEra ∷ TranslationContext AllegraEra → Tx 'TopTx (PreviousEra AllegraEra) → Except (TranslationError AllegraEra (Tx 'TopTx)) (Tx 'TopTx AllegraEra) Source # | |||||
| TranslateEra AlonzoEra (Tx 'TopTx) Source # | |||||
Defined in Cardano.Ledger.Alonzo.Translation Associated Types
Methods translateEra ∷ TranslationContext AlonzoEra → Tx 'TopTx (PreviousEra AlonzoEra) → Except (TranslationError AlonzoEra (Tx 'TopTx)) (Tx 'TopTx AlonzoEra) Source # | |||||
| TranslateEra MaryEra (Tx 'TopTx) | |||||
Defined in Cardano.Ledger.Mary.Translation Associated Types
Methods translateEra ∷ TranslationContext MaryEra → Tx 'TopTx (PreviousEra MaryEra) → Except (TranslationError MaryEra (Tx 'TopTx)) (Tx 'TopTx MaryEra) Source # | |||||
| EraTx era ⇒ HasOKey TxId (Tx l era) | |||||
| Typeable l ⇒ DecCBOR (Annotator (Tx l AlonzoEra)) Source # | |||||
| Typeable l ⇒ DecCBOR (Annotator (Tx l ShelleyEra)) | |||||
| Typeable t ⇒ DecCBOR (Annotator (Tx t AllegraEra)) | |||||
| Typeable t ⇒ DecCBOR (Annotator (Tx t MaryEra)) | |||||
| Typeable l ⇒ ToCBOR (Tx l AlonzoEra) Source # | |||||
| Typeable l ⇒ ToCBOR (Tx l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.Tx | |||||
| Typeable t ⇒ ToCBOR (Tx t AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.Tx | |||||
| Typeable t ⇒ ToCBOR (Tx t MaryEra) | |||||
| EncCBOR (Tx l AlonzoEra) Source # | |||||
| EncCBOR (Tx l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.Tx | |||||
| EncCBOR (Tx t AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.Tx | |||||
| EncCBOR (Tx t MaryEra) | |||||
| EqRaw (Tx l AlonzoEra) Source # | |||||
| EqRaw (Tx l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.Tx Methods eqRaw ∷ Tx l ShelleyEra → Tx l ShelleyEra → Bool Source # | |||||
| EqRaw (Tx t AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.Tx Methods eqRaw ∷ Tx t AllegraEra → Tx t AllegraEra → Bool Source # | |||||
| EqRaw (Tx t MaryEra) | |||||
| NFData (Tx l AlonzoEra) Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx | |||||
| NFData (Tx l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.Tx Methods rnf ∷ Tx l ShelleyEra → () # | |||||
| NFData (Tx t AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.Tx Methods rnf ∷ Tx t AllegraEra → () # | |||||
| NFData (Tx t MaryEra) | |||||
Defined in Cardano.Ledger.Mary.Tx | |||||
| Generic (Tx l AlonzoEra) Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx Associated Types
| |||||
| Generic (Tx l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.Tx Associated Types
Methods from ∷ Tx l ShelleyEra → Rep (Tx l ShelleyEra) x # to ∷ Rep (Tx l ShelleyEra) x → Tx l ShelleyEra # | |||||
| Generic (Tx t AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.Tx Associated Types
Methods from ∷ Tx t AllegraEra → Rep (Tx t AllegraEra) x # to ∷ Rep (Tx t AllegraEra) x → Tx t AllegraEra # | |||||
| Generic (Tx t MaryEra) | |||||
Defined in Cardano.Ledger.Mary.Tx Associated Types
| |||||
| Show (Tx l AlonzoEra) Source # | |||||
| Show (Tx l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.Tx | |||||
| Show (Tx t AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.Tx | |||||
| Show (Tx t MaryEra) | |||||
| Eq (Tx l AlonzoEra) Source # | |||||
| Eq (Tx l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.Tx Methods (==) ∷ Tx l ShelleyEra → Tx l ShelleyEra → Bool # (/=) ∷ Tx l ShelleyEra → Tx l ShelleyEra → Bool # | |||||
| Eq (Tx t AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.Tx Methods (==) ∷ Tx t AllegraEra → Tx t AllegraEra → Bool # (/=) ∷ Tx t AllegraEra → Tx t AllegraEra → Bool # | |||||
| Eq (Tx t MaryEra) | |||||
| Typeable l ⇒ NoThunks (Tx l AlonzoEra) Source # | |||||
| Typeable l ⇒ NoThunks (Tx l ShelleyEra) | |||||
| Typeable t ⇒ NoThunks (Tx t AllegraEra) | |||||
| Typeable t ⇒ NoThunks (Tx t MaryEra) | |||||
| newtype Tx l AlonzoEra Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx | |||||
| newtype Tx l ShelleyEra | |||||
Defined in Cardano.Ledger.Shelley.Tx | |||||
| newtype Tx t AllegraEra | |||||
Defined in Cardano.Ledger.Allegra.Tx | |||||
| newtype Tx t MaryEra | |||||
| type TranslationError AllegraEra (Tx 'TopTx) | |||||
Defined in Cardano.Ledger.Allegra.Translation | |||||
| type TranslationError AlonzoEra (Tx 'TopTx) Source # | |||||
Defined in Cardano.Ledger.Alonzo.Translation | |||||
| type TranslationError MaryEra (Tx 'TopTx) | |||||
Defined in Cardano.Ledger.Mary.Translation | |||||
| type Rep (Tx l AlonzoEra) Source # | |||||
Defined in Cardano.Ledger.Alonzo.Tx | |||||
| type Rep (Tx l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.Tx type Rep (Tx l ShelleyEra) = D1 ('MetaData "Tx" "Cardano.Ledger.Shelley.Tx" "cardano-ledger-shelley-1.18.0.0-inplace" 'True) (C1 ('MetaCons "MkShelleyTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "unShelleyTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ShelleyTx l ShelleyEra)))) | |||||
| type Rep (Tx t AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.Tx type Rep (Tx t AllegraEra) = D1 ('MetaData "Tx" "Cardano.Ledger.Allegra.Tx" "cardano-ledger-allegra-1.9.0.0-inplace" 'True) (C1 ('MetaCons "MkAllegraTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "unAllegraTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ShelleyTx t AllegraEra)))) | |||||
| type Rep (Tx t MaryEra) | |||||
Defined in Cardano.Ledger.Mary.Tx | |||||
class (EraTx era, AlonzoEraTxBody era, AlonzoEraTxWits era, AlonzoEraScript era) ⇒ AlonzoEraTx era where Source #
Instances
| AlonzoEraTx AlonzoEra Source # | |
Defined in Cardano.Ledger.Alonzo.Tx | |
mkBasicAlonzoTx ∷ ∀ era (l ∷ TxLevel). (EraTx era, STxLevel l era ~ STxTopLevel l era) ⇒ TxBody l era → AlonzoTx l era Source #
bodyAlonzoTxL ∷ ∀ (l ∷ TxLevel) era f. Functor f ⇒ (TxBody l era → f (TxBody l era)) → AlonzoTx l era → f (AlonzoTx l era) Source #
witsAlonzoTxL ∷ ∀ (l ∷ TxLevel) era f. Functor f ⇒ (TxWits era → f (TxWits era)) → AlonzoTx l era → f (AlonzoTx l era) Source #
auxDataAlonzoTxL ∷ ∀ (l ∷ TxLevel) era f. Functor f ⇒ (StrictMaybe (TxAuxData era) → f (StrictMaybe (TxAuxData era))) → AlonzoTx l era → f (AlonzoTx l era) Source #
sizeAlonzoTxF ∷ ∀ era (l ∷ TxLevel). (HasCallStack, EraTx era) ⇒ SimpleGetter (AlonzoTx l era) Word32 Source #
txsize computes the length of the serialised bytes (for estimations)
isValidAlonzoTxL ∷ ∀ (l ∷ TxLevel) era f. Functor f ⇒ (IsValid → f IsValid) → AlonzoTx l era → f (AlonzoTx l era) Source #
txrdmrs ∷ AlonzoEraScript era ⇒ AlonzoTxWits era → Redeemers era Source #
data family TxBody (l ∷ TxLevel) era Source #
The body of a transaction.
Instances
| HasEraTxLevel TxBody AllegraEra | |||||
Defined in Cardano.Ledger.Allegra.TxBody Methods toSTxLevel ∷ ∀ (l ∷ TxLevel). TxBody l AllegraEra → STxLevel l AllegraEra Source # | |||||
| HasEraTxLevel TxBody AlonzoEra Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxBody | |||||
| HasEraTxLevel TxBody MaryEra | |||||
Defined in Cardano.Ledger.Mary.TxBody | |||||
| HasEraTxLevel TxBody ShelleyEra | |||||
Defined in Cardano.Ledger.Shelley.TxBody Methods toSTxLevel ∷ ∀ (l ∷ TxLevel). TxBody l ShelleyEra → STxLevel l ShelleyEra Source # | |||||
| Typeable l ⇒ DecCBOR (Annotator (TxBody l AllegraEra)) | |||||
| Typeable l ⇒ DecCBOR (Annotator (TxBody l AlonzoEra)) Source # | |||||
| Typeable l ⇒ DecCBOR (Annotator (TxBody l MaryEra)) | |||||
| Typeable l ⇒ DecCBOR (Annotator (TxBody l ShelleyEra)) | |||||
| Typeable l ⇒ ToCBOR (TxBody l AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.TxBody | |||||
| Typeable l ⇒ ToCBOR (TxBody l AlonzoEra) Source # | |||||
| Typeable l ⇒ ToCBOR (TxBody l MaryEra) | |||||
| Typeable l ⇒ ToCBOR (TxBody l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.TxBody | |||||
| EncCBOR (TxBody l AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.TxBody | |||||
| EncCBOR (TxBody l AlonzoEra) Source # | Encodes memoized bytes created upon construction. | ||||
| EncCBOR (TxBody l MaryEra) | |||||
| EncCBOR (TxBody l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.TxBody | |||||
| SafeToHash (TxBody l AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.TxBody Methods originalBytes ∷ TxBody l AllegraEra → ByteString Source # originalBytesSize ∷ TxBody l AllegraEra → Int Source # makeHashWithExplicitProxys ∷ Proxy i → TxBody l AllegraEra → SafeHash i Source # | |||||
| SafeToHash (TxBody l AlonzoEra) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxBody Methods originalBytes ∷ TxBody l AlonzoEra → ByteString Source # originalBytesSize ∷ TxBody l AlonzoEra → Int Source # makeHashWithExplicitProxys ∷ Proxy i → TxBody l AlonzoEra → SafeHash i Source # | |||||
| SafeToHash (TxBody l MaryEra) | |||||
Defined in Cardano.Ledger.Mary.TxBody Methods originalBytes ∷ TxBody l MaryEra → ByteString Source # originalBytesSize ∷ TxBody l MaryEra → Int Source # makeHashWithExplicitProxys ∷ Proxy i → TxBody l MaryEra → SafeHash i Source # | |||||
| SafeToHash (TxBody l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.TxBody Methods originalBytes ∷ TxBody l ShelleyEra → ByteString Source # originalBytesSize ∷ TxBody l ShelleyEra → Int Source # makeHashWithExplicitProxys ∷ Proxy i → TxBody l ShelleyEra → SafeHash i Source # | |||||
| EqRaw (TxBody l AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.TxBody Methods eqRaw ∷ TxBody l AllegraEra → TxBody l AllegraEra → Bool Source # | |||||
| EqRaw (TxBody l AlonzoEra) Source # | |||||
| EqRaw (TxBody l MaryEra) | |||||
| EqRaw (TxBody l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.TxBody Methods eqRaw ∷ TxBody l ShelleyEra → TxBody l ShelleyEra → Bool Source # | |||||
| Memoized (TxBody l AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.TxBody Associated Types
Methods getMemoBytes ∷ TxBody l AllegraEra → MemoBytes (RawType (TxBody l AllegraEra)) wrapMemoBytes ∷ MemoBytes (RawType (TxBody l AllegraEra)) → TxBody l AllegraEra | |||||
| Memoized (TxBody l AlonzoEra) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxBody Associated Types
| |||||
| Memoized (TxBody l MaryEra) | |||||
Defined in Cardano.Ledger.Mary.TxBody Associated Types
| |||||
| Memoized (TxBody l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.TxBody Associated Types
Methods getMemoBytes ∷ TxBody l ShelleyEra → MemoBytes (RawType (TxBody l ShelleyEra)) wrapMemoBytes ∷ MemoBytes (RawType (TxBody l ShelleyEra)) → TxBody l ShelleyEra | |||||
| NFData (TxBody l AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.TxBody Methods rnf ∷ TxBody l AllegraEra → () # | |||||
| NFData (TxBody l AlonzoEra) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxBody | |||||
| NFData (TxBody l MaryEra) | |||||
Defined in Cardano.Ledger.Mary.TxBody | |||||
| NFData (TxBody l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.TxBody Methods rnf ∷ TxBody l ShelleyEra → () # | |||||
| Generic (TxBody l AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.TxBody Associated Types
Methods from ∷ TxBody l AllegraEra → Rep (TxBody l AllegraEra) x # to ∷ Rep (TxBody l AllegraEra) x → TxBody l AllegraEra # | |||||
| Generic (TxBody l AlonzoEra) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxBody Associated Types
| |||||
| Generic (TxBody l MaryEra) | |||||
Defined in Cardano.Ledger.Mary.TxBody Associated Types
| |||||
| Generic (TxBody l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.TxBody Associated Types
Methods from ∷ TxBody l ShelleyEra → Rep (TxBody l ShelleyEra) x # to ∷ Rep (TxBody l ShelleyEra) x → TxBody l ShelleyEra # | |||||
| Show (TxBody l AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.TxBody | |||||
| Show (TxBody l AlonzoEra) Source # | |||||
| Show (TxBody l MaryEra) | |||||
| Show (TxBody l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.TxBody | |||||
| Eq (TxBody l AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.TxBody Methods (==) ∷ TxBody l AllegraEra → TxBody l AllegraEra → Bool # (/=) ∷ TxBody l AllegraEra → TxBody l AllegraEra → Bool # | |||||
| Eq (TxBody l AlonzoEra) Source # | |||||
| Eq (TxBody l MaryEra) | |||||
| Eq (TxBody l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.TxBody Methods (==) ∷ TxBody l ShelleyEra → TxBody l ShelleyEra → Bool # (/=) ∷ TxBody l ShelleyEra → TxBody l ShelleyEra → Bool # | |||||
| Typeable l ⇒ NoThunks (TxBody l AllegraEra) | |||||
| Typeable l ⇒ NoThunks (TxBody l AlonzoEra) Source # | |||||
| Typeable l ⇒ NoThunks (TxBody l MaryEra) | |||||
| Typeable l ⇒ NoThunks (TxBody l ShelleyEra) | |||||
| HashAnnotated (TxBody l AllegraEra) EraIndependentTxBody | |||||
Defined in Cardano.Ledger.Allegra.TxBody Methods hashAnnotated ∷ TxBody l AllegraEra → SafeHash EraIndependentTxBody Source # | |||||
| HashAnnotated (TxBody l AlonzoEra) EraIndependentTxBody Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxBody Methods hashAnnotated ∷ TxBody l AlonzoEra → SafeHash EraIndependentTxBody Source # | |||||
| HashAnnotated (TxBody l MaryEra) EraIndependentTxBody | |||||
Defined in Cardano.Ledger.Mary.TxBody Methods hashAnnotated ∷ TxBody l MaryEra → SafeHash EraIndependentTxBody Source # | |||||
| HashAnnotated (TxBody l ShelleyEra) EraIndependentTxBody | |||||
Defined in Cardano.Ledger.Shelley.TxBody Methods hashAnnotated ∷ TxBody l ShelleyEra → SafeHash EraIndependentTxBody Source # | |||||
| newtype TxBody l AllegraEra | |||||
Defined in Cardano.Ledger.Allegra.TxBody | |||||
| newtype TxBody l AlonzoEra Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxBody | |||||
| newtype TxBody l MaryEra | |||||
Defined in Cardano.Ledger.Mary.TxBody | |||||
| newtype TxBody l ShelleyEra | |||||
Defined in Cardano.Ledger.Shelley.TxBody | |||||
| type RawType (TxBody l AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.TxBody | |||||
| type RawType (TxBody l AlonzoEra) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxBody | |||||
| type RawType (TxBody l MaryEra) | |||||
Defined in Cardano.Ledger.Mary.TxBody | |||||
| type RawType (TxBody l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.TxBody | |||||
| type Rep (TxBody l AllegraEra) | |||||
Defined in Cardano.Ledger.Allegra.TxBody type Rep (TxBody l AllegraEra) = D1 ('MetaData "TxBody" "Cardano.Ledger.Allegra.TxBody" "cardano-ledger-allegra-1.9.0.0-inplace" 'True) (C1 ('MetaCons "MkAllegraTxBody" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MemoBytes (AllegraTxBodyRaw () l AllegraEra))))) | |||||
| type Rep (TxBody l AlonzoEra) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxBody type Rep (TxBody l AlonzoEra) = D1 ('MetaData "TxBody" "Cardano.Ledger.Alonzo.TxBody" "cardano-ledger-alonzo-1.15.0.0-inplace" 'True) (C1 ('MetaCons "MkAlonzoTxBody" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MemoBytes (AlonzoTxBodyRaw l AlonzoEra))))) | |||||
| type Rep (TxBody l MaryEra) | |||||
Defined in Cardano.Ledger.Mary.TxBody type Rep (TxBody l MaryEra) = D1 ('MetaData "TxBody" "Cardano.Ledger.Mary.TxBody" "cardano-ledger-mary-1.10.0.0-inplace" 'True) (C1 ('MetaCons "MkMaryTxBody" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MemoBytes (MaryTxBodyRaw l))))) | |||||
| type Rep (TxBody l ShelleyEra) | |||||
Defined in Cardano.Ledger.Shelley.TxBody type Rep (TxBody l ShelleyEra) = D1 ('MetaData "TxBody" "Cardano.Ledger.Shelley.TxBody" "cardano-ledger-shelley-1.18.0.0-inplace" 'True) (C1 ('MetaCons "MkShelleyTxBody" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MemoBytes (ShelleyTxBodyRaw l ShelleyEra))))) | |||||
totExUnits ∷ ∀ era (l ∷ TxLevel). (EraTx era, AlonzoEraTxWits era) ⇒ Tx l era → ExUnits Source #
alonzoMinFeeTx ∷ ∀ era (l ∷ TxLevel). (EraTx era, AlonzoEraTxWits era, AlonzoEraPParams era) ⇒ PParams era → Tx l era → Coin Source #
txouts ∷ ∀ era (l ∷ TxLevel). EraTxBody era ⇒ TxBody l era → UTxO era Source #
Compute the transaction outputs of a transaction.
toCBORForSizeComputation ∷ ∀ (l ∷ TxLevel) era. (EncCBOR (TxBody l era), EncCBOR (TxWits era), EncCBOR (TxAuxData era)) ⇒ AlonzoTx l era → Encoding Source #
This ensures that the size of transactions from Mary is unchanged. The individual components all store their bytes; the only work we do in this function is concatenating
toCBORForMempoolSubmission ∷ ∀ (l ∷ TxLevel) era. (EncCBOR (TxBody l era), EncCBOR (TxWits era), EncCBOR (TxAuxData era)) ⇒ AlonzoTx l era → Encoding Source #
Encode to CBOR for the purposes of transmission from node to node, or from wallet to node.
Note that this serialisation is neither the serialisation used on-chain
(where Txs are deconstructed using segwit), nor the serialisation used for
computing the transaction size (which omits the IsValid field for
compatibility with Mary - see toCBORForSizeComputation).
alonzoTxEqRaw ∷ ∀ era (l ∷ TxLevel). (AlonzoEraTx era, STxLevel l era ~ STxTopLevel l era) ⇒ Tx l era → Tx l era → Bool Source #
mkScriptIntegrity ∷ ∀ era (l ∷ TxLevel). (AlonzoEraPParams era, AlonzoEraTxWits era, EraUTxO era) ⇒ PParams era → Tx l era → ScriptsProvided era → Set ScriptHash → StrictMaybe (ScriptIntegrity era) Source #
Orphan instances
| EraTx AlonzoEra Source # | |||||
Associated Types
Methods mkBasicTx ∷ ∀ (l ∷ TxLevel). TxBody l AlonzoEra → Tx l AlonzoEra Source # bodyTxL ∷ ∀ (l ∷ TxLevel). Lens' (Tx l AlonzoEra) (TxBody l AlonzoEra) Source # witsTxL ∷ ∀ (l ∷ TxLevel). Lens' (Tx l AlonzoEra) (TxWits AlonzoEra) Source # auxDataTxL ∷ ∀ (l ∷ TxLevel). Lens' (Tx l AlonzoEra) (StrictMaybe (TxAuxData AlonzoEra)) Source # sizeTxF ∷ ∀ (l ∷ TxLevel). HasCallStack ⇒ SimpleGetter (Tx l AlonzoEra) Word32 Source # sizeTxForFeeCalculation ∷ ∀ (l ∷ TxLevel). (HasCallStack, SafeToHash (TxWits AlonzoEra), Typeable l) ⇒ Tx l AlonzoEra → Word32 Source # validateNativeScript ∷ ∀ (l ∷ TxLevel). Tx l AlonzoEra → NativeScript AlonzoEra → Bool Source # getMinFeeTx ∷ ∀ (l ∷ TxLevel). PParams AlonzoEra → Tx l AlonzoEra → Int → Coin Source # | |||||
| HasEraTxLevel Tx AlonzoEra Source # | |||||
| Typeable l ⇒ DecCBOR (Annotator (Tx l AlonzoEra)) Source # | |||||
| Typeable l ⇒ ToCBOR (Tx l AlonzoEra) Source # | |||||
| EncCBOR (Tx l AlonzoEra) Source # | |||||
| EqRaw (Tx l AlonzoEra) Source # | |||||
| NFData (Tx l AlonzoEra) Source # | |||||
| Generic (Tx l AlonzoEra) Source # | |||||
Associated Types
| |||||
| Show (Tx l AlonzoEra) Source # | |||||
| Eq (Tx l AlonzoEra) Source # | |||||
| Typeable l ⇒ NoThunks (Tx l AlonzoEra) Source # | |||||