From 4dcc2d46c75489e9047384d4df34e9bd6a946bbf Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Wed, 24 Jul 2024 16:38:51 +0200 Subject: [PATCH 01/18] Move `Outputs` to `Cardano.Read.Ledger.Tx.Outputs` --- .../Wallet/Launch/Cluster/Http/ServiceSpec.hs | 8 +++--- .../Wallet/Primitive/Ledger/Read/Tx.hs | 6 ++--- .../Ledger/Read/Tx/Features/Outputs.hs | 6 ++--- .../Ledger/Read/Tx/Features/WitnessCount.hs | 8 +++--- lib/read/cardano-wallet-read.cabal | 2 +- .../Read => Read/Ledger}/Tx/Outputs.hs | 26 ++++++------------- .../DB/Store/Transactions/TransactionInfo.hs | 6 ++--- 7 files changed, 26 insertions(+), 36 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Outputs.hs (71%) diff --git a/lib/local-cluster/test/unit/Cardano/Wallet/Launch/Cluster/Http/ServiceSpec.hs b/lib/local-cluster/test/unit/Cardano/Wallet/Launch/Cluster/Http/ServiceSpec.hs index d7753991d5c..7538fcb1cdc 100644 --- a/lib/local-cluster/test/unit/Cardano/Wallet/Launch/Cluster/Http/ServiceSpec.hs +++ b/lib/local-cluster/test/unit/Cardano/Wallet/Launch/Cluster/Http/ServiceSpec.hs @@ -32,6 +32,10 @@ import Cardano.Ledger.Coin import Cardano.Ledger.Mary.Value ( MaryValue (..) ) +import Cardano.Read.Ledger.Tx.Outputs + ( Outputs (..) + , getEraOutputs + ) import Cardano.Wallet.Faucet.Gen.Address ( NetworkTag (..) , genAddress @@ -111,10 +115,6 @@ import Cardano.Wallet.Read , extractEraValue , (:*:) (..) ) -import Cardano.Wallet.Read.Tx.Outputs - ( Outputs (..) - , getEraOutputs - ) import Control.Monad ( join , replicateM diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs index bbdbf176238..b619c949f4a 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs @@ -16,6 +16,9 @@ import Prelude import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) +import Cardano.Read.Ledger.Tx.Outputs + ( getEraOutputs + ) import Cardano.Wallet.Primitive.Ledger.Read.Tx.Features.CollateralInputs ( getCollateralInputs ) @@ -65,9 +68,6 @@ import Cardano.Wallet.Read.Tx.Hash import Cardano.Wallet.Read.Tx.Metadata ( getEraMetadata ) -import Cardano.Wallet.Read.Tx.Outputs - ( getEraOutputs - ) import Cardano.Wallet.Read.Tx.ScriptValidity ( getEraScriptValidity ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Outputs.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Outputs.hs index 55fc6ec713d..071b1af6c5e 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Outputs.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Outputs.hs @@ -30,6 +30,9 @@ import Cardano.Ledger.Alonzo import Cardano.Ledger.Shelley.API ( StrictMaybe (SJust, SNothing) ) +import Cardano.Read.Ledger.Tx.Outputs + ( Outputs (..) + ) import Cardano.Wallet.Primitive.Ledger.Convert ( toWalletTokenBundle ) @@ -40,9 +43,6 @@ import Cardano.Wallet.Read import Cardano.Wallet.Read.Eras ( IsEra ) -import Cardano.Wallet.Read.Tx.Outputs - ( Outputs (..) - ) import Cardano.Wallet.Util ( internalError ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/WitnessCount.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/WitnessCount.hs index 3c34e4977e5..58c573a64a9 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/WitnessCount.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/WitnessCount.hs @@ -15,6 +15,10 @@ import Cardano.Ledger.Api , hashScript , scriptTxWitsL ) +import Cardano.Read.Ledger.Tx.Outputs + ( Outputs (..) + , getEraOutputs + ) import Cardano.Wallet.Primitive.Ledger.Read.Tx.Features.Outputs ( fromBabbageTxOut , fromConwayTxOut @@ -41,10 +45,6 @@ import Cardano.Wallet.Read , Shelley , Tx ) -import Cardano.Wallet.Read.Tx.Outputs - ( Outputs (..) - , getEraOutputs - ) import Cardano.Wallet.Read.Tx.Witnesses ( Witnesses (..) , getEraWitnesses diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index 7784ae4627a..cfa3a9c71c4 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -45,6 +45,7 @@ library exposed-modules: Cardano.Read.Ledger Cardano.Read.Ledger.Tx.Inputs + Cardano.Read.Ledger.Tx.Outputs Cardano.Read.Ledger.Tx.TxId Cardano.Wallet.Read Cardano.Wallet.Read.Block @@ -90,7 +91,6 @@ library Cardano.Wallet.Read.Tx.Integrity Cardano.Wallet.Read.Tx.Metadata Cardano.Wallet.Read.Tx.Mint - Cardano.Wallet.Read.Tx.Outputs Cardano.Wallet.Read.Tx.ReferenceInputs Cardano.Wallet.Read.Tx.ScriptValidity Cardano.Wallet.Read.Tx.TxId diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Outputs.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Outputs.hs similarity index 71% rename from lib/read/lib/Cardano/Wallet/Read/Tx/Outputs.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/Outputs.hs index 217da3ac340..03cddee2e53 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Outputs.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Outputs.hs @@ -1,9 +1,7 @@ -{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} -{-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} @@ -14,7 +12,7 @@ -- Raw era-dependent tx outputs data extraction from 'Tx' -- -module Cardano.Wallet.Read.Tx.Outputs +module Cardano.Read.Ledger.Tx.Outputs ( OutputsType , Outputs (..) , getEraOutputs @@ -62,25 +60,17 @@ import Data.List.NonEmpty import Data.Sequence.Strict ( StrictSeq ) -import Ouroboros.Consensus.Cardano.Block - ( StandardAllegra - , StandardAlonzo - , StandardBabbage - , StandardConway - , StandardMary - , StandardShelley - ) import qualified Cardano.Chain.UTxO as BY type family OutputsType era where OutputsType Byron = NonEmpty BY.TxOut - OutputsType Shelley = StrictSeq (ShelleyTxOut StandardShelley) - OutputsType Allegra = StrictSeq (ShelleyTxOut StandardAllegra) - OutputsType Mary = StrictSeq (ShelleyTxOut StandardMary) - OutputsType Alonzo = StrictSeq (AlonzoTxOut StandardAlonzo) - OutputsType Babbage = StrictSeq (BabbageTxOut StandardBabbage) - OutputsType Conway = StrictSeq (BabbageTxOut StandardConway) + OutputsType Shelley = StrictSeq (ShelleyTxOut Shelley) + OutputsType Allegra = StrictSeq (ShelleyTxOut Allegra) + OutputsType Mary = StrictSeq (ShelleyTxOut Mary) + OutputsType Alonzo = StrictSeq (AlonzoTxOut Alonzo) + OutputsType Babbage = StrictSeq (BabbageTxOut Babbage) + OutputsType Conway = StrictSeq (BabbageTxOut Conway) newtype Outputs era = Outputs (OutputsType era) @@ -89,7 +79,7 @@ deriving instance Eq (OutputsType era) => Eq (Outputs era) {-# INLINE getEraOutputs #-} getEraOutputs :: forall era . IsEra era => Tx era -> Outputs era -getEraOutputs = case theEra @era of +getEraOutputs = case theEra :: Era era of Byron -> onTx $ Outputs . BY.txOutputs . BY.taTx Shelley -> outputs Allegra -> outputs diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs index 5444e1c18b4..4dcaa685a55 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs @@ -17,6 +17,9 @@ import Prelude hiding import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) +import Cardano.Read.Ledger.Tx.Outputs + ( getEraOutputs + ) import Cardano.Slotting.Slot ( SlotNo (..) ) @@ -107,9 +110,6 @@ import Cardano.Wallet.Read.Tx.Hash import Cardano.Wallet.Read.Tx.Metadata ( getEraMetadata ) -import Cardano.Wallet.Read.Tx.Outputs - ( getEraOutputs - ) import Cardano.Wallet.Read.Tx.ScriptValidity ( getEraScriptValidity ) From 2d7b48d9c59fde2e73627895c03e001f44228e07 Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Thu, 25 Jul 2024 16:29:13 +0200 Subject: [PATCH 02/18] Move `Cardano` to ` Cardano.Read.Ledger.Tx.Cardano` --- .../lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Sealed.hs | 6 +++--- lib/read/cardano-wallet-read.cabal | 2 +- .../lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Cardano.hs | 2 +- .../test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Cardano.hs (96%) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Sealed.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Sealed.hs index 87b66439d37..48186fdfe44 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Sealed.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Sealed.hs @@ -16,6 +16,9 @@ import Prelude import Cardano.Api ( InAnyCardanoEra (..) ) +import Cardano.Read.Ledger.Tx.Cardano + ( fromCardanoApiTx + ) import Cardano.Wallet.Primitive.Types.Tx.SealedTx ( SealedTx (unsafeCardanoTx) ) @@ -26,9 +29,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Cardano - ( fromCardanoApiTx - ) import qualified Cardano.Wallet.Primitive.Types.Tx.SealedTx as W diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index cfa3a9c71c4..65f142d2b10 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -47,6 +47,7 @@ library Cardano.Read.Ledger.Tx.Inputs Cardano.Read.Ledger.Tx.Outputs Cardano.Read.Ledger.Tx.TxId + Cardano.Read.Ledger.Tx.Cardano Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -68,7 +69,6 @@ library Cardano.Wallet.Read.Eras.KnownEras Cardano.Wallet.Read.Hash Cardano.Wallet.Read.Tx - Cardano.Wallet.Read.Tx.Cardano Cardano.Wallet.Read.Tx.CBOR Cardano.Wallet.Read.Tx.Certificates Cardano.Wallet.Read.Tx.CollateralInputs diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Cardano.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Cardano.hs similarity index 96% rename from lib/read/lib/Cardano/Wallet/Read/Tx/Cardano.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/Cardano.hs index 68287705a70..92e99894801 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Cardano.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Cardano.hs @@ -8,7 +8,7 @@ -- License: Apache-2.0 -- -module Cardano.Wallet.Read.Tx.Cardano +module Cardano.Read.Ledger.Tx.Cardano ( fromCardanoApiTx ) where diff --git a/lib/unit/test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs b/lib/unit/test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs index e126fc03d65..64a94cc5948 100644 --- a/lib/unit/test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs +++ b/lib/unit/test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs @@ -57,6 +57,9 @@ import Cardano.Api.Gen import Cardano.Mnemonic ( SomeMnemonic (SomeMnemonic) ) +import Cardano.Read.Ledger.Tx.Cardano + ( fromCardanoApiTx + ) import Cardano.Wallet ( Fee (..) , Percentile (..) @@ -171,9 +174,6 @@ import Cardano.Wallet.Primitive.Types.Tx.TxOut.Gen import Cardano.Wallet.Primitive.Types.UTxO ( UTxO (..) ) -import Cardano.Wallet.Read.Tx.Cardano - ( fromCardanoApiTx - ) import Cardano.Wallet.Shelley.Transaction ( TxWitnessTag (..) , mkByronWitness From 1348f045bafaeaafe59b1e657728c64b5a132849 Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Thu, 25 Jul 2024 16:42:49 +0200 Subject: [PATCH 03/18] Move `CBOR` to `Cardano.Read.Ledger.Tx.CBOR` --- .../Wallet/Api/Http/Server/Handlers/TxCBOR.hs | 8 ++++---- .../src/Cardano/Wallet/Api/Http/Shelley/Server.hs | 6 +++--- .../lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs | 6 +++--- .../lib/Cardano/Wallet/Primitive/Types/Tx/Tx.hs | 6 +++--- lib/read/cardano-wallet-read.cabal | 2 +- .../Cardano/{Wallet/Read => Read/Ledger}/Tx/CBOR.hs | 2 +- lib/read/test/Cardano/Wallet/Read/Tx/CBORSpec.hs | 12 ++++++------ lib/read/test/Cardano/Wallet/Read/Tx/TxIdSpec.hs | 6 +++--- .../Cardano/Wallet/DummyTarget/Primitive/Types.hs | 6 +++--- lib/unit/test/unit/Cardano/Wallet/DB/Arbitrary.hs | 6 +++--- lib/unit/test/unit/Cardano/Wallet/DB/StateMachine.hs | 6 +++--- .../Wallet/DB/Store/Transactions/StoreSpec.hs | 6 +++--- lib/wallet/src/Cardano/Wallet.hs | 6 +++--- lib/wallet/src/Cardano/Wallet/DB/Layer.hs | 6 +++--- .../Cardano/Wallet/DB/Store/Transactions/Model.hs | 6 +++--- .../Wallet/DB/Store/Transactions/TransactionInfo.hs | 8 ++++---- .../Wallet/Primitive/Types/Tx/TransactionInfo.hs | 6 +++--- 17 files changed, 52 insertions(+), 52 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/CBOR.hs (99%) diff --git a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs index 55e54717fa1..1d8f517fe96 100644 --- a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs +++ b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs @@ -18,6 +18,10 @@ import Prelude import Cardano.Binary ( DecoderError ) +import Cardano.Read.Ledger.Tx.CBOR + ( TxCBOR + , deserializeTx + ) import Cardano.Wallet.Api.Http.Server.Error ( IsServerError (..) , apiError @@ -45,10 +49,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Eras.EraFun ( applyEraFun ) -import Cardano.Wallet.Read.Tx.CBOR - ( TxCBOR - , deserializeTx - ) import Cardano.Wallet.Read.Tx.Certificates ( getEraCertificates ) diff --git a/lib/api/src/Cardano/Wallet/Api/Http/Shelley/Server.hs b/lib/api/src/Cardano/Wallet/Api/Http/Shelley/Server.hs index 984e5a7224b..85be8e5b5cf 100644 --- a/lib/api/src/Cardano/Wallet/Api/Http/Shelley/Server.hs +++ b/lib/api/src/Cardano/Wallet/Api/Http/Shelley/Server.hs @@ -179,6 +179,9 @@ import Cardano.Mnemonic import Cardano.Pool.Types ( PoolId ) +import Cardano.Read.Ledger.Tx.CBOR + ( TxCBOR + ) import Cardano.Wallet ( BuiltTx (..) , DelegationFee (feePercentiles) @@ -653,9 +656,6 @@ import Cardano.Wallet.Primitive.Types.Tx.TxMeta import Cardano.Wallet.Primitive.Types.Tx.TxOut ( TxOut (..) ) -import Cardano.Wallet.Read.Tx.CBOR - ( TxCBOR - ) import Cardano.Wallet.Registry ( HasWorkerCtx (..) , MkWorker (..) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs index b619c949f4a..1357dcf3792 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs @@ -13,6 +13,9 @@ where import Prelude +import Cardano.Read.Ledger.Tx.CBOR + ( renderTxToCBOR + ) import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) @@ -50,9 +53,6 @@ import Cardano.Wallet.Read import Cardano.Wallet.Read.Eras ( eraValue ) -import Cardano.Wallet.Read.Tx.CBOR - ( renderTxToCBOR - ) import Cardano.Wallet.Read.Tx.CollateralInputs ( getEraCollateralInputs ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Types/Tx/Tx.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Types/Tx/Tx.hs index d31a56f7ea1..54a7abdf56d 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Types/Tx/Tx.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Types/Tx/Tx.hs @@ -47,6 +47,9 @@ import Cardano.Api , TxMetadata (..) , TxMetadataValue (..) ) +import Cardano.Read.Ledger.Tx.CBOR + ( TxCBOR + ) import Cardano.Wallet.Orphans () import Cardano.Wallet.Primitive.Types.AssetId @@ -65,9 +68,6 @@ import Cardano.Wallet.Primitive.Types.Tx.TxIn import Cardano.Wallet.Primitive.Types.Tx.TxOut ( TxOut (..) ) -import Cardano.Wallet.Read.Tx.CBOR - ( TxCBOR - ) import Control.DeepSeq ( NFData (..) ) diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index 65f142d2b10..d9a1a108d0f 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -48,6 +48,7 @@ library Cardano.Read.Ledger.Tx.Outputs Cardano.Read.Ledger.Tx.TxId Cardano.Read.Ledger.Tx.Cardano + Cardano.Read.Ledger.Tx.CBOR Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -69,7 +70,6 @@ library Cardano.Wallet.Read.Eras.KnownEras Cardano.Wallet.Read.Hash Cardano.Wallet.Read.Tx - Cardano.Wallet.Read.Tx.CBOR Cardano.Wallet.Read.Tx.Certificates Cardano.Wallet.Read.Tx.CollateralInputs Cardano.Wallet.Read.Tx.CollateralOutputs diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/CBOR.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/CBOR.hs similarity index 99% rename from lib/read/lib/Cardano/Wallet/Read/Tx/CBOR.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/CBOR.hs index c3024c9cdee..b4fcaf29dbc 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/CBOR.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/CBOR.hs @@ -15,7 +15,7 @@ -- CBOR operations for era dependent transactions. -- -module Cardano.Wallet.Read.Tx.CBOR +module Cardano.Read.Ledger.Tx.CBOR ( TxCBOR , renderTxToCBOR , parseTxFromCBOR diff --git a/lib/read/test/Cardano/Wallet/Read/Tx/CBORSpec.hs b/lib/read/test/Cardano/Wallet/Read/Tx/CBORSpec.hs index 8c8eae14826..8ca0387e832 100644 --- a/lib/read/test/Cardano/Wallet/Read/Tx/CBORSpec.hs +++ b/lib/read/test/Cardano/Wallet/Read/Tx/CBORSpec.hs @@ -7,17 +7,17 @@ module Cardano.Wallet.Read.Tx.CBORSpec import Prelude +import Cardano.Read.Ledger.Tx.CBOR + ( TxCBOR + , parseTxFromCBOR + , renderTxToCBOR + ) import Cardano.Wallet.Read.Eras ( Era (..) , EraValue (..) , IsEra , K (..) ) -import Cardano.Wallet.Read.Tx.CBOR - ( TxCBOR - , parseTxFromCBOR - , renderTxToCBOR - ) import Data.ByteArray.Encoding ( Base (..) , convertFromBase @@ -43,7 +43,7 @@ import Test.QuickCheck import qualified Data.ByteString.Lazy as BL spec :: Spec -spec = describe "Cardano.Wallet.Read.Tx.CBOR" $ do +spec = describe "Cardano.Read.Ledger.Tx.CBOR" $ do describe "TxCBOR encoding" $ do it "roundtrips byron tx properly" $ do diff --git a/lib/read/test/Cardano/Wallet/Read/Tx/TxIdSpec.hs b/lib/read/test/Cardano/Wallet/Read/Tx/TxIdSpec.hs index 01e6942ff15..99498148bbd 100644 --- a/lib/read/test/Cardano/Wallet/Read/Tx/TxIdSpec.hs +++ b/lib/read/test/Cardano/Wallet/Read/Tx/TxIdSpec.hs @@ -8,6 +8,9 @@ module Cardano.Wallet.Read.Tx.TxIdSpec import Prelude +import Cardano.Read.Ledger.Tx.CBOR + ( deserializeTx + ) import Cardano.Wallet.Read.Eras ( IsEra , K (..) @@ -19,9 +22,6 @@ import Cardano.Wallet.Read.Hash import Cardano.Wallet.Read.Tx ( Tx ) -import Cardano.Wallet.Read.Tx.CBOR - ( deserializeTx - ) import Cardano.Wallet.Read.Tx.TxId ( TxId , getTxId diff --git a/lib/unit/test-common/Cardano/Wallet/DummyTarget/Primitive/Types.hs b/lib/unit/test-common/Cardano/Wallet/DummyTarget/Primitive/Types.hs index 86f167fe43d..0ef1c354088 100644 --- a/lib/unit/test-common/Cardano/Wallet/DummyTarget/Primitive/Types.hs +++ b/lib/unit/test-common/Cardano/Wallet/DummyTarget/Primitive/Types.hs @@ -23,6 +23,9 @@ module Cardano.Wallet.DummyTarget.Primitive.Types import Prelude +import Cardano.Read.Ledger.Tx.CBOR + ( TxCBOR + ) import Cardano.Wallet.Network ( NetworkLayer (..) ) @@ -69,9 +72,6 @@ import Cardano.Wallet.Primitive.Types.Tx.TxIn import Cardano.Wallet.Primitive.Types.Tx.TxOut ( TxOut (..) ) -import Cardano.Wallet.Read.Tx.CBOR - ( TxCBOR - ) import Data.Functor.Identity ( Identity (..) ) diff --git a/lib/unit/test/unit/Cardano/Wallet/DB/Arbitrary.hs b/lib/unit/test/unit/Cardano/Wallet/DB/Arbitrary.hs index 8e487572af2..eb7f5dbc6ef 100644 --- a/lib/unit/test/unit/Cardano/Wallet/DB/Arbitrary.hs +++ b/lib/unit/test/unit/Cardano/Wallet/DB/Arbitrary.hs @@ -49,6 +49,9 @@ import Cardano.Mnemonic import Cardano.Pool.Types ( PoolId (..) ) +import Cardano.Read.Ledger.Tx.CBOR + ( TxCBOR + ) import Cardano.Wallet.Address.Book ( AddressBookIso (..) ) @@ -220,9 +223,6 @@ import Cardano.Wallet.Read.Eras.EraValue import Cardano.Wallet.Read.Eras.KnownEras ( knownEraIndices ) -import Cardano.Wallet.Read.Tx.CBOR - ( TxCBOR - ) import Cardano.Wallet.Unsafe ( someDummyMnemonic , unsafeMkPercentage diff --git a/lib/unit/test/unit/Cardano/Wallet/DB/StateMachine.hs b/lib/unit/test/unit/Cardano/Wallet/DB/StateMachine.hs index acbe9613366..6ceafc2c8b9 100644 --- a/lib/unit/test/unit/Cardano/Wallet/DB/StateMachine.hs +++ b/lib/unit/test/unit/Cardano/Wallet/DB/StateMachine.hs @@ -58,6 +58,9 @@ import Cardano.Address.Script import Cardano.Pool.Types ( PoolId (..) ) +import Cardano.Read.Ledger.Tx.CBOR + ( TxCBOR + ) import Cardano.Wallet.Address.Book ( AddressBookIso ) @@ -222,9 +225,6 @@ import Cardano.Wallet.Primitive.Types.UTxO import Cardano.Wallet.Read.Eras.EraValue ( eraValueSerialize ) -import Cardano.Wallet.Read.Tx.CBOR - ( TxCBOR - ) import Control.DeepSeq ( NFData ) diff --git a/lib/unit/test/unit/Cardano/Wallet/DB/Store/Transactions/StoreSpec.hs b/lib/unit/test/unit/Cardano/Wallet/DB/Store/Transactions/StoreSpec.hs index 5007d2cb7aa..dcac0d575f3 100644 --- a/lib/unit/test/unit/Cardano/Wallet/DB/Store/Transactions/StoreSpec.hs +++ b/lib/unit/test/unit/Cardano/Wallet/DB/Store/Transactions/StoreSpec.hs @@ -21,6 +21,9 @@ import Cardano.DB.Sqlite ( ForeignKeysSetting (..) , runQuery ) +import Cardano.Read.Ledger.Tx.CBOR + ( roundTripTxCBor + ) import Cardano.Wallet.DB.Arbitrary () import Cardano.Wallet.DB.Fixtures @@ -60,9 +63,6 @@ import Cardano.Wallet.DB.Store.Transactions.TransactionInfo import Cardano.Wallet.Primitive.Types.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.CBOR - ( roundTripTxCBor - ) import Control.Monad ( forM_ , (<=<) diff --git a/lib/wallet/src/Cardano/Wallet.hs b/lib/wallet/src/Cardano/Wallet.hs index 989c2256406..4d6c12810dc 100644 --- a/lib/wallet/src/Cardano/Wallet.hs +++ b/lib/wallet/src/Cardano/Wallet.hs @@ -279,6 +279,9 @@ import Cardano.Ledger.Api import Cardano.Mnemonic ( SomeMnemonic ) +import Cardano.Read.Ledger.Tx.CBOR + ( TxCBOR + ) import Cardano.Slotting.Slot ( SlotNo (..) ) @@ -590,9 +593,6 @@ import Cardano.Wallet.Primitive.Types.UTxO import Cardano.Wallet.Primitive.Types.UTxOStatistics ( UTxOStatistics ) -import Cardano.Wallet.Read.Tx.CBOR - ( TxCBOR - ) import Cardano.Wallet.Shelley.Transaction ( _txRewardWithdrawalCost , mkTransaction diff --git a/lib/wallet/src/Cardano/Wallet/DB/Layer.hs b/lib/wallet/src/Cardano/Wallet/DB/Layer.hs index d51671b9f7c..4bfc84004a0 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Layer.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Layer.hs @@ -76,6 +76,9 @@ import Cardano.DB.Sqlite.Migration.Old ( ManualMigration (..) , MigrationError ) +import Cardano.Read.Ledger.Tx.CBOR + ( parseTxFromCBOR + ) import Cardano.Slotting.Slot ( WithOrigin (..) ) @@ -187,9 +190,6 @@ import Cardano.Wallet.Primitive.Types.Coin import Cardano.Wallet.Read.Eras.EraValue ( EraValue ) -import Cardano.Wallet.Read.Tx.CBOR - ( parseTxFromCBOR - ) import Control.DeepSeq ( force ) diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Model.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Model.hs index 2d7cd1f6090..a2c764f5248 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Model.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Model.hs @@ -37,6 +37,9 @@ module Cardano.Wallet.DB.Store.Transactions.Model import Prelude +import Cardano.Read.Ledger.Tx.CBOR + ( TxCBOR + ) import Cardano.Wallet.DB.Sqlite.Schema ( CBOR (..) , TxCollateral (..) @@ -71,9 +74,6 @@ import Cardano.Wallet.Primitive.Types.Tx.Tx import Cardano.Wallet.Read.Eras.EraValue ( eraValueSerialize ) -import Cardano.Wallet.Read.Tx.CBOR - ( TxCBOR - ) import Control.Arrow ( (&&&) , (***) diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs index 4dcaa685a55..7194a926484 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs @@ -14,6 +14,10 @@ import Prelude hiding ( (.) ) +import Cardano.Read.Ledger.Tx.CBOR + ( TxCBOR + , renderTxToCBOR + ) import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) @@ -91,10 +95,6 @@ import Cardano.Wallet.Read.Eras , IsEra , applyEraFun ) -import Cardano.Wallet.Read.Tx.CBOR - ( TxCBOR - , renderTxToCBOR - ) import Cardano.Wallet.Read.Tx.CollateralInputs ( getEraCollateralInputs ) diff --git a/lib/wallet/src/Cardano/Wallet/Primitive/Types/Tx/TransactionInfo.hs b/lib/wallet/src/Cardano/Wallet/Primitive/Types/Tx/TransactionInfo.hs index 2d4ad8dcbe4..7cd333b53f1 100644 --- a/lib/wallet/src/Cardano/Wallet/Primitive/Types/Tx/TransactionInfo.hs +++ b/lib/wallet/src/Cardano/Wallet/Primitive/Types/Tx/TransactionInfo.hs @@ -24,6 +24,9 @@ module Cardano.Wallet.Primitive.Types.Tx.TransactionInfo import Prelude +import Cardano.Read.Ledger.Tx.CBOR + ( TxCBOR + ) import Cardano.Wallet.Primitive.Types.Coin ( Coin (..) ) @@ -49,9 +52,6 @@ import Cardano.Wallet.Primitive.Types.Tx.TxMeta import Cardano.Wallet.Primitive.Types.Tx.TxOut ( TxOut ) -import Cardano.Wallet.Read.Tx.CBOR - ( TxCBOR - ) import Control.DeepSeq ( NFData (..) ) From 1210daf49239464d4d16c92995278803f3a032b7 Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Thu, 25 Jul 2024 16:45:13 +0200 Subject: [PATCH 04/18] Move `CollateralInputs` to `Cardano.Wallet.Read.Tx.CollateralInputs` --- .../lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs | 6 +++--- .../Primitive/Ledger/Read/Tx/Features/CollateralInputs.hs | 8 ++++---- lib/read/cardano-wallet-read.cabal | 2 +- .../{Wallet/Read => Read/Ledger}/Tx/CollateralInputs.hs | 2 +- .../Cardano/Wallet/DB/Store/Transactions/Decoration.hs | 6 +++--- .../Wallet/DB/Store/Transactions/TransactionInfo.hs | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/CollateralInputs.hs (97%) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs index 1357dcf3792..cc5049b33f4 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs @@ -16,6 +16,9 @@ import Prelude import Cardano.Read.Ledger.Tx.CBOR ( renderTxToCBOR ) +import Cardano.Read.Ledger.Tx.CollateralInputs + ( getEraCollateralInputs + ) import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) @@ -53,9 +56,6 @@ import Cardano.Wallet.Read import Cardano.Wallet.Read.Eras ( eraValue ) -import Cardano.Wallet.Read.Tx.CollateralInputs - ( getEraCollateralInputs - ) import Cardano.Wallet.Read.Tx.CollateralOutputs ( getEraCollateralOutputs ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/CollateralInputs.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/CollateralInputs.hs index 78f41364e75..663117ab8c2 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/CollateralInputs.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/CollateralInputs.hs @@ -10,6 +10,10 @@ module Cardano.Wallet.Primitive.Ledger.Read.Tx.Features.CollateralInputs import Prelude +import Cardano.Read.Ledger.Tx.CollateralInputs + ( CollateralInputs (..) + , CollateralInputsType + ) import Cardano.Wallet.Primitive.Ledger.Read.Tx.Features.Inputs ( fromShelleyTxIns ) @@ -17,10 +21,6 @@ import Cardano.Wallet.Read.Eras ( Era (..) , IsEra (..) ) -import Cardano.Wallet.Read.Tx.CollateralInputs - ( CollateralInputs (..) - , CollateralInputsType - ) import qualified Cardano.Ledger.Shelley.API as SH import qualified Cardano.Wallet.Primitive.Types.Tx.TxIn as W diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index d9a1a108d0f..d7ca7ba4dc8 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -49,6 +49,7 @@ library Cardano.Read.Ledger.Tx.TxId Cardano.Read.Ledger.Tx.Cardano Cardano.Read.Ledger.Tx.CBOR + Cardano.Read.Ledger.Tx.CollateralInputs Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -71,7 +72,6 @@ library Cardano.Wallet.Read.Hash Cardano.Wallet.Read.Tx Cardano.Wallet.Read.Tx.Certificates - Cardano.Wallet.Read.Tx.CollateralInputs Cardano.Wallet.Read.Tx.CollateralOutputs Cardano.Wallet.Read.Tx.Eras Cardano.Wallet.Read.Tx.ExtraSigs diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/CollateralInputs.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/CollateralInputs.hs similarity index 97% rename from lib/read/lib/Cardano/Wallet/Read/Tx/CollateralInputs.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/CollateralInputs.hs index bce3b0c903b..7475ca35ee6 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/CollateralInputs.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/CollateralInputs.hs @@ -14,7 +14,7 @@ -- Raw collateral inputs data extraction from 'Tx' -- -module Cardano.Wallet.Read.Tx.CollateralInputs +module Cardano.Read.Ledger.Tx.CollateralInputs ( CollateralInputsType , CollateralInputs (..) , getEraCollateralInputs diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Decoration.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Decoration.hs index f013a69ca55..b460f83ec7c 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Decoration.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/Decoration.hs @@ -33,6 +33,9 @@ import Prelude hiding ( (.) ) +import Cardano.Read.Ledger.Tx.CollateralInputs + ( getEraCollateralInputs + ) import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) @@ -61,9 +64,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Eras.EraFun ( applyEraFun ) -import Cardano.Wallet.Read.Tx.CollateralInputs - ( getEraCollateralInputs - ) import Control.Applicative ( (<|>) ) diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs index 7194a926484..a77b36d271b 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs @@ -18,6 +18,9 @@ import Cardano.Read.Ledger.Tx.CBOR ( TxCBOR , renderTxToCBOR ) +import Cardano.Read.Ledger.Tx.CollateralInputs + ( getEraCollateralInputs + ) import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) @@ -95,9 +98,6 @@ import Cardano.Wallet.Read.Eras , IsEra , applyEraFun ) -import Cardano.Wallet.Read.Tx.CollateralInputs - ( getEraCollateralInputs - ) import Cardano.Wallet.Read.Tx.CollateralOutputs ( getEraCollateralOutputs ) From e6ba9cedd02f2566da22a48cb50655fe0348649b Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Thu, 25 Jul 2024 16:48:17 +0200 Subject: [PATCH 05/18] Move `Certificates` to `Cardano.Wallet.Read.Tx.Certificates` --- .../src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs | 6 +++--- .../lib/Cardano/Wallet/Primitive/Ledger/Read/Block.hs | 6 +++--- .../Primitive/Ledger/Read/Tx/Features/Certificates.hs | 8 ++++---- .../Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs | 6 +++--- lib/read/cardano-wallet-read.cabal | 2 +- .../{Wallet/Read => Read/Ledger}/Tx/Certificates.hs | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Certificates.hs (98%) diff --git a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs index 1d8f517fe96..950cd231abf 100644 --- a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs +++ b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs @@ -22,6 +22,9 @@ import Cardano.Read.Ledger.Tx.CBOR ( TxCBOR , deserializeTx ) +import Cardano.Read.Ledger.Tx.Certificates + ( getEraCertificates + ) import Cardano.Wallet.Api.Http.Server.Error ( IsServerError (..) , apiError @@ -49,9 +52,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Eras.EraFun ( applyEraFun ) -import Cardano.Wallet.Read.Tx.Certificates - ( getEraCertificates - ) import Cardano.Wallet.Read.Tx.ExtraSigs ( getEraExtraSigs ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Block.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Block.hs index e495b0e3aaf..35ed253d0b4 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Block.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Block.hs @@ -12,6 +12,9 @@ import Prelude hiding , (.) ) +import Cardano.Read.Ledger.Tx.Certificates + ( getEraCertificates + ) import Cardano.Wallet.Primitive.Ledger.Read.Block.Header ( primitiveBlockHeader ) @@ -33,9 +36,6 @@ import Cardano.Wallet.Read.Block.Txs import Cardano.Wallet.Read.Eras ( applyEraFun ) -import Cardano.Wallet.Read.Tx.Certificates - ( getEraCertificates - ) import Control.Category ( Category (..) ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Certificates.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Certificates.hs index 296d53b84ad..8f4efa2210c 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Certificates.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Certificates.hs @@ -34,6 +34,10 @@ import Cardano.Ledger.Shelley.API import Cardano.Ledger.Shelley.TxCert ( ShelleyTxCert ) +import Cardano.Read.Ledger.Tx.Certificates + ( Certificates (..) + , CertificatesType + ) import Cardano.Slotting.Slot ( EpochNo (..) ) @@ -64,10 +68,6 @@ import Cardano.Wallet.Read.Eras , IsEra , theEra ) -import Cardano.Wallet.Read.Tx.Certificates - ( Certificates (..) - , CertificatesType - ) import Cardano.Wallet.Util ( internalError ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs index 75030ee3f16..7f65e481ba0 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs @@ -15,6 +15,9 @@ where import Prelude +import Cardano.Read.Ledger.Tx.Certificates + ( getEraCertificates + ) import Cardano.Wallet.Primitive.Ledger.Read.Tx ( primitiveTx ) @@ -44,9 +47,6 @@ import Cardano.Wallet.Read , Tx (Tx) , (:*:) ((:*:)) ) -import Cardano.Wallet.Read.Tx.Certificates - ( getEraCertificates - ) import Cardano.Wallet.Read.Tx.Mint ( getEraMint ) diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index d7ca7ba4dc8..f6cd227061a 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -48,6 +48,7 @@ library Cardano.Read.Ledger.Tx.Outputs Cardano.Read.Ledger.Tx.TxId Cardano.Read.Ledger.Tx.Cardano + Cardano.Read.Ledger.Tx.Certificates Cardano.Read.Ledger.Tx.CBOR Cardano.Read.Ledger.Tx.CollateralInputs Cardano.Wallet.Read @@ -71,7 +72,6 @@ library Cardano.Wallet.Read.Eras.KnownEras Cardano.Wallet.Read.Hash Cardano.Wallet.Read.Tx - Cardano.Wallet.Read.Tx.Certificates Cardano.Wallet.Read.Tx.CollateralOutputs Cardano.Wallet.Read.Tx.Eras Cardano.Wallet.Read.Tx.ExtraSigs diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Certificates.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Certificates.hs similarity index 98% rename from lib/read/lib/Cardano/Wallet/Read/Tx/Certificates.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/Certificates.hs index d1419ae25b2..1f27587bb37 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Certificates.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Certificates.hs @@ -14,7 +14,7 @@ -- Raw certificate data extraction from 'Tx' -- -module Cardano.Wallet.Read.Tx.Certificates +module Cardano.Read.Ledger.Tx.Certificates ( CertificatesType , Certificates (..) , getEraCertificates From e79d0628a4f218172c8d50d85b5a39023c52c3e3 Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Thu, 25 Jul 2024 16:49:37 +0200 Subject: [PATCH 06/18] Move `CollateralOutputs` to `Cardano.Read.Ledger.Tx.CollateralOutputs` --- .../lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs | 6 +++--- .../Primitive/Ledger/Read/Tx/Features/CollateralOutputs.hs | 6 +++--- lib/read/cardano-wallet-read.cabal | 2 +- .../{Wallet/Read => Read/Ledger}/Tx/CollateralOutputs.hs | 2 +- .../Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/CollateralOutputs.hs (98%) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs index cc5049b33f4..417ff6bb447 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs @@ -19,6 +19,9 @@ import Cardano.Read.Ledger.Tx.CBOR import Cardano.Read.Ledger.Tx.CollateralInputs ( getEraCollateralInputs ) +import Cardano.Read.Ledger.Tx.CollateralOutputs + ( getEraCollateralOutputs + ) import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) @@ -56,9 +59,6 @@ import Cardano.Wallet.Read import Cardano.Wallet.Read.Eras ( eraValue ) -import Cardano.Wallet.Read.Tx.CollateralOutputs - ( getEraCollateralOutputs - ) import Cardano.Wallet.Read.Tx.Fee ( getEraFee ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/CollateralOutputs.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/CollateralOutputs.hs index a6ff0caf38b..5c26d3218e0 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/CollateralOutputs.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/CollateralOutputs.hs @@ -9,6 +9,9 @@ module Cardano.Wallet.Primitive.Ledger.Read.Tx.Features.CollateralOutputs import Prelude +import Cardano.Read.Ledger.Tx.CollateralOutputs + ( CollateralOutputs (..) + ) import Cardano.Wallet.Primitive.Ledger.Convert ( toWalletTokenBundle ) @@ -19,9 +22,6 @@ import Cardano.Wallet.Read.Eras ( Era (..) , IsEra (..) ) -import Cardano.Wallet.Read.Tx.CollateralOutputs - ( CollateralOutputs (..) - ) import Data.Maybe.Strict ( strictMaybeToMaybe ) diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index f6cd227061a..ab8044e3a26 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -51,6 +51,7 @@ library Cardano.Read.Ledger.Tx.Certificates Cardano.Read.Ledger.Tx.CBOR Cardano.Read.Ledger.Tx.CollateralInputs + Cardano.Read.Ledger.Tx.CollateralOutputs Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -72,7 +73,6 @@ library Cardano.Wallet.Read.Eras.KnownEras Cardano.Wallet.Read.Hash Cardano.Wallet.Read.Tx - Cardano.Wallet.Read.Tx.CollateralOutputs Cardano.Wallet.Read.Tx.Eras Cardano.Wallet.Read.Tx.ExtraSigs Cardano.Wallet.Read.Tx.Fee diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/CollateralOutputs.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/CollateralOutputs.hs similarity index 98% rename from lib/read/lib/Cardano/Wallet/Read/Tx/CollateralOutputs.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/CollateralOutputs.hs index 03e5b0835d3..7b909fdbfc0 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/CollateralOutputs.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/CollateralOutputs.hs @@ -14,7 +14,7 @@ -- Raw collateral output data extraction from 'Tx' -- -module Cardano.Wallet.Read.Tx.CollateralOutputs +module Cardano.Read.Ledger.Tx.CollateralOutputs ( CollateralOutputsType , CollateralOutputs (..) , getEraCollateralOutputs diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs index a77b36d271b..618ee0daeaf 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs @@ -21,6 +21,9 @@ import Cardano.Read.Ledger.Tx.CBOR import Cardano.Read.Ledger.Tx.CollateralInputs ( getEraCollateralInputs ) +import Cardano.Read.Ledger.Tx.CollateralOutputs + ( getEraCollateralOutputs + ) import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) @@ -98,9 +101,6 @@ import Cardano.Wallet.Read.Eras , IsEra , applyEraFun ) -import Cardano.Wallet.Read.Tx.CollateralOutputs - ( getEraCollateralOutputs - ) import Cardano.Wallet.Read.Tx.Fee ( getEraFee ) From 0f91fb8240b4e69b5c0216493c60514db13a85da Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Thu, 25 Jul 2024 16:51:56 +0200 Subject: [PATCH 07/18] Move `Eras` to `Cardano.Read.Ledger.Tx.Eras` --- lib/read/cardano-wallet-read.cabal | 2 +- lib/read/lib/Cardano/Read/Ledger/Tx/Certificates.hs | 6 +++--- lib/read/lib/Cardano/Read/Ledger/Tx/CollateralInputs.hs | 6 +++--- lib/read/lib/Cardano/Read/Ledger/Tx/CollateralOutputs.hs | 6 +++--- .../lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Eras.hs | 2 +- lib/read/lib/Cardano/Read/Ledger/Tx/Inputs.hs | 6 +++--- lib/read/lib/Cardano/Read/Ledger/Tx/Outputs.hs | 6 +++--- lib/read/lib/Cardano/Read/Ledger/Tx/TxId.hs | 6 +++--- lib/read/lib/Cardano/Wallet/Read/Tx/ExtraSigs.hs | 6 +++--- lib/read/lib/Cardano/Wallet/Read/Tx/Fee.hs | 6 +++--- lib/read/lib/Cardano/Wallet/Read/Tx/Hash.hs | 6 +++--- lib/read/lib/Cardano/Wallet/Read/Tx/Integrity.hs | 6 +++--- lib/read/lib/Cardano/Wallet/Read/Tx/Metadata.hs | 6 +++--- lib/read/lib/Cardano/Wallet/Read/Tx/Mint.hs | 6 +++--- lib/read/lib/Cardano/Wallet/Read/Tx/ReferenceInputs.hs | 6 +++--- lib/read/lib/Cardano/Wallet/Read/Tx/ScriptValidity.hs | 6 +++--- lib/read/lib/Cardano/Wallet/Read/Tx/Validity.hs | 6 +++--- lib/read/lib/Cardano/Wallet/Read/Tx/Withdrawals.hs | 6 +++--- lib/read/lib/Cardano/Wallet/Read/Tx/Witnesses.hs | 6 +++--- 19 files changed, 53 insertions(+), 53 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Eras.hs (88%) diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index ab8044e3a26..e5eff1f758f 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -52,6 +52,7 @@ library Cardano.Read.Ledger.Tx.CBOR Cardano.Read.Ledger.Tx.CollateralInputs Cardano.Read.Ledger.Tx.CollateralOutputs + Cardano.Read.Ledger.Tx.Eras Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -73,7 +74,6 @@ library Cardano.Wallet.Read.Eras.KnownEras Cardano.Wallet.Read.Hash Cardano.Wallet.Read.Tx - Cardano.Wallet.Read.Tx.Eras Cardano.Wallet.Read.Tx.ExtraSigs Cardano.Wallet.Read.Tx.Fee Cardano.Wallet.Read.Tx.Gen diff --git a/lib/read/lib/Cardano/Read/Ledger/Tx/Certificates.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Certificates.hs index 1f27587bb37..700aea08dc9 100644 --- a/lib/read/lib/Cardano/Read/Ledger/Tx/Certificates.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Certificates.hs @@ -36,6 +36,9 @@ import Cardano.Ledger.Crypto import Cardano.Ledger.Shelley.TxCert ( ShelleyTxCert ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -50,9 +53,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( view ) diff --git a/lib/read/lib/Cardano/Read/Ledger/Tx/CollateralInputs.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/CollateralInputs.hs index 7475ca35ee6..331952fee90 100644 --- a/lib/read/lib/Cardano/Read/Ledger/Tx/CollateralInputs.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/CollateralInputs.hs @@ -32,6 +32,9 @@ import Cardano.Ledger.Core import Cardano.Ledger.Crypto ( StandardCrypto ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -46,9 +49,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( (^.) ) diff --git a/lib/read/lib/Cardano/Read/Ledger/Tx/CollateralOutputs.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/CollateralOutputs.hs index 7b909fdbfc0..0da5fa44278 100644 --- a/lib/read/lib/Cardano/Read/Ledger/Tx/CollateralOutputs.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/CollateralOutputs.hs @@ -39,6 +39,9 @@ import Cardano.Ledger.Core import Cardano.Ledger.Crypto ( StandardCrypto ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -53,9 +56,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( (^.) ) diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Eras.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Eras.hs similarity index 88% rename from lib/read/lib/Cardano/Wallet/Read/Tx/Eras.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/Eras.hs index ffc5a4cb026..82e736b9e1a 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Eras.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Eras.hs @@ -5,7 +5,7 @@ -- License: Apache-2.0 -- -module Cardano.Wallet.Read.Tx.Eras +module Cardano.Read.Ledger.Tx.Eras ( onTx ) where diff --git a/lib/read/lib/Cardano/Read/Ledger/Tx/Inputs.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Inputs.hs index 49e1f9fd331..2e14cd0f6ed 100644 --- a/lib/read/lib/Cardano/Read/Ledger/Tx/Inputs.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Inputs.hs @@ -28,6 +28,9 @@ import Cardano.Ledger.Core import Cardano.Ledger.Crypto ( StandardCrypto ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -42,9 +45,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( (^.) ) diff --git a/lib/read/lib/Cardano/Read/Ledger/Tx/Outputs.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Outputs.hs index 03cddee2e53..8aead2440e5 100644 --- a/lib/read/lib/Cardano/Read/Ledger/Tx/Outputs.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Outputs.hs @@ -34,6 +34,9 @@ import Cardano.Ledger.Core import Cardano.Ledger.Shelley.TxOut ( ShelleyTxOut ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -48,9 +51,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( view ) diff --git a/lib/read/lib/Cardano/Read/Ledger/Tx/TxId.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/TxId.hs index e2a0bdbd211..a3be3b5d55a 100644 --- a/lib/read/lib/Cardano/Read/Ledger/Tx/TxId.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/TxId.hs @@ -27,6 +27,9 @@ import Cardano.Ledger.Core import Cardano.Ledger.Crypto ( StandardCrypto ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read ( Tx ) @@ -41,9 +44,6 @@ import Cardano.Wallet.Read.Eras , Mary , Shelley ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( (^.) ) diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/ExtraSigs.hs b/lib/read/lib/Cardano/Wallet/Read/Tx/ExtraSigs.hs index 88162e33fe7..9a0657cb6bd 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/ExtraSigs.hs +++ b/lib/read/lib/Cardano/Wallet/Read/Tx/ExtraSigs.hs @@ -31,6 +31,9 @@ import Cardano.Ledger.Keys ( KeyHash , KeyRole (..) ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -45,9 +48,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( (^.) ) diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Fee.hs b/lib/read/lib/Cardano/Wallet/Read/Tx/Fee.hs index fa4f7d733c8..d369c8bb94f 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Fee.hs +++ b/lib/read/lib/Cardano/Wallet/Read/Tx/Fee.hs @@ -30,6 +30,9 @@ import Cardano.Ledger.Core ( bodyTxL , feeTxBodyL ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -44,9 +47,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( (^.) ) diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Hash.hs b/lib/read/lib/Cardano/Wallet/Read/Tx/Hash.hs index dc94a57ad36..7a28fa38405 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Hash.hs +++ b/lib/read/lib/Cardano/Wallet/Read/Tx/Hash.hs @@ -36,6 +36,9 @@ import Cardano.Ledger.Core import Cardano.Ledger.TxIn ( TxId (..) ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read ( Tx ) @@ -43,9 +46,6 @@ import Cardano.Wallet.Read.Eras ( Era (..) , IsEra (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( (^.) ) diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Integrity.hs b/lib/read/lib/Cardano/Wallet/Read/Tx/Integrity.hs index 63328a98c4b..88b135569b4 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Integrity.hs +++ b/lib/read/lib/Cardano/Wallet/Read/Tx/Integrity.hs @@ -35,6 +35,9 @@ import Cardano.Ledger.Core import Cardano.Ledger.Crypto ( StandardCrypto ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -49,9 +52,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( (^.) ) diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Metadata.hs b/lib/read/lib/Cardano/Wallet/Read/Tx/Metadata.hs index e569c0e4cb1..7c7e15182f6 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Metadata.hs +++ b/lib/read/lib/Cardano/Wallet/Read/Tx/Metadata.hs @@ -34,6 +34,9 @@ import Cardano.Ledger.Core import Cardano.Ledger.Shelley.TxAuxData ( ShelleyTxAuxData ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -48,9 +51,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( view ) diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Mint.hs b/lib/read/lib/Cardano/Wallet/Read/Tx/Mint.hs index c249947dc27..8408b21c9f7 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Mint.hs +++ b/lib/read/lib/Cardano/Wallet/Read/Tx/Mint.hs @@ -35,6 +35,9 @@ import Cardano.Ledger.Mary.Core import Cardano.Ledger.Mary.Value ( MultiAsset ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -49,9 +52,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( view ) diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/ReferenceInputs.hs b/lib/read/lib/Cardano/Wallet/Read/Tx/ReferenceInputs.hs index e6ff4ffb8af..8c1d7f62205 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/ReferenceInputs.hs +++ b/lib/read/lib/Cardano/Wallet/Read/Tx/ReferenceInputs.hs @@ -32,6 +32,9 @@ import Cardano.Ledger.Core import Cardano.Ledger.Crypto ( StandardCrypto ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -46,9 +49,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( (^.) ) diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/ScriptValidity.hs b/lib/read/lib/Cardano/Wallet/Read/Tx/ScriptValidity.hs index bd594c3ed7d..e9e826cb7f5 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/ScriptValidity.hs +++ b/lib/read/lib/Cardano/Wallet/Read/Tx/ScriptValidity.hs @@ -26,6 +26,9 @@ import Cardano.Ledger.Alonzo.Tx ( IsValid , isValidTxL ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -40,9 +43,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( (^.) ) diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Validity.hs b/lib/read/lib/Cardano/Wallet/Read/Tx/Validity.hs index f62e7d6cb11..902fe681885 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Validity.hs +++ b/lib/read/lib/Cardano/Wallet/Read/Tx/Validity.hs @@ -38,6 +38,9 @@ import Cardano.Ledger.Shelley.TxBody import Cardano.Ledger.Slot ( SlotNo ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -52,9 +55,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( (^.) ) diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Withdrawals.hs b/lib/read/lib/Cardano/Wallet/Read/Tx/Withdrawals.hs index 4bb91c230d9..c0a4c2fda97 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Withdrawals.hs +++ b/lib/read/lib/Cardano/Wallet/Read/Tx/Withdrawals.hs @@ -38,6 +38,9 @@ import Cardano.Ledger.Core import Cardano.Ledger.Crypto ( StandardCrypto ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -52,9 +55,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( view ) diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Witnesses.hs b/lib/read/lib/Cardano/Wallet/Read/Tx/Witnesses.hs index 409a6fb78a4..6bb873d5212 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Witnesses.hs +++ b/lib/read/lib/Cardano/Wallet/Read/Tx/Witnesses.hs @@ -31,6 +31,9 @@ import Cardano.Ledger.Core import Cardano.Ledger.Shelley.TxWits ( ShelleyTxWits ) +import Cardano.Read.Ledger.Tx.Eras + ( onTx + ) import Cardano.Wallet.Read.Eras ( Allegra , Alonzo @@ -47,9 +50,6 @@ import Cardano.Wallet.Read.Eras.KnownEras import Cardano.Wallet.Read.Tx ( Tx (..) ) -import Cardano.Wallet.Read.Tx.Eras - ( onTx - ) import Control.Lens ( view ) From 9b6dee9514e296971b616679eaed98481f9a5635 Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Thu, 25 Jul 2024 16:54:47 +0200 Subject: [PATCH 08/18] Move `ExtraSigs` to `Cardano.Read.Ledger.Tx.ExtraSigs` --- .../src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs | 6 +++--- .../Wallet/Primitive/Ledger/Read/Tx/Features/ExtraSigs.hs | 6 +++--- lib/read/cardano-wallet-read.cabal | 2 +- .../Cardano/{Wallet/Read => Read/Ledger}/Tx/ExtraSigs.hs | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/ExtraSigs.hs (97%) diff --git a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs index 950cd231abf..d35856ce666 100644 --- a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs +++ b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs @@ -25,6 +25,9 @@ import Cardano.Read.Ledger.Tx.CBOR import Cardano.Read.Ledger.Tx.Certificates ( getEraCertificates ) +import Cardano.Read.Ledger.Tx.ExtraSigs + ( getEraExtraSigs + ) import Cardano.Wallet.Api.Http.Server.Error ( IsServerError (..) , apiError @@ -52,9 +55,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Eras.EraFun ( applyEraFun ) -import Cardano.Wallet.Read.Tx.ExtraSigs - ( getEraExtraSigs - ) import Cardano.Wallet.Read.Tx.Integrity ( getEraIntegrity ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/ExtraSigs.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/ExtraSigs.hs index cdbdb0b7378..df6b8e8d1c7 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/ExtraSigs.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/ExtraSigs.hs @@ -27,13 +27,13 @@ import Cardano.Ledger.Keys ( KeyHash (..) , KeyRole (..) ) +import Cardano.Read.Ledger.Tx.ExtraSigs + ( ExtraSigs (..) + ) import Cardano.Wallet.Read.Eras ( Era (..) , IsEra (..) ) -import Cardano.Wallet.Read.Tx.ExtraSigs - ( ExtraSigs (..) - ) import Data.ByteString.Short ( fromShort ) diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index e5eff1f758f..5e5acba9ad1 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -53,6 +53,7 @@ library Cardano.Read.Ledger.Tx.CollateralInputs Cardano.Read.Ledger.Tx.CollateralOutputs Cardano.Read.Ledger.Tx.Eras + Cardano.Read.Ledger.Tx.ExtraSigs Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -74,7 +75,6 @@ library Cardano.Wallet.Read.Eras.KnownEras Cardano.Wallet.Read.Hash Cardano.Wallet.Read.Tx - Cardano.Wallet.Read.Tx.ExtraSigs Cardano.Wallet.Read.Tx.Fee Cardano.Wallet.Read.Tx.Gen Cardano.Wallet.Read.Tx.Gen.Address diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/ExtraSigs.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/ExtraSigs.hs similarity index 97% rename from lib/read/lib/Cardano/Wallet/Read/Tx/ExtraSigs.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/ExtraSigs.hs index 9a0657cb6bd..e30eabbb106 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/ExtraSigs.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/ExtraSigs.hs @@ -14,7 +14,7 @@ -- Raw extra signers required data extraction from 'Tx' -- -module Cardano.Wallet.Read.Tx.ExtraSigs where +module Cardano.Read.Ledger.Tx.ExtraSigs where import Prelude From 1789acc43c2427c7a76caa3c3af64a5c6552bc8c Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Thu, 25 Jul 2024 16:57:39 +0200 Subject: [PATCH 09/18] Move `Fee` to `Cardano.Read.Ledger.Tx.Fee` --- .../lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs | 6 +++--- .../Wallet/Primitive/Ledger/Read/Tx/Features/Fee.hs | 8 ++++---- lib/read/cardano-wallet-read.cabal | 2 +- .../lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Fee.hs | 2 +- .../Wallet/DB/Store/Transactions/TransactionInfo.hs | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Fee.hs (97%) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs index 417ff6bb447..65bef188f66 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs @@ -22,6 +22,9 @@ import Cardano.Read.Ledger.Tx.CollateralInputs import Cardano.Read.Ledger.Tx.CollateralOutputs ( getEraCollateralOutputs ) +import Cardano.Read.Ledger.Tx.Fee + ( getEraFee + ) import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) @@ -59,9 +62,6 @@ import Cardano.Wallet.Read import Cardano.Wallet.Read.Eras ( eraValue ) -import Cardano.Wallet.Read.Tx.Fee - ( getEraFee - ) import Cardano.Wallet.Read.Tx.Hash ( getEraTxHash ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Fee.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Fee.hs index 30ee19ce13b..46f8a1602a9 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Fee.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Fee.hs @@ -12,6 +12,10 @@ import Prelude import Cardano.Ledger.Coin ( Coin ) +import Cardano.Read.Ledger.Tx.Fee + ( Fee (..) + , FeeType + ) import Cardano.Wallet.Read ( Era (..) , theEra @@ -19,10 +23,6 @@ import Cardano.Wallet.Read import Cardano.Wallet.Read.Eras ( IsEra ) -import Cardano.Wallet.Read.Tx.Fee - ( Fee (..) - , FeeType - ) import qualified Cardano.Wallet.Primitive.Ledger.Convert as Ledger import qualified Cardano.Wallet.Primitive.Types.Coin as W diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index 5e5acba9ad1..fee1d5d6c83 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -54,6 +54,7 @@ library Cardano.Read.Ledger.Tx.CollateralOutputs Cardano.Read.Ledger.Tx.Eras Cardano.Read.Ledger.Tx.ExtraSigs + Cardano.Read.Ledger.Tx.Fee Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -75,7 +76,6 @@ library Cardano.Wallet.Read.Eras.KnownEras Cardano.Wallet.Read.Hash Cardano.Wallet.Read.Tx - Cardano.Wallet.Read.Tx.Fee Cardano.Wallet.Read.Tx.Gen Cardano.Wallet.Read.Tx.Gen.Address Cardano.Wallet.Read.Tx.Gen.Allegra diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Fee.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Fee.hs similarity index 97% rename from lib/read/lib/Cardano/Wallet/Read/Tx/Fee.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/Fee.hs index d369c8bb94f..967915cedeb 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Fee.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Fee.hs @@ -14,7 +14,7 @@ -- Raw fee data extraction from 'Tx' -- -module Cardano.Wallet.Read.Tx.Fee +module Cardano.Read.Ledger.Tx.Fee ( FeeType , Fee (..) , getEraFee diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs index 618ee0daeaf..a67b9397732 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs @@ -24,6 +24,9 @@ import Cardano.Read.Ledger.Tx.CollateralInputs import Cardano.Read.Ledger.Tx.CollateralOutputs ( getEraCollateralOutputs ) +import Cardano.Read.Ledger.Tx.Fee + ( getEraFee + ) import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) @@ -101,9 +104,6 @@ import Cardano.Wallet.Read.Eras , IsEra , applyEraFun ) -import Cardano.Wallet.Read.Tx.Fee - ( getEraFee - ) import Cardano.Wallet.Read.Tx.Hash ( getEraTxHash ) From 174973efd4ca9745afdb5457ce3d09262853a2fe Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Thu, 25 Jul 2024 16:59:11 +0200 Subject: [PATCH 10/18] Move `Hash` to `Cardano.Read.Ledger.Tx.Hash` --- .../lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs | 6 +++--- .../Wallet/Primitive/Ledger/Read/Tx/Features/Inputs.hs | 6 +++--- .../Primitive/Ledger/Read/Tx/Features/WitnessCount.hs | 6 +++--- .../lib/Cardano/Wallet/Primitive/Ledger/Shelley.hs | 6 +++--- lib/read/cardano-wallet-read.cabal | 2 +- .../lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Hash.hs | 2 +- .../Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs | 6 +++--- 7 files changed, 17 insertions(+), 17 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Hash.hs (98%) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs index 65bef188f66..88c2dc9318d 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs @@ -25,6 +25,9 @@ import Cardano.Read.Ledger.Tx.CollateralOutputs import Cardano.Read.Ledger.Tx.Fee ( getEraFee ) +import Cardano.Read.Ledger.Tx.Hash + ( getEraTxHash + ) import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) @@ -62,9 +65,6 @@ import Cardano.Wallet.Read import Cardano.Wallet.Read.Eras ( eraValue ) -import Cardano.Wallet.Read.Tx.Hash - ( getEraTxHash - ) import Cardano.Wallet.Read.Tx.Metadata ( getEraMetadata ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Inputs.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Inputs.hs index d6f8ed7c71b..cf41af70d55 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Inputs.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Inputs.hs @@ -13,6 +13,9 @@ module Cardano.Wallet.Primitive.Ledger.Read.Tx.Features.Inputs import Prelude +import Cardano.Read.Ledger.Tx.Hash + ( fromShelleyTxId + ) import Cardano.Read.Ledger.Tx.Inputs ( Inputs (..) , InputsType @@ -24,9 +27,6 @@ import Cardano.Wallet.Read.Eras ( Era (..) , IsEra (..) ) -import Cardano.Wallet.Read.Tx.Hash - ( fromShelleyTxId - ) import Data.Foldable ( toList ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/WitnessCount.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/WitnessCount.hs index 58c573a64a9..a6cbf0d8e41 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/WitnessCount.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/WitnessCount.hs @@ -57,6 +57,9 @@ import Cardano.Ledger.Babbage ( AlonzoScript , BabbageTxOut ) +import Cardano.Read.Ledger.Tx.Hash + ( getEraTxHash + ) import Cardano.Wallet.Primitive.Ledger.Convert ( toWalletScript , toWalletScriptFromShelley @@ -74,9 +77,6 @@ import Cardano.Wallet.Primitive.Types.WitnessCount , emptyWitnessCount , toKeyRole ) -import Cardano.Wallet.Read.Tx.Hash - ( getEraTxHash - ) import Control.Lens ( folded , (<&>) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Shelley.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Shelley.hs index 16090d58148..e96f5b2ebfe 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Shelley.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Shelley.hs @@ -153,6 +153,9 @@ import Cardano.Ledger.PoolParams import Cardano.Ledger.Shelley.Genesis ( fromNominalDiffTimeMicro ) +import Cardano.Read.Ledger.Tx.Hash + ( fromShelleyTxId + ) import Cardano.Slotting.Slot ( EpochNo (..) , EpochSize (..) @@ -183,9 +186,6 @@ import Cardano.Wallet.Primitive.Types.StakePoolMetadata ( StakePoolMetadataHash (..) , StakePoolMetadataUrl (..) ) -import Cardano.Wallet.Read.Tx.Hash - ( fromShelleyTxId - ) import Cardano.Wallet.Unsafe ( unsafeIntToWord , unsafeMkPercentage diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index fee1d5d6c83..a09e887136b 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -55,6 +55,7 @@ library Cardano.Read.Ledger.Tx.Eras Cardano.Read.Ledger.Tx.ExtraSigs Cardano.Read.Ledger.Tx.Fee + Cardano.Read.Ledger.Tx.Hash Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -86,7 +87,6 @@ library Cardano.Wallet.Read.Tx.Gen.Mary Cardano.Wallet.Read.Tx.Gen.Shelley Cardano.Wallet.Read.Tx.Gen.TxParameters - Cardano.Wallet.Read.Tx.Hash Cardano.Wallet.Read.Tx.Inputs Cardano.Wallet.Read.Tx.Integrity Cardano.Wallet.Read.Tx.Metadata diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Hash.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Hash.hs similarity index 98% rename from lib/read/lib/Cardano/Wallet/Read/Tx/Hash.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/Hash.hs index 7a28fa38405..207833ab459 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Hash.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Hash.hs @@ -12,7 +12,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} -module Cardano.Wallet.Read.Tx.Hash +module Cardano.Read.Ledger.Tx.Hash ( byronTxHash , shelleyTxHash , fromShelleyTxId diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs index a67b9397732..bcf02357e21 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs @@ -27,6 +27,9 @@ import Cardano.Read.Ledger.Tx.CollateralOutputs import Cardano.Read.Ledger.Tx.Fee ( getEraFee ) +import Cardano.Read.Ledger.Tx.Hash + ( getEraTxHash + ) import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) @@ -104,9 +107,6 @@ import Cardano.Wallet.Read.Eras , IsEra , applyEraFun ) -import Cardano.Wallet.Read.Tx.Hash - ( getEraTxHash - ) import Cardano.Wallet.Read.Tx.Metadata ( getEraMetadata ) From 7a80beeec025dae87046659ee7d66c3327200248 Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Fri, 26 Jul 2024 14:03:12 +0200 Subject: [PATCH 11/18] Move `Integrity` to `Cardano.Read.Ledger.Tx.Integrity` --- .../src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs | 6 +++--- .../Wallet/Primitive/Ledger/Read/Tx/Features/Integrity.hs | 8 ++++---- lib/read/cardano-wallet-read.cabal | 2 +- .../Cardano/{Wallet/Read => Read/Ledger}/Tx/Integrity.hs | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Integrity.hs (98%) diff --git a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs index d35856ce666..455fcb9eda1 100644 --- a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs +++ b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs @@ -28,6 +28,9 @@ import Cardano.Read.Ledger.Tx.Certificates import Cardano.Read.Ledger.Tx.ExtraSigs ( getEraExtraSigs ) +import Cardano.Read.Ledger.Tx.Integrity + ( getEraIntegrity + ) import Cardano.Wallet.Api.Http.Server.Error ( IsServerError (..) , apiError @@ -55,9 +58,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Eras.EraFun ( applyEraFun ) -import Cardano.Wallet.Read.Tx.Integrity - ( getEraIntegrity - ) import Cardano.Wallet.Read.Tx.Mint ( getEraMint ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Integrity.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Integrity.hs index d3f030ed844..153094bacf5 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Integrity.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Integrity.hs @@ -29,6 +29,10 @@ import Cardano.Ledger.Crypto import Cardano.Ledger.SafeHash ( SafeToHash (originalBytes) ) +import Cardano.Read.Ledger.Tx.Integrity + ( Integrity (..) + , getEraIntegrity + ) import Cardano.Wallet.Read.Eras ( Era (..) , EraValue @@ -38,10 +42,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Tx ( Tx ) -import Cardano.Wallet.Read.Tx.Integrity - ( Integrity (..) - , getEraIntegrity - ) import Control.Category ( (.) ) diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index a09e887136b..b64587394c4 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -56,6 +56,7 @@ library Cardano.Read.Ledger.Tx.ExtraSigs Cardano.Read.Ledger.Tx.Fee Cardano.Read.Ledger.Tx.Hash + Cardano.Read.Ledger.Tx.Integrity Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -88,7 +89,6 @@ library Cardano.Wallet.Read.Tx.Gen.Shelley Cardano.Wallet.Read.Tx.Gen.TxParameters Cardano.Wallet.Read.Tx.Inputs - Cardano.Wallet.Read.Tx.Integrity Cardano.Wallet.Read.Tx.Metadata Cardano.Wallet.Read.Tx.Mint Cardano.Wallet.Read.Tx.ReferenceInputs diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Integrity.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Integrity.hs similarity index 98% rename from lib/read/lib/Cardano/Wallet/Read/Tx/Integrity.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/Integrity.hs index 88b135569b4..e565fde56c5 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Integrity.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Integrity.hs @@ -14,7 +14,7 @@ -- Raw script integrity data extraction from 'Tx' -- -module Cardano.Wallet.Read.Tx.Integrity +module Cardano.Read.Ledger.Tx.Integrity ( IntegrityType , Integrity (..) , getEraIntegrity From d0af0a59483cec4b4428f83e0b88c5b69ca8811b Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Fri, 26 Jul 2024 14:04:05 +0200 Subject: [PATCH 12/18] Move `Metadata` to `Cardano.Read.Ledger.Tx.Metadata` --- .../lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs | 6 +++--- .../Wallet/Primitive/Ledger/Read/Tx/Features/Metadata.hs | 6 +++--- lib/read/cardano-wallet-read.cabal | 2 +- .../lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Metadata.hs | 2 +- .../Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Metadata.hs (98%) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs index 88c2dc9318d..22aa51802be 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs @@ -31,6 +31,9 @@ import Cardano.Read.Ledger.Tx.Hash import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) +import Cardano.Read.Ledger.Tx.Metadata + ( getEraMetadata + ) import Cardano.Read.Ledger.Tx.Outputs ( getEraOutputs ) @@ -65,9 +68,6 @@ import Cardano.Wallet.Read import Cardano.Wallet.Read.Eras ( eraValue ) -import Cardano.Wallet.Read.Tx.Metadata - ( getEraMetadata - ) import Cardano.Wallet.Read.Tx.ScriptValidity ( getEraScriptValidity ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Metadata.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Metadata.hs index 1fbd3b4f188..13d89999a5a 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Metadata.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Metadata.hs @@ -36,13 +36,13 @@ import Cardano.Ledger.Shelley.TxAuxData ( Metadatum , ShelleyTxAuxData (..) ) +import Cardano.Read.Ledger.Tx.Metadata + ( Metadata (..) + ) import Cardano.Wallet.Read.Eras ( Era (..) , IsEra (..) ) -import Cardano.Wallet.Read.Tx.Metadata - ( Metadata (..) - ) import Data.Map ( Map ) diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index b64587394c4..4ca12034a45 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -57,6 +57,7 @@ library Cardano.Read.Ledger.Tx.Fee Cardano.Read.Ledger.Tx.Hash Cardano.Read.Ledger.Tx.Integrity + Cardano.Read.Ledger.Tx.Metadata Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -89,7 +90,6 @@ library Cardano.Wallet.Read.Tx.Gen.Shelley Cardano.Wallet.Read.Tx.Gen.TxParameters Cardano.Wallet.Read.Tx.Inputs - Cardano.Wallet.Read.Tx.Metadata Cardano.Wallet.Read.Tx.Mint Cardano.Wallet.Read.Tx.ReferenceInputs Cardano.Wallet.Read.Tx.ScriptValidity diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Metadata.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Metadata.hs similarity index 98% rename from lib/read/lib/Cardano/Wallet/Read/Tx/Metadata.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/Metadata.hs index 7c7e15182f6..c016e1077f8 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Metadata.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Metadata.hs @@ -14,7 +14,7 @@ -- Raw mint data extraction from 'Tx' -- -module Cardano.Wallet.Read.Tx.Metadata +module Cardano.Read.Ledger.Tx.Metadata ( MetadataType , Metadata (..) , getEraMetadata diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs index bcf02357e21..c99c9b9240d 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs @@ -33,6 +33,9 @@ import Cardano.Read.Ledger.Tx.Hash import Cardano.Read.Ledger.Tx.Inputs ( getEraInputs ) +import Cardano.Read.Ledger.Tx.Metadata + ( getEraMetadata + ) import Cardano.Read.Ledger.Tx.Outputs ( getEraOutputs ) @@ -107,9 +110,6 @@ import Cardano.Wallet.Read.Eras , IsEra , applyEraFun ) -import Cardano.Wallet.Read.Tx.Metadata - ( getEraMetadata - ) import Cardano.Wallet.Read.Tx.ScriptValidity ( getEraScriptValidity ) From 2d56b0d3fd3a168026b46f6ca78137ca51a2a5bd Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Fri, 26 Jul 2024 14:04:51 +0200 Subject: [PATCH 13/18] Move `Mint` to `Cardano.Read.Ledger.Tx.Mint` --- .../src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs | 6 +++--- .../Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs | 6 +++--- .../Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs | 6 +++--- lib/read/cardano-wallet-read.cabal | 2 +- .../lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Mint.hs | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Mint.hs (98%) diff --git a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs index 455fcb9eda1..6d3864c3fa6 100644 --- a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs +++ b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs @@ -31,6 +31,9 @@ import Cardano.Read.Ledger.Tx.ExtraSigs import Cardano.Read.Ledger.Tx.Integrity ( getEraIntegrity ) +import Cardano.Read.Ledger.Tx.Mint + ( getEraMint + ) import Cardano.Wallet.Api.Http.Server.Error ( IsServerError (..) , apiError @@ -58,9 +61,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Eras.EraFun ( applyEraFun ) -import Cardano.Wallet.Read.Tx.Mint - ( getEraMint - ) import Cardano.Wallet.Read.Tx.ReferenceInputs ( getEraReferenceInputs ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs index 117f6fedc36..7c8d22014da 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs @@ -42,6 +42,9 @@ import Cardano.Ledger.Shelley.TxWits ( ShelleyTxWits , scriptWits ) +import Cardano.Read.Ledger.Tx.Mint + ( Mint (..) + ) import Cardano.Wallet.Primitive.Ledger.Convert ( toPlutusScriptInfo , toWalletAssetName @@ -76,9 +79,6 @@ import Cardano.Wallet.Read.Eras , IsEra (..) , (:*:) (..) ) -import Cardano.Wallet.Read.Tx.Mint - ( Mint (..) - ) import Cardano.Wallet.Read.Tx.ReferenceInputs ( ReferenceInputs (..) ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs index 7f65e481ba0..c0a8d1cbf82 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs @@ -18,6 +18,9 @@ import Prelude import Cardano.Read.Ledger.Tx.Certificates ( getEraCertificates ) +import Cardano.Read.Ledger.Tx.Mint + ( getEraMint + ) import Cardano.Wallet.Primitive.Ledger.Read.Tx ( primitiveTx ) @@ -47,9 +50,6 @@ import Cardano.Wallet.Read , Tx (Tx) , (:*:) ((:*:)) ) -import Cardano.Wallet.Read.Tx.Mint - ( getEraMint - ) import Cardano.Wallet.Read.Tx.ReferenceInputs ( getEraReferenceInputs ) diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index 4ca12034a45..f59a1b185c1 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -58,6 +58,7 @@ library Cardano.Read.Ledger.Tx.Hash Cardano.Read.Ledger.Tx.Integrity Cardano.Read.Ledger.Tx.Metadata + Cardano.Read.Ledger.Tx.Mint Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -90,7 +91,6 @@ library Cardano.Wallet.Read.Tx.Gen.Shelley Cardano.Wallet.Read.Tx.Gen.TxParameters Cardano.Wallet.Read.Tx.Inputs - Cardano.Wallet.Read.Tx.Mint Cardano.Wallet.Read.Tx.ReferenceInputs Cardano.Wallet.Read.Tx.ScriptValidity Cardano.Wallet.Read.Tx.TxId diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Mint.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Mint.hs similarity index 98% rename from lib/read/lib/Cardano/Wallet/Read/Tx/Mint.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/Mint.hs index 8408b21c9f7..1c55b578e81 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Mint.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Mint.hs @@ -15,7 +15,7 @@ -- Raw mint data extraction from 'Tx' -- -module Cardano.Wallet.Read.Tx.Mint +module Cardano.Read.Ledger.Tx.Mint ( MintType , Mint (..) , getEraMint From b8ea90f51e62fb8d15bd4a297bcf7e48b24edf5d Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Fri, 26 Jul 2024 14:05:51 +0200 Subject: [PATCH 14/18] Move `ReferenceInputs` to `Cardano.Read.Ledger.Tx.ReferenceInputs` --- .../src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs | 6 +++--- .../Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs | 6 +++--- .../Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs | 6 +++--- lib/read/cardano-wallet-read.cabal | 2 +- .../{Wallet/Read => Read/Ledger}/Tx/ReferenceInputs.hs | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/ReferenceInputs.hs (97%) diff --git a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs index 6d3864c3fa6..f1c34f3e040 100644 --- a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs +++ b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs @@ -34,6 +34,9 @@ import Cardano.Read.Ledger.Tx.Integrity import Cardano.Read.Ledger.Tx.Mint ( getEraMint ) +import Cardano.Read.Ledger.Tx.ReferenceInputs + ( getEraReferenceInputs + ) import Cardano.Wallet.Api.Http.Server.Error ( IsServerError (..) , apiError @@ -61,9 +64,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Eras.EraFun ( applyEraFun ) -import Cardano.Wallet.Read.Tx.ReferenceInputs - ( getEraReferenceInputs - ) import Cardano.Wallet.Read.Tx.Validity ( getEraValidity ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs index 7c8d22014da..a797b0f20c3 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs @@ -45,6 +45,9 @@ import Cardano.Ledger.Shelley.TxWits import Cardano.Read.Ledger.Tx.Mint ( Mint (..) ) +import Cardano.Read.Ledger.Tx.ReferenceInputs + ( ReferenceInputs (..) + ) import Cardano.Wallet.Primitive.Ledger.Convert ( toPlutusScriptInfo , toWalletAssetName @@ -79,9 +82,6 @@ import Cardano.Wallet.Read.Eras , IsEra (..) , (:*:) (..) ) -import Cardano.Wallet.Read.Tx.ReferenceInputs - ( ReferenceInputs (..) - ) import Cardano.Wallet.Read.Tx.Witnesses ( Witnesses (..) ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs index c0a8d1cbf82..4b9c0590275 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs @@ -21,6 +21,9 @@ import Cardano.Read.Ledger.Tx.Certificates import Cardano.Read.Ledger.Tx.Mint ( getEraMint ) +import Cardano.Read.Ledger.Tx.ReferenceInputs + ( getEraReferenceInputs + ) import Cardano.Wallet.Primitive.Ledger.Read.Tx ( primitiveTx ) @@ -50,9 +53,6 @@ import Cardano.Wallet.Read , Tx (Tx) , (:*:) ((:*:)) ) -import Cardano.Wallet.Read.Tx.ReferenceInputs - ( getEraReferenceInputs - ) import Cardano.Wallet.Read.Tx.Validity ( getEraValidity ) diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index f59a1b185c1..5453c576531 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -59,6 +59,7 @@ library Cardano.Read.Ledger.Tx.Integrity Cardano.Read.Ledger.Tx.Metadata Cardano.Read.Ledger.Tx.Mint + Cardano.Read.Ledger.Tx.ReferenceInputs Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -91,7 +92,6 @@ library Cardano.Wallet.Read.Tx.Gen.Shelley Cardano.Wallet.Read.Tx.Gen.TxParameters Cardano.Wallet.Read.Tx.Inputs - Cardano.Wallet.Read.Tx.ReferenceInputs Cardano.Wallet.Read.Tx.ScriptValidity Cardano.Wallet.Read.Tx.TxId Cardano.Wallet.Read.Tx.TxIn diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/ReferenceInputs.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/ReferenceInputs.hs similarity index 97% rename from lib/read/lib/Cardano/Wallet/Read/Tx/ReferenceInputs.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/ReferenceInputs.hs index 8c1d7f62205..66a5c4697da 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/ReferenceInputs.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/ReferenceInputs.hs @@ -14,7 +14,7 @@ -- Reference input data extraction from 'Tx' -- -module Cardano.Wallet.Read.Tx.ReferenceInputs +module Cardano.Read.Ledger.Tx.ReferenceInputs ( ReferenceInputsType , ReferenceInputs (..) , getEraReferenceInputs From f68dd31e7e329c84d670cc4a76d1759503de3247 Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Fri, 26 Jul 2024 14:07:04 +0200 Subject: [PATCH 15/18] Move `ScriptValidity` to `Cardano.Read.Ledger.Tx.ScriptValidity` --- .../lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs | 6 +++--- .../Primitive/Ledger/Read/Tx/Features/ScriptValidity.hs | 6 +++--- lib/read/cardano-wallet-read.cabal | 2 +- .../{Wallet/Read => Read/Ledger}/Tx/ScriptValidity.hs | 2 +- .../Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/ScriptValidity.hs (97%) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs index 22aa51802be..5589290058c 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs @@ -37,6 +37,9 @@ import Cardano.Read.Ledger.Tx.Metadata import Cardano.Read.Ledger.Tx.Outputs ( getEraOutputs ) +import Cardano.Read.Ledger.Tx.ScriptValidity + ( getEraScriptValidity + ) import Cardano.Wallet.Primitive.Ledger.Read.Tx.Features.CollateralInputs ( getCollateralInputs ) @@ -68,9 +71,6 @@ import Cardano.Wallet.Read import Cardano.Wallet.Read.Eras ( eraValue ) -import Cardano.Wallet.Read.Tx.ScriptValidity - ( getEraScriptValidity - ) import Cardano.Wallet.Read.Tx.Withdrawals ( getEraWithdrawals ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/ScriptValidity.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/ScriptValidity.hs index 22d45521381..815d691b66f 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/ScriptValidity.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/ScriptValidity.hs @@ -18,13 +18,13 @@ import Prelude import Cardano.Ledger.Alonzo.Tx ( IsValid (..) ) +import Cardano.Read.Ledger.Tx.ScriptValidity + ( ScriptValidity (..) + ) import Cardano.Wallet.Read.Eras ( Era (..) , IsEra (..) ) -import Cardano.Wallet.Read.Tx.ScriptValidity - ( ScriptValidity (..) - ) import qualified Cardano.Wallet.Primitive.Types.Tx.Tx as W diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index 5453c576531..dc374791561 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -60,6 +60,7 @@ library Cardano.Read.Ledger.Tx.Metadata Cardano.Read.Ledger.Tx.Mint Cardano.Read.Ledger.Tx.ReferenceInputs + Cardano.Read.Ledger.Tx.ScriptValidity Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -92,7 +93,6 @@ library Cardano.Wallet.Read.Tx.Gen.Shelley Cardano.Wallet.Read.Tx.Gen.TxParameters Cardano.Wallet.Read.Tx.Inputs - Cardano.Wallet.Read.Tx.ScriptValidity Cardano.Wallet.Read.Tx.TxId Cardano.Wallet.Read.Tx.TxIn Cardano.Wallet.Read.Tx.Validity diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/ScriptValidity.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/ScriptValidity.hs similarity index 97% rename from lib/read/lib/Cardano/Wallet/Read/Tx/ScriptValidity.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/ScriptValidity.hs index e9e826cb7f5..7be24e70fba 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/ScriptValidity.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/ScriptValidity.hs @@ -14,7 +14,7 @@ -- Raw mint data extraction from 'Tx' -- -module Cardano.Wallet.Read.Tx.ScriptValidity +module Cardano.Read.Ledger.Tx.ScriptValidity ( ScriptValidityType , ScriptValidity (..) , getEraScriptValidity diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs index c99c9b9240d..03ec2e66b07 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs @@ -39,6 +39,9 @@ import Cardano.Read.Ledger.Tx.Metadata import Cardano.Read.Ledger.Tx.Outputs ( getEraOutputs ) +import Cardano.Read.Ledger.Tx.ScriptValidity + ( getEraScriptValidity + ) import Cardano.Slotting.Slot ( SlotNo (..) ) @@ -110,9 +113,6 @@ import Cardano.Wallet.Read.Eras , IsEra , applyEraFun ) -import Cardano.Wallet.Read.Tx.ScriptValidity - ( getEraScriptValidity - ) import Cardano.Wallet.Read.Tx.Validity ( getEraValidity ) From 1e99fca3138823a7b21f13d67308d479c7ac1c52 Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Fri, 26 Jul 2024 14:09:06 +0200 Subject: [PATCH 16/18] Move `Validity` to `Cardano.Wallet.Read.Tx.Validity` --- .../src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs | 6 +++--- .../Wallet/Primitive/Ledger/Read/Tx/Features/Validity.hs | 6 +++--- .../Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs | 6 +++--- lib/read/cardano-wallet-read.cabal | 2 +- .../lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Validity.hs | 2 +- .../Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Validity.hs (98%) diff --git a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs index f1c34f3e040..d519aad07a7 100644 --- a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs +++ b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs @@ -37,6 +37,9 @@ import Cardano.Read.Ledger.Tx.Mint import Cardano.Read.Ledger.Tx.ReferenceInputs ( getEraReferenceInputs ) +import Cardano.Read.Ledger.Tx.Validity + ( getEraValidity + ) import Cardano.Wallet.Api.Http.Server.Error ( IsServerError (..) , apiError @@ -64,9 +67,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Eras.EraFun ( applyEraFun ) -import Cardano.Wallet.Read.Tx.Validity - ( getEraValidity - ) import Cardano.Wallet.Read.Tx.Witnesses ( getEraWitnesses ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Validity.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Validity.hs index abc2411c9a1..20d3efc5272 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Validity.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Validity.hs @@ -22,6 +22,9 @@ import Prelude import Cardano.Ledger.Api ( ValidityInterval (..) ) +import Cardano.Read.Ledger.Tx.Validity + ( Validity (..) + ) import Cardano.Wallet.Primitive.Types.ValidityIntervalExplicit ( ValidityIntervalExplicit (ValidityIntervalExplicit) ) @@ -29,9 +32,6 @@ import Cardano.Wallet.Read.Eras ( Era (..) , IsEra (..) ) -import Cardano.Wallet.Read.Tx.Validity - ( Validity (..) - ) import Data.Maybe.Strict ( StrictMaybe (..) ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs index 4b9c0590275..99da563db0e 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs @@ -24,6 +24,9 @@ import Cardano.Read.Ledger.Tx.Mint import Cardano.Read.Ledger.Tx.ReferenceInputs ( getEraReferenceInputs ) +import Cardano.Read.Ledger.Tx.Validity + ( getEraValidity + ) import Cardano.Wallet.Primitive.Ledger.Read.Tx ( primitiveTx ) @@ -53,9 +56,6 @@ import Cardano.Wallet.Read , Tx (Tx) , (:*:) ((:*:)) ) -import Cardano.Wallet.Read.Tx.Validity - ( getEraValidity - ) import Cardano.Wallet.Read.Tx.Witnesses ( getEraWitnesses ) diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index dc374791561..9e1d77cd8c4 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -61,6 +61,7 @@ library Cardano.Read.Ledger.Tx.Mint Cardano.Read.Ledger.Tx.ReferenceInputs Cardano.Read.Ledger.Tx.ScriptValidity + Cardano.Read.Ledger.Tx.Validity Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -95,7 +96,6 @@ library Cardano.Wallet.Read.Tx.Inputs Cardano.Wallet.Read.Tx.TxId Cardano.Wallet.Read.Tx.TxIn - Cardano.Wallet.Read.Tx.Validity Cardano.Wallet.Read.Tx.Withdrawals Cardano.Wallet.Read.Tx.Witnesses diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Validity.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Validity.hs similarity index 98% rename from lib/read/lib/Cardano/Wallet/Read/Tx/Validity.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/Validity.hs index 902fe681885..961f02fbcf4 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Validity.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Validity.hs @@ -14,7 +14,7 @@ -- Raw validity interval data extraction from 'Tx' -- -module Cardano.Wallet.Read.Tx.Validity +module Cardano.Read.Ledger.Tx.Validity ( getEraValidity , ValidityType , Validity (..) diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs index 03ec2e66b07..cbb349abca0 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs @@ -42,6 +42,9 @@ import Cardano.Read.Ledger.Tx.Outputs import Cardano.Read.Ledger.Tx.ScriptValidity ( getEraScriptValidity ) +import Cardano.Read.Ledger.Tx.Validity + ( getEraValidity + ) import Cardano.Slotting.Slot ( SlotNo (..) ) @@ -113,9 +116,6 @@ import Cardano.Wallet.Read.Eras , IsEra , applyEraFun ) -import Cardano.Wallet.Read.Tx.Validity - ( getEraValidity - ) import Cardano.Wallet.Read.Tx.Withdrawals ( getEraWithdrawals ) From c9f297d15792b813915547a6187650aca6a0fb62 Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Fri, 26 Jul 2024 14:10:01 +0200 Subject: [PATCH 17/18] Move `Withdrawals` to `Cardano.Read.Ledger.Tx.Withdrawals` --- .../lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs | 6 +++--- .../Wallet/Primitive/Ledger/Read/Tx/Features/Withdrawals.hs | 6 +++--- lib/read/cardano-wallet-read.cabal | 2 +- .../Cardano/{Wallet/Read => Read/Ledger}/Tx/Withdrawals.hs | 2 +- .../Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Withdrawals.hs (98%) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs index 5589290058c..fa98e2a5ddf 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx.hs @@ -40,6 +40,9 @@ import Cardano.Read.Ledger.Tx.Outputs import Cardano.Read.Ledger.Tx.ScriptValidity ( getEraScriptValidity ) +import Cardano.Read.Ledger.Tx.Withdrawals + ( getEraWithdrawals + ) import Cardano.Wallet.Primitive.Ledger.Read.Tx.Features.CollateralInputs ( getCollateralInputs ) @@ -71,9 +74,6 @@ import Cardano.Wallet.Read import Cardano.Wallet.Read.Eras ( eraValue ) -import Cardano.Wallet.Read.Tx.Withdrawals - ( getEraWithdrawals - ) import Data.Foldable ( fold ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Withdrawals.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Withdrawals.hs index bd5dc0c2e40..e81db2453f5 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Withdrawals.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Withdrawals.hs @@ -17,6 +17,9 @@ module Cardano.Wallet.Primitive.Ledger.Read.Tx.Features.Withdrawals import Prelude +import Cardano.Read.Ledger.Tx.Withdrawals + ( Withdrawals (..) + ) import Cardano.Wallet.Primitive.Types.Coin ( Coin ) @@ -27,9 +30,6 @@ import Cardano.Wallet.Read.Eras ( Era (..) , IsEra (..) ) -import Cardano.Wallet.Read.Tx.Withdrawals - ( Withdrawals (..) - ) import Data.Map.Strict ( Map ) diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index 9e1d77cd8c4..0f8023300e9 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -62,6 +62,7 @@ library Cardano.Read.Ledger.Tx.ReferenceInputs Cardano.Read.Ledger.Tx.ScriptValidity Cardano.Read.Ledger.Tx.Validity + Cardano.Read.Ledger.Tx.Withdrawals Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -96,7 +97,6 @@ library Cardano.Wallet.Read.Tx.Inputs Cardano.Wallet.Read.Tx.TxId Cardano.Wallet.Read.Tx.TxIn - Cardano.Wallet.Read.Tx.Withdrawals Cardano.Wallet.Read.Tx.Witnesses build-depends: diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Withdrawals.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Withdrawals.hs similarity index 98% rename from lib/read/lib/Cardano/Wallet/Read/Tx/Withdrawals.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/Withdrawals.hs index c0a4c2fda97..05d4c4490ff 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Withdrawals.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Withdrawals.hs @@ -14,7 +14,7 @@ -- Raw withdrawals data extraction from 'Tx' -- -module Cardano.Wallet.Read.Tx.Withdrawals +module Cardano.Read.Ledger.Tx.Withdrawals ( WithdrawalsType , Withdrawals (..) , getEraWithdrawals diff --git a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs index cbb349abca0..420d7622bf9 100644 --- a/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs +++ b/lib/wallet/src/Cardano/Wallet/DB/Store/Transactions/TransactionInfo.hs @@ -45,6 +45,9 @@ import Cardano.Read.Ledger.Tx.ScriptValidity import Cardano.Read.Ledger.Tx.Validity ( getEraValidity ) +import Cardano.Read.Ledger.Tx.Withdrawals + ( getEraWithdrawals + ) import Cardano.Slotting.Slot ( SlotNo (..) ) @@ -116,9 +119,6 @@ import Cardano.Wallet.Read.Eras , IsEra , applyEraFun ) -import Cardano.Wallet.Read.Tx.Withdrawals - ( getEraWithdrawals - ) import Cardano.Wallet.Transaction ( ValidityIntervalExplicit (invalidHereafter) ) From 5d240ece733c3c04054de027474fe68a517e03b2 Mon Sep 17 00:00:00 2001 From: Heinrich Apfelmus Date: Fri, 26 Jul 2024 14:11:11 +0200 Subject: [PATCH 18/18] Move `Witness` to `Cardano.Read.Ledger.Tx.Witnesses` --- .../src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs | 6 +++--- .../Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs | 6 +++--- .../Primitive/Ledger/Read/Tx/Features/WitnessCount.hs | 8 ++++---- .../Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs | 6 +++--- lib/read/cardano-wallet-read.cabal | 2 +- .../Cardano/{Wallet/Read => Read/Ledger}/Tx/Witnesses.hs | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) rename lib/read/lib/Cardano/{Wallet/Read => Read/Ledger}/Tx/Witnesses.hs (97%) diff --git a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs index d519aad07a7..f9378893d60 100644 --- a/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs +++ b/lib/api/src/Cardano/Wallet/Api/Http/Server/Handlers/TxCBOR.hs @@ -40,6 +40,9 @@ import Cardano.Read.Ledger.Tx.ReferenceInputs import Cardano.Read.Ledger.Tx.Validity ( getEraValidity ) +import Cardano.Read.Ledger.Tx.Witnesses + ( getEraWitnesses + ) import Cardano.Wallet.Api.Http.Server.Error ( IsServerError (..) , apiError @@ -67,9 +70,6 @@ import Cardano.Wallet.Read.Eras import Cardano.Wallet.Read.Eras.EraFun ( applyEraFun ) -import Cardano.Wallet.Read.Tx.Witnesses - ( getEraWitnesses - ) import Cardano.Wallet.Transaction ( TokenMapWithScripts , ValidityIntervalExplicit diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs index a797b0f20c3..2459ada228b 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/Mint.hs @@ -48,6 +48,9 @@ import Cardano.Read.Ledger.Tx.Mint import Cardano.Read.Ledger.Tx.ReferenceInputs ( ReferenceInputs (..) ) +import Cardano.Read.Ledger.Tx.Witnesses + ( Witnesses (..) + ) import Cardano.Wallet.Primitive.Ledger.Convert ( toPlutusScriptInfo , toWalletAssetName @@ -82,9 +85,6 @@ import Cardano.Wallet.Read.Eras , IsEra (..) , (:*:) (..) ) -import Cardano.Wallet.Read.Tx.Witnesses - ( Witnesses (..) - ) import Data.Foldable ( toList ) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/WitnessCount.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/WitnessCount.hs index a6cbf0d8e41..9d679394dcd 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/WitnessCount.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/Features/WitnessCount.hs @@ -19,6 +19,10 @@ import Cardano.Read.Ledger.Tx.Outputs ( Outputs (..) , getEraOutputs ) +import Cardano.Read.Ledger.Tx.Witnesses + ( Witnesses (..) + , getEraWitnesses + ) import Cardano.Wallet.Primitive.Ledger.Read.Tx.Features.Outputs ( fromBabbageTxOut , fromConwayTxOut @@ -45,10 +49,6 @@ import Cardano.Wallet.Read , Shelley , Tx ) -import Cardano.Wallet.Read.Tx.Witnesses - ( Witnesses (..) - , getEraWitnesses - ) import Cardano.Address.Script ( KeyRole (..) diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs index 99da563db0e..489436b6905 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Ledger/Read/Tx/TxExtended.hs @@ -27,6 +27,9 @@ import Cardano.Read.Ledger.Tx.ReferenceInputs import Cardano.Read.Ledger.Tx.Validity ( getEraValidity ) +import Cardano.Read.Ledger.Tx.Witnesses + ( getEraWitnesses + ) import Cardano.Wallet.Primitive.Ledger.Read.Tx ( primitiveTx ) @@ -56,9 +59,6 @@ import Cardano.Wallet.Read , Tx (Tx) , (:*:) ((:*:)) ) -import Cardano.Wallet.Read.Tx.Witnesses - ( getEraWitnesses - ) import qualified Cardano.Api as Cardano import qualified Cardano.Api.Shelley as Cardano diff --git a/lib/read/cardano-wallet-read.cabal b/lib/read/cardano-wallet-read.cabal index 0f8023300e9..ac9ab15510e 100644 --- a/lib/read/cardano-wallet-read.cabal +++ b/lib/read/cardano-wallet-read.cabal @@ -63,6 +63,7 @@ library Cardano.Read.Ledger.Tx.ScriptValidity Cardano.Read.Ledger.Tx.Validity Cardano.Read.Ledger.Tx.Withdrawals + Cardano.Read.Ledger.Tx.Witnesses Cardano.Wallet.Read Cardano.Wallet.Read.Block Cardano.Wallet.Read.Block.BHeader @@ -97,7 +98,6 @@ library Cardano.Wallet.Read.Tx.Inputs Cardano.Wallet.Read.Tx.TxId Cardano.Wallet.Read.Tx.TxIn - Cardano.Wallet.Read.Tx.Witnesses build-depends: , base diff --git a/lib/read/lib/Cardano/Wallet/Read/Tx/Witnesses.hs b/lib/read/lib/Cardano/Read/Ledger/Tx/Witnesses.hs similarity index 97% rename from lib/read/lib/Cardano/Wallet/Read/Tx/Witnesses.hs rename to lib/read/lib/Cardano/Read/Ledger/Tx/Witnesses.hs index 6bb873d5212..73419e3f3db 100644 --- a/lib/read/lib/Cardano/Wallet/Read/Tx/Witnesses.hs +++ b/lib/read/lib/Cardano/Read/Ledger/Tx/Witnesses.hs @@ -14,7 +14,7 @@ -- Raw witnesses data extraction from 'Tx' -- -module Cardano.Wallet.Read.Tx.Witnesses +module Cardano.Read.Ledger.Tx.Witnesses ( WitnessesType , Witnesses (..) , getEraWitnesses