Prerequisites
Before installing the SDK, ensure you have the following:Node.js
Version 16 or later
Solana CLI
Version 2.1.18 or later
Anchor
Version 0.31.1 (for development)
TypeScript
Recommended for type safety
Install the SDK
The Privacy Cash SDK is available on GitHub. Install it using npm or yarn:The SDK package is hosted at github.com/Privacy-Cash/privacy-cash-sdk.
Install Dependencies
The SDK requires several peer dependencies for cryptographic operations:Dependency Overview
Download Circuit Files
The SDK requires circuit files for proof generation. These are large files (100MB+) and must be downloaded separately:1
Clone the Repository
2
Build Circuit Artifacts
3
Copy Artifacts to Your Project
Initialize the SDK
Create a configuration file to initialize the SDK:config.ts
Verify Installation
Test your installation with a simple script:test-installation.ts
If you see commitment and nullifier outputs, your installation is complete!
Environment Configuration
Create a.env file for sensitive configuration:
.env
TypeScript Configuration
Add proper TypeScript configuration for the SDK:tsconfig.json
Next Steps
Basic Usage
Learn core SDK operations
Examples
View complete integration examples