Lit class for decrypting verifiable credentials that have been encrypted with the VerifiableCredentialEncryptionType.DECENTRALIZED_LIT encryption type.
Lit
new Lit(
network
,capacityDelegationAuthSig
?,debug
?):Lit
Creates an instance of the Lit class for decrypting verifiable credentials.
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. |
LitRaw.constructor
connect():
Promise
<LitNodeClient
>
Promise
<LitNodeClient
>
LitRaw.connect
verifiableCredentialsSDK/encryption/lit.ts:50
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.
Parameter | Type | Description |
---|---|---|
credential | EncryptedVerifiableCredential | The encrypted verifiable credential to decrypt. |
Promise
<VerifiableCredential
>
A promise that resolves to the decrypted verifiable credential.
LitRaw.decrypt
Lit class for decrypting verifiable credentials that have been encrypted with the VerifiableCredentialEncryptionType.DECENTRALIZED_LIT encryption type.
Lit
new Lit(
network
,capacityDelegationAuthSig
?,debug
?):Lit
Creates an instance of the Lit class for decrypting verifiable credentials.
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. |
LitRaw.constructor
connect():
Promise
<LitNodeClient
>
Promise
<LitNodeClient
>
LitRaw.connect
verifiableCredentialsSDK/encryption/lit.ts:50
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.
Parameter | Type | Description |
---|---|---|
credential | EncryptedVerifiableCredential | The encrypted verifiable credential to decrypt. |
Promise
<VerifiableCredential
>
A promise that resolves to the decrypted verifiable credential.
LitRaw.decrypt