Pythscan
Tech · Tech

SDKs

The libraries Pyth ships per language and chain. They handle update parsing, signature verification, freshness checks, and confidence-interval logic so consumer contracts don't have to reimplement them.

Pyth maintains official SDKs for the major chain ecosystems: Solidity for EVM chains, Rust and Anchor for Solana, Move for Sui and Aptos, plus language-specific packages for off-chain consumers (TypeScript, Python). The SDK is the recommended entry point for any new integration — it abstracts the wire format, the signature scheme, and the freshness logic so you focus on the business logic.

What an SDK handles for you

  • Pulling an update from Hermes (off-chain side) or accepting an update payload (on-chain side)
  • Verifying Pyth's signature on the update
  • Decoding price, confidence interval, exponent, and publish time
  • Helpers like get_price_no_older_than(max_age) and get_price_unchecked

Smart contract integration in practice

A typical on-chain integration looks like this: the caller submits a Pyth update payload (fetched from Hermes off-chain) into their transaction. The consumer contract calls update_price_feeds() on the Pyth verifier, paying the update fee. It then reads the price for its feed ID through the SDK helper that enforces a max age and (optionally) a max confidence-interval ratio. If either bound is exceeded, the read reverts; otherwise the contract uses the validated price.

Where to find them

Every SDK lives under the pyth-network organization on GitHub with per-chain READMEs. The canonical entry point is docs.pyth.network, which links to the relevant SDK and quickstart per chain. /developers on Pythscan is the live aggregation of all developer surfaces.

Related concepts