• Verifies if a received IPublicCredential is valid, meaning if its content has not been tampered with and optionally if its structure matches a given ICType.

    Successful verification of a public credential still requires the consumer to check the revoked property and take the appropriate action.

    We recommend consumer of credentials to fetch them themselves using the functions exposed in this SDK. Nevertheless, for some use cases having a function that verifies the content of a credential directly could be handy. This function does that: it takes a IPublicCredential, and re-computes its cryptographically-generated ID to verify the content authenticity.

    Parameters

    • credential: IPublicCredential

      The full IPublicCredential object.

    • options: VerifyOptions = {}

      Additional parameter for more verification steps.

    Returns Promise<void>