WalletAuthService class provides methods to retrieve a challenge for wallet authentication and to decrypt credentials using that challenge.
Constructors
new WalletAuthService()
new WalletAuthService(): WalletAuthService
Returns
WalletAuthService
Methods
decrypt()
decrypt(Decrypts an encrypted verifiable credential using a signed challenge. This method sends the signed challenge, the user’s address, and the encrypted credential to Crossmint for decryption.credential,challenge,signature,userAddress):Promise<any>
Parameters
Returns
Promise<any>
A promise that resolves to the decrypted data.
Throws
Will throw an error if the decryption request fails or if the response is invalid.Defined in
services/walletAuth.ts:57getChallenge()
getChallenge(Retrieves a challenge nonce for wallet authentication. This method requests a challenge from Crossmint that can be signed by the user’s wallet to authenticate the user.userAddress):Promise<string>
Parameters
Returns
Promise<string>
A promise that resolves to a string representing the challenge to sign.

