Copyright | Aleksandr Krupenkin 2016-2021 |
---|---|
License | Apache-2.0 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Recoverable Ethereum signature support.
Synopsis
- hashMessage :: ByteArrayAccess message => message -> Digest Keccak_256
- signMessage :: (ByteArrayAccess message, ByteArray rsv) => PrivateKey -> message -> rsv
- signTransaction :: ByteArray ba => (Maybe (Integer, Integer, Word8) -> ba) -> PrivateKey -> ba
Documentation
hashMessage :: ByteArrayAccess message => message -> Digest Keccak_256 Source #
Ethereum standard hashed message.
The data will be UTF-8 HEX decoded and enveloped as follows: "x19Ethereum Signed Message:n" + message.length + message and hashed using keccak256.
signMessage :: (ByteArrayAccess message, ByteArray rsv) => PrivateKey -> message -> rsv Source #
Make Ethereum standard signature.
The message is before enveloped as follows: "x19Ethereum Signed Message:n" + message.length + message
WARNING: Vulnerable to timing attacks.