Install
Import paths
The package ships three entry points. Only import what you need.| Path | Use for |
|---|---|
@cypher-zk/sdk | Core client, actions, account types, utilities |
@cypher-zk/sdk/react | React hooks (usePlaceBet, useMarkets, etc.) |
@cypher-zk/sdk/react in a Node.js script - it pulls in React and TanStack Query which are browser-only.
Buffer polyfill (Next.js / Vite)
The SDK uses Node’sBuffer internally. In browser bundlers, Buffer is not available by default.
- Next.js (Turbopack)
- Next.js (Webpack)
- Vite
Create Then add to
src/lib/buffer-polyfill.ts and import it at the top of your root layout:TypeScript
TypeScript
next.config.ts:TypeScript
What’s next
- Quickstart - initialize the client and place your first bet
- React setup - wire up
CypherProviderin your app