VerifiableCredentialEncryptionType.CROSSMINT_RECOVERABLE
encryption type.
This class uses a provided signature callback to authenticate the user and decrypt the credential.
To use the Crossmint decrypt endpoint, an API key with the credentials.decrypt
scope must be provided.
new CrossmintDecrypt(userAddress
,signCallback
,authService
):CrossmintDecrypt
Parameter | Type |
---|---|
userAddress | string |
signCallback | (wallet , challenge ) => Promise <string > |
authService | WalletAuthService |
CrossmintDecrypt
Property | Type | Description | Defined in |
---|---|---|---|
signCallback | (wallet : string , challenge : string ) => Promise <string > | A callback function that signs the challenge with the user’s wallet. | decryption/wallet.ts:24 |
userAddress | string | - | decryption/wallet.ts:16 |
decrypt(Decrypts an encrypted verifiable credential. This method validates the decrypted data to ensure it is a valid verifiable credential.credential
):Promise
<VerifiableCredential
>
Parameter | Type | Description |
---|---|---|
credential | EncryptedVerifiableCredential | The encrypted verifiable credential to decrypt. |
Promise
<VerifiableCredential
>
A promise that resolves to a VerifiableCredential
.