# AccountOperation.toRpc

Converts an account operation to its JSON-RPC representation.

## Imports

:::code-group
```ts [Named]
import { AccountOperation } from 'ox/tempo'
```

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

## Examples

```ts twoslash
// @noErrors
import { AccountOperation } from 'ox/tempo'

const operationRpc = AccountOperation.toRpc(operation)
```

## Definition

```ts
function toRpc<operation>(
  operation: operation,
): toRpc.ReturnValue<operation>
```

**Source:** [src/tempo/AccountOperation.ts](https://github.com/wevm/ox/blob/main/src/tempo/AccountOperation.ts#L490)

## Parameters

### operation

* **Type:** `operation`

Account operation.

## Return Type

The JSON-RPC operation.

`toRpc.ReturnValue<operation>`
