# TransactionEnvelope.toTransactionRequest

Converts a [`TransactionEnvelope.TxEnvelope`](/api/TransactionEnvelope/types#txenvelope) to a [`TransactionRequest.TransactionRequest`](/api/TransactionRequest/types#transactionrequest).

Flattens any EIP-7594 `sidecars` back into the top-level `blobs` field. Signature fields (`r`, `s`, `yParity`, `v`) are preserved — Ox's `TransactionRequest` extends the Execution API `GenericTransaction` shape to optionally carry signed payloads. Pair with [`TransactionRequest.toRpc`](/api/TransactionRequest/toRpc) to produce an `eth_sendTransaction`-shaped payload.

Note: the 4844 round-trip `TxEnvelope → TransactionRequest → TxEnvelope` is **lossy** — `sidecars.commitments` and `sidecars.cellProofs` are not preserved on the `TransactionRequest` shape. Callers that need full round-trip parity must carry sidecars out of band.

## Imports

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

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

## Examples

```ts twoslash
import { TransactionEnvelope, TxEnvelopeEip1559 } from 'ox'

const envelope = TxEnvelopeEip1559.from({
  chainId: 1,
  maxFeePerGas: 1n,
  to: '0x0000000000000000000000000000000000000000',
  value: 1n
})

const request =
  TransactionEnvelope.toTransactionRequest(envelope)
// @log: {
// @log:   chainId: 1,
// @log:   maxFeePerGas: 1n,
// @log:   to: '0x0000000000000000000000000000000000000000',
// @log:   type: 'eip1559',
// @log:   value: 1n,
// @log: }
```

## Definition

```ts
function toTransactionRequest(
  envelope: TransactionEnvelope.TxEnvelope,
): TransactionRequest.TransactionRequest
```

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

## Parameters

### envelope

* **Type:** [`TransactionEnvelope.TxEnvelope`](/api/TransactionEnvelope/types#transactionenvelopetxenvelope)

The transaction envelope to convert.

#### envelope.accessList

* **Type:** `readonly { address: abitype_Address; storageKeys: readonly 0x${string}[]; }[]`
* **Optional**

EIP-2930 Access List.

#### envelope.authorizationList

* **Type:** `readonly { address: abitype_Address; chainId: numberType; nonce: bigintType; r: 0x${string}; s: 0x${string}; yParity: numberType; }[]`

EIP-7702 Authorization List.

#### envelope.blobVersionedHashes

* **Type:** `readonly 0x${string}[]`

Versioned hashes of blobs to be included in the transaction.

#### envelope.chainId

* **Type:** `numberType`

EIP-155 Chain ID.

#### envelope.data

* **Type:** `0x${string}`
* **Optional**

Contract code or a hashed method call with encoded args

#### envelope.from

* **Type:** `Address.Address | undefined`
* **Optional**

Sender of the transaction. RPC-only metadata; not part of the
serialized envelope. Carried here for parity with
[`TransactionRequest.TransactionRequest`](/api/TransactionRequest/types#transactionrequest) and
[`Transaction.Transaction`](/api/Transaction/types#transaction).

#### envelope.gas

* **Type:** `bigintType`
* **Optional**

Gas provided for transaction execution

#### envelope.gasPrice

* **Type:** `bigintType`
* **Optional**

Base fee per gas.

#### envelope.input

* **Type:** `0x${string}`
* **Optional**

#### envelope.maxFeePerBlobGas

* **Type:** `bigintType`
* **Optional**

Maximum total fee per gas sender is willing to pay for blob gas (in wei).

#### envelope.maxFeePerGas

* **Type:** `bigintType`
* **Optional**

Total fee per gas in wei (gasPrice/baseFeePerGas + maxPriorityFeePerGas).

#### envelope.maxPriorityFeePerGas

* **Type:** `bigintType`
* **Optional**

Max priority fee per gas (in wei).

#### envelope.nonce

* **Type:** `bigintType`
* **Optional**

Unique number identifying this transaction

#### envelope.r

* **Type:** `0x${string}`

#### envelope.s

* **Type:** `0x${string}`

#### envelope.sidecars

* **Type:** `Sidecars`
* **Optional**

PeerDAS (EIP-7594) sidecars associated with this transaction. When
defined, the envelope serializes into the 5-element "PooledTransactions"
network wrapper (`rlp([tx_body, wrapper_version, blobs, commitments,
cell_proofs])`).

#### envelope.to

* **Type:** `Address.Address | null | undefined`
* **Optional**

Transaction recipient

#### envelope.type

* **Type:** `type`

Transaction type

#### envelope.v

* **Type:** `numberType`
* **Optional**

#### envelope.value

* **Type:** `bigintType`
* **Optional**

Value in wei sent with this transaction

#### envelope.yParity

* **Type:** `numberType`
* **Optional**

ECDSA signature yParity.

## Return Type

A transaction request.

`TransactionRequest.TransactionRequest`
