import { BlockchainEventEmitter as e } from "./BlockchainEventEmitter.mjs";
import { ClientEventHelper as t } from "../helpers/ClientEventHelper.mjs";
//#region libs/shared/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.ts
var n = class extends e {
	clientEventHelper;
	constructor(e, n, r, i, a, o, s) {
		super(n, r, i, !1, a, o, s), this.clientEventHelper = new t(n, e);
	}
	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 { n as ClientBlockchainEventEmitter };
