> ## 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.

# requiresPasswordForOperation

> Checks if a wallet operation requires a password

## Function Signature

```typescript theme={"system"}
requiresPasswordForOperation(params: {
  accountAddress: string;
  walletMetadata: WalletMetadata;
  walletOperation?: WalletOperation;
  backupInfo?: KeyShareBackupInfo;
}): Promise<boolean>
```

## Description

Checks whether a specific wallet operation requires a password. Useful for branching UI before prompting the user for a password.

## Parameters

### Required Parameters

* **`accountAddress`** (`string`) - The wallet address (must include `0x` prefix). Must match `walletMetadata.accountAddress`.
* **`walletMetadata`** ([`WalletMetadata`](/node/reference/types/wallet-metadata)) - The cached metadata for this wallet

### Optional Parameters

* **`walletOperation`** (`WalletOperation`) - The wallet operation to check (defaults to `REACH_THRESHOLD`)
* **`backupInfo`** ([`KeyShareBackupInfo`](/node/reference/types/key-share-backup-info)) - Pre-resolved backup info; if omitted the SDK reads it from `walletMetadata`.

## Returns

* **`Promise<boolean>`** - `true` if password is required, `false` otherwise

## Example

```typescript theme={"system"}
import { authenticatedEvmClient } from './client';
import { WalletOperation } from '@dynamic-labs-wallet/node';

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

const requiresPassword = await evmClient.requiresPasswordForOperation({
  accountAddress,
  walletMetadata,
  walletOperation: WalletOperation.SIGN_MESSAGE,
});

console.log('Requires password for signing:', requiresPassword);
```

## Available Wallet Operations

* **`SIGN_MESSAGE`** - Message signing operations
* **`SIGN_TRANSACTION`** - Transaction signing operations
* **`EXPORT_PRIVATE_KEY`** - Private key export operations

## Error Handling

```typescript theme={"system"}
try {
  const requiresPassword = await evmClient.requiresPasswordForOperation({
    accountAddress,
    walletMetadata,
    walletOperation: WalletOperation.SIGN_MESSAGE,
  });
  console.log('Password requirement checked');
} catch (error) {
  console.error('Failed to check password requirement:', error);
}
```

## Related Functions

* [`verifyPassword()`](/node/reference/evm/verify-password) - Verify wallet password
* [`signMessage()`](/node/reference/evm/sign-message) - Sign a message
* [`signTransaction()`](/node/reference/evm/sign-transaction) - Sign a transaction
