web3-0.9.0.0: Web3 API for Haskell.

CopyrightAlexander Krupenkin 2018
LicenseBSD3
Maintainermail@akru.me
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Crypto.Ethereum.Signature

Description

Recoverable Ethereum signature support.

Synopsis

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.

signTransaction Source #

Arguments

:: 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.