Verifier class that implements the IVerifier interface. Provides methods for generating QR codes, signing DVR tokens, verifying SIWE messages, and verifying ZkPass proofs.

Hierarchy

  • Verifier

Implements

Constructors

Methods

  • Signs a DVR token using the provided key and DVR object, and returns a signed DVR response.

    Parameters

    • param0: DVRDTO

      An object containing the key in PEM format, the DVR object, and the verifying key in JKWS format.

    • siwePayload: SIWEDTO

      The SIWE payload to verify before signing the DVR token.

    • callbackUrl: string

      The callback URL to include in the signed DVR response.

    • Optional from: string

      The DID of the sender, if provided. If not provided, a default DID is generated from the key in PEM format.

    Returns Promise<SignedDvrResponse>

    A promise that resolves with a signed DVR response object containing the DVR ID, sender DID, callback URL, and signed DVR token.

  • Verifies a ZkPass proof token using the provided ZkPassProofMetadataValidator.

    Parameters

    • zkpassProofToken: string

      The ZkPass proof token to verify.

    • dvrVerifier: ZkPassProofMetadataValidator

      The ZkPassProofMetadataValidator to use for validation.

    Returns Promise<boolean>

    A Promise that resolves to a boolean indicating whether the proof is valid.

  • Verifies a SIWE message and signature.

    Parameters

    • siweMessage: SIWEDTO

      The SIWE message to verify.

    Returns Promise<void>

    • A Promise that resolves if the verification is successful, or rejects with an error message if it fails.

Generated using TypeDoc