diff --git a/cardano-api/internal/Cardano/Api/ReexposeLedger.hs b/cardano-api/internal/Cardano/Api/ReexposeLedger.hs index fcf067551..f83906d5a 100644 --- a/cardano-api/internal/Cardano/Api/ReexposeLedger.hs +++ b/cardano-api/internal/Cardano/Api/ReexposeLedger.hs @@ -119,17 +119,28 @@ module Cardano.Api.ReexposeLedger , AsIx (..) , CoinPerWord (..) , Data (..) + , EraTxWits (..) , ExUnits (..) + , Language + , Plutus , Prices (..) + , Script , CostModels , AlonzoGenesis , AsIxItem (..) , EraGov , EraTx (witsTxL, bodyTxL) , Tx + , TxDats (..) + , getNativeScript + , languageToText + , plutusBinary + , plutusScriptLanguage , ppPricesL , unData , unRedeemers + , serializeAsHexText + , showTimelock -- Base , boundRational , unboundRational @@ -166,12 +177,14 @@ module Cardano.Api.ReexposeLedger where import Cardano.Crypto.Hash.Class (hashFromBytes, hashToBytes) +import Cardano.Ledger.Allegra.Scripts (showTimelock) import Cardano.Ledger.Alonzo.Core (AlonzoEraScript (..), AlonzoEraTxBody (..), AlonzoEraTxWits (..), AsIx (..), AsIxItem (AsIxItem), CoinPerWord (..), EraGov, - EraTx (bodyTxL, witsTxL), PParamsUpdate (..), Tx, ppPricesL) + EraTx (bodyTxL, witsTxL), EraTxWits (..), PParamsUpdate (..), Tx, ppPricesL) import Cardano.Ledger.Alonzo.Genesis (AlonzoGenesis) import Cardano.Ledger.Alonzo.Scripts (AlonzoPlutusPurpose (..), CostModels, ExUnits (..), - Prices (..)) + Prices (..), Script, plutusScriptLanguage) +import Cardano.Ledger.Alonzo.TxWits (TxDats (..)) import Cardano.Ledger.Api (Constitution (..), GovAction (..), unRedeemers) import Cardano.Ledger.Api.Tx.Cert (pattern AuthCommitteeHotKeyTxCert, pattern DelegStakeTxCert, pattern DelegTxCert, pattern GenesisDelegTxCert, @@ -179,7 +192,7 @@ import Cardano.Ledger.Api.Tx.Cert (pattern AuthCommitteeHotKeyTxCert, pattern RegDepositTxCert, pattern RegPoolTxCert, pattern RegTxCert, pattern ResignCommitteeColdTxCert, pattern RetirePoolTxCert, pattern UnRegDRepTxCert, pattern UnRegDepositTxCert, pattern UnRegTxCert) -import Cardano.Ledger.Babbage.Core (CoinPerByte (..)) +import Cardano.Ledger.Babbage.Core (CoinPerByte (..), getNativeScript) import Cardano.Ledger.BaseTypes (AnchorData (..), DnsName, EpochInterval (..), Network (..), NonNegativeInterval, ProtVer (..), StrictMaybe (..), UnitInterval, Url, boundRational, dnsToText, hashAnchorData, maybeToStrictMaybe, mkVersion, @@ -187,7 +200,7 @@ import Cardano.Ledger.BaseTypes (AnchorData (..), DnsName, EpochInterv unboundRational, urlToText) import Cardano.Ledger.Binary (Annotated (..), ByteSpan (..), byronProtVer, fromCBOR, serialize', slice, toCBOR, toPlainDecoder) -import Cardano.Ledger.Binary.Plain (Decoder) +import Cardano.Ledger.Binary.Plain (Decoder, serializeAsHexText) import Cardano.Ledger.CertState (DRepState (..), csCommitteeCredsL) import Cardano.Ledger.Coin (Coin (..), addDeltaCoin, toDeltaCoin) import Cardano.Ledger.Conway.Core (DRepVotingThresholds (..), PoolVotingThresholds (..), @@ -209,6 +222,7 @@ import Cardano.Ledger.DRep (DRep (..), drepAnchorL, drepDepositL, drep import Cardano.Ledger.Keys (HasKeyRole, KeyHash (..), KeyRole (..), VKey (..), hashWithSerialiser) import Cardano.Ledger.Plutus.Data (Data (..), unData) +import Cardano.Ledger.Plutus.Language (Language, Plutus, languageToText, plutusBinary) import Cardano.Ledger.PoolParams (PoolMetadata (..), PoolParams (..), StakePoolRelay (..)) import Cardano.Ledger.SafeHash (SafeHash, castSafeHash, extractHash, unsafeMakeSafeHash) import Cardano.Ledger.Shelley.API (AccountState (..), GenDelegPair (..), diff --git a/cardano-api/internal/Cardano/Api/ScriptData.hs b/cardano-api/internal/Cardano/Api/ScriptData.hs index 4951db6c2..759f8a743 100644 --- a/cardano-api/internal/Cardano/Api/ScriptData.hs +++ b/cardano-api/internal/Cardano/Api/ScriptData.hs @@ -1,5 +1,6 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DerivingVia #-} +{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE LambdaCase #-} diff --git a/cardano-api/src/Cardano/Api.hs b/cardano-api/src/Cardano/Api.hs index f8a0238c4..785bb0ab5 100644 --- a/cardano-api/src/Cardano/Api.hs +++ b/cardano-api/src/Cardano/Api.hs @@ -528,6 +528,7 @@ module Cardano.Api , eraOfScriptInEra , HasScriptLanguageInEra (..) , ToAlonzoScript (..) + , AlonzoEraOnwardsConstraints -- ** Use of a script in an era as a witness , WitCtxTxIn