Skip to main content

eth_sign

Returns an EIP-191 signature over the provided data.

Params

(2)

1. Address (required)

string
Match pattern:
^0x[0-9a-fA-F]{40}$

2. Message (required)

string
Match pattern:
^0x[0-9a-f]*$

Result

(Signature)
string
Match pattern:
^0x[0-9a-f]{130}$

Example

Request

await window.ethereum.request({
"method": "eth_sign",
"params": [
"0x9b2055d370f73ec7d8a03e965129118dc8f5bf83",
"0xdeadbeaf"
]
});

Result

"0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b"

Params

Address

Message


Request

await window.ethereum.request({
"method": "eth_sign",
"params": [
null,
null
]
});