# TxEnvelopeEip8141

Utilities for constructing, signing, and encoding EIP-8141 frame transactions.

## Examples

### Basic Usage

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

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

## Functions

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`TxEnvelopeEip8141.assert`](/api/TxEnvelopeEip8141/assert) | Asserts that an EIP-8141 envelope satisfies structural transaction constraints. |
| [`TxEnvelopeEip8141.deserialize`](/api/TxEnvelopeEip8141/deserialize) | Deserializes an EIP-8141 transaction body or PeerDAS network wrapper. |
| [`TxEnvelopeEip8141.from`](/api/TxEnvelopeEip8141/from) | Creates an EIP-8141 transaction envelope from an object or serialized transaction. |
| [`TxEnvelopeEip8141.fromRpc`](/api/TxEnvelopeEip8141/fromRpc) | Converts an RPC envelope to an EIP-8141 envelope without losing chain ID precision. |
| [`TxEnvelopeEip8141.getSignPayload`](/api/TxEnvelopeEip8141/getSignPayload) | Returns the canonical signing payload of an EIP-8141 envelope. |
| [`TxEnvelopeEip8141.hash`](/api/TxEnvelopeEip8141/hash) | Hashes an EIP-8141 transaction, excluding its blob sidecars. |
| [`TxEnvelopeEip8141.serialize`](/api/TxEnvelopeEip8141/serialize) | Serializes an EIP-8141 envelope, including a PeerDAS wrapper when sidecars exist. |
| [`TxEnvelopeEip8141.toRpc`](/api/TxEnvelopeEip8141/toRpc) | Converts an EIP-8141 envelope to RPC fields. Sidecars are excluded. |
| [`TxEnvelopeEip8141.validate`](/api/TxEnvelopeEip8141/validate) | Returns whether an EIP-8141 envelope satisfies structural constraints. |

## Errors

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`TxEnvelopeEip8141.InvalidError`](/api/TxEnvelopeEip8141/errors#txenvelopeeip8141invaliderror) | Thrown when an EIP-8141 envelope is structurally invalid. |

## Types

| Name                | Description                         |
| ------------------- | ----------------------------------- |
| [`TxEnvelopeEip8141.Rpc`](/api/TxEnvelopeEip8141/types#txenvelopeeip8141rpc) | JSON-RPC representation of an EIP-8141 envelope. |
| [`TxEnvelopeEip8141.Serialized`](/api/TxEnvelopeEip8141/types#txenvelopeeip8141serialized) | Serialized EIP-8141 transaction envelope. |
| [`TxEnvelopeEip8141.SerializedType`](/api/TxEnvelopeEip8141/types#txenvelopeeip8141serializedtype) | Serialized EIP-8141 transaction type. |
| [`TxEnvelopeEip8141.TxEnvelopeEip8141`](/api/TxEnvelopeEip8141/types#txenvelopeeip8141txenvelopeeip8141) | An EIP-8141 transaction containing independently budgeted call frames. |
| [`TxEnvelopeEip8141.Type`](/api/TxEnvelopeEip8141/types#txenvelopeeip8141type) | EIP-8141 transaction type identifier. |
