Overview
The global wallet interface does not provide a way to export the wallet key. If you’d like users to be able to export their global wallet key, you can provide an easy interface for them to log into their wallet and export the key.You should prompt the user to log in with exactly the same credentials as they use to log in to the global wallet.
Pre-requisites
- Check the ‘default wallet version’ in the embedded wallet section of the dashboard
- Ensure you are using the same environment ID as you do for your global wallet implementation.
Enabling Signin
Exporting
V3 Wallets
Use theexportPrivateKey
method
- Get the primary wallet
- Guard against no primary wallet or no embedded wallet
- Get the connector
For EVM, Solana, and Sui wallets, you can use the
DynamicWaasEVMConnector
, DynamicWaasSolanaConnector
, and DynamicWaasSuiConnector
respectively.- Define the display container
- Export the private key
Full Example
V2 Wallets
Use theuseEmbeddedReveal
hook.