# AccountProof.toRpc

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

## Imports

:::code-group
```ts [Named]
import { AccountProof } from 'ox'
```

```ts [Entrypoint]
import * as AccountProof from 'ox/AccountProof'
```
:::

## Examples

```ts twoslash
import { AccountProof } from 'ox'

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
```

**Source:** [src/core/AccountProof.ts](https://github.com/wevm/ox/blob/main/src/core/AccountProof.ts#L155)

## Parameters

### proof

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

The account proof to convert.

## Return Type

An RPC account proof.

`Rpc`
