Frame
Utilities for constructing, validating, and encoding EIP-8141 call frames.
A Frame.Frame describes a call with an execution mode, approval flags,
and separate execution and state gas limits.
Examples
Creating Frames
Use Frame.from to construct a frame with named mode and flags.
import { Frame } from 'ox'
const frame = Frame.from({
executionGas: 50_000n,
flags: 'approveExecutionAndPayment',
mode: 'verify'
})Functions
| Name | Description |
|---|---|
Frame.assert | Asserts that a Frame.Frame satisfies frame-local constraints. |
Frame.from | Coerces a frame object into a Frame.Frame. |
Frame.fromRpc | Converts an RPC frame to a frame. |
Frame.fromTuple | Converts a Frame.Tuple to a Frame.Frame. |
Frame.toRpc | Converts a frame to its JSON-RPC representation. |
Frame.toTuple | Converts a Frame.Frame to its RLP-ready Frame.Tuple. |
Frame.validate | Returns whether a Frame.Frame satisfies frame-local constraints. |
Errors
| Name | Description |
|---|---|
Frame.InvalidError | Thrown when an EIP-8141 frame is structurally invalid. |
Types
| Name | Description |
|---|---|
Frame.Flags | Numeric approval and batching bits, or a named flag value. |
Frame.Frame | An EIP-8141 call frame. |
Frame.Mode | A numeric or named frame execution mode. |
Frame.Rpc | JSON-RPC representation of a frame. |
Frame.Tuple | RLP-ready frame tuple. Empty target bytes refer to the transaction sender. |

