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

isPasswordEncrypted(params: {
  accountAddress: string;
  walletMetadata: WalletMetadata;
  backupInfo?: KeyShareBackupInfo;
}): Promise<boolean>

Description

Checks whether a wallet’s backup is password-encrypted. Read off walletMetadata.externalServerKeySharesBackupInfo.passwordEncrypted.

Parameters

Required Parameters

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

Optional Parameters

Returns

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

Example

import { authenticatedSvmClient } from './client';

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

const isEncrypted = await svmClient.isPasswordEncrypted({
  accountAddress,
  walletMetadata,
});