/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { DriftClient } from '../driftClient';
import { UserAccount } from '../types';
import { Commitment, PublicKey } from '@solana/web3.js';
import { Buffer } from 'buffer';
import { DLOB } from '../dlob/DLOB';
import { OrderSubscriberConfig, OrderSubscriberEvents } from './types';
import { PollingSubscription } from './PollingSubscription';
import { WebsocketSubscription } from './WebsocketSubscription';
import StrictEventEmitter from 'strict-event-emitter-types';
import { EventEmitter } from 'events';
import { ProtectMakerParamsMap } from '../dlob/types';
import { grpcSubscription } from './grpcSubscription';
export declare class OrderSubscriber {
    driftClient: DriftClient;
    usersAccounts: Map<string, {
        slot: number;
        userAccount: UserAccount;
    }>;
    subscription: PollingSubscription | WebsocketSubscription | grpcSubscription;
    commitment: Commitment;
    eventEmitter: StrictEventEmitter<EventEmitter, OrderSubscriberEvents>;
    fetchPromise?: Promise<void>;
    fetchPromiseResolver: () => void;
    mostRecentSlot: number;
    decodeFn: (name: string, data: Buffer) => UserAccount;
    decodeData?: boolean;
    fetchAllNonIdleUsers?: boolean;
    constructor(config: OrderSubscriberConfig);
    subscribe(): Promise<void>;
    fetch(): Promise<void>;
    tryUpdateUserAccount(key: string, dataType: 'raw' | 'decoded' | 'buffer', data: string[] | UserAccount | Buffer, slot: number): void;
    /**
     * Creates a new DLOB for the order subscriber to fill. This will allow a
     * caller to extend the DLOB Subscriber with a custom DLOB type.
     * @returns New, empty DLOB object.
     */
    protected createDLOB(protectedMakerParamsMap?: ProtectMakerParamsMap): DLOB;
    getDLOB(slot: number, protectedMakerParamsMap?: ProtectMakerParamsMap): Promise<DLOB>;
    getSlot(): number;
    addPubkey(userAccountPublicKey: PublicKey): Promise<void>;
    mustGetUserAccount(key: string): Promise<UserAccount>;
    unsubscribe(): Promise<void>;
}
