Recommended: JavaScript SDK for React Native
While this SDK is still supported, we recommend using newer JavaScript SDK, which is optimized for React Native, but also comes with a host of other benefits.
Notice that embedded wallets must be enabled in your environment’s
dashboard settings first!
Creating and Getting the Wallet
This interface allows you to create new embedded wallets, check if any already exist and fetch the current wallet. See the following example which renders a prompt to create a wallet or renders its address if it already exists:Creating a Wallet for a Specific Chain
ThecreateWallet method also allows you to create an embedded wallet for a specific chain
See the example below:
Exporting Wallet Keys
If your app uses embedded wallets, you must also make sure to provide your users with some way to export their wallets’ keys to ensure they have absolute control over them. Dynamic provides a quick and easy way to do so with our embedded wallet key export UI flow!V3/MPC wallets can only be exported as private keys. Recovery phrase export is not available for these wallet types.
This flow will export the keys from your primary wallet. See
here how
to set your primary wallet.
WaaS Operations
Dynamic’s Wallet as a Service (WaaS) provides advanced wallet management capabilities for embedded wallets. These operations allow you to perform secure key management, backup, and signing operations.WaaS operations require the wallet to be a Dynamic WaaS wallet (
wallet.key === 'dynamicwaas').Backup Key Shares to Google Drive
Backup wallet key shares to Google Drive for secure recovery:Import Private Key
Import an existing private key into a WaaS wallet:Sign Raw Messages
Sign arbitrary raw messages with your WaaS wallet, message must be 64 characters, available only for EVM wallets:Update Wallet Password
Update the password for your WaaS wallet:Refresh Wallet Account Shares
Refresh the account shares for your WaaS wallet:All WaaS operations support optional password parameters for additional security.
The
accountAddress parameter should be the wallet’s address, and walletId
identifies the specific WaaS wallet instance.