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. You must re-cache the backupInfo into your stored walletMetadata.externalServerKeySharesBackupInfo.
Parameters
Required Parameters
accountAddress(string) - The wallet address. Must matchwalletMetadata.accountAddress.chainName(string) - The chain name (e.g.,'SVM')walletMetadata(WalletMetadata) - The cached metadata for this wallet
Optional Parameters
password(string) - Required whenbackUpToDynamicistrue.externalServerKeyShares(ServerKeyShare[]) - Current plaintext shares.backUpToDynamic(boolean) - Whether to back the new shares up to Dynamic.
Returns
Promise<{ externalServerKeyShares, backupInfo }>externalServerKeyShares— The newly-generated shares. Re-vault these.backupInfo(KeyShareBackupInfo) — Updated backup-pointer state. Merge into cachedwalletMetadata.
Example
Related
WalletMetadata- The metadata object passed to every operationreshare()- Change threshold scheme + refresh shares in one call