Frame.from
Coerces a frame object into a Frame.Frame.
Validates the frame and returns a copy, preserving literal types and the supplied numeric or named mode and flags. Omitted fields stay omitted; Frame.toTuple supplies their defaults when encoding.
Imports
Named
import { Frame } from 'ox'Examples
Basic Usage
Construct a verification frame that approves execution and payment.
import { Frame } from 'ox'
const frame = Frame.from({
executionGas: 50_000n,
flags: 'approveExecutionAndPayment',
mode: 'verify'
})Definition
function from<frame>(
frame: frame | Frame,
): frameSource: src/core/Frame.ts
Parameters
frame
- Type:
frame | Frame
The frame object to convert.
Return Type
The validated frame.
frame

