# TxEnvelopeEip8141.serialize

Serializes an EIP-8141 envelope, including a PeerDAS wrapper when sidecars exist.

## Imports

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

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

## Examples

### Basic Usage

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

const envelope = TxEnvelopeEip8141.from({
  chainId: 1,
  frames: [{ gas: 50_000n, mode: 'sender' }],
  sender: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8'
})
const serialized = TxEnvelopeEip8141.serialize(envelope)
```

## Definition

```ts
function serialize(
  envelope: PartialBy<TxEnvelopeEip8141, 'type'>,
): Serialized
```

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

## Parameters

### envelope

* **Type:** `PartialBy<TxEnvelopeEip8141, 'type'>`

The transaction envelope to serialize.

## Return Type

The serialized transaction.

`Serialized`
