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

eth_requestAccounts

Request user authentication and account access.

Authentication Required: No (triggers authentication)

Request

await jaw.provider.request({
  method: 'eth_requestAccounts',
});

Parameters

None

Response

Returns an array of account addresses.

Type: 0x${string}[]

Example

["0x1234567890123456789012345678901234567890"]

Behavior

  • Opens authentication popup (in CrossPlatform mode)
  • User creates a new account or signs in with an existing one
  • Returns array with single account address
  • Emits accountsChanged event with the connected accounts
  • Subsequent calls return cached accounts without opening popup

Errors

CodeDescription
4001User rejected the request
4100Unauthorized (authentication failed)

Example

import { JAW } from '@jaw.id/core';
 
const jaw = JAW.create({
  apiKey: 'your-api-key',
});
 
 const accounts = await jaw.provider.request({
   method: 'eth_requestAccounts',
 });

Related Methods

  • eth_accounts - Get accounts without triggering authentication
  • wallet_connect - Connect with advanced capabilities (SIWE, subnames)