/// <reference types="node" />
/// <reference types="node" />
import { AmmanAccountRendererMap } from '@j0nnyboi/amman-client';
import { AccountInfo, Keypair } from '@safecoin/web3.js';
import { Server as HttpServer } from 'http';
import { Server, Socket } from 'socket.io';
import { AccountStates } from '../accounts/state';
import { AmmanAccountProvider } from '../types';
import { Account, AmmanState, Program } from '../validator/types';
import { RelayHandler } from './handler';
/**
 * A simple socket.io server which communicates to the Amman Explorere as well as accepting connections
 * from other clients, i.e. via an {@link AmmanClient} which tests can use to communicate via the amman API.
 *
 * @private
 */
export declare class RelayServer {
    readonly io: Server;
    readonly handler: RelayHandler;
    constructor(io: Server, handler: RelayHandler);
    get accountStates(): AccountStates;
    hookConnectionEvents(): void;
    hookMessages(socket: Socket): void;
    close(): Promise<void>;
}
/**
 * Sets up the Amman Relay which uses the given account provider to resolve account data.
 * @private
 * */
export declare class Relay {
    private static createApp;
    static startServer(ammanState: AmmanState, accountProviders: Record<string, AmmanAccountProvider>, accountRenderers: AmmanAccountRendererMap, programs: Program[], accounts: Account[], loadedAccountInfos: Map<string, AccountInfo<Buffer>>, loadedKeypairs: Map<string, Keypair>, accountsFolder: string, snapshotRoot: string, killRunning?: boolean): Promise<{
        app: HttpServer;
        io: Server;
        relayServer: RelayServer;
    }>;
}
