Skip to main content

personal_sign

Enables passport users to sign ERC-191 personal messages off-chain.

Params

  1. Address: string. The address that will sign the message.
  2. Message: string. A message string to be signed

Result

Returns a Promise that resolves with a string, representing the resulting hex-encoded signature. For an example on validating the authenticity of this signature, check out this guide.

Example

const address = '0xabb12d14E1d89014F795bA359bBA6De724F5936E'
const message = "Hello, Ethereum"
const signature = await provider.request({
method: 'personal_sign',
params: [address, message]
})
console.log(signature) // '0x...'