Availability
Export access depends on wallet ownership and authorization.Client-side export
User-owned embedded wallets can be exported using theexportWallet method in Privy’s React SDK. (This includes wallets created server-side with a Privy user as the owner)
Due to the sensitive nature of key export, client side export is only available in the React SDK where the operation can be secured with strict browser security guarantees.
If you’d like to enable key export with one of Privy’s other client-side SDKs, we encourage setting up a minimal web page with Privy’s React SDK and export wallet functionality that you can direct users to.
By default, to use wallets, users authenticate to the Privy API directly from their client using
their access token. This means that users can send transactions or export their keys using their
access token with the Privy API, even if an application does not implement Privy’s
exportWallet
method. This design ensures users always retain self-sovereign access to their wallet keys.To prevent users from unilaterally exporting keys, applications can set up a 2-of-2 key quorum as the wallet owner, consisting of the user and an authorization key controlled by the application’s server. This requires authorization from both parties to export the wallet.Server-side export
Wallets can be exported using Privy’s server-side SDKs or REST API, regardless of whether they were created client-side or server-side. Provide the wallet owner’s credentials in the authorization context. App credentials alone do not authorize export for user owned wallets.Supported chains
Key export is available for all wallets on every supported tier.Usage
To have your user export their embedded wallet’s private key, use Privy’s When invoked,
exportWallet method:- EVM
- Solana
exportWallet will open a modal where your user can copy the full private key for their embedded wallet. The modal will also link your user to a guide for how to load their embedded wallet into another wallet client, such as MetaMask or Phantom.If your user is not authenticated or has not yet created an embedded wallet in your app, this method will fail.As an example, you might attach exportWallet to an export wallet button in your app:- EVM
- Solana
If your application uses smart wallets on EVM
networks, exporting the wallet will export the private key for the smart wallet’s signer, and
not the smart wallet itself. Users can control their smart wallet via this private key, but will
be required to manually use it to sign calls to the contract for their smart wallet directly to
use the smart wallet outside of your app.
Exporting HD wallets
If your user has multiple embedded wallets, you can export the private key for a specific wallet by passing the address of your desired wallet as anaddress parameter to the exportWallet method:- EVM
- Solana
When your user exports their embedded wallet, their private key is assembled on a different origin
than your app’s origin. This means neither you nor Privy can ever access your user’s private key.
Your user is the only party that can ever access their full private key.

