Function Signature
Description
Creates a new SVM wallet account with the specified threshold signature scheme. Returns wallet information including the account address, public keys, and key shares with their backup status.Parameters
Required Parameters
thresholdSignatureScheme(ThresholdSignatureScheme) - The threshold signature scheme for the wallet
Optional Parameters
password(string) - Wallet password for additional securityonError((error: Error) => void) - Error callback function for handling creation errorsbackUpToClientShareService(boolean) - Whether to back up the first key share to Dynamic’s client share service (defaults to false). Whentrue, the first share is backed up to Dynamic and the remaining shares are returned for external storage. Whenfalse, all shares are returned for external storage.
Returns
Promise<object>- Object containing wallet information:accountAddress- The wallet’s account addressrawPublicKey- Raw public keyexternalKeySharesWithBackupStatus- Array of key shares with their backup status. Each entry contains:share- The key share (ServerKeyShare)backedUpToClientKeyShareService- Whether this share was backed up to Dynamic’s client share service
externalServerKeyShares- (deprecated) Array of external server key shares. UseexternalKeySharesWithBackupStatusinstead.walletId- Unique wallet identifier
Example
Error Handling
Related Functions
importPrivateKey()- Import existing private keygetSvmWallets()- Get all SVM wallets