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
Refreshes the wallet’s MPC key shares while maintaining the same threshold signature scheme. Returns both the newexternalServerKeyShares and an updated backupInfo reflecting the new backup state. You must re-cache the backupInfo into your stored walletMetadata.externalServerKeySharesBackupInfo — otherwise subsequent operations read stale metadata.
Parameters
Required Parameters
accountAddress(string) - The wallet address (must include0xprefix). Must matchwalletMetadata.accountAddress.chainName(string) - The chain name (e.g.,'EVM')walletMetadata(WalletMetadata) - The cached metadata for this wallet
Optional Parameters
password(string) - Required whenbackUpToDynamicistrue. Used to encrypt the refreshed shares for Dynamic-managed backup.externalServerKeyShares(ServerKeyShare[]) - Current plaintext shares. If omitted, the SDK recovers from backup usingpassword.backUpToDynamic(boolean) - Whether to back the new shares up to Dynamic’s key share service. Defaults tofalse.
Returns
Promise<{ externalServerKeyShares, backupInfo }>externalServerKeyShares— The newly-generated shares. Re-vault these; the old shares no longer sign with this wallet.backupInfo(KeyShareBackupInfo) — Updated backup-pointer state. Merge into your cachedwalletMetadata.
Example
Error Handling
Related
WalletMetadata- The metadata object passed to every operationreshare()- Change threshold scheme + refresh shares in one call- Storage Best Practices - Where to cache metadata vs. vault shares