# streak-api
Shared types, constants, instruction layouts, Pyth helpers, and off-chain **`sdk`** builders for **STREAK** on Solana.
Protocol site: **[streak.market](https://streak.market)**.
This crate is intended for:
- **On-chain programs** that depend on `solana-program` and compile against the same instruction/state definitions.
- **Clients** (bots, CLIs, servers) that build transactions with [`solana_sdk`](https://docs.rs/solana-sdk); use matching major versions of Solana crates as your RPC stack.
## Contents
- **`consts`** — program id, PDAs seeds, treasury / executor addresses, timing limits.
- **`state`** — `Treasury`, `Ledger`, `Market`, `Position` account layouts (Steel `account!`).
- **`instruction`** — discriminators and typed instruction payloads used by the program.
- **`sdk`** — helpers that assemble `solana_program::instruction::Instruction` with the correct account metas (mirror on-chain ordering comments in the program).
- **`error`** — `StreakError` codes shared with the program.
Settlement math and Pyth decoding helpers live under **`settlement`** / **`pyth`** for parity with on-chain checks.
## Usage
Add to `Cargo.toml`:
```toml
streak-api = "0.1.0"
```
Depend on **`solana-program`** (and optionally **`solana-sdk`** off-chain) versions compatible with your deployment.
## License
MIT — see the repository license file.