> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# AccountProof.toRpc

:::info
`AccountProof.toRpc` is a re-export of ox's [`AccountProof.toRpc`](https://oxlib.sh/api/AccountProof/toRpc). Refer to the ox documentation for the full reference.
:::

Converts an [`AccountProof.AccountProof`](/docs/utilities/accountproof/types#accountproof) to an [`AccountProof.Rpc`](/docs/utilities/accountproof/types#rpc).

## Imports

```ts
import { AccountProof } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { AccountProof } from 'viem/utils'

const proof = AccountProof.toRpc({
  address: '0xb9CAB4F0E46F7F6b1024b5A7463734fa68E633f9',
  balance: 1n,
  codeHash:
    '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470',
  nonce: 2,
  storageHash:
    '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
  accountProof: [],
  storageProof: [
    {
      key: '0x0000000000000000000000000000000000000000000000000000000000000000',
      proof: [],
      value: 3n
    }
  ]
})
```

## Definition

```ts
function toRpc(
  proof: toRpc.Input,
): Rpc
```

## Parameters

### proof

* **Type:** `toRpc.Input`

The account proof to convert.

## Return Type

An RPC account proof.

`Rpc`
