Skip to main content

eth_accounts

Returns a list of addresses owned by client.

Parameters

None

Returns

An array of hexadecimals as strings representing the addresses owned by the client.

Infura will not return any accounts

While this JSON-RPC method is supported by Infura, it will not return any accounts as Infura does not support "unlocking" accounts. Instead, users should send pre-signed raw transactions using eth_sendRawTransaction.

Example

Replace <YOUR-API-KEY> with an API key from your Infura dashboard.

Request

curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}'

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": []
}