import { SimpleExchange } from './simple-exchange'; import { IDexHelper } from '../dex-helper'; import { Logger } from '../types'; import { IDexWithBlacklist, IDexWithPairRestriction, IDexWithRestriction } from './idex'; type CACHE_TTL = number | 'none'; type DexRestrictionOptions = { blacklistedTTL?: CACHE_TTL; enableDexRestriction?: boolean; enablePairRestriction?: boolean; restrictCheckIntervalMs?: number; restrictCountThreshold?: number; restrictTtlS?: number; restrictPairTtlS?: number; }; export declare class SimpleExchangeWithRestrictions extends SimpleExchange implements IDexWithRestriction, IDexWithPairRestriction, IDexWithBlacklist { protected readonly dexHelper: IDexHelper; dexKey: string; protected readonly blacklistedTTL: CACHE_TTL; protected readonly enableDexRestriction: boolean; protected readonly enablePairRestriction: boolean; protected restrictCheckIntervalMs: number; protected restrictCountThreshold: number; protected restrictTtlS: number; protected restrictPairTtlS: number; protected logger: Logger; constructor(dexHelper: IDexHelper, dexKey: string, options?: DexRestrictionOptions); hasDexRestriction(): this is IDexWithRestriction; hasPairRestriction(): this is IDexWithPairRestriction; hasBlacklist(): this is IDexWithBlacklist; isBlacklisted(address: string): Promise; protected setBlacklist(addresses: string[], ttl?: CACHE_TTL): Promise; private setCacheBatch; addBlacklistedAddress(address: string, ttl?: CACHE_TTL): Promise; getBlacklistedCacheKey(address: string): string; getRestrictedPairCacheKey(token0: string, token1: string): string; getRestrictedCacheKey(): string; isRestricted(): Promise; isRestrictedPair(token0: string, token1: string): Promise; protected restrictPair(token0: string, token1: string, errorMessage: string, ttl?: number): Promise; protected restrict(errorMessage: string): Promise; } export {};