import { type Address } from 'viem'; import type { GauntletClient } from '../client'; export interface UserCurrentBalanceParams { vaultId: string; address: Address; chainId?: number; } export interface UserCurrentBalance { /** Chain identifier, e.g. "base" */ chain: string; token: Address; decimals: number; /** Assets queued via async deposit, not yet earning */ pendingDeposit: bigint; /** Assets actively earning in the vault */ balance: bigint; /** Assets queued via async withdraw, not yet claimable */ pendingWithdraw: bigint; } /** * Returns the current balance breakdown for a user across all EVM deployments of a vault. * * Queries the vault's on-chain state to split the user's position into three buckets: * - `balance` — assets actively earning inside the vault (converted from vault units to tokens). * - `pendingDeposit` — tokens submitted via async deposit but not yet processed by a solver. * - `pendingWithdraw` — vault units locked in a pending async redeem request (converted to tokens). * * Only supported for Aera multi-depositor vaults. Pending amounts are detected by scanning * the last ~3 days of provisioner events and cross-checking hash existence on-chain. * * @param client - A configured `GauntletClient` instance with an EVM public client for each * chain the vault is deployed on. * @param params - Query parameters including `vaultId`, the user `address`, and an optional * `chainId` to limit the query to a single deployment. * @returns One `UserCurrentBalance` entry per chain queried. * * @throws {VaultNotFoundError} If the vault ID is not found in the manifest. * @throws {UnsupportedProtocolError} If the vault is not an Aera multi-depositor vault. * @throws {ChainMismatchError} If `chainId` is specified but no deployment exists for that chain. * * @example * ```ts * const balances = await getUserCurrentBalance(client, { * vaultId: 'baseUsdcPrime', * address: '0xYourWalletAddress', * }); * // [{ chain: 'base', token: '0x...', decimals: 6, balance: 100_000_000n, pendingDeposit: 0n, pendingWithdraw: 0n }] * ``` */ export declare function getUserCurrentBalance(client: GauntletClient, params: UserCurrentBalanceParams): Promise; //# sourceMappingURL=userCurrentBalance.d.ts.map