When you’re past the prototype stage and shipping a production daemon, indexer, trading bot, or long-running agent worker, reach for the Rust SDK. Instead of managing raw HTTP requests, gRPC channels, and WebSocket connections yourself, the SDK handles connection lifecycle, authentication, retries, failover, and reconnection behind a clean API.Documentation Index
Fetch the complete documentation index at: https://docs.orbitflare.com/llms.txt
Use this file to discover all available pages before exploring further.
Install
--features "ws grpc" for an indexer that subscribes to both surfaces.
What’s included
| Service | What it does |
|---|---|
| RPC | JSON-RPC client with typed helpers for common Solana methods, plus raw escape hatches |
| WebSocket | Subscriptions for accounts, logs, slots, signatures with auto-resubscribe on reconnect |
| gRPC (Yellowstone) | Yellowstone Geyser streaming for transactions, accounts, slots, and blocks. YAML config or programmatic filters |
| JetStream | OrbitFlare’s decoded shreds delivered as gRPC streams. Same client pattern as Yellowstone, different proto |
Environment variables
The SDK reads endpoints from the environment if you don’t pass them explicitly. This is the recommended pattern for agent-generated code: the agent never has to hard-code URLs or keys, and the same binary works across regions and networks.| Variable | Used by | Purpose |
|---|---|---|
ORBITFLARE_LICENSE_KEY | RPC, WebSocket | API key appended to endpoint URLs |
ORBITFLARE_RPC_URL | RPC | Default endpoint if .url() is not called |
ORBITFLARE_WS_URL | WebSocket | Default endpoint if .url() is not called |
ORBITFLARE_GRPC_URL | gRPC | Default endpoint if .url() is not called |
ORBITFLARE_JETSTREAM_URL | JetStream | Default endpoint if .url() is not called |
Quick example
A minimal RPC agent that reads its endpoint from the environment and queries balance with retry/failover handled automatically:Streaming with Yellowstone gRPC
YellowstoneClientBuilder for JetstreamClientBuilder.
Why use the SDK over raw HTTP
For agent-written production code, the SDK handles the cross-cutting concerns that are easy to get wrong:- Retries with exponential backoff, configurable per client
- Multi-region failover: primary fails, fallbacks tried in order
- Auth injection: license key added to every request, never stored in the endpoint
- WebSocket reconnect: subscriptions auto-resubscribe after disconnect
- gRPC channel management: keepalive, reconnect, backoff
- Typed responses: common methods deserialize into Rust structs, with raw escape hatches available for everything else
Source
- SDK repo: github.com/orbitflare/orbitflare-sdk-rs
- Full reference: SDK overview, RPC, WebSocket, gRPC, Jetstream