import type { Address, NativeUnits, BaseUnits } from '../types.js'; import type { Abi, Chain as ViemChain } from 'viem'; export type ParseUnitsAsTokenParams = { /** The amount to transfer. */ value: NativeUnits | BaseUnits; /** The token address (optional). */ token?: Address | { address: Address; abi?: Abi; } | null; /** The blockchain chain to use. */ chain: ViemChain; }; /** * Parses a given value into the appropriate token units based on the specified chain and token. * * @returns The parsed token value in base units. * * @example * ```typescript * const link = await parseUnitsAsToken(client, { * value: '1', * chain: ETH_SEPOLIA, * }); * // => 1000000000000000000n * ``` * * @example * ```typescript * const link = await parseUnitsAsToken(client, { * value: '1', * chain: ETH_SEPOLIA, * token: ETH_SEPOLIA.contracts.USDC, * }); * // => 1000000n * ``` */ export declare function parseUnitsAsToken(params: ParseUnitsAsTokenParams): Promise;