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

# toViewOnlyAccount

> Create a view-only viem Account for an address. Any signing operation throws.

Useful as an account owner when signing happens elsewhere (e.g. a server-held
session signer), so the SDK can read from the account without holding a key.

## Import

```ts theme={null}
import { toViewOnlyAccount } from '@rhinestone/sdk/utils'
```

## Usage

```ts theme={null}
import { toViewOnlyAccount } from '@rhinestone/sdk/utils'

const account = await sdk.createAccount({
  owners: { type: 'ecdsa', accounts: [toViewOnlyAccount(userAddress)] },
})
```

## Parameters

<ParamField path="address" type="`0x${string}`" required>
  Address to wrap
</ParamField>

## Returns

<ResponseField name="account" type="Account">
  A viem account that can be read from but not signed with
</ResponseField>
