Management API Reference

personal_sign

Sign personal messages using the wallet.

Signs an EIP-191 personal message.

Request#


_10
type Request = {
_10
method: 'personal_sign',
_10
params: [
_10
/** Message to sign. */
_10
message: string,
_10
/** Address of the signer. */
_10
address: `0x${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.


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