Overview

This guide shows you how to import existing Solana private keys into Dynamic’s MPC wallet system. This is useful when migrating from traditional Solana wallets or integrating with existing systems.

Prerequisites

Import Your Solana Private Key

import { authenticatedSvmClient } from './client';
import { ThresholdSignatureScheme } from '@dynamic-labs-wallet/node';

const svmClient = await authenticatedSvmClient();

const wallet = await svmClient.importPrivateKey({
  privateKey: 'YourSolanaPrivateKey',
  chainName: 'SVM',
  thresholdSignatureScheme: ThresholdSignatureScheme.TWO_OF_TWO,
  password: 'your-secure-password'
});

console.log('Solana wallet imported:', wallet.accountAddress);
console.log('Public key:', wallet.rawPublicKey);

Security Considerations

  • Private Key Format: Ensure your private key is in the correct format
  • Password Security: Use a strong, unique password
  • Key Storage: Never store private keys in plain text after import
  • Backup: Ensure you have a secure backup of your original private key

Threshold Signature Schemes

Choose based on your security and availability needs:
  • TWO_OF_TWO: Maximum security, requires both server and Dynamic
  • TWO_OF_THREE: Balanced security and availability

Next Steps