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.
Parameters
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"
}'import axios from 'axios'
let data = JSON.stringify({
jsonrpc: "2.0",
method: "eth_accounts",
params: [],
id: "getblock.io",
});
let config = {
method: "post",
maxBodyLength: Infinity,
url: "https://go.getblock.us/<ACCESS_TOKEN>",
headers: {
"Content-Type": "application/json",
},
data: data,
};
axios
.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response
{
"jsonrpc": "2.0",
"id": "1",
"result": [
"0xd1f5279be4b4dd94133a23dee1b23f5bfe436tf3r"
]
}Response Parameter Definition
Field
Data Type
Definition
Use case
Error handling
Status Code
Error Message
Cause
Integration with Web3
Last updated
Was this helpful?