Skip to content
Cive

getAccount

Get an account, identified by its address.

Usage

import {  } from "./client";
const  = await .({
  : "cfx:...",
});

Returns

Account

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, 
});

JSON-RPC Method

cfx_getAccount