eth_requestAccounts

Important

This method will send a wallet activation request if the user hasn't activated their wallet in your dapp, you can read more about the Stargazer wallet activation process herearrow-up-right.

Request the user to grant access to their Ethereum (EVM) accounts. This method follows the EIP-1102arrow-up-right specification.

Parametersarrow-up-right

None

Return Typearrow-up-right

Address[] - User accounts available.

Important

The account at index 0 will always be the active account in Stargazer.

Examplearrow-up-right

await provider.request({ method: "eth_requestAccounts", params: [] });
// ["0x407d73d8a49eeb85d32cf465507dd71d507100c1"]

Last updated

Was this helpful?