Sign
post
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 recognisable 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
-
DATA
, 20 Bytes - address -
DATA
, N Bytes - message to sign
Returns
DATA
: Signature
Body
jsonrpcstringRequired
methodstringRequired
paramsstring[]Required
idinteger · int32Required
Responses
200
Successful Operation
500
Internal Server Error
post
POST //sign HTTP/1.1
Host: tomo.nownodes.io
Content-Type: application/json
Accept: */*
Content-Length: 113
{
"jsonrpc": "2.0",
"method": "eth_sign",
"params": [
"0x9b2055d370f73ec7d8a03e965129118dc8f5bf83",
"0xdeadbeaf"
],
"id": 1
}
No content