Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
eth_sign – 1auth
Skip to content

eth_sign

Signs arbitrary hex-encoded data. This is a legacy method - prefer personal_sign for new implementations. The data is decoded and displayed to the user for review before signing. Internally, this method behaves identically to personal_sign.

Try it

Parameters

PositionTypeDescription
0stringThe account address
1stringThe data to sign (hex-encoded)

Returns

string - The signature as a hex string.

Example

const accounts = await provider.request({ method: 'eth_accounts' });
const data = '0x' + Buffer.from('Hello').toString('hex');
 
const signature = await provider.request({
  method: 'eth_sign',
  params: [accounts[0], data],
});

Notes

  • This method is deprecated in favor of personal_sign
  • The data is displayed to the user after hex decoding
  • Works the same as personal_sign internally