Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class MakeDigest a where
- makeDigest :: a -> Digest SHA256
- class SignatureSchema alg where
- type PubKey alg :: *
- type PrivateKey alg :: *
- type Signature alg :: *
- type Message alg :: *
- algorithm :: Proxy alg -> Text
- sign :: Proxy alg -> PrivateKey alg -> Message alg -> Signature alg
- verify :: Proxy alg -> PubKey alg -> Signature alg -> Message alg -> Bool
- makePubKey :: Proxy alg -> ByteString -> Maybe (PubKey alg)
- makeSignature :: Proxy alg -> ByteString -> Maybe (Signature alg)
- derivePubKey :: Proxy alg -> PrivateKey alg -> PubKey alg
- addressFromPubKey :: Proxy alg -> PubKey alg -> Address
- class SignatureSchema alg => RecoverableSignatureSchema alg where
- type RecoverableSignature alg :: *
- signRecoverableMessage :: Proxy alg -> PrivateKey alg -> Message alg -> RecoverableSignature alg
- recover :: Proxy alg -> RecoverableSignature alg -> Message alg -> Maybe (PubKey alg)
- serializeRecoverableSignature :: Proxy alg -> RecoverableSignature alg -> ByteString
- makeRecoverableSignature :: Proxy alg -> ByteString -> Maybe (RecoverableSignature alg)
- parsePubKey :: SignatureSchema alg => Proxy alg -> PubKey -> Either Text (PubKey alg)
- data Secp256k1
Documentation
class MakeDigest a where Source #
Class encapsulating data which can hashed.
makeDigest :: a -> Digest SHA256 Source #
Instances
MakeDigest RawTransaction Source # | |
Defined in Tendermint.SDK.Types.Transaction makeDigest :: RawTransaction -> Digest SHA256 Source # |
class SignatureSchema alg where Source #
Defines the types and methods for the signature schema parameterized by alg
.
algorithm :: Proxy alg -> Text Source #
sign :: Proxy alg -> PrivateKey alg -> Message alg -> Signature alg Source #
verify :: Proxy alg -> PubKey alg -> Signature alg -> Message alg -> Bool Source #
makePubKey :: Proxy alg -> ByteString -> Maybe (PubKey alg) Source #
makeSignature :: Proxy alg -> ByteString -> Maybe (Signature alg) Source #
derivePubKey :: Proxy alg -> PrivateKey alg -> PubKey alg Source #
addressFromPubKey :: Proxy alg -> PubKey alg -> Address Source #
Instances
SignatureSchema Secp256k1 Source # | |
Defined in Tendermint.SDK.Crypto type PubKey Secp256k1 :: Type Source # type PrivateKey Secp256k1 :: Type Source # algorithm :: Proxy Secp256k1 -> Text Source # sign :: Proxy Secp256k1 -> PrivateKey Secp256k1 -> Message Secp256k1 -> Signature Secp256k1 Source # verify :: Proxy Secp256k1 -> PubKey Secp256k1 -> Signature Secp256k1 -> Message Secp256k1 -> Bool Source # makePubKey :: Proxy Secp256k1 -> ByteString -> Maybe (PubKey Secp256k1) Source # makeSignature :: Proxy Secp256k1 -> ByteString -> Maybe (Signature Secp256k1) Source # derivePubKey :: Proxy Secp256k1 -> PrivateKey Secp256k1 -> PubKey Secp256k1 Source # addressFromPubKey :: Proxy Secp256k1 -> PubKey Secp256k1 -> Address Source # |
class SignatureSchema alg => RecoverableSignatureSchema alg where Source #
Class allowing for signing and recovering signatures for messages.
type RecoverableSignature alg :: * Source #
signRecoverableMessage :: Proxy alg -> PrivateKey alg -> Message alg -> RecoverableSignature alg Source #
recover :: Proxy alg -> RecoverableSignature alg -> Message alg -> Maybe (PubKey alg) Source #
serializeRecoverableSignature :: Proxy alg -> RecoverableSignature alg -> ByteString Source #
makeRecoverableSignature :: Proxy alg -> ByteString -> Maybe (RecoverableSignature alg) Source #
Instances
parsePubKey :: SignatureSchema alg => Proxy alg -> PubKey -> Either Text (PubKey alg) Source #