MATIC
POST
GET
Last updated on January 1, 1970
1 min read
Method eth_sign undefined ()
connect with WS protocol
eth_sign
The sign method calculates an Ethereum specific signature withsign(keccak256(\x19Ethereum Signed Message\n + len(message) +message))).By adding a prefix to the message makes the calculated signaturerecognisable as an Ethereum specific signature. This prevents misusewhere a malicious DApp can sign arbitrary data (e.g. transaction) anduse the signature to impersonate the victim.Note the address to sign with must be unlocked.
Parameters
DATA
- string
address.
DATA
- string
message to sign.
Request
wscat -c wss://matic.getblock.io/YOUR-API-KEY/mainnet/
# wait for connection and send the request body
{"jsonrpc": "2.0",
"method": "eth_sign",
"params": ["0xe7e2cb8c81c10ff191a73fe266788c9ce62ec754", "0xdeadbeaf"],
"id": "getblock.io"}
Response
{
"error": {
"code": -32000,
"message": "unknown account"
},
"id": "getblock.io",
"jsonrpc": "2.0"
}
Start Building with GetBlock RPCs for Free
Previous
{ "overview": "Overview", "guides": "Guides", "get-started": "Get Started", "rpc-service": "Nodes Methods", "getblock-explorer": "Explorer API", "getblock-tracker": "Tracker API", "nodes-endpoints": "Nodes Endpoints" }
Next
{ "overview": "Overview", "guides": "Guides", "get-started": "Get Started", "rpc-service": "Nodes Methods", "getblock-explorer": "Explorer API", "getblock-tracker": "Tracker API", "nodes-endpoints": "Nodes Endpoints" }