Balance And Transaction History
Asset Balances
You can also use the SDK instance (zkfi
), to query asset balances of the shielded account you initialized the SDK with:
const balances: Record<number, bigint> = zkfi.getBalances();
// Output:
// {
// 65537: 2000000000000000000n,
// 65538: 32000000000000000000n,
// .
// .
// .
// }
The returned output is a mapping from the asset id to the balance value.
Transaction History
SDK instance can also be utilized to query transaction history list with:
const fromBlock = 10820000;
const toBlock = 10720000;
const history = zkfi.getTransactionHistory(fromBlock, toBlock);
Last updated