cardano-ledger-api-1.9.2.2: Public API for the cardano ledger codebase
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Api.Tx.AuxData

Synopsis

Documentation

class (Era era, Eq (TxAuxData era), EqRaw (TxAuxData era), Show (TxAuxData era), NoThunks (TxAuxData era), ToCBOR (TxAuxData era), EncCBOR (TxAuxData era), DecCBOR (Annotator (TxAuxData era)), HashAnnotated (TxAuxData era) EraIndependentTxAuxData (EraCrypto era)) ⇒ EraTxAuxData era Source #

TxAuxData which may be attached to a transaction

Associated Types

type TxAuxData era = (r ∷ Type) | r → era Source #

upgradeTxAuxDataEraTxAuxData era ⇒ TxAuxData (PreviousEra era) → TxAuxData era Source #

Every era, except Shelley, must be able to upgrade a TxAuxData from a previous era.

Warning - Important to note that any memoized binary representation will not be preserved. If you need to retain underlying bytes you can use translateEraThroughCBOR

Shelley

data ShelleyTxAuxData era where Source #

Bundled Patterns

pattern ShelleyTxAuxDataEra era ⇒ Map Word64 MetadatumShelleyTxAuxData era 

Instances

Instances details
Memoized ShelleyTxAuxData 
Instance details

Defined in Cardano.Ledger.Shelley.TxAuxData

Associated Types

type RawType ShelleyTxAuxData = (r ∷ TypeType) Source #

Generic (ShelleyTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Shelley.TxAuxData

Associated Types

type Rep (ShelleyTxAuxData era) ∷ TypeType Source #

HashAlgorithm (HASH (EraCrypto era)) ⇒ Show (ShelleyTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Shelley.TxAuxData

Typeable era ⇒ ToCBOR (ShelleyTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Shelley.TxAuxData

Methods

toCBORShelleyTxAuxData era → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (ShelleyTxAuxData era) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ShelleyTxAuxData era] → Size Source #

Era era ⇒ DecCBOR (Annotator (ShelleyTxAuxData era)) 
Instance details

Defined in Cardano.Ledger.Shelley.TxAuxData

Era era ⇒ EncCBOR (ShelleyTxAuxData era)

Encodes memoized bytes created upon construction.

Instance details

Defined in Cardano.Ledger.Shelley.TxAuxData

Methods

encCBORShelleyTxAuxData era → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (ShelleyTxAuxData era) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [ShelleyTxAuxData era] → Size Source #

EqRaw (ShelleyTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Shelley.TxAuxData

Methods

eqRawShelleyTxAuxData era → ShelleyTxAuxData era → Bool Source #

SafeToHash (ShelleyTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Shelley.TxAuxData

NFData (ShelleyTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Shelley.TxAuxData

Methods

rnfShelleyTxAuxData era → () Source #

Eq (ShelleyTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Shelley.TxAuxData

NoThunks (ShelleyTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Shelley.TxAuxData

c ~ EraCrypto era ⇒ HashAnnotated (ShelleyTxAuxData era) EraIndependentTxAuxData c 
Instance details

Defined in Cardano.Ledger.Shelley.TxAuxData

type RawType ShelleyTxAuxData 
Instance details

Defined in Cardano.Ledger.Shelley.TxAuxData

type Rep (ShelleyTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Shelley.TxAuxData

type Rep (ShelleyTxAuxData era) = D1 ('MetaData "ShelleyTxAuxData" "Cardano.Ledger.Shelley.TxAuxData" "cardano-ledger-shelley-1.12.2.1-inplace" 'True) (C1 ('MetaCons "AuxiliaryDataConstr" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MemoBytes ShelleyTxAuxDataRaw era))))

data Metadatum Source #

A generic metadatum type.

Constructors

Map ![(Metadatum, Metadatum)] 
List ![Metadatum] 
I !Integer 
B !ByteString 
S !Text 

Instances

Instances details
Generic Metadatum 
Instance details

Defined in Cardano.Ledger.Metadata

Associated Types

type Rep MetadatumTypeType Source #

Show Metadatum 
Instance details

Defined in Cardano.Ledger.Metadata

DecCBOR Metadatum 
Instance details

Defined in Cardano.Ledger.Metadata

EncCBOR Metadatum 
Instance details

Defined in Cardano.Ledger.Metadata

Methods

encCBORMetadatumEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy MetadatumSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Metadatum] → Size Source #

NFData Metadatum 
Instance details

Defined in Cardano.Ledger.Metadata

Methods

rnfMetadatum → () Source #

Eq Metadatum 
Instance details

Defined in Cardano.Ledger.Metadata

Ord Metadatum 
Instance details

Defined in Cardano.Ledger.Metadata

NoThunks Metadatum 
Instance details

Defined in Cardano.Ledger.Metadata

type Rep Metadatum 
Instance details

Defined in Cardano.Ledger.Metadata

Allegra

class EraTxAuxData era ⇒ AllegraEraTxAuxData era Source #

Minimal complete definition

timelockScriptsTxAuxDataL

Instances

Instances details
Crypto c ⇒ AllegraEraTxAuxData (AllegraEra c) 
Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

data AllegraTxAuxData era where Source #

Bundled Patterns

pattern AllegraTxAuxDataEra era ⇒ Map Word64 MetadatumStrictSeq (Timelock era) → AllegraTxAuxData era 

Instances

Instances details
Memoized AllegraTxAuxData 
Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

Associated Types

type RawType AllegraTxAuxData = (r ∷ TypeType) Source #

Generic (AllegraTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

Associated Types

type Rep (AllegraTxAuxData era) ∷ TypeType Source #

HashAlgorithm (HASH (EraCrypto era)) ⇒ Show (AllegraTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

Typeable era ⇒ ToCBOR (AllegraTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

Methods

toCBORAllegraTxAuxData era → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (AllegraTxAuxData era) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [AllegraTxAuxData era] → Size Source #

Era era ⇒ DecCBOR (Annotator (AllegraTxAuxData era)) 
Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

Era era ⇒ EncCBOR (AllegraTxAuxData era)

Encodes memoized bytes created upon construction.

Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

Methods

encCBORAllegraTxAuxData era → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (AllegraTxAuxData era) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [AllegraTxAuxData era] → Size Source #

EqRaw (AllegraTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

Methods

eqRawAllegraTxAuxData era → AllegraTxAuxData era → Bool Source #

SafeToHash (AllegraTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

NFData (AllegraTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

Methods

rnfAllegraTxAuxData era → () Source #

Eq (AllegraTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

Era era ⇒ NoThunks (AllegraTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

c ~ EraCrypto era ⇒ HashAnnotated (AllegraTxAuxData era) EraIndependentTxAuxData c 
Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

type RawType AllegraTxAuxData 
Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

type Rep (AllegraTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Allegra.TxAuxData

type Rep (AllegraTxAuxData era) = D1 ('MetaData "AllegraTxAuxData" "Cardano.Ledger.Allegra.TxAuxData" "cardano-ledger-allegra-1.5.0.1-inplace" 'True) (C1 ('MetaCons "AuxiliaryDataWithBytes" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MemoBytes AllegraTxAuxDataRaw era))))
type TranslationError (MaryEra c) AllegraTxAuxData 
Instance details

Defined in Cardano.Ledger.Mary.Translation

Alonzo

class AllegraEraTxAuxData era ⇒ AlonzoEraTxAuxData era Source #

Minimal complete definition

plutusScriptsTxAuxDataL

Instances

Instances details
Crypto c ⇒ AlonzoEraTxAuxData (AlonzoEra c) 
Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

data AlonzoTxAuxData era where Source #

Bundled Patterns

pattern AlonzoTxAuxData ∷ (HasCallStack, AlonzoEraScript era) ⇒ Map Word64 MetadatumStrictSeq (Timelock era) → Map Language (NonEmpty PlutusBinary) → AlonzoTxAuxData era

Construct auxiliary data. Make sure not to supply plutus script versions that are not supported in this era, because it will result in a runtime exception. Use mkAlonzoTxAuxData instead if you need runtime safety guarantees.

pattern AlonzoTxAuxData'Map Word64 MetadatumStrictSeq (Timelock era) → Map Language (NonEmpty PlutusBinary) → AlonzoTxAuxData era 

Instances

Instances details
Memoized AlonzoTxAuxData 
Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

Associated Types

type RawType AlonzoTxAuxData = (r ∷ TypeType) Source #

Generic (AlonzoTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

Associated Types

type Rep (AlonzoTxAuxData era) ∷ TypeType Source #

HashAlgorithm (HASH (EraCrypto era)) ⇒ Show (AuxiliaryData era) 
Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

Typeable era ⇒ ToCBOR (AlonzoTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

Methods

toCBORAlonzoTxAuxData era → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (AlonzoTxAuxData era) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [AlonzoTxAuxData era] → Size Source #

Era era ⇒ DecCBOR (Annotator (AuxiliaryData era)) 
Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

Era era ⇒ EncCBOR (AlonzoTxAuxData era)

Encodes memoized bytes created upon construction.

Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

Methods

encCBORAlonzoTxAuxData era → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (AlonzoTxAuxData era) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [AlonzoTxAuxData era] → Size Source #

EqRaw (AlonzoTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

Methods

eqRawAlonzoTxAuxData era → AlonzoTxAuxData era → Bool Source #

SafeToHash (AlonzoTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

NFData (AuxiliaryData era) 
Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

Methods

rnfAuxiliaryData era → () Source #

Eq (AuxiliaryData era) 
Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

Methods

(==)AuxiliaryData era → AuxiliaryData era → Bool Source #

(/=)AuxiliaryData era → AuxiliaryData era → Bool Source #

NoThunks (AuxiliaryData era) 
Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

EraCrypto era ~ c ⇒ HashAnnotated (AuxiliaryData era) EraIndependentTxAuxData c 
Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

type RawType AlonzoTxAuxData 
Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

type Rep (AlonzoTxAuxData era) 
Instance details

Defined in Cardano.Ledger.Alonzo.TxAuxData

type Rep (AlonzoTxAuxData era) = D1 ('MetaData "AlonzoTxAuxData" "Cardano.Ledger.Alonzo.TxAuxData" "cardano-ledger-alonzo-1.10.0.1-inplace" 'True) (C1 ('MetaCons "AuxiliaryDataConstr" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MemoBytes AlonzoTxAuxDataRaw era))))

mkAlonzoTxAuxData ∷ (Foldable f, AlonzoEraScript era) ⇒ Map Word64 Metadatum → f (AlonzoScript era) → AlonzoTxAuxData era Source #

Helper function that will construct Auxiliary data from Metadatum map and a list of scripts.

Note that the relative order of same type scripts will be preserved.