Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
wallet_connect – 1auth
Skip to content

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