Skip to main content
Offline recovery creates two additional encrypted key shares, separate from the wallet’s primary key shares. Share 1 is stored in the user’s Google Drive, and Share 2 is delivered to your configured webhook. Together they let the user reconstruct the wallet when Dynamic is offline. For the complete recovery model and recovery tool, see Offline Recovery.

Prerequisites

Before calling the SDK method, configure offline recovery for the environment:
  1. Configure Google Drive backup.
  2. In the Dynamic Console, go to Wallets > Embedded Wallets > Backup & Recovery.
  3. Turn on Developer Recovery Share.
  4. Configure the Share Delivery webhook URL and the RSA public key used to encrypt shares.
When offline recovery is enabled, users cannot use Google Drive as a regular cloud backup.

Create recovery shares

Call createOfflineRecoveryShares on sdk.wallets.waas with the embedded wallet:
Pass the wallet password when the wallet is password-protected. The method returns after the recovery shares are created. Your webhook then receives a wallet.offlineRecovery.created event containing the encrypted developer recovery share.

Require MFA

Step-up authentication is not required, but Dynamic strongly recommends verifying the user before creating recovery shares. Complete an MFA verification that returns a token, then pass it as mfaToken:
See MFA for the available verification methods.

Encrypt to an end user’s key

By default, Share 2 is encrypted to the RSA public key configured on your environment, which means your backend can decrypt it. To make the share decryptable only with a private key held elsewhere, pass a base64-encoded RSA public key of 2048 bits or larger as recoveryEncryptionPublicKey:
userRegisteredPublicKey is application-supplied and can be a base64-encoded PEM key or raw public key data. Keep the matching private key where recovery should be possible, such as on the user’s device. When recoveryEncryptionPublicKey is omitted, the environment’s configured key is used.

Parameters

Offline Recovery

Understand the recovery shares, webhook event, and recovery tool.

Password encryption

Unlock password-protected wallets before sensitive operations.
Last modified on November 30, 2026