Skip to main content

Crate turbine_sdk

Crate turbine_sdk 

Source
Expand description

Public library for embedding TURBINE in another Rust program.

Start the runtime with Turbine::builder, then submit work as a TradeIntent. The CLI (turbine-cli) is a thin wrapper around this crate.

Structs§

Config
Top-level configuration. Required sections must be present in the TOML; tuning sections default to sane values when omitted.
ExecReport
Outcome of one execution attempt (logged + returned for tests/IPC).
ExecutionEngine
The execution engine: holds the payer keypair, the submitter, and shared state.
FailureEvent
A failure signal handed to the AI coordinator. Either tracking_id (preferred) or bundle_id must resolve to an in-flight record.
FeeDecision
The tip decision for one bundle.
HotState
The single shared hot-state container, held behind an Arc by every runtime.
RetryOverrides
AI-sanctioned overrides applied when rebuilding a bundle for an autonomous retry. Produced by the coordinator::RetryCoordinator from a governor-clamped turbine_ai::RetryAdjustments.
TradeIntent
A unit of work for the engine: trade instruction groups (one tx each) plus the accounts the bundle will write-lock (drives the contention-aware fee matrix).
Turbine
A running TURBINE engine: Geyser + DPU + Jito submit + AI retry loop.
TurbineBuilder
Builder for Turbine. Load a config, then TurbineBuilder::start.

Enums§

Congestion
Localized account-contention level, derived from the write-lock EMA z-score. Ordered so max() over a bundle’s write-locked accounts picks the bottleneck.
DeshredBootStatus
Result of attempting to enable deshred at daemon boot.
FailureClass
The observed failure class (from the Jito reject/drop reason, an on-chain error, or a submit timeout). It is passed to the AI analyst as a hint only — the AI performs the authoritative classification and decides the fix (plan §8, revised: every failure is routed to the AI; there is no deterministic fix path).
GateOutcome
Outcome of waiting for the submission window.
Percentile
Jito landed-tip percentile buckets (p25–p99).
TelemetryEvent
A single event on the telemetry bus. Tagged for clean JSON over the WebSocket.
TurbineError
The unified error type for TURBINE. Variants are coarse-grained by component so callers can match on the failing subsystem without leaking internals.

Type Aliases§

Result
Convenient result alias used throughout TURBINE crates.