Prerequisites
Before calling the SDK method, configure offline recovery for the environment:- Configure Google Drive backup.
- In the Dynamic Console, go to Wallets > Embedded Wallets > Backup & Recovery.
- Turn on Developer Recovery Share.
- Configure the Share Delivery webhook URL and the RSA public key used to encrypt shares.
Create recovery shares
CallcreateOfflineRecoveryShares on sdk.wallets.waas with the embedded wallet:
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 asmfaToken:
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 asrecoveryEncryptionPublicKey:
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
Related
Offline Recovery
Understand the recovery shares, webhook event, and recovery tool.
Password encryption
Unlock password-protected wallets before sensitive operations.