{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
module Cardano.Crypto.VRF.NeverUsed
( NeverVRF
, VerKeyVRF (..)
, SignKeyVRF (..)
, CertVRF (..)
)
where
import GHC.Generics (Generic)
import NoThunks.Class (NoThunks)
import Cardano.Crypto.VRF.Class
data NeverVRF
instance VRFAlgorithm NeverVRF where
data VerKeyVRF NeverVRF = NeverUsedVerKeyVRF
deriving (Int -> VerKeyVRF NeverVRF -> ShowS
[VerKeyVRF NeverVRF] -> ShowS
VerKeyVRF NeverVRF -> String
(Int -> VerKeyVRF NeverVRF -> ShowS)
-> (VerKeyVRF NeverVRF -> String)
-> ([VerKeyVRF NeverVRF] -> ShowS)
-> Show (VerKeyVRF NeverVRF)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VerKeyVRF NeverVRF] -> ShowS
$cshowList :: [VerKeyVRF NeverVRF] -> ShowS
show :: VerKeyVRF NeverVRF -> String
$cshow :: VerKeyVRF NeverVRF -> String
showsPrec :: Int -> VerKeyVRF NeverVRF -> ShowS
$cshowsPrec :: Int -> VerKeyVRF NeverVRF -> ShowS
Show, VerKeyVRF NeverVRF -> VerKeyVRF NeverVRF -> Bool
(VerKeyVRF NeverVRF -> VerKeyVRF NeverVRF -> Bool)
-> (VerKeyVRF NeverVRF -> VerKeyVRF NeverVRF -> Bool)
-> Eq (VerKeyVRF NeverVRF)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VerKeyVRF NeverVRF -> VerKeyVRF NeverVRF -> Bool
$c/= :: VerKeyVRF NeverVRF -> VerKeyVRF NeverVRF -> Bool
== :: VerKeyVRF NeverVRF -> VerKeyVRF NeverVRF -> Bool
$c== :: VerKeyVRF NeverVRF -> VerKeyVRF NeverVRF -> Bool
Eq, (forall x. VerKeyVRF NeverVRF -> Rep (VerKeyVRF NeverVRF) x)
-> (forall x. Rep (VerKeyVRF NeverVRF) x -> VerKeyVRF NeverVRF)
-> Generic (VerKeyVRF NeverVRF)
forall x. Rep (VerKeyVRF NeverVRF) x -> VerKeyVRF NeverVRF
forall x. VerKeyVRF NeverVRF -> Rep (VerKeyVRF NeverVRF) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep (VerKeyVRF NeverVRF) x -> VerKeyVRF NeverVRF
$cfrom :: forall x. VerKeyVRF NeverVRF -> Rep (VerKeyVRF NeverVRF) x
Generic, Context -> VerKeyVRF NeverVRF -> IO (Maybe ThunkInfo)
Proxy (VerKeyVRF NeverVRF) -> String
(Context -> VerKeyVRF NeverVRF -> IO (Maybe ThunkInfo))
-> (Context -> VerKeyVRF NeverVRF -> IO (Maybe ThunkInfo))
-> (Proxy (VerKeyVRF NeverVRF) -> String)
-> NoThunks (VerKeyVRF NeverVRF)
forall a.
(Context -> a -> IO (Maybe ThunkInfo))
-> (Context -> a -> IO (Maybe ThunkInfo))
-> (Proxy a -> String)
-> NoThunks a
showTypeOf :: Proxy (VerKeyVRF NeverVRF) -> String
$cshowTypeOf :: Proxy (VerKeyVRF NeverVRF) -> String
wNoThunks :: Context -> VerKeyVRF NeverVRF -> IO (Maybe ThunkInfo)
$cwNoThunks :: Context -> VerKeyVRF NeverVRF -> IO (Maybe ThunkInfo)
noThunks :: Context -> VerKeyVRF NeverVRF -> IO (Maybe ThunkInfo)
$cnoThunks :: Context -> VerKeyVRF NeverVRF -> IO (Maybe ThunkInfo)
NoThunks)
data SignKeyVRF NeverVRF = NeverUsedSignKeyVRF
deriving (Int -> SignKeyVRF NeverVRF -> ShowS
[SignKeyVRF NeverVRF] -> ShowS
SignKeyVRF NeverVRF -> String
(Int -> SignKeyVRF NeverVRF -> ShowS)
-> (SignKeyVRF NeverVRF -> String)
-> ([SignKeyVRF NeverVRF] -> ShowS)
-> Show (SignKeyVRF NeverVRF)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignKeyVRF NeverVRF] -> ShowS
$cshowList :: [SignKeyVRF NeverVRF] -> ShowS
show :: SignKeyVRF NeverVRF -> String
$cshow :: SignKeyVRF NeverVRF -> String
showsPrec :: Int -> SignKeyVRF NeverVRF -> ShowS
$cshowsPrec :: Int -> SignKeyVRF NeverVRF -> ShowS
Show, SignKeyVRF NeverVRF -> SignKeyVRF NeverVRF -> Bool
(SignKeyVRF NeverVRF -> SignKeyVRF NeverVRF -> Bool)
-> (SignKeyVRF NeverVRF -> SignKeyVRF NeverVRF -> Bool)
-> Eq (SignKeyVRF NeverVRF)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignKeyVRF NeverVRF -> SignKeyVRF NeverVRF -> Bool
$c/= :: SignKeyVRF NeverVRF -> SignKeyVRF NeverVRF -> Bool
== :: SignKeyVRF NeverVRF -> SignKeyVRF NeverVRF -> Bool
$c== :: SignKeyVRF NeverVRF -> SignKeyVRF NeverVRF -> Bool
Eq, (forall x. SignKeyVRF NeverVRF -> Rep (SignKeyVRF NeverVRF) x)
-> (forall x. Rep (SignKeyVRF NeverVRF) x -> SignKeyVRF NeverVRF)
-> Generic (SignKeyVRF NeverVRF)
forall x. Rep (SignKeyVRF NeverVRF) x -> SignKeyVRF NeverVRF
forall x. SignKeyVRF NeverVRF -> Rep (SignKeyVRF NeverVRF) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep (SignKeyVRF NeverVRF) x -> SignKeyVRF NeverVRF
$cfrom :: forall x. SignKeyVRF NeverVRF -> Rep (SignKeyVRF NeverVRF) x
Generic, Context -> SignKeyVRF NeverVRF -> IO (Maybe ThunkInfo)
Proxy (SignKeyVRF NeverVRF) -> String
(Context -> SignKeyVRF NeverVRF -> IO (Maybe ThunkInfo))
-> (Context -> SignKeyVRF NeverVRF -> IO (Maybe ThunkInfo))
-> (Proxy (SignKeyVRF NeverVRF) -> String)
-> NoThunks (SignKeyVRF NeverVRF)
forall a.
(Context -> a -> IO (Maybe ThunkInfo))
-> (Context -> a -> IO (Maybe ThunkInfo))
-> (Proxy a -> String)
-> NoThunks a
showTypeOf :: Proxy (SignKeyVRF NeverVRF) -> String
$cshowTypeOf :: Proxy (SignKeyVRF NeverVRF) -> String
wNoThunks :: Context -> SignKeyVRF NeverVRF -> IO (Maybe ThunkInfo)
$cwNoThunks :: Context -> SignKeyVRF NeverVRF -> IO (Maybe ThunkInfo)
noThunks :: Context -> SignKeyVRF NeverVRF -> IO (Maybe ThunkInfo)
$cnoThunks :: Context -> SignKeyVRF NeverVRF -> IO (Maybe ThunkInfo)
NoThunks)
data CertVRF NeverVRF = NeverUsedCertVRF
deriving (Int -> CertVRF NeverVRF -> ShowS
[CertVRF NeverVRF] -> ShowS
CertVRF NeverVRF -> String
(Int -> CertVRF NeverVRF -> ShowS)
-> (CertVRF NeverVRF -> String)
-> ([CertVRF NeverVRF] -> ShowS)
-> Show (CertVRF NeverVRF)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CertVRF NeverVRF] -> ShowS
$cshowList :: [CertVRF NeverVRF] -> ShowS
show :: CertVRF NeverVRF -> String
$cshow :: CertVRF NeverVRF -> String
showsPrec :: Int -> CertVRF NeverVRF -> ShowS
$cshowsPrec :: Int -> CertVRF NeverVRF -> ShowS
Show, CertVRF NeverVRF -> CertVRF NeverVRF -> Bool
(CertVRF NeverVRF -> CertVRF NeverVRF -> Bool)
-> (CertVRF NeverVRF -> CertVRF NeverVRF -> Bool)
-> Eq (CertVRF NeverVRF)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CertVRF NeverVRF -> CertVRF NeverVRF -> Bool
$c/= :: CertVRF NeverVRF -> CertVRF NeverVRF -> Bool
== :: CertVRF NeverVRF -> CertVRF NeverVRF -> Bool
$c== :: CertVRF NeverVRF -> CertVRF NeverVRF -> Bool
Eq, Eq (CertVRF NeverVRF)
Eq (CertVRF NeverVRF)
-> (CertVRF NeverVRF -> CertVRF NeverVRF -> Ordering)
-> (CertVRF NeverVRF -> CertVRF NeverVRF -> Bool)
-> (CertVRF NeverVRF -> CertVRF NeverVRF -> Bool)
-> (CertVRF NeverVRF -> CertVRF NeverVRF -> Bool)
-> (CertVRF NeverVRF -> CertVRF NeverVRF -> Bool)
-> (CertVRF NeverVRF -> CertVRF NeverVRF -> CertVRF NeverVRF)
-> (CertVRF NeverVRF -> CertVRF NeverVRF -> CertVRF NeverVRF)
-> Ord (CertVRF NeverVRF)
CertVRF NeverVRF -> CertVRF NeverVRF -> Bool
CertVRF NeverVRF -> CertVRF NeverVRF -> Ordering
CertVRF NeverVRF -> CertVRF NeverVRF -> CertVRF NeverVRF
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: CertVRF NeverVRF -> CertVRF NeverVRF -> CertVRF NeverVRF
$cmin :: CertVRF NeverVRF -> CertVRF NeverVRF -> CertVRF NeverVRF
max :: CertVRF NeverVRF -> CertVRF NeverVRF -> CertVRF NeverVRF
$cmax :: CertVRF NeverVRF -> CertVRF NeverVRF -> CertVRF NeverVRF
>= :: CertVRF NeverVRF -> CertVRF NeverVRF -> Bool
$c>= :: CertVRF NeverVRF -> CertVRF NeverVRF -> Bool
> :: CertVRF NeverVRF -> CertVRF NeverVRF -> Bool
$c> :: CertVRF NeverVRF -> CertVRF NeverVRF -> Bool
<= :: CertVRF NeverVRF -> CertVRF NeverVRF -> Bool
$c<= :: CertVRF NeverVRF -> CertVRF NeverVRF -> Bool
< :: CertVRF NeverVRF -> CertVRF NeverVRF -> Bool
$c< :: CertVRF NeverVRF -> CertVRF NeverVRF -> Bool
compare :: CertVRF NeverVRF -> CertVRF NeverVRF -> Ordering
$ccompare :: CertVRF NeverVRF -> CertVRF NeverVRF -> Ordering
$cp1Ord :: Eq (CertVRF NeverVRF)
Ord, (forall x. CertVRF NeverVRF -> Rep (CertVRF NeverVRF) x)
-> (forall x. Rep (CertVRF NeverVRF) x -> CertVRF NeverVRF)
-> Generic (CertVRF NeverVRF)
forall x. Rep (CertVRF NeverVRF) x -> CertVRF NeverVRF
forall x. CertVRF NeverVRF -> Rep (CertVRF NeverVRF) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep (CertVRF NeverVRF) x -> CertVRF NeverVRF
$cfrom :: forall x. CertVRF NeverVRF -> Rep (CertVRF NeverVRF) x
Generic, Context -> CertVRF NeverVRF -> IO (Maybe ThunkInfo)
Proxy (CertVRF NeverVRF) -> String
(Context -> CertVRF NeverVRF -> IO (Maybe ThunkInfo))
-> (Context -> CertVRF NeverVRF -> IO (Maybe ThunkInfo))
-> (Proxy (CertVRF NeverVRF) -> String)
-> NoThunks (CertVRF NeverVRF)
forall a.
(Context -> a -> IO (Maybe ThunkInfo))
-> (Context -> a -> IO (Maybe ThunkInfo))
-> (Proxy a -> String)
-> NoThunks a
showTypeOf :: Proxy (CertVRF NeverVRF) -> String
$cshowTypeOf :: Proxy (CertVRF NeverVRF) -> String
wNoThunks :: Context -> CertVRF NeverVRF -> IO (Maybe ThunkInfo)
$cwNoThunks :: Context -> CertVRF NeverVRF -> IO (Maybe ThunkInfo)
noThunks :: Context -> CertVRF NeverVRF -> IO (Maybe ThunkInfo)
$cnoThunks :: Context -> CertVRF NeverVRF -> IO (Maybe ThunkInfo)
NoThunks)
algorithmNameVRF :: proxy NeverVRF -> String
algorithmNameVRF proxy NeverVRF
_ = String
"never"
deriveVerKeyVRF :: SignKeyVRF NeverVRF -> VerKeyVRF NeverVRF
deriveVerKeyVRF SignKeyVRF NeverVRF
_ = VerKeyVRF NeverVRF
NeverUsedVerKeyVRF
evalVRF :: ContextVRF NeverVRF
-> a
-> SignKeyVRF NeverVRF
-> (OutputVRF NeverVRF, CertVRF NeverVRF)
evalVRF = String
-> ()
-> a
-> SignKeyVRF NeverVRF
-> (OutputVRF NeverVRF, CertVRF NeverVRF)
forall a. HasCallStack => String -> a
error String
"VRF unavailable"
verifyVRF :: ContextVRF NeverVRF
-> VerKeyVRF NeverVRF
-> a
-> (OutputVRF NeverVRF, CertVRF NeverVRF)
-> Bool
verifyVRF = String
-> ()
-> VerKeyVRF NeverVRF
-> a
-> (OutputVRF NeverVRF, CertVRF NeverVRF)
-> Bool
forall a. HasCallStack => String -> a
error String
"VRF unavailable"
sizeOutputVRF :: proxy NeverVRF -> Word
sizeOutputVRF proxy NeverVRF
_ = Word
0
genKeyVRF :: Seed -> SignKeyVRF NeverVRF
genKeyVRF Seed
_ = SignKeyVRF NeverVRF
NeverUsedSignKeyVRF
seedSizeVRF :: proxy NeverVRF -> Word
seedSizeVRF proxy NeverVRF
_ = Word
0
sizeVerKeyVRF :: proxy NeverVRF -> Word
sizeVerKeyVRF proxy NeverVRF
_ = Word
0
sizeSignKeyVRF :: proxy NeverVRF -> Word
sizeSignKeyVRF proxy NeverVRF
_ = Word
0
sizeCertVRF :: proxy NeverVRF -> Word
sizeCertVRF proxy NeverVRF
_ = Word
0
rawSerialiseVerKeyVRF :: VerKeyVRF NeverVRF -> ByteString
rawSerialiseVerKeyVRF VerKeyVRF NeverVRF
_ = ByteString
forall a. Monoid a => a
mempty
rawSerialiseSignKeyVRF :: SignKeyVRF NeverVRF -> ByteString
rawSerialiseSignKeyVRF SignKeyVRF NeverVRF
_ = ByteString
forall a. Monoid a => a
mempty
rawSerialiseCertVRF :: CertVRF NeverVRF -> ByteString
rawSerialiseCertVRF CertVRF NeverVRF
_ = ByteString
forall a. Monoid a => a
mempty
rawDeserialiseVerKeyVRF :: ByteString -> Maybe (VerKeyVRF NeverVRF)
rawDeserialiseVerKeyVRF ByteString
_ = VerKeyVRF NeverVRF -> Maybe (VerKeyVRF NeverVRF)
forall a. a -> Maybe a
Just VerKeyVRF NeverVRF
NeverUsedVerKeyVRF
rawDeserialiseSignKeyVRF :: ByteString -> Maybe (SignKeyVRF NeverVRF)
rawDeserialiseSignKeyVRF ByteString
_ = SignKeyVRF NeverVRF -> Maybe (SignKeyVRF NeverVRF)
forall a. a -> Maybe a
Just SignKeyVRF NeverVRF
NeverUsedSignKeyVRF
rawDeserialiseCertVRF :: ByteString -> Maybe (CertVRF NeverVRF)
rawDeserialiseCertVRF ByteString
_ = CertVRF NeverVRF -> Maybe (CertVRF NeverVRF)
forall a. a -> Maybe a
Just CertVRF NeverVRF
NeverUsedCertVRF