//#region extensions/crypto/src/lib/token-decimals.d.ts /** * Shared utility for resolving ERC-20 token decimals. * * Used by defi-swap (3 call sites), the plan executor balance resolver, * safety-service, and allowance-manager. * * Strategy: * 1. ETH/WETH → 18 (no RPC needed) * 2. Well-known stablecoins (USDC, USDT) → 6 * 3. On-chain `decimals()` call via publicClient * 4. Fallback to 18 if all else fails */ /** * Resolve the decimal count for a token address. * * @param tokenAddress - The ERC-20 contract address (0x...) or ETH sentinel. * @param publicClient - A viem PublicClient (or compatible) for on-chain reads. * Pass `null` to skip on-chain resolution. * @returns The token's decimal count (defaults to 18 if unknown). */ declare function resolveTokenDecimals(tokenAddress: string, publicClient: { readContract: (args: any) => Promise; } | null): Promise; /** * Check if a token address represents native ETH (including WETH). */ declare function isNativeEth(tokenAddress: string): boolean; //#endregion export { isNativeEth, resolveTokenDecimals }; //# sourceMappingURL=token-decimals.d.mts.map