dimension-js-sdk
Version:
SDK to interact with the Dimension blockchain
21 lines (20 loc) • 755 B
TypeScript
/**
* A service to query balance for accounts
*/
import { DimensionServiceByJsonRPC } from './DimensionServiceByJsonRPC';
import { CLPublicKey } from '../lib';
import { BigNumber } from '@ethersproject/bignumber';
export declare class BalanceServiceByJsonRPC {
private dimensionService;
private balanceUrefs;
constructor(dimensionService: DimensionServiceByJsonRPC);
/**
* Query balance for the specified account
*
* It will cache balance URef values for accounts so that on subsequent queries,
* it only takes 1 state query not 4 to get the value.
* @param blockHashBase16
* @param publicKey
*/
getAccountBalance(blockHashBase16: string, publicKey: CLPublicKey): Promise<BigNumber | undefined>;
}