> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# verifyCredential

> **verifyCredential**(`credential`): `Promise`\<`object`>

Verify a Verifiable Credential

This function checks the validity of a given Verifiable Credential (VC) by performing several checks:

1. Ensures the `validUntil` date is a valid ISO string and not expired.
2. Verifies the cryptographic proof attached to the credential.
3. Checks if the associated NFT has been revoked (burned).

## Parameters

| Parameter    | Type                                                         | Description                     |
| ------------ | ------------------------------------------------------------ | ------------------------------- |
| `credential` | [`VerifiableCredential`](../interfaces/VerifiableCredential) | the credential object to verify |

## Returns

`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

> **error**: `string` | `undefined`

### validVC

> **validVC**: `boolean`

## Throws

Will throw an error if `validUntil` is present and is not a valid ISO string or if the date is invalid.

## Defined in

[verifiableCredentialsSDK/verification/verify.ts:22](https://github.com/Crossmint/crossmint-sdk/blob/main/packages/client/verifiable-credentials/src/verifiableCredentialsSDK/verification/verify.ts#L22)
