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

# setViewerIdentityPublicKey

> Grants one identity read access to Bitcoin wallet queries while privacy is enabled.

Grants one identity read access to Bitcoin wallet queries while privacy is enabled. The argument is a hex-encoded, 33-byte compressed identity public key. Setting it replaces any existing viewer; it does not enable privacy or grant spending access.

## Method signature

```typescript theme={null}
async setViewerIdentityPublicKey(viewerIdentityPublicKey: string): Promise<WalletSettings | undefined>
```

Returns the updated settings, or `undefined` if no settings were returned. To confirm the configured key, call `const settings = await wallet.getWalletSettings()` and inspect `settings?.viewerIdentityPublicKey`.

See [Grant a service read access](/wallets/privacy#grant-a-service-read-access) for key derivation, setup, and revocation.
