Function Signature

getWallet(params: {
  accountAddress: string;
  password?: string;
}): Promise<Wallet>

Description

Retrieves detailed information about a specific wallet by its account address. This function requires authentication and can optionally verify a password if the wallet is password-protected.

Parameters

Required Parameters

  • accountAddress (string) - The wallet address to retrieve

Optional Parameters

  • password (string) - Wallet password (if wallet is password-protected)

Returns

  • Promise<Wallet> - Detailed wallet information

Example

import { authenticatedSvmClient } from './client';

const svmClient = await authenticatedSvmClient();

const wallet = await svmClient.getWallet({
  accountAddress: 'YourSolanaWalletAddress',
  password: 'optional-password',
});

console.log('Wallet details:', wallet);

Error Handling

try {
  const wallet = await svmClient.getWallet({
    accountAddress: 'YourSolanaWalletAddress',
  });
  console.log('Wallet retrieved successfully');
} catch (error) {
  console.error('Failed to retrieve wallet:', error);
}