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
Rotates the password used to encrypt the wallet’s backup shares on Dynamic’s key share service. Returns the updatedbackupInfo (with the new passwordEncrypted state). Merge it into your cached walletMetadata.externalServerKeySharesBackupInfo — otherwise the next signing operation will fail password verification against stale metadata.
Parameters
Required Parameters
accountAddress(string) - The wallet address (must include0xprefix). Must matchwalletMetadata.accountAddress.walletMetadata(WalletMetadata) - The cached metadata for this walletbackUpToDynamic(boolean) - Whether to back the re-encrypted shares up to Dynamic. Typicallytruefor password rotation flows.
Optional Parameters
existingPassword(string) - The current password (required if the wallet is currently password-encrypted)newPassword(string) - The new password. Required whenbackUpToDynamicistrue. Validated upfront before the MPC ceremony runs — passing an empty / missingnewPasswordwithbackUpToDynamic: truethrows immediately rather than silently downgrading the backup.externalServerKeyShares(ServerKeyShare[]) - Plaintext shares. If omitted, the SDK recovers usingexistingPassword.
Returns
Promise<{ backupInfo }>—backupInfo(KeyShareBackupInfo) reflects the new password-encrypted state. Merge into cachedwalletMetadata.
Example
Error Handling
Related
WalletMetadata- The metadata object passed to every operationverifyPassword()- Verify the wallet’s current passwordisPasswordEncrypted()- Check if the wallet is password-encrypted