signable-0.1: Deterministic serialisation and signatures with proto-lens support

Safe HaskellNone
LanguageHaskell2010

Data.Signable.Class

Contents

Synopsis

Key

Sha256

newtype Sha256 Source #

Constructors

Sha256 ByteString 

Signature

data Sig Source #

Instances
Eq Sig Source # 
Instance details

Defined in Data.Signable.Class

Methods

(==) :: Sig -> Sig -> Bool #

(/=) :: Sig -> Sig -> Bool #

Show Sig Source # 
Instance details

Defined in Data.Signable.Class

Methods

showsPrec :: Int -> Sig -> ShowS #

show :: Sig -> String #

showList :: [Sig] -> ShowS #

Class

class Signable a where Source #

Minimal complete definition

toBinary

Instances
Signable Bool Source # 
Instance details

Defined in Data.Signable.Class

Signable Double Source # 
Instance details

Defined in Data.Signable.Class

Signable Float Source # 
Instance details

Defined in Data.Signable.Class

Signable Int32 Source # 
Instance details

Defined in Data.Signable.Class

Signable Int64 Source # 
Instance details

Defined in Data.Signable.Class

Signable Word32 Source # 
Instance details

Defined in Data.Signable.Class

Signable Word64 Source # 
Instance details

Defined in Data.Signable.Class

Signable ByteString Source # 
Instance details

Defined in Data.Signable.Class

Signable ByteString Source # 
Instance details

Defined in Data.Signable.Class

Signable Text Source # 
Instance details

Defined in Data.Signable.Class

(Foldable f, Signable a) => Signable (f a) Source # 
Instance details

Defined in Data.Signable.Class

Methods

toBinary :: f a -> ByteString Source #

toSha256 :: f a -> Sha256 Source #

sign :: PrvKey -> f a -> Maybe Sig Source #

verify :: PubKey -> Sig -> f a -> Bool Source #

Misc

data Alg Source #

Constructors

AlgSecp256k1 
Instances
Show Alg Source # 
Instance details

Defined in Data.Signable.Class

Methods

showsPrec :: Int -> Alg -> ShowS #

show :: Alg -> String #

showList :: [Alg] -> ShowS #