# TxEnvelopeEip8141.toRpc

Converts an EIP-8141 envelope to RPC fields. Sidecars are excluded.

## Imports

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

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

## Examples

### Basic Usage

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

const envelope = TxEnvelopeEip8141.from({
  chainId: 1,
  frames: [Frame.from({})],
  sender: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8'
})
const rpc = TxEnvelopeEip8141.toRpc(envelope)
```

## Definition

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

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

## Parameters

### envelope

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

The value to convert.

#### envelope.chainId

* **Type:** `number | bigint | 0x${string}`

#### envelope.frames

* **Type:** `readonly Input[]`

#### envelope.maxFeePerBlobGas

* **Type:** `number | bigint | 0x${string}`
* **Optional**

#### envelope.maxFeePerGas

* **Type:** `number | bigint | 0x${string}`
* **Optional**

#### envelope.maxPriorityFeePerGas

* **Type:** `number | bigint | 0x${string}`
* **Optional**

#### envelope.nonce

* **Type:** `number | bigint | 0x${string}`
* **Optional**

#### envelope.type

* **Type:** `"eip8141"`
* **Optional**

## Return Type

The converted value.

`Rpc`
