Skip to main content
Kimia is a set of permissionless Anchor programs with deterministic PDAs. Integrating does not require permission, an API key, or a keeper whitelist.
Kimia does not publish an npm package or a crates.io crate. There is no @kimia/sdk you can npm install. Everything below assumes you either:
  • Fork this repo and import the generated TS clients directly, or
  • Regenerate TS clients from the on-chain IDLs into your own project.
CPI from another Solana program works but requires a path or git Cargo dependency — no published crate.

What actually ships

Choose your integration path

TypeScript via Codama

Copy frontend/app/generated/<program>/ into your project. Only runtime dep is @solana/kit.

Regenerate from IDL

If you want the TS client in your own package, re-run Codama against the IDLs under target/idl/.

On-chain CPI

Depend on the program crate by path or git with features = ["cpi"]. Reference: Programs/programs/delta-vault/src/instructions/deposit.rs.

Keeper bot

Crank funding, liquidations, rewards, rebalancing — permissionlessly.

Source IDLs

After building the Anchor workspaces with anchor build:
Each codama.*.json in frontend/ pins one IDL to an output directory:

Typical wiring (inside this repo)

1

Build programs, regenerate clients

From the Perp-engine and Programs workspaces: anchor build. Then from frontend/: npm run codama:all.
2

Import the generated builder

3

Resolve PDAs

Use the generated find*Pda helpers; they encapsulate seed derivation.
4

Prepend an oracle update

Use @pythnetwork/pyth-solana-receiver to post a fresh Hermes update in the same transaction.
5

Sign and send

The reference sender lives at frontend/app/lib/send-transaction.ts.

Next

Generated client shape

What Codama output looks like.

Data formats & precision

Decimals, rounding, BigInt.

Error handling

Map program errors to user messages.