diff --git a/src/interfaces.ts b/src/interfaces.ts index 06b326c..69959f7 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -2,6 +2,7 @@ import { BeaconConfig } from "@lodestar/config"; import { GenesisData, LightClientUpdate } from "#types.js"; import { ProverRequestCallback } from "#client/index.js"; import BaseClient from "#baseClient.js"; +import { EventEmitter } from "events"; export interface IProver { get callback(): ProverRequestCallback; @@ -12,7 +13,7 @@ export interface IProver { ): Promise; } -export interface IStore { +export interface IStore extends EventEmitter { addUpdate(period: number, update: LightClientUpdate): void; getUpdate(period: number): Uint8Array; hasUpdate(period: number): boolean;