Home

Core

Sign Messages with Embedded Signer

Openfort smart Acfounts supports signing the following message standards:

  • Typed data messages (recommended) EIP-712
  • Personal messages ERC-191

note

To use embedded signers, first you need to authenticate your users. Follow the steps to set up embedded signers for your users with the embedded signer overview.

Signing messages#

To request a signature from a user, use the signMessage method.

When invoked, signMessage will request an EIP-191 personal_sign signature from the embedded signer, and returns a Promise for the user's signature as a string.

client.ts

_10
await openfort.signMessage(message);

Signing typed data#

To have a user sign an EIP-712 typed data signature, use the signTypedData method.

When invoked, signTypedData will request an EIP-721 eth_signTypedData_v4 signature from the embedded signer, and returns a Promise for the user's signature as a string.

client.ts

_10
await openfort.signTypedData(domain, types, value);

Examples#