eth_sign

calculates an Ethereum specific signature.

📘

Your account must be unlocked to use this endpoint.

🚧

Note that the interactive example in this page will not work, due to the fact that eth_sign is used to modify the state of the blockchain, it is not possible to duplicate the same request.

Description

The sign method calculates an Ethereum specific signature with: sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))).

By adding a prefix to the message makes the calculated signature recognizable as an Ethereum specific signature. This prevents misuse where a malicious dapp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim.

Note: the address to sign with must be unlocked.

Parameters

  1. DATA, 20 Bytes - address
  2. DATA, N Bytes - message to sign

Returns

DATA: Signature


Language
Authorization
Header
Click Try It! to start a request and see the response here!