/cosmos/auth/v1beta1/accounts/{address} - Cronos
Example code for the cosmos/auth/v1beta1/accounts/{address} REST method. Complete guide on how to use cosmos/auth/v1beta1/accounts/{address} REST method in GetBlock Web3 documentation.
Returns the account at a bech32 address, including its account number and sequence (nonce). The sequence is required to build and sign a transaction from the account.
Endpoint
GET /cosmos/auth/v1beta1/accounts/{address}Path Parameters
address
string
Bech32 account address (crc1…)
Example
export CRONOS_REST=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/
curl "${CRONOS_REST}cosmos/auth/v1beta1/accounts/crc1p9zq0lr6h6n5s2wk9m3v7t4x8c6b2d0f1g3h5j"Response
{
"account": {
"@type": "/ethermint.types.v1.EthAccount",
"base_account": {
"address": "crc1p9zq0lr6h6n5s2wk9m3v7t4x8c6b2d0f1g3h5j",
"pub_key": null,
"account_number": "12345",
"sequence": "42"
}
}
}Response Fields
account.base_account.account_number
string
On-chain account number
account.base_account.sequence
string
Account nonce for the next transaction
account.@type
string
Account type (Ethermint EthAccount on Cronos)
Use Cases
Signing: Read the sequence before building a transaction
Account Existence: Confirm an address has been seen on-chain
Wallet Backends: Populate account metadata
Error Handling
404 / not found
Not found
No account exists at the address
403 / RBAC: access denied
Access denied
The GetBlock access token is missing or incorrect
Last updated
Was this helpful?