Classes
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
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
Overrides
LitRaw.constructor
Defined in
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
Parameter | Type | Description |
---|---|---|
credential | EncryptedVerifiableCredential | The encrypted verifiable credential to decrypt. |
Returns
Promise
<VerifiableCredential
>
A promise that resolves to the decrypted verifiable credential.
Overrides
LitRaw.decrypt