Copyright | Alexander Krupenkin 2018 |
---|---|
License | BSD3 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Recoverable ECC 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
- pack :: ByteArray rsv => (Integer, Integer, Word8) -> rsv
- unpack :: ByteArrayAccess rsv => rsv -> (Integer, Integer, Word8)
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.
:: ByteArray ba | |
=> (Maybe (Integer, Integer, Word8) -> ba) | Two way transaction packer (unsigned and signed) |
-> PrivateKey | Private key |
-> ba | Encoded transaction |
Sign Ethereum transaction.
WARNING: Vulnerable to timing attacks.