Function Signature
Description
Rotates the password used to encrypt the wallet’s backup shares on Dynamic’s key share service. Returns the updated backupInfo (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 include 0x prefix). Must match walletMetadata.accountAddress.
walletMetadata (WalletMetadata) - The cached metadata for this wallet
backUpToDynamic (boolean) - Whether to back the re-encrypted shares up to Dynamic. Typically true for password rotation flows.
Optional Parameters
existingPassword (string) - The current password (required if the wallet is currently password-encrypted)
newPassword (string) - The new password. Required when backUpToDynamic is true. Validated upfront before the MPC ceremony runs — passing an empty / missing newPassword with backUpToDynamic: true throws immediately rather than silently downgrading the backup.
externalServerKeyShares (ServerKeyShare[]) - Plaintext shares. If omitted, the SDK recovers using existingPassword.
Returns
Promise<{ backupInfo }> — backupInfo (KeyShareBackupInfo) reflects the new password-encrypted state. Merge into cached walletMetadata.
Example
Error Handling
Last modified on September 21, 2026