eth_sign

function eth_sign(data_hash: byte_array, privkey: byte_array): (byte_array, byte_array, integer)

Calculates an Ethereum signature. Takes a hash and a private key and returns values r, s, and rec_id that are accepted by eth_ecrecover.

Return

tuple containing the ethereum signature components.

Since

0.10.6

Parameters

data_hash

The byte array representing the hash to be signed.

privkey

The 32-byte private key used for signing.