> ## 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.

# Lit

Lit class for decrypting verifiable credentials that have been encrypted with the
VerifiableCredentialEncryptionType.DECENTRALIZED\_LIT encryption type.

## Extends

* `Lit`

## Constructors

### new Lit()

> **new Lit**(`network`, `capacityDelegationAuthSig`?, `debug`?): [`Lit`](./Lit)

Creates an instance of the Lit class for decrypting verifiable credentials.

#### Parameters

| Parameter                    | Type                                       | Default value | Description                                                                                                                                                                                                                                                  |
| ---------------------------- | ------------------------------------------ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `network`                    | `"habanero"` \| `"manzano"` \| `"cayenne"` | `undefined`   | The network on which the credentials are encrypted (use CredentialMetadata.encryption.details.network).                                                                                                                                                      |
| `capacityDelegationAuthSig`? | `AuthSig`                                  | `undefined`   | The capacity delegation signature used to pay for decrypting the credentials. If not provided, the Crossmint signature will be used. To use the Crossmint delegation signature, the user must have provided an API key with the `credentials.decrypt` scope. |
| `debug`?                     | `boolean`                                  | `false`       | If true, enables debug mode for additional logging.                                                                                                                                                                                                          |

#### Returns

[`Lit`](./Lit)

#### Overrides

`LitRaw.constructor`

#### Defined in

[decryption/lit.ts:27](https://github.com/Crossmint/crossmint-sdk/blob/main/packages/client/verifiable-credentials/src/decryption/lit.ts#L27)

## Methods

### connect()

> **connect**(): `Promise`\<`LitNodeClient`>

#### Returns

`Promise`\<`LitNodeClient`>

#### Inherited from

`LitRaw.connect`

#### Defined in

[verifiableCredentialsSDK/encryption/lit.ts:50](https://github.com/Crossmint/crossmint-sdk/blob/main/packages/client/verifiable-credentials/src/verifiableCredentialsSDK/encryption/lit.ts#L50)

***

### decrypt()

> **decrypt**(`credential`): `Promise`\<[`VerifiableCredential`](../interfaces/VerifiableCredential)>

Decrypts a verifiable credential that has been encrypted with the Lit protocol.
The user will be prompted to sign a message to decrypt the credential.

#### Parameters

| Parameter    | Type                                                                           | Description                                     |
| ------------ | ------------------------------------------------------------------------------ | ----------------------------------------------- |
| `credential` | [`EncryptedVerifiableCredential`](../interfaces/EncryptedVerifiableCredential) | The encrypted verifiable credential to decrypt. |

#### Returns

`Promise`\<[`VerifiableCredential`](../interfaces/VerifiableCredential)>

A promise that resolves to the decrypted verifiable credential.

#### Overrides

`LitRaw.decrypt`

#### Defined in

[decryption/lit.ts:49](https://github.com/Crossmint/crossmint-sdk/blob/main/packages/client/verifiable-credentials/src/decryption/lit.ts#L49)
