Recovery Kit

Recovery Kit Functions and Hooks

Create Recovery Kit​

Description​

Creates a social login for the user using their Google SSO and a password (2FA). The user will get a widget to connect their Google account to their wallet. Next time the user wants to recover their wallet, they will be asked to provide their SSO instead of using their recovery phrase.

Return type​

Promise<string>

Usage Example​

await sdk.wallet.createRecovery()

Get Recovery Kit status​

Description​

Returns the recovery status of the user's wallet by email or user ID. If the user created a recovery kit the function will return recoveryKit.If the user saved their recovery phrase to their Google Drive, the function will return savedMnemonics. This function can be used to encourage the user to save his wallet information or create a social log-in to protect his wallet.

Return type​

Promise<string[]>

Possible values are: recoveryKit, savedMnemonics

Usage Example​

const recoveryStatus = await sdk.wallet.getRecoveryStatus()

Show recovery phrase

Description​

Shows a widget where the user can see their recovery phrase and a button to save the recovery phrase to their Google Drive. Using the button for saving the recovery phrase to Google Drive will set a flag that the platform can fetch using getRecoveryStatus().

Return type​

Promise<string>

Usage Example​

await sdk.wallet.showRecoveryPhrase()

Last updated