Skip to main content

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

getExternalServerKeyShares(params: {
  accountAddress: string;
  walletMetadata: WalletMetadata;
  password?: string;
  backupInfo?: KeyShareBackupInfo;
}): Promise<ServerKeyShare[]>

Description

Retrieves external server key shares for the wallet by recovering them from backup using the supplied password.

Parameters

Required Parameters

  • accountAddress (string) - The wallet address. Must match walletMetadata.accountAddress.
  • walletMetadata (WalletMetadata) - The cached metadata for this wallet

Optional Parameters

  • password (string) - Required if the wallet was created with backUpToDynamic: true
  • backupInfo (KeyShareBackupInfo) - Pre-resolved backup info

Returns

  • Promise<ServerKeyShare[]> - Array of external server key shares

Example

import { authenticatedSvmClient } from './client';

const svmClient = await authenticatedSvmClient();
const walletMetadata = JSON.parse(await redis.get(`wallet:${accountAddress}`));

const keyShares = await svmClient.getExternalServerKeyShares({
  accountAddress,
  walletMetadata,
  password: 'user-password',
});