> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spark.money/llms.txt
> Use this file to discover all available pages before exploring further.

# setPrivacyEnabled

> Enable or disable privacy mode for the wallet.

Enables or disables privacy mode for the wallet.

## Method Signature

```typescript theme={null}
async setPrivacyEnabled(privacyEnabled: boolean): Promise<WalletSettings | undefined>
```

## Parameters

<ResponseField name="privacyEnabled" type="boolean" required>
  Whether to enable privacy mode
</ResponseField>

## Returns

<ResponseField name="settings" type="WalletSettings | undefined" required>
  Updated wallet settings, or undefined if update failed
</ResponseField>

## Example

```typescript theme={null}
// Enable privacy mode
const settings = await wallet.setPrivacyEnabled(true);
console.log("Privacy enabled:", settings?.privateEnabled);

// Disable privacy mode
await wallet.setPrivacyEnabled(false);
```
