verifyCredential(
credential
):Promise
<object
>
Verify a Verifiable Credential
This function checks the validity of a given Verifiable Credential (VC) by performing several checks:
validUntil
date is a valid ISO string and not expired.Parameter | Type | Description |
---|---|---|
credential | VerifiableCredential | the credential object to verify |
Promise
<object
>
error
: A string with the error message if the credential is invalid, or undefined
if the credential is valid.validVC
: A boolean indicating if the credential is valid.error:
string
|undefined
validVC:
boolean
Will throw an error if validUntil
is present and is not a valid ISO string or if the date is invalid.
verifiableCredentialsSDK/verification/verify.ts:22
verifyCredential(
credential
):Promise
<object
>
Verify a Verifiable Credential
This function checks the validity of a given Verifiable Credential (VC) by performing several checks:
validUntil
date is a valid ISO string and not expired.Parameter | Type | Description |
---|---|---|
credential | VerifiableCredential | the credential object to verify |
Promise
<object
>
error
: A string with the error message if the credential is invalid, or undefined
if the credential is valid.validVC
: A boolean indicating if the credential is valid.error:
string
|undefined
validVC:
boolean
Will throw an error if validUntil
is present and is not a valid ISO string or if the date is invalid.
verifiableCredentialsSDK/verification/verify.ts:22