{-# 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
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
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. 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
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
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
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. 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
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
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
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)
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
Ord, 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
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 :: forall (proxy :: * -> *). proxy NeverVRF -> String
algorithmNameVRF proxy NeverVRF
_ = String
"never"
deriveVerKeyVRF :: SignKeyVRF NeverVRF -> VerKeyVRF NeverVRF
deriveVerKeyVRF SignKeyVRF NeverVRF
_ = VerKeyVRF NeverVRF
NeverUsedVerKeyVRF
evalVRF :: forall a.
(HasCallStack, Signable NeverVRF a) =>
ContextVRF NeverVRF
-> a
-> SignKeyVRF NeverVRF
-> (OutputVRF NeverVRF, CertVRF NeverVRF)
evalVRF = forall a. HasCallStack => String -> a
error String
"VRF unavailable"
verifyVRF :: forall a.
(HasCallStack, Signable NeverVRF a) =>
ContextVRF NeverVRF
-> VerKeyVRF NeverVRF
-> a
-> CertVRF NeverVRF
-> Maybe (OutputVRF NeverVRF)
verifyVRF = forall a. HasCallStack => String -> a
error String
"VRF unavailable"
sizeOutputVRF :: forall (proxy :: * -> *). proxy NeverVRF -> Word
sizeOutputVRF proxy NeverVRF
_ = Word
0
genKeyVRF :: Seed -> SignKeyVRF NeverVRF
genKeyVRF Seed
_ = SignKeyVRF NeverVRF
NeverUsedSignKeyVRF
seedSizeVRF :: forall (proxy :: * -> *). proxy NeverVRF -> Word
seedSizeVRF proxy NeverVRF
_ = Word
0
sizeVerKeyVRF :: forall (proxy :: * -> *). proxy NeverVRF -> Word
sizeVerKeyVRF proxy NeverVRF
_ = Word
0
sizeSignKeyVRF :: forall (proxy :: * -> *). proxy NeverVRF -> Word
sizeSignKeyVRF proxy NeverVRF
_ = Word
0
sizeCertVRF :: forall (proxy :: * -> *). proxy NeverVRF -> Word
sizeCertVRF proxy NeverVRF
_ = Word
0
rawSerialiseVerKeyVRF :: VerKeyVRF NeverVRF -> ByteString
rawSerialiseVerKeyVRF VerKeyVRF NeverVRF
_ = forall a. Monoid a => a
mempty
rawSerialiseSignKeyVRF :: SignKeyVRF NeverVRF -> ByteString
rawSerialiseSignKeyVRF SignKeyVRF NeverVRF
_ = forall a. Monoid a => a
mempty
rawSerialiseCertVRF :: CertVRF NeverVRF -> ByteString
rawSerialiseCertVRF CertVRF NeverVRF
_ = forall a. Monoid a => a
mempty
rawDeserialiseVerKeyVRF :: ByteString -> Maybe (VerKeyVRF NeverVRF)
rawDeserialiseVerKeyVRF ByteString
_ = forall a. a -> Maybe a
Just VerKeyVRF NeverVRF
NeverUsedVerKeyVRF
rawDeserialiseSignKeyVRF :: ByteString -> Maybe (SignKeyVRF NeverVRF)
rawDeserialiseSignKeyVRF ByteString
_ = forall a. a -> Maybe a
Just SignKeyVRF NeverVRF
NeverUsedSignKeyVRF
rawDeserialiseCertVRF :: ByteString -> Maybe (CertVRF NeverVRF)
rawDeserialiseCertVRF ByteString
_ = forall a. a -> Maybe a
Just CertVRF NeverVRF
NeverUsedCertVRF