Management API Reference

eth_requestAccounts

Connect an application to a wallet and request account access.

Requests access to Account addresses.

The eth_requestAccounts methods effectively "connects" an Application to a Wallet.

Request#


_10
type Request = {
_10
method: 'eth_requestAccounts',
_10
}

Response#

Array of connected Account addresses.


_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 accounts = await provider.request({ method: 'eth_requestAccounts' })