Function Signature
Description
Imports an existing Solana private key into the MPC wallet system. The private key is split into shares according to the specified threshold signature scheme.Parameters
Required Parameters
privateKey(string) - The Solana private key to importchainName(string) - The chain name (use ‘SVM’ for Solana chains)thresholdSignatureScheme(ThresholdSignatureScheme) - The threshold signature scheme for the walletpassword(string) - Wallet password for security
Optional Parameters
backUpToClientShareService(boolean) - Whether to back up the first key share to Dynamic’s client share service (defaults to false)
Returns
Promise<object>- Object containing wallet information:accountAddress- The wallet’s account addressrawPublicKey- Raw public keyexternalKeySharesWithBackupStatus- Array of key shares with their backup status (seecreateWalletAccountfor details)externalServerKeyShares- (deprecated) UseexternalKeySharesWithBackupStatusinstead
Example
Error Handling
Related Functions
createWalletAccount()- Create new walletexportPrivateKey()- Export private key