import { AddressMap } from "./AddressMap.js"; import { Asset } from "../base/types.js"; import { Address } from "viem"; //#region src/onchain/utils/AssetsMap.d.ts /** * Case-insensitive map from EVM token addresses to bigint balances. * Missing keys are treated as `0n`. */ export declare class AssetsMap extends AddressMap { /** * @param entries - Optional initial entries as `[address, balance]` tuples or {@link Asset} objects. * @param name - Optional label used in error messages when a lookup fails. */ constructor(entries?: Array<[string, bigint] | Asset>, name?: string); /** * Looks up a token balance, treating a missing key as `0n`. */ getOrZero(address: string): bigint; /** * Adds `amount` to the token balance, treating a missing key as `0n`. */ inc(address: string, amount: bigint): void; /** * Subtracts `amount` from the token balance, treating a missing key as `0n`. */ dec(address: string, amount: bigint): void; /** * Per-token difference `this - before`, non-zero entries only. * * Assumes this map's keys are a superset of `before`'s keys; tokens present * only in `before` are not reported. */ difference(before: AssetsMap): AssetsMap; /** * Sums `fn` over all entries. */ sum(fn: (token: Address, balance: bigint) => bigint): bigint; /** * Converts the map to an array of {@link Asset} objects. * @param minBalance - If provided, keeps only entries with a balance * strictly greater than this threshold (e.g. `1n` to filter out dust). */ toAssets(minBalance?: bigint): Asset[]; clone(): AssetsMap; } //#endregion