• Verifies the proofs on a Verifiable Presentation. Does not verify the credentials contained within.

    Parameters

    • presentation: VerifiablePresentation

      The Verifiable Presentation to be verified.

    • options: {
          challenge?: string;
          cryptosuites?: CryptoSuite<any, string, string>[];
          didResolver?: ((did, resolutionOptions?) => Promise<ResolutionResult>);
          domain?: string;
          now?: Date;
          proofPurpose?: string;
          tolerance?: number;
          verifier?: string;
      }

      Verification options.

      • Optional challenge?: string

        The expected challenge value for the presentation, if any.

      • Optional cryptosuites?: CryptoSuite<any, string, string>[]

        Array of cryptographic suites to use during verification (default includes suites for sr25519-jcs-2023, eddsa-jcs-2022, and es256k-jcs-2023).

      • Optional didResolver?: ((did, resolutionOptions?) => Promise<ResolutionResult>)
          • (did, resolutionOptions?): Promise<ResolutionResult>
          • Implementation of resolve compliant with W3C DID specifications. Additionally, this function returns an id-only DID document in the case where a DID has been deleted or upgraded. If a DID is invalid or has not been registered, this is indicated by the error property on the didResolutionMetadata.

            Parameters

            Returns Promise<ResolutionResult>

            The resolution result for the resolve function as specified in the W3C DID specifications.

      • Optional domain?: string

        Expected domain for the proof. Verification fails if mismatched.

      • Optional now?: Date

        The reference time for verification as Date (default is current time).

      • Optional proofPurpose?: string

        Controls which value is expected for the proof's proofPurpose property. If specified, verification fails if the proof is issued for a different purpose.

      • Optional tolerance?: number

        The allowed time drift in milliseconds for time-sensitive checks (default is 0).

      • Optional verifier?: string

        The expected verifier for the presentation, if any.

    Returns Promise<Omit<VerifyPresentationResult, "credentialResults">>

    An object representing the verification results of the presentation proofs.