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

personal_sign

Signs a plaintext message using the user's passkey. This opens a signing modal where the user can review the message before approving. Use this for "Sign in with Ethereum" flows, proving account ownership, or any scenario where you need a cryptographic signature on arbitrary text.

Try it

Parameters

PositionTypeDescription
0stringThe message to sign (can be hex-encoded or plain text)
1stringThe account address (optional, uses connected account)

Returns

string - The signature as a hex string, encoded for smart account verification.

Example

const message = 'Hello, 1auth!';
const accounts = await provider.request({ method: 'eth_accounts' });
 
const signature = await provider.request({
  method: 'personal_sign',
  params: [message, accounts[0]],
});
 
console.log('Signature:', signature);

Notes

  • Opens the signing modal showing the message to the user
  • The user must approve the signature with their passkey
  • Returns a WebAuthn-encoded signature compatible with ERC-6492
  • Hex-encoded messages are automatically decoded for display