TypeAlias.Balance
type Balance = {
decimals?: number;
isFees?: boolean;
isNative?: boolean;
raw: string | bigint;
symbol?: string;
};
Represents a balance with optional metadata.
Examples
// Example of a balance in native currency with fees
const balance: Balance = {
raw: '1000000000000000000',
decimals: 18,
symbol: 'ETH',
isNative: true,
isFees: true
};
// Example of a balance in a token
const tokenBalance: Balance = {
raw: BigInt('500000000000000000'),
decimals: 18,
symbol: 'DAI'
};