Skip to main content

Crate pyth_lazer_stellar_sdk

Crate pyth_lazer_stellar_sdk 

Source
Expand description

Rust SDK for consuming Pyth Lazer price updates in Soroban (Stellar) contracts.

Use PythLazerClient to cross-contract call a deployed pyth-lazer-stellar verifier and parse_payload to decode the verified payload bytes into typed values.

§Security

parse_payload performs no signature verification — it decodes whatever bytes it is handed. Only PythLazerClient::verify_update establishes the trust boundary: it verifies the update via the on-chain verifier contract before parsing and returns a VerifiedPayload. Passing unverified, attacker-supplied bytes to parse_payload produces a fully-formed but unsigned Update whose values must not be trusted.

Structs§

Feed
Parsed price feed data.
PythLazerClient
Typed client for cross-contract calls to a deployed pyth-lazer-stellar verifier contract.
Update
VerifiedPayload
An Update that has been verified through the on-chain verifier contract.

Enums§

Channel
MarketSession
ParseError
Errors returned by crate::parse_payload when decoding a verified Lazer payload. Declared as a #[contracterror] so consumers can propagate it directly from their own contract entrypoints.

Functions§

parse_payload
Parse verified payload bytes into a structured Update.