Skip to main content

klay_getAccount RPC Method

Returns the account information of a given address.

Updated on
Aug 7, 2024

klay_getAccount RPC Method

Parameters

address
string
REQUIRED
The address of the account being queried
BlockNumberOrHashOrTag
string
REQUIRED
The block number in integer, block hash or block tag(earliest and latest)

Returns

accType
integer
Indicates the type of the account
account
object
The account object which contains the following fields:
nonce
integer
The number of transactions sent from this account
balance
string
The balance of the account, represented in hexadecimal format
humanReadable
boolean
A boolean indicating whether the account address is in a human-readable format
key
object
The key object which contains the following fields:
keyType
integer
Indicates the type of key
key
object
An object containing the key data
storageRoot
string
The root hash of the account's storage trie
codeHash
string
The hash of the account's smart contract code, if any
codeFormat
integer
Indicates the format of the account's code
vmVersion
integer
The version of the virtual machine used to execute the account's code
Request
1
curl https://docs-demo.kaia-kairos.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{
5
"method": "klay_getAccount",
6
"id": 1,
7
"jsonrpc": "2.0",
8
"params": [
9
"0xcda6be802fa1f6861a5a574f5e349ea2b3f2d175",
10
"latest"
11
]
12
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free