# TxEnvelopeEip8141.from

Creates an EIP-8141 transaction envelope from an object or serialized transaction.

## 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: [
    {
      flags: 'approveExecutionAndPayment',
      gas: 50_000n,
      mode: 'verify'
    }
  ],
  sender: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8'
})
```

## Definition

```ts
function from<envelope>(
  envelope: envelope,
): from.ReturnType<envelope>
```

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

## Parameters

### envelope

* **Type:** `envelope`

An envelope object or serialized transaction.

## Return Type

The envelope with its transaction type.

`from.ReturnType<envelope>`
