{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE UndecidableInstances #-}

module Test.Cardano.Protocol.Crypto.KES (
  KESKeyPair (..),
) where

import qualified Cardano.Crypto.KES.Class as KES
import Cardano.Protocol.Crypto

data KESKeyPair c = KESKeyPair
  { forall c. KESKeyPair c -> UnsoundPureSignKeyKES (KES c)
kesSignKey :: !(KES.UnsoundPureSignKeyKES (KES c))
  , forall c. KESKeyPair c -> VerKeyKES (KES c)
kesVerKey :: !(KES.VerKeyKES (KES c))
  }

instance Show (KES.VerKeyKES (KES c)) => Show (KESKeyPair c) where
  show :: KESKeyPair c -> String
show (KESKeyPair UnsoundPureSignKeyKES (KES c)
_ VerKeyKES (KES c)
vk) =
    -- showing `SignKeyKES` is impossible for security reasons.
    String
"KESKeyPair <SignKeyKES> " forall a. Semigroup a => a -> a -> a
<> forall a. Show a => a -> String
show VerKeyKES (KES c)
vk