From bd3f0dbe5ba0ecc11d7e13920e47280ab9fdbd13 Mon Sep 17 00:00:00 2001 From: Yaco 0x Date: Wed, 7 Aug 2024 09:45:40 -0300 Subject: [PATCH] docs: natspec for eboactor --- packages/automated-dispute/src/eboActor.ts | 5 +++++ packages/automated-dispute/src/eboRegistry.ts | 6 ++++++ packages/automated-dispute/src/protocolProvider.ts | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/automated-dispute/src/eboActor.ts b/packages/automated-dispute/src/eboActor.ts index 24111e3..54693d6 100644 --- a/packages/automated-dispute/src/eboActor.ts +++ b/packages/automated-dispute/src/eboActor.ts @@ -17,6 +17,11 @@ export class EboActor { this.registry = new EboRegistry(); } + /** + * Handle RequestCreated event. + * + * @param event RequestCreated event + */ public async onRequestCreated(event: EboEvent<"RequestCreated">): Promise { if (event.metadata.requestId != this.requestId) throw new RequestMismatch(this.requestId, event.metadata.requestId); diff --git a/packages/automated-dispute/src/eboRegistry.ts b/packages/automated-dispute/src/eboRegistry.ts index 873bd07..f4a6d34 100644 --- a/packages/automated-dispute/src/eboRegistry.ts +++ b/packages/automated-dispute/src/eboRegistry.ts @@ -11,6 +11,12 @@ export class EboRegistry { this.dispute = new Map(); } + /** + * Add a `Request` by ID. + * + * @param requestId the ID of the `Request` + * @param request the `Request` + */ public addRequest(requestId: string, request: Request) { this.requests.set(requestId, request); } diff --git a/packages/automated-dispute/src/protocolProvider.ts b/packages/automated-dispute/src/protocolProvider.ts index 9c8fcc3..773edcd 100644 --- a/packages/automated-dispute/src/protocolProvider.ts +++ b/packages/automated-dispute/src/protocolProvider.ts @@ -56,7 +56,8 @@ export class ProtocolProvider { /** * Gets the current epoch, the block number and its timestamp of the current epoch - * @returns The current epoch and the block number of the current epoch + * + * @returns The current epoch, its block number and its timestamp */ async getCurrentEpoch(): Promise<{ currentEpoch: bigint;