eth_accounts - Arbitrum

Example code for the eth_accounts JSON RPC method. Сomplete guide on how to use eth_accounts JSON RPC in GetBlock Web3 documentation.

This method gets a list of addresses owned by the client.

Parameters

  • None

Request

curl --location 'https://go.getblock.us/<ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
  "jsonrpc": "2.0",
  "method": "eth_accounts",
  "params": [],
  "id": "getblock.io"
}'

Response

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

Response Parameter Definition

Field
Data Type
Definition

result

string

An array of addresses owned by the client.

If the accounts doesn't have any address, it returns empty array.

Use case

This method is generally used to:

  • Retrieve the list of locally unlocked accounts on a full node.

  • Identify which account a node can use for signing transactions.

  • Pre–Web3 wallet integrations where the node itself managed keys.

Error handling

Status Code
Error Message
Cause

403

Missing or invalid ACCESS_TOKEN.

Integration with Web3

The eth_accounts can help developers to:

  • Identify available signing accounts

  • Auto-select a default wallet in development

  • Validate that a local signer exists

  • Simplify onboarding in testing environments

Last updated

Was this helpful?