wallet_connect
An alias for eth_requestAccounts. Prompts the user to connect their wallet to your dApp if not already connected. Both methods behave identically - use whichever naming convention fits your codebase.
Try it
Parameters
None.
Returns
string[] - Array of account addresses that the user has authorized.
Example
const accounts = await provider.request({ method: 'wallet_connect' });
console.log('Connected as:', accounts[0]);Notes
- This is an alias for
eth_requestAccounts - Opens the connection modal if not already connected
- Returns immediately if the user is already connected