Search docs

Find a documentation page

Rust SDK

staked-quic-client-sdk and staked-quic-tpu-client: the canonical Rust integrations.

Crates

  • staked-quic-client-sdk: typed REST client for the marketplace API. Wraps reqwest, exposes builder-style request types, and ships the ULID-based idempotency helpers.
  • staked-quic-tpu-client: drop-in replacement for the upstream Solana TPU client that forwards the QUIC handshake's CertificateVerify payload to a validator's TEE via gRPC over TLS. Authenticated with the marketplace-issued ES256 JWT.

Both crates live in the open-source sibling repo staked-quic-connection-provider and are published with each tagged release. Cargo can pull them straight from Git:

[dependencies]
staked-quic-client-sdk = { git = "ssh://git@github.com/nodexpert-labs/staked-quic-connection-provider.git", branch = "master" }
staked-quic-tpu-client = { git = "ssh://git@github.com/nodexpert-labs/staked-quic-connection-provider.git", branch = "master" }

Typical client setup

use staked_quic_client_sdk::Client;

let client = Client::builder()
    .base_url(std::env::var("MARKETPLACE_API_URL")?)
    .bearer_token(std::env::var("MARKETPLACE_TOKEN")?)
    .build()?;

The builder enforces a base URL plus a bearer token at compile time. There is no global "init", so instantiate the client once per runtime and share it via Arc.

Full request / response types are auto-generated from the OpenAPI spec served at the API reference. Inspect the spec for the exact field list.

Where to find examples

  • The sibling repo's bench-client/ crate shows end-to-end usage against a real TPU.
  • The marketplace's tests/e2e_smoke crate walks the full list → book → pay → JWT → sign loop against a live local stack.