Returns a list of addresses owned by the client.
Request Format
{
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": 1
}
Response Format
{
"jsonrpc": "2.0",
"id": 1,
"result": [
"0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
]
}
Parameters
None.
Return Value
- Accounts (
array of addresses
): Returns an array containing addresses owned by the client.
Example
Request
{
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": 1
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": [
"0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
]
}
Notes
- This method returns a list of accounts managed by the client (e.g., accounts unlocked in a local Ethereum node).
{
"jsonrpc": "2.0",
"id": 1,
"result": [
"0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
]
}