From b2271691f7d9e204b124bdbd019e260aaed57c81 Mon Sep 17 00:00:00 2001 From: Javier Pavon Date: Thu, 2 Jul 2026 06:50:43 +0200 Subject: [PATCH] review --- docs/classes/av_client.AVClient.html | 2 +- docs/classes/av_verifier.AVVerifier.html | 2 +- lib/av_client.ts | 2 +- lib/av_verifier.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/classes/av_client.AVClient.html b/docs/classes/av_client.AVClient.html index 06fde44c..9b3b635d 100644 --- a/docs/classes/av_client.AVClient.html +++ b/docs/classes/av_client.AVClient.html @@ -263,7 +263,7 @@

Returns Promise<void>

Returns undefined on success or throws an error.

-

TypeError if called before voter registration (this.voterSession is undefined — the guard on line 628 dereferences it directly).

+

TypeError if called before voter registration (this.voterSession is undefined — the method dereferences it directly without a null check).

NetworkError if any request failed to get a response.

  • Encrypts the voter's ballot selections and submits them to the Digital Ballot Box.

    Must be called after registerVoter (or diff --git a/docs/classes/av_verifier.AVVerifier.html b/docs/classes/av_verifier.AVVerifier.html index 4776dd8d..8ca3a83e 100644 --- a/docs/classes/av_verifier.AVVerifier.html +++ b/docs/classes/av_verifier.AVVerifier.html @@ -43,7 +43,7 @@

Returns Promise<string>

The 7-character Base58 pairing code derived from the verifier item's short address. Both the voter's app and this verifier should display this code so the voter can confirm they are paired with the correct device.

-

NetworkError if any request failed to get a response.

+

An error if the DBB request fails (raw Axios error — not wrapped in NetworkError).

  • Decrypts the ballot and returns the original contest selections.

    Synchronous. Uses the verifier's private key (generated in submitVerifierKey) to decrypt both the voter and board diff --git a/lib/av_client.ts b/lib/av_client.ts index 9c51ba17..9f1ef2c1 100644 --- a/lib/av_client.ts +++ b/lib/av_client.ts @@ -622,7 +622,7 @@ export class AVClient implements IAVClient { * * @param extendedBy Number of **seconds** to extend the session by. * @returns Returns undefined on success or throws an error. - * @throws TypeError if called before voter registration (`this.voterSession` is undefined — the guard on line 628 dereferences it directly). + * @throws TypeError if called before voter registration (`this.voterSession` is undefined — the method dereferences it directly without a null check). * @throws {@link NetworkError | NetworkError} if any request failed to get a response. */ public async extendVoterSessions(extendedBy: number): Promise { diff --git a/lib/av_verifier.ts b/lib/av_verifier.ts index ab0d9ddb..4d90bbbf 100644 --- a/lib/av_verifier.ts +++ b/lib/av_verifier.ts @@ -125,7 +125,7 @@ export class AVVerifier { * @returns The 7-character Base58 pairing code derived from the verifier item's short address. * Both the voter's app and this verifier should display this code so the voter can confirm * they are paired with the correct device. - * @throws {@link NetworkError | NetworkError} if any request failed to get a response. + * @throws An error if the DBB request fails (raw Axios error — not wrapped in `NetworkError`). */ public async submitVerifierKey(spoilRequestAddress: string): Promise { const keyPair = randomKeyPair(this.crypto)