TxEnvelopeEip8141
Utilities for constructing, signing, and encoding EIP-8141 frame transactions.
Examples
Basic Usage
import { TxEnvelopeEip8141 } from 'ox'
const envelope = TxEnvelopeEip8141.from({
chainId: 1,
frames: [{ executionGas: 50_000n, mode: 'sender' }],
sender: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8'
})Functions
| Name | Description |
|---|---|
TxEnvelopeEip8141.assert | Asserts that an EIP-8141 envelope satisfies structural transaction constraints. |
TxEnvelopeEip8141.deserialize | Deserializes an EIP-8141 transaction body or PeerDAS network wrapper. |
TxEnvelopeEip8141.from | Creates an EIP-8141 transaction envelope from an object or serialized transaction. |
TxEnvelopeEip8141.fromRpc | Converts an RPC envelope to an EIP-8141 envelope without losing chain ID precision. |
TxEnvelopeEip8141.getSignPayload | Returns the canonical signing payload of an EIP-8141 envelope. |
TxEnvelopeEip8141.hash | Hashes an EIP-8141 transaction, excluding its blob sidecars. |
TxEnvelopeEip8141.serialize | Serializes an EIP-8141 envelope, including a PeerDAS wrapper when sidecars exist. |
TxEnvelopeEip8141.toRpc | Converts an EIP-8141 envelope to RPC fields. Sidecars are excluded. |
TxEnvelopeEip8141.validate | Returns whether an EIP-8141 envelope satisfies structural constraints. |
Errors
| Name | Description |
|---|---|
TxEnvelopeEip8141.InvalidError | Thrown when an EIP-8141 envelope is structurally invalid. |
Types
| Name | Description |
|---|---|
TxEnvelopeEip8141.Rpc | JSON-RPC representation of an EIP-8141 envelope. |
TxEnvelopeEip8141.Serialized | Serialized EIP-8141 transaction envelope. |
TxEnvelopeEip8141.SerializedType | Serialized EIP-8141 transaction type. |
TxEnvelopeEip8141.TxEnvelopeEip8141 | An EIP-8141 transaction containing independently budgeted call frames. |
TxEnvelopeEip8141.Type | EIP-8141 transaction type identifier. |

