Recommended: JavaScript SDK with React Hooks
For new React apps, we recommend the JavaScript SDK with React Hooks (
@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.SDK and wallet version numbers overlap. The React SDK and embedded wallets have independent version histories. In this guide, SDK V5 means React SDK major version 5, while wallet V1/V2/V3 means embedded wallet generations. React SDK V5 creates V3 wallets, while existing V1/V2 wallets are supported only through the migration flow.
Check whether wallet migration is required
Follow the Dynamic CLI getting started guide to install the CLI, authenticate, and select the environment you want to check. Then run:migrationRequired is true, add the migration flow described below. legacyVersions lists the legacy version types in use, and legacyVersionCount counts those version types. This endpoint reports which versions are active, not the number of wallets or users on each version. If migrationRequired is false, you can skip the migration section.
To inspect an individual user’s wallet versions, open Authenticated Users in the Dynamic dashboard, select the user, and open the Account tab. To see the wallet version configured for new users, open Embedded Wallets.
Upgrade checklist
- Update every
@dynamic-labs/*package to the latest V5 version. - Replace removed APIs (see Removed APIs).
- If the environment includes V1/V2 wallets, add a migration path (see Migrate existing embedded wallets).
Update your packages
Update all Dynamic packages to V5 at the same time. Mixing V4 and V5 packages is not supported. See the latest version on npm.Breaking changes
Embedded wallets require V3
V5 does not use V1/V2 wallets for normal wallet operations. Users can still access a legacy wallet through the migration flow, where they export its private key and import it into V3. Importing the same key preserves the wallet address and access to its funds. In React, after the SDK detects a V1/V2 wallet without a migration UI, it throws this developer-facingError:
LegacyWalletMigrationProvider satisfies this check. See Migrate existing embedded wallets.
Legacy embedded wallet connectors removed from chain aggregators
EthereumWalletConnectors and SolanaWalletConnectors no longer bundle the legacy embedded wallet connectors. New embedded wallets don’t need them. If you need to support migration from legacy embedded wallets, import the legacy connectors separately and add them alongside your other connectors:
LegacyWalletMigrationProvider so users can upgrade — see Migrate existing embedded wallets.
@dynamic-labs/eclipse removed
The @dynamic-labs/eclipse package has been removed. Use @dynamic-labs/solana for Eclipse and other Solana-based chains.
Removed APIs
Migrate existing embedded wallets
This section only applies if you have users on legacy (V1/V2) embedded wallets. If you don’t, there is nothing to do here — you can skip it.
If you use Account Abstraction, the migration flow automatically resolves the legacy EOA signer behind an ERC-4337 smart wallet or ERC-7702 account. Importing the same key preserves the signer’s address, so no separate smart wallet migration is required.
- With the built-in UI — Dynamic renders a migration modal that walks the user through export and upgrade. This is the simplest option and the default.
- Without the UI (headless) — you build your own UI and drive the upgrade programmatically. Use this when you need full control over the experience.
@dynamic-labs/legacy-embedded-wallet-migration package:
With the built-in UI
- React
- React Native
Mount To open the flow manually (for example, from a “Migrate wallet” button) instead of relying on auto-open, use
LegacyWalletMigrationProvider inside your DynamicContextProvider. When a legacy wallet is detected, the migration modal opens automatically and handles the export and upgrade end-to-end.useLegacyWalletMigration:Without the UI (headless)
Disable the built-in modal, then drive the upgrade with your own UI. Choose this option when you need to integrate migration into an existing flow, match custom UI or accessibility requirements, or control when each step appears. You must build and maintain the loading, error, and completion states yourself, so use the built-in UI unless you need that control. The steps are the same on both platforms:- Detect the legacy wallets that need migration.
- Trigger the private key export for the user.
- Pass the exported key to the upgrade call.
- React
- React Native
Mount
LegacyWalletMigrationProvider with autoOpen={false} (this still satisfies the legacy-wallet enforcement check), then use the migration hooks to build your own UI.Mounting
LegacyWalletMigrationProvider with autoOpen={false} satisfies the legacy-wallet enforcement check for you, and the migration hooks work whether or not you render the built-in modal.New features
Legacy embedded wallet migration package
@dynamic-labs/legacy-embedded-wallet-migration is a new package that owns the entire legacy-to-V3 upgrade flow. It provides the built-in migration modal (LegacyWalletMigrationProvider) and the headless building blocks (useLegacyWalletsToMigrate, useHasLegacyWalletsToMigrate, useLegacyWalletExport, useUpgradeToDynamicWaas) so you can offer either experience.