const e=require(`../../../functions/utils/resolve-sync.utils.cjs`);var t=class{blockchainEventEmitter;eventName;constructor(e,t){this.blockchainEventEmitter=e,this.eventName=t,e.addEventProcessorFunction(this.processEventsPage.bind(this))}get latestBlockNumber(){return this.blockchainEventEmitter.latestBlockNumber}get chainId(){return this.blockchainEventEmitter.chainId}intervalClear(){this.blockchainEventEmitter.intervalClear()}async processEventsPage(t){let n=new Set;t.forEach(({eventName:e,transactionHash:t})=>{e===`BlockedUtxosCreated`&&n.add(t)});let r=[];await e.resolveSync(t.map(e=>async()=>{if(e.eventName!==this.eventName)return;let{blockNumber:t,transactionHash:i}=e,a=this.mapEvent(e),o=n.has(i);await this.acceptEvent(a,t,i,o)&&r.push(a)}));let i=r.length;return await this.afterEventsAccepted(i),r.length}};exports.AbstractEventService=t;