import type { ConvertBalanceState } from './convert/balances'; import type { ConvertAssetBalance, ConvertResolvedAsset } from './convert/types'; /** * A destination asset the SDK asks the host to read, with the decimals the SDK * resolved so the host never has to. * @experimental */ export type DestinationAsset = ConvertResolvedAsset; /** * One asset's wallet balance as the host read it: a base-unit integer string in * the decimals the SDK passed. `"0"` means a real zero. A missing or invalid * `unitPriceUsd` leaves the asset selectable without a balance label. * @experimental */ export type DestinationAssetBalance = ConvertAssetBalance; /** * Reads wallet balances for the destination asset menu, in one call. * - Called when the menu opens, then every 60s while it stays open. * - Answer for exactly the assets passed; leave out any you can't read or * don't want labeled. Don't throw. * @experimental */ export type GetDestinationAssetBalances = (params: { assets: DestinationAsset[]; }) => Promise; /** What the asset menu shows for one asset's balance label. */ export type DestinationAssetBalanceState = { status: 'loading'; } | { status: 'unavailable'; } | { status: 'ready'; tokenAmount: string; usdValue: number; }; /** Keyed by `convertAssetKey` (`chainId:address`); a missing key shows no label. */ export type DestinationAssetBalanceStates = Record; export declare function formatDestinationAssetAmount(tokenAmount: string): string; export declare function toDestinationAssetBalanceState(balance: ConvertBalanceState | undefined, decimals: number): DestinationAssetBalanceState | undefined;