eth_sign
Signs a message with the key of an account held by the node, prefixed as an Ethereum signed message.
Ethereum specification · All supported methods
Parameters
Parameters are positional, in the order below.
| Parameter | Type | Required | Description |
|---|---|---|---|
Address | 20-byte address | Yes | The account to sign with. The node must hold its key. |
Message | Hexadecimal bytes | Yes | The message to sign. |
Return value
The signature as hexadecimal bytes.
Example
Replace <gateway-url> with your gateway base URL and <service-url> with the chain’s service path, such as service/ethereum.
sh
curl -X POST "<gateway-url>/<service-url>" \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_sign","params":["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0xdeadbeaf"]}'Illustrative response; values depend on the selected network and request:
json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b"
}