TRANSACTION LIFECYCLE

Prepare a transaction

Build an unsigned frame transaction with explicit actions, gas limits, and fee bounds. The client checks the chain and resolves the ordinary account nonce.

APIclient.prepareFrameTransaction(parameters)

Usage

TYPESCRIPT
prepare.ts
import { frame, getProfile } from '@framepay/sdk';const profile = getProfile('ethrex-eip8141-tracer');const transaction = await client.prepareFrameTransaction({  sender: signer.address,  maxFeePerGas: 2_000_000_000n,  frames: [    frame(profile, 'VERIFY', {      scope: 'EXECUTION_AND_PAYMENT', execution: 30_000n,    }),    frame(profile, 'SENDER', {      target: recipient, value: 1_000_000_000n,      execution: 50_000n, state: 200_000n,    }),  ],});

Examples use the configured client from Create a client.

Parameters

NameTypeDescription
senderAddressThe account authorizing the transaction.
framesFrame[]Ordered frames with explicit execution and state gas limits.
maxFeePerGasbigintMaximum gas price, in wei.
nonceSeqbigint?Read from the chain for ordinary nonces when omitted. Required for nonzero nonce keys.
nonceKeysbigint[]?Defaults to [0n]. Keyed nonce allocation is managed by the caller.
recentRootReferencesRecentRootReference[]?Optional references included in the signed envelope.

Returns

Promise<FrameTx> — an unsigned transaction envelope.

Behavior to know

  • Preparation is not admission simulation. Gas values in this example come from the workshop preset.
  • A nonce read is not a reservation. Serialize ordinary-nonce sends from the same account.
NEXT UPSign locally