import { BigNumber } from "ethers";
import { BigNumberish } from "../utils";
export interface QueryInterface {
    getGasCosts: () => Promise<BigNumberish>;
    getTokenPrice: (tokenSymbol: string) => Promise<number>;
    getTokenDecimals: (tokenSymbol: string) => number;
}
export declare const expectedCapitalCostsKeys: string[];
export interface CapitalCostConfig {
    lowerBound: string;
    upperBound: string;
    cutoff: string;
    decimals: number;
}
declare type ChainIdAsString = string;
export interface CapitalCostConfigOverride {
    default: CapitalCostConfig;
    routeOverrides?: Record<ChainIdAsString, Record<ChainIdAsString, CapitalCostConfig>>;
}
export declare type RelayCapitalCostConfig = CapitalCostConfigOverride | CapitalCostConfig;
export interface BaseRelayFeeCalculatorConfig {
    nativeTokenDecimals?: number;
    gasDiscountPercent?: number;
    capitalDiscountPercent?: number;
    feeLimitPercent?: number;
    capitalCostsPercent?: number;
    capitalCostsConfig?: {
        [token: string]: CapitalCostConfig | CapitalCostConfigOverride;
    };
}
export interface RelayFeeCalculatorConfigWithQueries extends BaseRelayFeeCalculatorConfig {
    queries: QueryInterface;
}
export interface RelayFeeCalculatorConfigWithMap extends BaseRelayFeeCalculatorConfig {
    queriesMap: Record<number, QueryInterface>;
}
export declare type RelayFeeCalculatorConfig = RelayFeeCalculatorConfigWithQueries | RelayFeeCalculatorConfigWithMap;
export interface RelayerFeeDetails {
    amountToRelay: string;
    tokenSymbol: string;
    gasFeePercent: string;
    gasFeeTotal: string;
    gasDiscountPercent: number;
    capitalFeePercent: string;
    capitalFeeTotal: string;
    capitalDiscountPercent: number;
    relayFeePercent: string;
    relayFeeTotal: string;
    feeLimitPercent: number;
    isAmountTooLow: boolean;
    maxGasFeePercent: string;
    minDeposit: string;
}
export interface LoggingFunction {
    (data: {
        at: string;
        message: string;
        [key: string]: unknown;
    }): void;
}
export interface Logger {
    debug: LoggingFunction;
    info: LoggingFunction;
    warn: LoggingFunction;
    error: LoggingFunction;
}
export declare const DEFAULT_LOGGER: Logger;
export declare class RelayFeeCalculator {
    private queries;
    private gasDiscountPercent;
    private capitalDiscountPercent;
    private feeLimitPercent;
    private nativeTokenDecimals;
    private capitalCostsPercent;
    private capitalCostsConfig;
    private logger;
    constructor(config: RelayFeeCalculatorConfigWithQueries, logger?: Logger);
    constructor(config: RelayFeeCalculatorConfigWithMap, logger?: Logger, destinationChainId?: number);
    /**
     * Type guard to check if a config is a CapitalCostConfigOverride or a CapitalCostConfig.
     * @param config CapitalCostConfig or CapitalCostConfigOverride
     * @returns true if the config is a CapitalCostConfigOverride, false otherwise.
     * @private
     * @dev This is a type guard that is used to check if a config is a CapitalCostConfigOverride or a CapitalCostConfig.
     * This is needed because the config can be either a CapitalCostConfig or a CapitalCostConfigOverride. If it's a
     * CapitalCostConfig, then we need to convert it to a CapitalCostConfigOverride with the default config set with no route
     * overrides.
     */
    private static capitalCostConfigIsOverride;
    /**
     * Validates a CapitalCostConfigOverride or a CapitalCostConfig.
     * @param capitalCosts CapitalCostConfig or CapitalCostConfigOverride
     * @returns CapitalCostConfigOverride
     */
    static validateAndTransformCapitalCostsConfigOverride(capitalCosts: CapitalCostConfigOverride | CapitalCostConfig): CapitalCostConfigOverride;
    /**
     * Validates a CapitalCostConfig.
     * @param capitalCosts CapitalCostConfig
     */
    static validateCapitalCostsConfig(capitalCosts: CapitalCostConfig): void;
    getTokenPrice(tokenSymbol: string): Promise<number>;
    gasFeePercent(amountToRelay: BigNumberish, tokenSymbol: string, _tokenPrice?: number): Promise<BigNumber>;
    capitalFeePercent(_amountToRelay: BigNumberish, _tokenSymbol: string, _originRoute?: ChainIdAsString, _destinationRoute?: ChainIdAsString): Promise<BigNumber>;
    relayerFeeDetails(amountToRelay: BigNumberish, tokenSymbol: string, tokenPrice?: number, _originRoute?: ChainIdAsString, _destinationRoute?: ChainIdAsString): Promise<RelayerFeeDetails>;
}
export {};
