{-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wno-orphans #-} module Cardano.Ledger.Babbage.TxAuxData () where import Cardano.Ledger.Alonzo.Core import Cardano.Ledger.Alonzo.TxAuxData ( AlonzoTxAuxData (..), hashAlonzoTxAuxData, metadataAlonzoTxAuxDataL, plutusScriptsAllegraTxAuxDataL, timelockScriptsAlonzoTxAuxDataL, translateAlonzoTxAuxData, validateAlonzoTxAuxData, ) import Cardano.Ledger.Babbage.Era import Cardano.Ledger.Babbage.Scripts () import Cardano.Ledger.Crypto instance Crypto c => EraTxAuxData (BabbageEra c) where type TxAuxData (BabbageEra c) = AlonzoTxAuxData (BabbageEra c) mkBasicTxAuxData :: TxAuxData (BabbageEra c) mkBasicTxAuxData = forall era. (HasCallStack, AlonzoEraScript era) => Map Word64 Metadatum -> StrictSeq (Timelock era) -> Map Language (NonEmpty PlutusBinary) -> AlonzoTxAuxData era AlonzoTxAuxData forall a. Monoid a => a mempty forall a. Monoid a => a mempty forall a. Monoid a => a mempty metadataTxAuxDataL :: Lens' (TxAuxData (BabbageEra c)) (Map Word64 Metadatum) metadataTxAuxDataL = forall era. Era era => Lens' (AlonzoTxAuxData era) (Map Word64 Metadatum) metadataAlonzoTxAuxDataL upgradeTxAuxData :: EraTxAuxData (PreviousEra (BabbageEra c)) => TxAuxData (PreviousEra (BabbageEra c)) -> TxAuxData (BabbageEra c) upgradeTxAuxData = forall era1 era2. (AlonzoEraScript era1, AlonzoEraScript era2, EraCrypto era1 ~ EraCrypto era2) => AlonzoTxAuxData era1 -> AlonzoTxAuxData era2 translateAlonzoTxAuxData hashTxAuxData :: TxAuxData (BabbageEra c) -> AuxiliaryDataHash (EraCrypto (BabbageEra c)) hashTxAuxData = forall c x. (HashAlgorithm (HASH c), HashAnnotated x EraIndependentTxAuxData c) => x -> AuxiliaryDataHash c hashAlonzoTxAuxData validateTxAuxData :: ProtVer -> TxAuxData (BabbageEra c) -> Bool validateTxAuxData = forall era. (AlonzoEraScript era, Script era ~ AlonzoScript era) => ProtVer -> AlonzoTxAuxData era -> Bool validateAlonzoTxAuxData instance Crypto c => AllegraEraTxAuxData (BabbageEra c) where timelockScriptsTxAuxDataL :: Lens' (TxAuxData (BabbageEra c)) (StrictSeq (Timelock (BabbageEra c))) timelockScriptsTxAuxDataL = forall era. Era era => Lens' (AlonzoTxAuxData era) (StrictSeq (Timelock era)) timelockScriptsAlonzoTxAuxDataL instance Crypto c => AlonzoEraTxAuxData (BabbageEra c) where plutusScriptsTxAuxDataL :: Lens' (TxAuxData (BabbageEra c)) (Map Language (NonEmpty PlutusBinary)) plutusScriptsTxAuxDataL = forall era. Era era => Lens' (AlonzoTxAuxData era) (Map Language (NonEmpty PlutusBinary)) plutusScriptsAllegraTxAuxDataL