///
import { ChainService } from '@soul-wallet/extension-base/services/chain-service';
import { _ApiOptions } from '@soul-wallet/extension-base/services/chain-service/handler/types';
import { _ChainBaseApi, _ChainConnectionStatus } from '@soul-wallet/extension-base/services/chain-service/types';
import { BehaviorSubject } from 'rxjs';
export declare const FIRST_RECONNECT_TIME = 3000;
export declare const SHORT_RETRY_TIME = 20000;
interface RetryObject {
retryTimes: number;
timeout?: NodeJS.Timer;
}
export declare abstract class AbstractChainHandler {
protected parent?: ChainService | undefined;
readonly apiStateMapSubject: BehaviorSubject>;
protected recoverMap: Record;
protected isSleeping: boolean;
protected constructor(parent?: ChainService | undefined);
abstract getApiByChain(chain: string): _ChainBaseApi | undefined;
abstract initApi(chainSlug: string, apiUrl: string, options: Omit<_ApiOptions, 'metadata'>): Promise<_ChainBaseApi>;
abstract recoverApi(chainSlug: string): void;
abstract sleep(): Promise;
abstract wakeUp(): Promise;
handleConnection(chain: string, newStatus: _ChainConnectionStatus, forceRecover?: boolean): void;
protected handleRecover(chain: string): void;
protected isRecovering(chain: string): boolean;
protected cancelRecover(chain: string): void;
cancelAllRecover(): void;
}
export {};