Skip to main content
Class for decrypting verifiable credentials encrypted with the VerifiableCredentialEncryptionType.CROSSMINT_RECOVERABLE encryption type using Metamask. This class uses Metamask to prompt the user to sign a message to decrypt the credential. If you want to use a different signature method, refer to the CrossmintDecrypt class. To use the Crossmint decrypt endpoint, an API key with the credentials.decrypt scope must be provided.

Constructors

new CrossmintMetamaskDecrypt()

new CrossmintMetamaskDecrypt(metamask): CrossmintMetamaskDecrypt

Parameters

Returns

CrossmintMetamaskDecrypt

Defined in

decryption/wallet.ts:69

Methods

decrypt()

decrypt(credential, wallet?): Promise<VerifiableCredential>
Decrypts an encrypted verifiable credential using Metamask. This method prompts the user via Metamask to sign the necessary message for decrypting the credential.

Parameters

Returns

Promise<VerifiableCredential> A promise that resolves to a VerifiableCredential.

Throws

Will throw an error if decryption fails or if Metamask is not properly configured.

Defined in

decryption/wallet.ts:84