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

# requiresRestoreBackupSharesForOperation

> Checks if a wallet operation requires backup shares to be restored

## Function Signature

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

## Description

Checks whether a specific wallet operation requires backup shares to be restored before it can complete. Useful for deciding whether to prompt the user for a password.

## Parameters

### Required Parameters

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

### Optional Parameters

* **`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 backup restore 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 requiresRestore = await evmClient.requiresRestoreBackupSharesForOperation({
  accountAddress,
  walletMetadata,
  walletOperation: WalletOperation.SIGN_MESSAGE,
});

console.log('Requires backup restore for signing:', requiresRestore);
```

## 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 requiresRestore = await evmClient.requiresRestoreBackupSharesForOperation({
    accountAddress: '0xYourWalletAddress',
    walletOperation: WalletOperation.SIGN_MESSAGE,
  });
  console.log('Backup restore requirement checked');
} catch (error) {
  console.error('Failed to check backup restore requirement:', error);
}
```

## Related Functions

* [`requiresPasswordForOperation()`](/node/reference/evm/requires-password-for-operation) - Check if password is required
* [`recoverEncryptedBackupByWallet()`](/node/reference/evm/recover-encrypted-backup-by-wallet) - Recover encrypted backup
