import { Connection, PublicKey } from '@solana/web3.js';
import { Idl } from '@coral-xyz/anchor';
import { Mutex } from 'async-mutex';
import { EventProcessorFunction } from '../../../types/events.types';
import { BlockchainEvent } from '../../BlockchainEvent/BlockchainEvent';
export declare abstract class SolanaBlockchainEventEmitter {
    private readonly _chainId;
    readonly connection: Connection;
    readonly programId: PublicKey;
    private _latestSlot;
    private _initialSlot;
    onEventsProcessed?: (acceptedEventCount: number) => void;
    private eventProcessors;
    private readonly maxPageSize?;
    private _isReady;
    protected isServer: boolean;
    private inProgress;
    private anchorParser?;
    private anchorCoder?;
    protected eventsFetchingMutex: Mutex;
    constructor(chainId: number, connection: Connection, programId: PublicKey, initialSlot: number, isServer: boolean, eventsFetchingMutex: Mutex, maxPageSize?: number);
    get chainId(): number;
    get latestBlockNumber(): number;
    get isReady(): boolean;
    setIdl(idl: Idl): void;
    syncFromAtMost(slot: number): void;
    protected advanceLatestBlockNumber(slot: number): void;
    intervalClear(): void;
    init(): Promise<void>;
    private requireReady;
    addEventProcessorFunction(eventProcessorFunction: EventProcessorFunction): void;
    getEventsInRange(fromSlot: number, toSlot: number): Promise<BlockchainEvent[]>;
    getLastBlockNumberForEventRequest(): Promise<number>;
    retrieveEvents(fromBlock: number, useForce?: boolean, initialLoading?: boolean): Promise<boolean>;
    private getProgramEvents;
    private parseTransactionForEvents;
    private parseLogsForEvents;
    private parseCpiForEvents;
    protected processEvents(events: BlockchainEvent[]): Promise<void>;
    protected abstract clear(): void;
    protected abstract startUpdateListener(): void;
}
