Management API Reference

eth_signTypedData_v4

Sign structured EIP-712 data with the wallet.

Signs EIP-712 typed data.

Request#


_10
type Request = {
_10
method: 'eth_signTypedData_v4',
_10
params: [
_10
/** Address of the signer. */
_10
address: `0x${string}`,
_10
/** Serialized typed data to sign. */
_10
data: string,
_10
],
_10
}

Response#

Signature.


_10
type Response = `0x${string}`

Example#

To make these instructions concrete, we have created a sample cross-app wallet called Rapidfire ID. To interact with it, you can find its SDK in the NPM package directory: @rapidfire/id.

You can check out the GitHub repository for Rapidfire Wallet to learn how to create your own wallet.


_10
import RapidfireID from '@rapidfire/id'
_10
_10
const rapidfire = new RapidfireID()
_10
const provider = rapidfire.getEthereumProvider()
_10
_10
const signature = await provider.request({
_10
method: 'eth_signTypedData_v4',
_10
params: ['0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef', '...'],
_10
})