Function Signature
Description
Imports an existing 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 private key to import (64 hex characters with0x
prefix)chainName
(string
) - The chain name (use ‘EVM’ for Ethereum chains)thresholdSignatureScheme
(ThresholdSignatureScheme
) - The threshold signature scheme for the wallet
Optional Parameters
password
(string
) - Wallet password for securityonError
((error: Error) => void
) - Error callback functionbackUpToClientShareService
(boolean
) - Whether to back up to client share service (defaults to false)
Returns
Promise<object>
- Object containing wallet information:accountAddress
- The wallet’s account addresspublicKeyHex
- Public key in hex formatrawPublicKey
- Raw public key objectexternalServerKeyShares
- Array of external server key shares
Example
Error Handling
Related Functions
createWalletAccount()
- Create new walletexportPrivateKey()
- Export private key