/** Transfer-time USD for Chain 138 checkpoint leaves (off-chain metadata only). */
export declare const CHAIN138_NATIVE_PRICING_ADDRESS = "0xc02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
/** Canonical Chain 138 stables — $1 peg when price-at API is unavailable. */
export declare const CHAIN138_STABLE_USD_PEG: Record<string, number>;
/** Known Chain 138 assets (override via env CHECKPOINT_USD_PEG_<SYMBOL>). */
export declare const CHAIN138_KNOWN_TOKEN_USD: Record<string, number>;
export type HistoricalPriceSnapshot = {
    chainId: number;
    tokenAddress: string;
    requestedTimestamp: string;
    effectiveTimestamp: string;
    priceUsd: number;
    source: string;
};
export type TransferUsdLine = {
    kind: 'native' | 'erc20';
    token?: string;
    tokenSymbol?: string;
    tokenDecimals?: number;
    from?: string;
    to?: string;
    amountRaw: string;
    logIndex?: number;
    priceUsd?: number;
    priceSource?: string;
    priceEffectiveTimestamp?: string;
    valueUsd?: string;
};
/** Convert decimal USD string (e.g. batch JSON) to 8-decimal fixed point for on-chain events. */
export declare function usdStringToE8(usd: string | undefined | null): bigint;
export type UsdPricingConfig = {
    apiBaseUrl: string;
    chainId?: number;
    enabled?: boolean;
    requestDelayMs?: number;
};
/** USD string with `outputScale` fractional digits (default 6). */
export declare function formatAmountUsd(rawAmount: string, decimals: number, priceUsd: number, priceScale?: number, outputScale?: number): string | undefined;
export declare function blockTimestampToIso(blockTimestamp: number): string;
export declare function fetchHistoricalPriceUsd(cfg: UsdPricingConfig, tokenAddress: string, blockTimestamp: number): Promise<HistoricalPriceSnapshot | null>;
export declare function priceTransferLine(cfg: UsdPricingConfig, line: TransferUsdLine, blockTimestamp: number): Promise<TransferUsdLine>;
/** Sum USD strings (6 decimal places) without floating-point drift. */
export declare function sumUsdStrings(values: (string | undefined)[]): string | undefined;
export declare function enrichLeafUsdFields(cfg: UsdPricingConfig, leaf: Record<string, unknown>, allErc20: Array<{
    token: string;
    tokenSymbol: string;
    tokenDecimals: number;
    from: string;
    to: string;
    value: bigint;
    logIndex: number;
}>): Promise<Record<string, unknown>>;
