strata-public-contract 0.1.0

Shared Rust types for Strata markets and Sonar quotes.
Documentation

strata-public-contract

Shared Rust models for Strata markets, capabilities, and Sonar quotes.

Most applications should start with strata-sdk, which includes these types and the async HTTP client. Use this crate directly when you need the public models without a network client.

Install

[dependencies]
strata-public-contract = "0.1"

What it provides

Model Represents
CapabilityCatalog Features currently available from Strata
MarketsResponse Markets, token decimals, and Sonar quote readiness
QuoteRequest Market, side, exact input amount, and slippage
QuoteResponse Output, fees, minimum output, price impact, and expiry
ErrorResponse Stable public error details

Token amounts are unsigned decimal strings in atomic units so values stay exact across Rust, JSON, JavaScript, and terminal boundaries.

Versioned fixtures

Enable the optional fixtures feature to consume the canonical JSON examples used across the official Strata SDKs:

[dev-dependencies]
strata-public-contract = { version = "0.1", features = ["fixtures"] }

See the workspace README for the complete guide.