This page details the Dynamic embedded wallet export process which enables users to retrieve and backup their wallet credentials.

This feature is only for Dynamic Embedded wallets. See Dynamic Embedded Wallets

Exporting a Wallet

Exporting a wallet allows a user to retrieve their wallet credentials for backing up or migrating to another wallet or service. This is useful in the event that a user loses their device or otherwise needs to recover their wallet or if they would like to use a different wallet provider with their existing wallet.

Wallet export is a three step process. First, a user must select a credential to export and agree to the acknowledgement screen. Second, a user must request export of their specified wallet credential. This will return the wallet credentials in an encrypted format. Third, the user must then decrypt the credentials by signing a message using their configured passkey.

How to enable wallet export

Wallet export is only enabled once users have configured a passkey. See Passkeys for more information on how to configure a passkey. Once users have configured a passkey, they will be able to export their wallet credentials.

What it looks like for a user

Inside the Dynamic modal, your end user should see three dots to the right of their wallet address at the top

Upon clicking/tapping these three dots, the user should then see an option called “Wallet settings” and should be able to click/tap on it.

Following the previous step should open the wallet settings page. On this page, the user should see two sections. One for “Security & Signing Methods” which should list all the signing methods available to the user, and another called “Export & Backup”.

Under the “Export & Backup” section the user should click/tap the button for the credential that they want to export. The options list is dependent upon the type of embedded wallet the user has. For example, if the user has an HD Embedded wallet (see HD Wallets), they should see options for “Private key” and “Recovery phrase”. If the user has a non HD wallet the user should see an option for “Private key”.

Upon selecting the credential to export, the user should see the below modal that the user must agree to before revealing their credentials. After reading the information the user should click/tap the checkbox to agree and click/tap the “Reveal” button. After clicking the “Reveal” button the user should be prompted to sign a message with their configured passkey to complete the export process.

After signing the message with their configured passkey, the user should see the below modal with their exported credentials. The user should copy the credentials and store them in a safe place. When finished, the user should click/tap the “I’m Done” button or “X” to finish the process.

Triggering wallet export manually

If you want to open the export wallet flow on behalf of your users, you can do so by calling the initExportProcess method from the useEmbeddedReveal hook. This will open the flow described above.

import { useEmbeddedReveal } from "@dynamic-labs/sdk-react-core";

const { initExportProcess } = useEmbeddedReveal();

<button onClick={() => initExportProcess()}></button>;

Risks & Considerations

Wallet export is a powerful feature that allows users to retrieve their wallet credentials. These wallet credentials have full control of the account and its assets. This feature should be used with caution and only when necessary.

Users should be aware that exporting their wallet credentials can expose their wallet to risk if the credentials are not stored securely. Users are advised to store their credentials in a secure location and to not share their credentials with anyone. Additionally, users should only export their credentials when necessary and should close the export modal once they have copied them to a secure location.