diff --git a/src/baseClient.ts b/src/baseClient.ts index 4ef9996..9da65fb 100644 --- a/src/baseClient.ts +++ b/src/baseClient.ts @@ -2,8 +2,8 @@ import { ClientConfig, ExecutionInfo, IProver, IStore } from "#interfaces.js"; import { POLLING_DELAY } from "#constants.js"; import { computeSyncPeriodAtSlot, - getCurrentSlot, deserializeSyncCommittee, + getCurrentSlot, } from "@lodestar/light-client/utils"; import bls, { init } from "@chainsafe/bls/switchable"; import { Mutex } from "async-mutex"; @@ -13,13 +13,13 @@ import { getDefaultClientConfig, optimisticUpdateVerify, } from "#util.js"; -import { capella, LightClientUpdate, OptimisticUpdate } from "#types.js"; +import { LightClientUpdate, OptimisticUpdateCallback } from "#types.js"; import { assertValidLightClientUpdate } from "@lodestar/light-client/validation"; export interface BaseClientOptions { prover: IProver; store: IStore; - optimisticUpdateCallback: () => Promise; + optimisticUpdateCallback: OptimisticUpdateCallback; } export default abstract class BaseClient { diff --git a/src/types.ts b/src/types.ts index 6633858..7fd7b20 100644 --- a/src/types.ts +++ b/src/types.ts @@ -18,3 +18,5 @@ export type VerifyWithReason = | { correct: false; reason: string }; export { capella, phase0 }; + +export type OptimisticUpdateCallback = () => Promise;