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.
- Pyth
Lazer Client - Typed client for cross-contract calls to a deployed
pyth-lazer-stellarverifier contract. - Update
- Verified
Payload - An
Updatethat has been verified through the on-chain verifier contract.
Enums§
- Channel
- Market
Session - Parse
Error - Errors returned by
crate::parse_payloadwhen 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.