Prerequisites
Before installing the SDK, ensure you have:- Node.js 16 or higher
- npm, yarn, or pnpm package manager
Installation
Install the package using your preferred package manager:Peer Dependencies
The SDK requires@solana/kit as a peer dependency:
Dependencies
The following dependencies are automatically installed:@solana-program/system- For creating accounts and system program interactions
Basic Usage
Once installed, import the SDK in your TypeScript/JavaScript file:Example: Verify Zero Ciphertext
Here’s a complete example showing how to verify a zero ciphertext proof:Example: Verify with Context State
You can also create a context state account to store verified proof data:Example: Using Proof from Record Account
For large proofs, you can store them in a record account and reference them:TypeScript Configuration
For optimal TypeScript support, ensure yourtsconfig.json includes:
Package Exports
The package supports both CommonJS and ES modules:- Types:
./dist/types/index.d.ts - ESM:
./dist/src/index.mjs - CommonJS:
./dist/src/index.js
Next Steps
Instructions Reference
Explore all available instructions and their TypeScript signatures