Overview
The CDP Server Wallet offers a secure method for creating EVM and Solana Accounts from imported private keys. The import flow is end-to-end encrypted between the CDP SDK and the TEE, ensuring that keys are never exposed outside of the secure enclave during the request. Encrypted by the SDK in a way that only the TEE can decrypt the keys, this process enables seamless and secure import of your keys into v2 accounts. This feature can be used to import wallets from external wallet providers and the v1 Server Wallet.EVM Accounts: Import from external wallet providers
You can import private keys from other wallet providers by exporting them as raw, hex-encoded 32-byte strings. To complete the import, useimportAccount
in TypeScript or import_account
in the Python CDP SDK.
Only private key import is supported. To import an HD Wallet, derive individual private keys from the seed and import them one by one.
Solana Accounts: Import from external wallet providers
Here’s an example of how to import a Solana account with a base58-encoded private key from a wallet provider like Phantom.Import developer-managed v1 Wallets
A key difference between v1 wallets and v2 accounts is that v1 wallets are HD Wallets, while v2 accounts are single-address accounts. Import each address from your v1 wallet as an individual v2 account, following the steps below. First, set up a new project and install dependenciesTypeScript
- Export private key of v1 address using v1 SDK
-
Import private keys as a v2 account using v2 SDK
TypeScript
Import Coinbase-managed v1 Wallets
Coinbase-Managed v1 wallets use Multi-Party Computation to split the private key shares between Coinbase and the developer. These wallets do not support private key export today. Therefore, to migrate these wallets, you must create a new v2 account and transfer funds onchain from your existing v1 addresses. The v1 SDK’s gasless sends feature can be used for a zero-cost migration. Create new v2 accounts for each address in your v1 wallet and transfer funds to them using the steps below:- Fetch the v1 wallet using v1 SDK
- Create new v2 account using v2 SDK
-
Send funds from v1 address to the new v2 account using v1 SDK
index.js
Video: Watch and learn
Watch this video for a walkthrough of importing keys:What to read next
- v2 Server Wallet Security: Learn more about the security features of the CDP v2 Server Wallet.
- Policies: Learn more about governing behavior of v2 accounts.
- Exporting Accounts: Learn more about exporting EVM and Solana accounts.