Skip to main content

Install

Pin @solana/web3.js to ^1.95.4. The SDK is not compatible with @solana/web3.js v2 or @solana/kit.

Import paths

The package ships three entry points. Only import what you need. Never import @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’s Buffer internally. In browser bundlers, Buffer is not available by default.
Create src/lib/buffer-polyfill.ts and import it at the top of your root layout:
TypeScript
TypeScript
Then add to next.config.ts:
TypeScript

What’s next

  • Quickstart - initialize the client and place your first bet
  • React setup - wire up CypherProvider in your app