getVoteList
Get the vote list of the given account, identified by its address.
Usage
import { } from "./client";
const = await .({
: "cfx:...",
});import { http, createPublicClient } from 'cive'
import { mainnet } from 'cive/chains'
export const publicClient = createPublicClient({
chain: mainnet,
transport: http(),
})Returns
VoteInfo []
Parameters
address
- Type:
Address
const voteList = await publicClient.getVoteList({
address: "cfx:...",
});epochTag (optional)
- Type:
latest_state|latest_confirmed|latest_checkpoint|earliest - Defaut:
latest_state
const voteList = await publicClient.getVoteList({
address: "cfx:...",
epochTag: "latest_state",
});epochNumber (optional)
- Type:
bigint
const voteList = await publicClient.getVoteList({
address: "cfx:...",
epochNumber: 1n,
});