Importing a private key
Usewallets.waas.importPrivateKey to import an existing raw private key into a Dynamic WaaS (MPC) wallet. The key is forwarded to the WaaS connector, which generates the MPC key shares for the wallet’s chain. The connector is resolved from the supplied chain, so no wallet id is required, and the raw key never leaves the webview after the call returns.
Parameters
The WaaS connector to import into:
WaasChain.evm, WaasChain.svm, WaasChain.btc, WaasChain.sui, or WaasChain.ton.The raw private key to import.
Optionally override the signature scheme:
twoOfTwo (default), twoOfThree, or threeOfFive.Bitcoin address type —
nativeSegwit or taproot. Required when chain is WaasChain.btc; ignored for other chains.Optionally assert the resulting public address. The import is rejected when the derived address does not match.
Optionally password-protect the newly created WaaS wallet. This does not unlock an existing wallet.
Importing a Bitcoin key
When importing intoWaasChain.btc, an addressType is required:
Exporting embedded wallet keys
Dynamic allows users to export their embedded wallet private keys for maximum control and portability. During export:- The key shares are temporarily recombined on the user’s device using secure MPC
- The private key is constructed client-side and provided to the user
When implementing Dynamic in a custom UI, ensure you surface this flow to your end-users so they always maintain control of their wallet.
Private key export settings
By default, users can export their private keys from embedded wallets. You can control this setting in the Embedded Wallets dashboard. Navigate to the Security section and toggle Private Key Exports to enable or disable private key exports.
Revealing the private key
To open the export wallet flow on behalf of your users, callrevealEmbeddedWalletPrivateKey() on the SDK’s UI module. This presents a secure flow where only the end-user can see their private key.