Function Signature

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

Description

Exports external server key shares for backup purposes. This function provides access to the key shares that can be stored securely for future recovery.

Parameters

Required Parameters

  • accountAddress (string) - The wallet address to export key shares for
  • password (string) - Wallet password for security

Returns

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

Example

import { authenticatedSvmClient } from './client';

const svmClient = await authenticatedSvmClient();

const exportedShares = await svmClient.exportExternalServerKeyShares({
  accountAddress: 'YourSolanaWalletAddress',
  password: 'your-password'
});

console.log('Exported shares:', exportedShares);

Error Handling

try {
  const exportedShares = await svmClient.exportExternalServerKeyShares({
    accountAddress: 'YourSolanaWalletAddress',
    password: 'your-password'
  });
  console.log('External server key shares exported successfully');
} catch (error) {
  console.error('Failed to export external server key shares:', error);
}