Skip to main content
The Rust SDK exposes the engine layer directly. — every flow goes through transact() with a shaped TransactOptions.

Entrypoint: transact

One function, every flow. The TransactOptions.swap field routes to /transact_swap; the sign of external_amount classifies deposit/transfer/withdraw.

TransactOptions

All fields except inputs, outputs, and external_amount have Default values. Build with struct-update syntax:

TransactResult

Thread cached_merkle_tree and address_lookup_table_accounts into the next TransactOptions to skip re-work.

SwapOptions

Set opts.swap = Some(swap) to route through /transact_swap. Direct-path swap is rejected (relay owns DEX account wiring).

UTXO primitives

UtxoKeypair is a field-element keypair for the circuit — not a Solana keypair.

RPC

RpcProvider is object-safe (Arc<dyn RpcProvider>). The trait surface:
Tests use rpc::test_support::MockRpc with scripted responses.

Relay

Instruction builders

Direct-submission instruction builders live under solana::instructions:
The orchestrator assembles these automatically. Call them directly if you need a custom submission path.

Proof generation

Called internally by the engine; exposed for custom proof pipelines. Artifacts cache at the platform cache dir.

Error type

See Error handling for retry semantics.

Constants

Fee constants live under utils::fees.