Function Signature

getExportId(params: {
  chainName: string;
  serverKeyShare: {
    chainName: string;
  };
}): Promise<string>

Description

Retrieves the export ID for a wallet on a specific chain. This ID is used for exporting wallet data and private keys.

Parameters

Required Parameters

  • chainName (string) - The name of the blockchain chain (e.g., ‘base-sepolia’)
  • serverKeyShare (object) - Object containing chain information:
    • chainName (string) - The chain name for the server key share

Returns

  • Promise<string> - The export ID for the wallet

Example

import { authenticatedEvmClient } from './client';

const evmClient = await authenticatedEvmClient();

const exportId = await evmClient.getExportId({
  chainName: 'base-sepolia',
  serverKeyShare: {
    chainName: 'base-sepolia',
  },
});

console.log('Export ID:', exportId);

Error Handling

try {
  const exportId = await evmClient.getExportId({
    chainName: 'base-sepolia',
    serverKeyShare: {
      chainName: 'base-sepolia',
    },
  });
  console.log('Export ID retrieved successfully');
} catch (error) {
  console.error('Failed to get export ID:', error);
}