import { StateService } from '.';
import { WalletNodeClient } from '../socket/walletnode';
import { ApiConfigItem } from '../types';
import { DetectionService } from './detect';
import { MemberNodeClient } from '../socket/membernode/membernode-client';
import { WalletNodeFactory } from './wallet-node-factory';
import { MemberNodeFactory } from './member-node-factory';
export declare class ConnectionService {
    private state;
    private detectionService;
    private walletNodeFactory;
    private membernodeFactory;
    walletSocket: WalletNodeClient;
    memberSocket: MemberNodeClient;
    private block;
    private events;
    constructor(state: StateService, detectionService: DetectionService, walletNodeFactory: WalletNodeFactory, membernodeFactory: MemberNodeFactory);
    get events$(): import("rxjs").Observable<unknown>;
    get block$(): import("rxjs").Observable<unknown>;
    initSockets(): Promise<void>;
    detect(endpoint: string): Promise<void>;
    /**
     * Perform a request to the API
     *
     * @static
     * @returns {Promise<any>}
     * @memberof ConnectionService
     */
    send(request: object, { path, apiType, method }: ApiConfigItem): Promise<any>;
    /**
     * On data returned from request, try to parse to JSON and resolve
     *
     * @static
     * @returns {void}
     * @memberof ConnectionService
     */
    private onData;
    onError(error: any, reject: any): any;
    /**
     * Generate the relevant API path
     *
     * @static
     * @returns {string}
     * @memberof ConnectionService
     */
    private generatePath;
    /**
     * Generate the applicable headers for the request
     *
     * @static
     * @returns {any}
     * @memberof ConnectionService
     */
    private getHeaders;
}
