# Frame.toRpc

Converts a frame to its JSON-RPC representation.

## Imports

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

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

## Examples

### Basic Usage

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

const frame = Frame.from({ gas: 50_000n, mode: 'verify' })
const rpc = Frame.toRpc(frame)
```

## Definition

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

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

## Parameters

### frame

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

The value to convert.

## Return Type

The converted value.

`Rpc`
