Function Signature

isPasswordEncrypted(params: {
  accountAddress: string;
}): Promise<boolean>

Description

Checks if a wallet is password encrypted. This function returns whether the specified wallet has password protection enabled.

Parameters

Required Parameters

  • accountAddress (string) - The wallet address to check

Returns

  • Promise<boolean> - true if wallet is password encrypted, false otherwise

Example

import { authenticatedSvmClient } from './client';

const svmClient = await authenticatedSvmClient();

const isEncrypted = await svmClient.isPasswordEncrypted({
  accountAddress: 'YourSolanaWalletAddress',
});

console.log('Is password encrypted:', isEncrypted);

Error Handling

try {
  const isEncrypted = await svmClient.isPasswordEncrypted({
    accountAddress: 'YourSolanaWalletAddress',
  });
  console.log('Password encryption status checked');
} catch (error) {
  console.error('Failed to check password encryption:', error);
}