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

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

Description

Exports external server key shares for a wallet. Verifies the password, then recovers and returns the plaintext shares.

Parameters

Required Parameters

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

Optional Parameters

  • password (string) - Wallet password (required if the wallet is password-encrypted)

Returns

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

Example

import { authenticatedSvmClient } from './client';

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

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