Function Signature

refreshWalletAccountShares(params: {
  accountAddress: string;
  chainName: string;
  password: string;
}): Promise<any[]>

Description

Refreshes wallet account shares for a specific wallet address. This function generates new key shares for the wallet while maintaining the same threshold signature scheme.

Parameters

Required Parameters

  • accountAddress (string) - The wallet address to refresh shares for (must include 0x prefix)
  • chainName (string) - The name of the blockchain chain (e.g., ‘base-sepolia’)
  • password (string) - Wallet password for authentication

Returns

  • Promise<any[]> - Array of refreshed key shares

Example

import { authenticatedEvmClient } from './client';

const evmClient = await authenticatedEvmClient();

const refreshedShares = await evmClient.refreshWalletAccountShares({
  accountAddress: '0xYourWalletAddress',
  chainName: 'base-sepolia',
  password: 'your-wallet-password',
});

console.log('Refreshed shares count:', refreshedShares.length);

Error Handling

try {
  const refreshedShares = await evmClient.refreshWalletAccountShares({
    accountAddress: '0xYourWalletAddress',
    chainName: 'base-sepolia',
    password: 'your-wallet-password',
  });
  console.log('Wallet account shares refreshed successfully');
} catch (error) {
  console.error('Failed to refresh wallet account shares:', error);
}