Verifier SDK
verifyVC
The verifyVC
function is an asynchronous method designed to validate the authenticity and integrity of a Verifiable Credential (VC) according to its cryptographic signature. Additionally, it checks the credential’s expiration and revocation status.
Function Signature
TypeScript
Parameters
vc
(SignedCredential): The signed credential object that needs to be verified. It must include the cryptographic proof and other essential data like the issuer’s information and the credential’s attributes.options
(VerificationOptions, optional): Configuration options for the verification process. This include:revocationRegistryAddress
(ethers.AddressLike): Optional. The address of the smart contract that handles credential revocation.provider
(ethers.Provider): Optional. The blockchain provider through which blockchain interactions are performed.mandatoryPointers
(string[]): Optional. A list of mandatory fields that must be included in the credential’s proof checking.
Returns
Promise<boolean>
: A promise that resolves to true if the credential is verified successfully, or false if the verification fails due to any reason such as an invalid or expired signature, or if the credential has been revoked.
Examples
TypeScript