Skip to content

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

NameDescription
TxEnvelopeEip8141.assertAsserts that an EIP-8141 envelope satisfies structural transaction constraints.
TxEnvelopeEip8141.deserializeDeserializes an EIP-8141 transaction body or PeerDAS network wrapper.
TxEnvelopeEip8141.fromCreates an EIP-8141 transaction envelope from an object or serialized transaction.
TxEnvelopeEip8141.fromRpcConverts an RPC envelope to an EIP-8141 envelope without losing chain ID precision.
TxEnvelopeEip8141.getSignPayloadReturns the canonical signing payload of an EIP-8141 envelope.
TxEnvelopeEip8141.hashHashes an EIP-8141 transaction, excluding its blob sidecars.
TxEnvelopeEip8141.serializeSerializes an EIP-8141 envelope, including a PeerDAS wrapper when sidecars exist.
TxEnvelopeEip8141.toRpcConverts an EIP-8141 envelope to RPC fields. Sidecars are excluded.
TxEnvelopeEip8141.validateReturns whether an EIP-8141 envelope satisfies structural constraints.

Errors

NameDescription
TxEnvelopeEip8141.InvalidErrorThrown when an EIP-8141 envelope is structurally invalid.

Types

NameDescription
TxEnvelopeEip8141.RpcJSON-RPC representation of an EIP-8141 envelope.
TxEnvelopeEip8141.SerializedSerialized EIP-8141 transaction envelope.
TxEnvelopeEip8141.SerializedTypeSerialized EIP-8141 transaction type.
TxEnvelopeEip8141.TxEnvelopeEip8141An EIP-8141 transaction containing independently budgeted call frames.
TxEnvelopeEip8141.TypeEIP-8141 transaction type identifier.