import { AbstractSolanaEventService } from './AbstractSolanaEventService';
import { SolanaBlockchainEventEmitter } from './SolanaBlockchainEventEmitter';
export interface SolanaSnapshot<SnapshotPayloadType> {
    readonly latestBlockNumber: number;
    readonly payload: SnapshotPayloadType;
}
export declare abstract class AbstractSolanaSnapshotService<EventType, SnapshotPayloadType, SerializedSnapshotType> extends AbstractSolanaEventService<EventType> {
    private savedLatestSlot;
    protected constructor(solanaBlockchainEventEmitter: SolanaBlockchainEventEmitter, eventName: string);
    init(): Promise<void>;
    retrieveEventsFromLatestBlock(): Promise<void>;
    private loadSnapshot;
    protected saveSnapshot(): Promise<unknown>;
    protected afterEventsAccepted(eventsCount: number): Promise<void>;
    protected abstract getSnapshotPayload(): SnapshotPayloadType;
    protected abstract populateSnapshot(snapshot: SolanaSnapshot<SnapshotPayloadType>): void;
    protected abstract serializeSnapshot(snapshot: SolanaSnapshot<SnapshotPayloadType>): SerializedSnapshotType;
    protected abstract deserializeSnapshot(serializedSnapshot: SerializedSnapshotType): SolanaSnapshot<SnapshotPayloadType>;
    protected abstract fetchSnapshot(): Promise<SerializedSnapshotType>;
    protected abstract persistSnapshot(serializedSnapshot: SerializedSnapshotType): Promise<unknown>;
}
