Documentation Index
Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
Use this file to discover all available pages before exploring further.
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. Returns awalletMetadata object (non-sensitive identity + backup pointers) alongside the sensitive externalServerKeyShares. Persist both — walletMetadata in your cache and externalServerKeyShares in a secrets vault.
Parameters
Required Parameters
privateKey(string) - The private key to importchainName(string) - The chain name (use'SVM'for Solana)thresholdSignatureScheme(ThresholdSignatureScheme) - The threshold signature scheme
Optional Parameters
password(string) - Required whenbackUpToDynamicistrue.onError((error: Error) => void) - Error callback functionbackUpToDynamic(boolean) - Whether to back up the first key share to Dynamic. Whentrue, apasswordmust be provided.
Returns
Promise<object>- Object containing wallet information:walletMetadata(WalletMetadata) - Persist in cache.rawPublicKey- Raw public keyexternalServerKeyShares(ServerKeyShare[]) - Store in secrets vault.externalKeySharesWithBackupStatus- Array of key shares with their backup status
Example
Related
WalletMetadata- The metadata object passed to every operationcreateWalletAccount()- Create a new walletexportPrivateKey()- Export private key