Skip to main content

SDK architecture tour

The public quant-desk-app/quantdesk-sdk repository is the developer-facing surface of QuantDesk: the on-chain interface, a typed client, and copy-paste examples. It is intentionally sterile — it contains what you need to integrate, and nothing about how the platform is operated internally. This page walks the top-level tree so you know what you are looking at.

Repository layout

idl/ — the on-chain contract

The Interface Definition Language files describe the QuantDesk perpetuals program: its instructions, accounts, and types. They are the source of truth for anything that talks to the program directly on Solana. Use these to build and decode transactions, or to generate your own bindings in another language.

typescript/ — the client library

The published SDK package (@quantdesk/sdk) lives here. It wraps the IDL, REST gateway, and websocket streams behind a typed client. Install it directly:

examples/ — runnable integrations

Self-contained samples grouped by task. Each subdirectory has its own README.md and works out of the box. Standalone files at the root of examples/ (for example basic-trading-demo.js and community-trading-bot.ts) are quick, single-file starting points.

scripts/ — environment setup

Convenience scripts for standing up a local development environment (SVM testing, WSL setup, and analysis prep). They are optional — you do not need them to consume the published package, only to hack on the repo itself.

Where to go next