SDK Config

Configuration objects for provers, verifiers, and time anchoring.

Fairseq keeps configuration explicit and minimal: you configure time beacon access, choose an ordering rule, and set operational limits. This ensures proofs remain deterministic and easy to audit.

Core configuration

RUST
use fairseq_sdk::{Config, LighthouseConfig, OrderingRule};

let config = Config {
    lighthouse: LighthouseConfig {
        url: "https://api.fairseq.io".to_string(),
        api_key: None, // set for hosted beacon access
    },
    ordering_rule: OrderingRule::Fifo,
    timeout_ms: 30_000,
    max_batch_size: 2_000,
};

Environment variables

The SDK reads these environment variables by default:

  • FAIRSEQ_API_KEY - API key for hosted proving or hosted beacons
  • FAIRSEQ_API_URL - Custom time beacon URL (default: production)
  • FAIRSEQ_TIMEOUT_MS - Request timeout override

Self-hosted vs hosted

  • Self-hosted: omit the API key and point lighthouse.url to your deployment.
  • Hosted: supply an API key from the dashboard.

Ordering rules

You can explicitly choose FIFO, priority-fee ordering, or custom rules:

RUST
use fairseq_sdk::OrderingRule;

let config = Config {
    ordering_rule: OrderingRule::PriorityFee,
    ..Default::default()
};

Related docs

Was this page helpful? /
Back to docs