Skip to main content
All PTB construction lives in packages/frontend/src/lib/ptb.ts. Consumers receive a fully-built Transaction they can hand to useTxSigner().sign().

Predict

The mint PTB asserts the on-chain ask hasn’t moved more than 105% of the quote before submitting (avoids decrease_position code 3).

Binary markets (scaffolded)

All merge multiple coin objects per leg into one PTB so the user can redeem a basket in a single tx.

DeepBook V3 swap

Dark-pool vault

Agent wizard

Not a single builder. The /agents Create wizard inlines the PTB:
Dry-run-verified on testnet (creates BalanceManager, TradeCap, TradeAgent, AgentOwnerCap, registry AgentSummary).

Optimistic Oracle

Latest finalize_vote matches the multi-return pattern from scripts/oo-finalize.ts, drops the address return, and transferObjects-es both bond coins to sender.

Send DUSDC (zkLogin onramp / offramp)

Inlined in SendDusdcCard.tsx:
Flows through useTxSigner() so gas is sponsored when allowlisted.