# AccountProof.fromRpc

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

## 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.fromRpc({
  address: '0xb9CAB4F0E46F7F6b1024b5A7463734fa68E633f9',
  balance: '0x1',
  codeHash:
    '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470',
  nonce: '0x2',
  storageHash:
    '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
  accountProof: [],
  storageProof: [
    {
      key: '0x0000000000000000000000000000000000000000000000000000000000000000',
      proof: [],
      value: '0x3'
    }
  ]
})
// @log: {
// @log:   address: '0xb9CAB4F0E46F7F6b1024b5A7463734fa68E633f9',
// @log:   balance: 1n,
// @log:   codeHash: '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470',
// @log:   nonce: 2,
// @log:   storageHash: '0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421',
// @log:   accountProof: [],
// @log:   storageProof: [
// @log:     {
// @log:       key: '0x0000000000000000000000000000000000000000000000000000000000000000',
// @log:       proof: [],
// @log:       value: 3n,
// @log:     },
// @log:   ],
// @log: }
```

## Definition

```ts
function fromRpc(
  proof: Rpc,
): AccountProof
```

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

## Parameters

### proof

* **Type:** `Rpc`

The RPC account proof.

## Return Type

An instantiated [`AccountProof.AccountProof`](/api/AccountProof/types#accountproof).

`AccountProof.AccountProof`
