- Upon a verifier’s request, the SDK prompts the credential subject to sign a message proving they are the credential subject, and approving the credential’s decryption.
- Once the subject approves, Crossmint decrypts the credential for the verifier to verify.
Lit.decrypt(encryptedCredential)
function.
If the credentials are encrypted using Crossmint, the SDK provides a CrossmintMetamaskDecrypt().decrypt(encryptedCredential)
function that decrypts the credential, assuming the user has a Metamask wallet. For the support of additional wallets during decryption, review our SDK reference.
A Crossmint API key (credentials.decrypt
) is needed when:
- Crossmint has encrypted the data (
crossmint-recoverable
encryption modality) - Data is encrypted via Lit but the verifier wants to delegate Lit network billing to Crossmint
Decryption will not work server-side when using Lit.