import { EventCategory as e } from "../../../types/events.types.mjs";
import { ClientEventHelper as t } from "../helpers/ClientEventHelper.mjs";
import { SolanaBlockchainEventEmitter as n } from "./SolanaBlockchainEventEmitter.mjs";
//#region libs/shared/common/src/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.ts
var r = class extends n {
	clientEventHelper;
	constructor(n, r, i, a, o, s, c) {
		super(n, r, i, a, !1, o, s), c && this.setIdl(c), this.clientEventHelper = new t(n, e.MainContractEvents);
	}
	clear() {
		this.clientEventHelper.clear();
	}
	startUpdateListener() {
		this.clientEventHelper.startUpdateListener(async (e) => {
			await this.eventsFetchingMutex.runExclusive(async () => {
				await this.processEvents(e);
			});
		}, this.latestBlockNumber + 1, (e) => this.advanceLatestBlockNumber(e));
	}
};
//#endregion
export { r as ClientSolanaBlockchainEventEmitter };
