From 6c4a906519fde7f4657805172edfd6ad0a1c8f0d Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Mon, 17 Jul 2023 08:44:10 +1000 Subject: [PATCH] wip --- cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs | 4 ++-- cardano-api/internal/Cardano/Api/Keys/Class.hs | 2 +- .../test/cardano-api-test/Test/Cardano/Api/Typed/Envelope.hs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs b/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs index 56ee85cd04..7d584d0122 100644 --- a/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs +++ b/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs @@ -746,10 +746,10 @@ genWitnesses era = (genShelleyKeyWitness era) return $ bsWits ++ keyWits -genVerificationKey :: Key keyrole => AsType keyrole -> Gen (VerificationKey keyrole) +genVerificationKey :: (Key keyrole, HasTypeProxy keyrole) => AsType keyrole -> Gen (VerificationKey keyrole) genVerificationKey roletoken = getVerificationKey <$> genSigningKey roletoken -genVerificationKeyHash :: Key keyrole => AsType keyrole -> Gen (Hash keyrole) +genVerificationKeyHash :: (Key keyrole, HasTypeProxy keyrole) => AsType keyrole -> Gen (Hash keyrole) genVerificationKeyHash roletoken = verificationKeyHash <$> genVerificationKey roletoken diff --git a/cardano-api/internal/Cardano/Api/Keys/Class.hs b/cardano-api/internal/Cardano/Api/Keys/Class.hs index fe7f684757..b6c63d5749 100644 --- a/cardano-api/internal/Cardano/Api/Keys/Class.hs +++ b/cardano-api/internal/Cardano/Api/Keys/Class.hs @@ -44,7 +44,7 @@ class (Eq (VerificationKey keyrole), data SigningKey keyrole :: Type -- | Get the corresponding verification key from a signing key. - getVerificationKey :: SigningKey keyrole -> VerificationKey keyrole + getVerificationKey :: HasTypeProxy keyrole => SigningKey keyrole -> VerificationKey keyrole -- | Generate a 'SigningKey' deterministically, given a 'Crypto.Seed'. The -- required size of the seed is given by 'deterministicSigningKeySeedSize'. diff --git a/cardano-api/test/cardano-api-test/Test/Cardano/Api/Typed/Envelope.hs b/cardano-api/test/cardano-api-test/Test/Cardano/Api/Typed/Envelope.hs index 33977d8722..eb190b27d7 100644 --- a/cardano-api/test/cardano-api-test/Test/Cardano/Api/Typed/Envelope.hs +++ b/cardano-api/test/cardano-api-test/Test/Cardano/Api/Typed/Envelope.hs @@ -89,7 +89,7 @@ prop_roundtrip_VrfSigningKey_envelope = -- ----------------------------------------------------------------------------- -roundtrip_VerificationKey_envelope :: Key keyrole +roundtrip_VerificationKey_envelope :: (Key keyrole, HasTypeProxy keyrole) => AsType keyrole -> Property roundtrip_VerificationKey_envelope roletoken = H.property $ do