Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 4 additions & 30 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ repository cardano-haskell-packages
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee

-- repeating the index-state for hackage to work around hackage.nix parsing limitation
index-state: 2025-01-01T23:24:19Z
index-state: 2025-04-02T17:19:52Z

index-state:
, hackage.haskell.org 2025-01-01T23:24:19Z
, cardano-haskell-packages 2025-03-01T00:00:00Z
, hackage.haskell.org 2025-04-02T17:19:52Z
, cardano-haskell-packages 2025-04-02T11:34:47Z

packages:
lib/address-derivation-discovery
Expand Down Expand Up @@ -112,33 +112,6 @@ source-repository-package
-- END OpenAPI
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
-- BEGIN Cardano Addresses Dependency

source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-addresses
tag: 2bca06deaa60e54a5322ac757387d744bf043367
--sha256: 1y1mzfly7jac40b9g4xc078rcm5zqhc3xxv77kwxi10yph1jwq7z
subdir: command-line
core

-- Normally cabal won't apply ghc-options which we specify to build packages
-- to their "regular" dependencies.
-- However, the dependencies declared using the `source-repository-package`
-- pragma are an exception to this rule.
-- This is why we need to manually control options that are applied to the
-- `cardano-addresses` package by declaring them explicitly here.
package cardano-addresses-cli
ghc-options:
-Wwarn=deprecations

package cardano-addresses
ghc-options:
-Wwarn=incomplete-uni-patterns
-- END Cardano Addresses Dependency
--------------------------------------------------------------------------------

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-sl-x509
Expand Down Expand Up @@ -168,6 +141,7 @@ allow-newer:
, servant-openapi3:*
, katip:Win32
, ekg-wai:time

constraints:
base >= 4.18.2.0 && < 5
, openapi3 >= 3.2.0
Expand Down
24 changes: 12 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@

# Adrestia tool belt
inherit (project.hsPkgs.bech32.components.exes) bech32;
inherit (project.hsPkgs.cardano-addresses-cli.components.exes) cardano-address;
inherit (project.hsPkgs.cardano-addresses.components.exes) cardano-address;

# Cardano
cardano-cli = nodeProject.hsPkgs.cardano-cli.components.exes.cardano-cli;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ library
, bech32-th
, binary
, bytestring
, cardano-addresses >=3.12.0 && <3.13
, cardano-addresses >=4.0.0 && <4.1
, cardano-crypto >=1.1.2 && <1.2
, cardano-crypto-class >=2.1.5.0 && <2.2
, cardano-ledger-api >=1.10.0.0 && <1.11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import Prelude

import Cardano.Address.Script
( Cosigner
, KeyHash
, Script (..)
, ScriptTemplate (..)
, toScriptHash
Expand Down Expand Up @@ -81,7 +80,7 @@ import GHC.Stack

import qualified Cardano.Address as CA
import qualified Cardano.Address.Derivation as CA
import qualified Cardano.Address.Script as CA
import qualified Cardano.Address.KeyHash as CA
import qualified Cardano.Address.Style.Shelley as CA
import qualified Data.Map.Strict as Map

Expand Down Expand Up @@ -152,11 +151,11 @@ replaceCosignersWithVerKeys
:: CA.Role
-> ScriptTemplate
-> Index 'Soft 'CredFromScriptK
-> Script KeyHash
-> Script CA.KeyHash
replaceCosignersWithVerKeys role' (ScriptTemplate xpubs scriptTemplate) ix =
replaceCosigner scriptTemplate
where
replaceCosigner :: Script Cosigner -> Script KeyHash
replaceCosigner :: Script Cosigner -> Script CA.KeyHash
replaceCosigner = \case
RequireSignatureOf c -> RequireSignatureOf $ toKeyHash c
RequireAllOf xs -> RequireAllOf (map replaceCosigner xs)
Expand All @@ -169,7 +168,7 @@ replaceCosignersWithVerKeys role' (ScriptTemplate xpubs scriptTemplate) ix =
Index 'Soft 'CredFromScriptK -> CA.Index 'CA.Soft 'CA.PaymentK
convertIndex = fromJust . CA.indexFromWord32 . fromIntegral . fromEnum

toKeyHash :: HasCallStack => Cosigner -> KeyHash
toKeyHash :: HasCallStack => Cosigner -> CA.KeyHash
toKeyHash c =
case Map.lookup c xpubs of
Nothing -> error "Impossible: cosigner without accXPpub."
Expand Down
2 changes: 1 addition & 1 deletion lib/api/cardano-wallet-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ library
, bech32-th
, binary
, bytestring
, cardano-addresses >=3.12.0 && <3.13
, cardano-addresses >=4.0.0 && <4.1
, cardano-api >=10.8.0.0 && <10.9
, cardano-api:internal
, cardano-balance-tx
Expand Down
2 changes: 1 addition & 1 deletion lib/api/src/Cardano/Wallet/Api/Http/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ import Servant.Server
)

import qualified Cardano.Address.Derivation as CA
import qualified Cardano.Address.Script as CA
import qualified Cardano.Address.KeyHash as CA
import qualified Cardano.Address.Style.Shelley as CA
import qualified Cardano.Api as Cardano
import qualified Cardano.Wallet.Address.Derivation.Shared as Shared
Expand Down
9 changes: 4 additions & 5 deletions lib/api/src/Cardano/Wallet/Api/Http/Shelley/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ import Cardano.Address.Derivation
)
import Cardano.Address.Script
( Cosigner (..)
, KeyHash (KeyHash)
, KeyRole (..)
, Script
, ScriptTemplate (..)
, ValidationLevel (..)
Expand Down Expand Up @@ -839,6 +837,7 @@ import UnliftIO.Exception
( tryAnyDeep
)

import qualified Cardano.Address.KeyHash as CA
import qualified Cardano.Address.Script as CA
import qualified Cardano.Address.Style.Shelley as CA
import qualified Cardano.Api as Cardano
Expand Down Expand Up @@ -3456,7 +3455,7 @@ decodeTransaction
$ maybe
AnyWitnessCountCtx
( ShelleyWalletCtx
. KeyHash Policy
. CA.KeyHash CA.Policy
. xpubToBytes
)
policyKeyM
Expand Down Expand Up @@ -3810,8 +3809,8 @@ submitSharedTransaction ctx apiw@(ApiT wid) apitx = do
isTimelock (NativeExplicitScript _ _) = True
isTimelock _ = False

isDelegationKeyHash (KeyHash CA.Delegation _) = True
isDelegationKeyHash (KeyHash _ _) = False
isDelegationKeyHash (CA.KeyHash CA.Delegation _) = True
isDelegationKeyHash (CA.KeyHash _ _) = False

hasDelegationKeyHash s =
isTimelock s && all isDelegationKeyHash (retrieveAllKeyHashes s)
Expand Down
5 changes: 4 additions & 1 deletion lib/api/src/Cardano/Wallet/Api/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,12 @@ import Cardano.Address.Derivation
, xpubFromBytes
, xpubToBytes
)

import Cardano.Address.KeyHash
( KeyHash (..)
)
import Cardano.Address.Script
( Cosigner (..)
, KeyHash (..)
, Script
, ScriptHash (..)
, ScriptTemplate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ mkHttpsManagerSettings TlsConfiguration{tlsCaCert, tlsSvCert, tlsSvKey} = do
sockSettings = Nothing
clientParams caChain credentials =
(defaultParamsClient "127.0.0.1" "")
{ clientUseMaxFragmentLength = Nothing
, clientUseServerNameIndication = True
{ clientUseServerNameIndication = True
, clientWantSessionResume = Nothing
, clientShared = clientShared caChain credentials
, clientHooks = clientHooks credentials
Expand Down
3 changes: 1 addition & 2 deletions lib/application/cardano-wallet-application.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ library
, ansi-terminal
, base
, bytestring
, cardano-addresses >=3.12.0 && <3.13
, cardano-addresses-cli >=3.12.0 && <3.13
, cardano-addresses >=4.0.0 && <4.1
, cardano-wallet
, cardano-wallet-api
, cardano-wallet-application-tls
Expand Down
4 changes: 2 additions & 2 deletions lib/balance-tx/cardano-balance-tx.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ library internal
build-depends:
, base >=4.14 && <5
, bytestring >=0.10.6 && <0.13
, cardano-addresses >=3.12.0 && <3.13
, cardano-addresses >=4.0.0 && <4.1
, cardano-api >=10.8.0.0 && <10.9
, cardano-coin-selection
, cardano-crypto-class >=2.1.5.0 && <2.2
Expand Down Expand Up @@ -115,7 +115,7 @@ test-suite test
, address-derivation-discovery
, base
, bytestring
, cardano-addresses >=3.12.0 && <3.13
, cardano-addresses >=4.0.0 && <4.1
, cardano-api >=10.8.0.0 && <10.9
, cardano-api-extra
, cardano-balance-tx:internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ import Text.Pretty.Simple
( pShow
)

import qualified Cardano.Address.KeyHash as CA
import qualified Cardano.Address.Script as CA
import qualified Cardano.CoinSelection.UTxOIndex as UTxOIndex
import qualified Cardano.CoinSelection.UTxOSelection as UTxOSelection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ import Numeric.Natural
( Natural
)

import qualified Cardano.Address.KeyHash as CA
import qualified Cardano.Address.Script as CA
import qualified Cardano.Api as CardanoApi
import qualified Cardano.Api.Shelley as CardanoApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import Internal.Cardano.Write.Tx
( Address
)

import qualified Cardano.Address.KeyHash as CA
import qualified Cardano.Address.Script as CA

-- | Assumptions about UTxOs that are needed for coin selection.
Expand Down
6 changes: 3 additions & 3 deletions lib/benchmarks/cardano-wallet-benchmarks.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ benchmark restore
, aeson
, base
, bytestring
, cardano-addresses >=3.12.0 && <3.13
, cardano-addresses >=4.0.0 && <4.1
, cardano-balance-tx
, cardano-balance-tx:internal
, cardano-wallet
Expand Down Expand Up @@ -140,7 +140,7 @@ benchmark latency
build-depends:
, aeson
, base
, cardano-addresses >=3.12.0 && <3.13
, cardano-addresses >=4.0.0 && <4.1
, cardano-wallet
, cardano-wallet-api
, cardano-wallet-application
Expand Down Expand Up @@ -186,7 +186,7 @@ benchmark db
, address-derivation-discovery
, base
, bytestring
, cardano-addresses >=3.12.0 && <3.13
, cardano-addresses >=4.0.0 && <4.1
, cardano-api >=10.8.0.0 && <10.9
, cardano-crypto >=1.1.2 && <1.2
, cardano-wallet
Expand Down
3 changes: 2 additions & 1 deletion lib/benchmarks/exe/latency-bench.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE NumericUnderscores #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}

Expand Down Expand Up @@ -224,7 +225,7 @@ import System.Environment.Extended
import System.IO
( stdout
)
import System.IO.Extra
import "extra" System.IO.Extra
( withTempFile
)
import System.IO.Temp.Extra
Expand Down
2 changes: 1 addition & 1 deletion lib/cardano-api-extra/cardano-api-extra.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ library
, iproute
, network
, ordered-containers
, plutus-ledger-api:plutus-ledger-api-testlib
, plutus-ledger-api:plutus-ledger-api-testlib >=1.37.0.0 && <1.38
, QuickCheck
, quickcheck-instances
, random
Expand Down
2 changes: 1 addition & 1 deletion lib/faucet/faucet.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ library
, aeson-pretty
, base
, bytestring
, cardano-addresses >=3.12.0 && <3.13
, cardano-addresses >=4.0.0 && <4.1
, containers
, directory
, extra
Expand Down
6 changes: 3 additions & 3 deletions lib/integration/cardano-wallet-integration.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ library framework
, bech32
, bech32-th
, bytestring
, cardano-addresses >=3.12.0 && <3.13
, cardano-addresses >=4.0.0 && <4.1
, cardano-ledger-shelley >=1.15.0.0 && <1.16
, cardano-wallet
, cardano-wallet-api
Expand Down Expand Up @@ -135,7 +135,7 @@ library scenarios
, base
, bech32-th
, bytestring
, cardano-addresses >=3.12.0 && <3.13
, cardano-addresses >=4.0.0 && <4.1
, cardano-api >=10.8.0.0 && <10.9
, cardano-crypto >=1.1.2 && <1.2
, cardano-crypto-class >=2.1.5.0 && <2.2
Expand Down Expand Up @@ -231,7 +231,7 @@ test-suite e2e
build-depends:
, aeson
, bytestring
, cardano-addresses >=3.12.0 && <3.13
, cardano-addresses >=4.0.0 && <4.1
, cardano-wallet-api
, cardano-wallet-application
, cardano-wallet-application-extras
Expand Down
Loading
Loading