getAccount
Get an account, identified by its address.
Usage
example.ts
import { publicClient } from "./client";
const account = await publicClient.getAccount({
address: "cfx:...",
});Returns
The state of the given account.
Parameters
address
- Type
Address
const account = await publicClient.getAccount({
address: "cfx:...",
});epochTag (optional)
- Type:
latest_state|latest_confirmed|latest_checkpoint|earliest - Defaut:
latest_state
const account = await publicClient.getAccount({
address: "cfx:...",
epochTag: "latest_state",
});epochNumber (optional)
- Type:
bigint
const account = await publicClient.getAccount({
address: "cfx:...",
epochNumber: 1n,
});