import { Contract } from "ethers";
import winston from "winston";
import { EventSearchConfig, EvmAddress, MakeOptional } from "../../utils";
import { ConfigStoreVersionUpdate, DisabledChainsUpdate, GlobalConfigUpdate, LiteChainsIdListUpdate, RateModelUpdate, RouteRateModelUpdate, SortableEvent, SpokePoolTargetBalance, SpokeTargetBalanceUpdate, TokenConfig } from "../../interfaces";
import { BaseAbstractClient, UpdateFailureReason } from "../BaseAbstractClient";
import { RateModel } from "../../lpFeeCalculator";
type ConfigStoreUpdateSuccess = {
    success: true;
    chainId: number;
    searchEndBlock: number;
    events: {
        updatedTokenConfigEvents: SortableEvent[];
        updatedGlobalConfigEvents: SortableEvent[];
        globalConfigUpdateTimes: number[];
    };
};
type ConfigStoreUpdateFailure = {
    success: false;
    reason: UpdateFailureReason;
};
export type ConfigStoreUpdate = ConfigStoreUpdateSuccess | ConfigStoreUpdateFailure;
export declare const DEFAULT_CONFIG_STORE_VERSION = 0;
export declare enum GLOBAL_CONFIG_STORE_KEYS {
    MAX_RELAYER_REPAYMENT_LEAF_SIZE = "MAX_RELAYER_REPAYMENT_LEAF_SIZE",
    MAX_POOL_REBALANCE_LEAF_SIZE = "MAX_POOL_REBALANCE_LEAF_SIZE",
    VERSION = "VERSION",
    DISABLED_CHAINS = "DISABLED_CHAINS",
    CHAIN_ID_INDICES = "CHAIN_ID_INDICES",
    LITE_CHAIN_ID_INDICES = "LITE_CHAIN_ID_INDICES"
}
export declare class AcrossConfigStoreClient extends BaseAbstractClient {
    readonly logger: winston.Logger;
    readonly configStore: Contract;
    readonly configStoreVersion: number;
    cumulativeRateModelUpdates: RateModelUpdate[];
    cumulativeRouteRateModelUpdates: RouteRateModelUpdate[];
    cumulativeMaxRefundCountUpdates: GlobalConfigUpdate[];
    cumulativeMaxL1TokenCountUpdates: GlobalConfigUpdate[];
    chainIdIndicesUpdates: GlobalConfigUpdate<number[]>[];
    liteChainIndicesUpdates: LiteChainsIdListUpdate[];
    cumulativeSpokeTargetBalanceUpdates: SpokeTargetBalanceUpdate[];
    cumulativeConfigStoreVersionUpdates: ConfigStoreVersionUpdate[];
    cumulativeDisabledChainUpdates: DisabledChainsUpdate[];
    hasLatestConfigStoreVersion: boolean;
    chainId: number | undefined;
    constructor(logger: winston.Logger, configStore: Contract, eventSearchConfig: MakeOptional<EventSearchConfig, "to"> | undefined, configStoreVersion: number);
    getRateModelForBlockNumber(l1Token: EvmAddress, originChainId: number | string, destinationChainId: number | string, blockNumber?: number | undefined): RateModel;
    getRouteRateModelForBlockNumber(l1Token: EvmAddress, route: string, blockNumber?: number | undefined): RateModel | undefined;
    protected implicitChainIdIndices(chainId?: number): number[];
    getChainIdIndicesForBlock(blockNumber?: number): number[];
    getLiteChainIdIndicesForBlock(blockNumber?: number): number[];
    getLiteChainIdIndicesForTimestamp(timestamp?: number): number[];
    isChainLiteChainAtTimestamp(chainId: number, timestamp?: number): boolean;
    getSpokeTargetBalancesForBlock(l1Token: string, chainId: number, blockNumber?: number): SpokePoolTargetBalance;
    getMaxRefundCountForRelayerRefundLeafForBlock(blockNumber?: number): number;
    getMaxL1TokenCountForPoolRebalanceLeafForBlock(blockNumber?: number): number;
    getEnabledChainsInBlockRange(fromBlock: number, toBlock?: number): number[];
    getEnabledChains(block?: number): number[];
    getDisabledChainsForBlock(blockNumber?: number): number[];
    getConfigStoreVersionForTimestamp(timestamp?: number): number;
    getConfigStoreVersionForBlock(blockNumber?: number): number;
    hasValidConfigStoreVersionForTimestamp(timestamp?: number): boolean;
    protected resolveChainId(): Promise<number>;
    protected _update(): Promise<ConfigStoreUpdate>;
    update(): Promise<void>;
    validateTokenConfigUpdate(args: TokenConfig): {
        spokeTargetBalances: SpokeTargetBalanceUpdate["spokeTargetBalances"];
        rateModel: string | undefined;
        routeRateModel: RouteRateModelUpdate["routeRateModel"];
    };
    isValidRateModel(rateModel: RateModel): boolean;
    filterDisabledChains(disabledChains: number[]): number[];
}
export {};
