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

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

Parameters

ParameterTypeDefault valueDescription
network"habanero" | "manzano" | "cayenne"undefinedThe network on which the credentials are encrypted (use CredentialMetadata.encryption.details.network).
capacityDelegationAuthSig?AuthSigundefinedThe 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?booleanfalseIf true, enables debug mode for additional logging.

Returns

Lit

Overrides

LitRaw.constructor

Defined in

decryption/lit.ts:27

Methods

connect()

connect(): Promise<LitNodeClient>

Returns

Promise<LitNodeClient>

Inherited from

LitRaw.connect

Defined in

verifiableCredentialsSDK/encryption/lit.ts:50


decrypt()

decrypt(credential): Promise<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

ParameterTypeDescription
credentialEncryptedVerifiableCredentialThe encrypted verifiable credential to decrypt.

Returns

Promise<VerifiableCredential>

A promise that resolves to the decrypted verifiable credential.

Overrides

LitRaw.decrypt

Defined in

decryption/lit.ts:49