personal_sign
Sign personal messages using the wallet.
Signs an EIP-191 personal message.
Request#
_10type 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.
_10type 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.
_12import RapidfireID from '@rapidfire/id'_12_12const rapidfire = new RapidfireID()_12const provider = rapidfire.getEthereumProvider()_12_12const signature = await provider.request({ _12 method: 'personal_sign', _12 params: [ _12 '0xcafebabe', _12 '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef', _12 ], _12})