Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • AVVerifier

Index

Constructors

  • new AVVerifier(bulletinBoardURL: string, dbbPublicKey?: string): AVVerifier
  • Parameters

    • bulletinBoardURL: string

      URL to the Assembly Voting backend server, specific for election.

    • Optional dbbPublicKey: string

    Returns AVVerifier

Methods

  • initialize(electionConfig: MinimalElectionConfig): Promise<void>
  • initialize(): Promise<void>
  • Initializes the client with an election config. If no config is provided, it fetches one from the backend.

    throws

    NetworkError if any request failed to get a response

    Parameters

    • electionConfig: MinimalElectionConfig

      Allows injection of an election configuration for testing purposes

    Returns Promise<void>

    Returns undefined if succeeded or throws an error

  • Returns Promise<void>

  • findBallot(trackingCode: string): Promise<string>
  • Parameters

    • trackingCode: string

    Returns Promise<string>

  • submitVerifierKey(spoilRequestAddress: string): Promise<string>
  • Parameters

    • spoilRequestAddress: string

    Returns Promise<string>

  • decryptBallot(): ContestSelection[]
  • Returns ContestSelection[]

  • pollForSpoilRequest(): Promise<string>
  • Returns Promise<string>

  • getReadableContestSelections(contestSelections: ContestSelection[], locale: string): ReadableContestSelection[]
  • Parameters

    • contestSelections: ContestSelection[]
    • locale: string

    Returns ReadableContestSelection[]

  • pollForCommitmentOpening(): Promise<unknown>
  • Returns Promise<unknown>