import type { AaStateVarsReader, SymbolOptions } from "./symbols.js"; import type { Network } from "./types.js"; export declare const BASE_DECIMALS = 9; export declare const AMOUNTS_NOTE = "Raw on-ledger amounts are integers in the asset's smallest units. display_total is already divided by 10^decimals; present display values to users, never raw integers. base is GBYTE with 9 decimals. explorer_asset_url lists the asset's description and holders (explorer amounts are already in display units)."; /** Explorer page listing an asset's description and holders. */ export declare function assetExplorerUrl(network: Network, symbolOrAsset: string): string; export interface AssetAmountSummary { asset: string; symbol: string | null; decimals: number | null; raw_total: number; display_total: string | null; explorer_asset_url?: string; } export interface BalanceAmountSummary { totals_by_asset: Record; amounts_note: string; unresolved_assets?: string[]; } /** * Converts a raw smallest-units integer into a human display string without * floating point artifacts, e.g. formatAmount(2500000000, 9) === "2.5". */ export declare function formatAmount(rawAmount: number, decimals: number): string | null; /** * Sums raw amounts per asset from either hub balance shape: * - get_balances: { address: { asset: { stable, pending } } } * - AA balances: { asset: number } */ export declare function collectAssetTotals(balances: unknown): Record; export interface SummarizeOptions extends SymbolOptions { resolve?: boolean; maxResolvedAssets?: number; /** When set, each asset summary gets an explorer_asset_url for that network. */ network?: Network; } /** * Builds a per-asset totals summary with symbols, decimals, and display amounts. * base always resolves to GBYTE/9 without touching the registry; custom assets * are resolved through the registry when available, failures degrade to nulls * and are listed in unresolved_assets so agents know to resolve before display. */ export declare function summarizeBalanceAmounts(reader: AaStateVarsReader, balances: unknown, options?: SummarizeOptions): Promise;