npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nova-privacy-sdk

v1.0.1

Published

SDK for Nova Privacy - Private cryptocurrency transactions on Solana. Fork of Privacy Cash SDK.

Readme

Nova Privacy SDK

SDK for Nova Privacy - Private cryptocurrency transactions on Solana. Enable private deposits, withdrawals, and transfers for SOL and SPL tokens (including NOVA token).

🔗 Fork Information

This SDK is a fork of the Privacy Cash SDK.

Original Project: Privacy Cash
Original Repository: Privacy-Cash/privacy-cash-sdk

We extend our gratitude to the Privacy Cash team for their excellent work. This fork includes:

  • Support for Nova Privacy program (SHLD11qQaY6h2N3ozXUWJEJitk1zGm9tvvAC7rjxpsp)
  • NOVA token support with dedicated tree address
  • Custom SOL and NOVA tree configurations
  • Enhanced private transaction capabilities

🚀 Features

  • Private SOL Transactions - Deposit and withdraw SOL privately
  • Private SPL Token Transactions - Support for NOVA, USDC, USDT, and other SPL tokens
  • Zero-Knowledge Proofs - Leverages zk-SNARKs for privacy
  • Mainnet Ready - Fully configured for Solana mainnet
  • TypeScript Support - Full TypeScript definitions included

📦 Installation

npm install nova-privacy-sdk

or

yarn add nova-privacy-sdk

🔧 Quick Start

import { PrivacyCash } from 'nova-privacy-sdk';
import { Keypair } from '@solana/web3.js';

// Initialize client
const client = new PrivacyCash({
  RPC_url: 'https://api.mainnet-beta.solana.com',
  owner: yourPrivateKey // Keypair, number[], Uint8Array, or base58 string
});

// Deposit SOL privately
const depositResult = await client.deposit({
  lamports: 0.1 * 1_000_000_000 // 0.1 SOL
});

// Check private balance
const balance = await client.getPrivateBalance();
console.log('Private balance:', balance.lamports / 1_000_000_000, 'SOL');

// Withdraw SOL privately
const withdrawResult = await client.withdraw({
  lamports: 0.05 * 1_000_000_000, // 0.05 SOL
  recipientAddress: '9BWSPeFXTyQTPiPNWjWoaN6biqjktTmzMzqDpkEnova'
});

// Deposit NOVA token
const novaMint = new PublicKey('3SkFJRqMPTKZLqKK1MmY2mvAm711FGAtJ9ZbL6r1coin');
await client.depositSPL({
  mintAddress: novaMint,
  amount: 100 // 100 NOVA tokens
});

📚 API Reference

SOL Transactions

  • deposit({ lamports }) - Deposit SOL to private balance
  • withdraw({ lamports, recipientAddress? }) - Withdraw SOL from private balance
  • getPrivateBalance() - Get current private SOL balance

SPL Token Transactions

  • depositSPL({ mintAddress, amount, base_units }) - Deposit SPL tokens privately
  • withdrawSPL({ mintAddress, amount, base_units, recipientAddress? }) - Withdraw SPL tokens privately
  • getPrivateBalanceSpl(mintAddress) - Get private balance for a specific SPL token

Utility Functions

  • clearCache() - Clear cached UTXO data
  • setLogger(logger) - Set custom logger function

⚙️ Configuration

The SDK uses environment variables for configuration. Create a .env file:

# Your forked program ID
NEXT_PUBLIC_PROGRAM_ID=SHLD11qQaY6h2N3ozXUWJEJitk1zGm9tvvAC7rjxpsp

# RPC URL (optional, defaults to public mainnet)
RPC_URL=https://api.mainnet-beta.solana.com

# Tree addresses (optional, defaults configured)
# NEXT_PUBLIC_SOL_TREE=DUnk81NBY7gUYRekT7GAwTU7jvabiVVwcMKZkRDs3dW9
# NEXT_PUBLIC_NOVA_TREE=9CJ8jwAXJ7GrYtrMmD4gXBpTC59DMX7a91yMVpz25enZ
# NEXT_PUBLIC_NOVA_MINT=3SkFJRqMPTKZLqKK1MmY2mvAm711FGAtJ9ZbL6r1coin
# NEXT_PUBLIC_NOVASOL_TREE=FZfbN2fY3aj7hTwh87dKMfuVwpaEipY3TuGpmYJnsWcG
# NEXT_PUBLIC_NOVASOL_MINT=noVaLtLjRoMLaYXom5Msk8zBmuPT7uk9m7rnKsU2bDN

🌳 Supported Tokens

  • SOL - Native Solana token (Tree: DUnk81NBY7gUYRekT7GAwTU7jvabiVVwcMKZkRDs3dW9)
  • NOVA - Nova Privacy token (3SkFJRqMPTKZLqKK1MmY2mvAm711FGAtJ9ZbL6r1coin, Tree: 9CJ8jwAXJ7GrYtrMmD4gXBpTC59DMX7a91yMVpz25enZ)
  • NOVASOL - Nova SOL token (noVaLtLjRoMLaYXom5Msk8zBmuPT7uk9m7rnKsU2bDN, Tree: FZfbN2fY3aj7hTwh87dKMfuVwpaEipY3TuGpmYJnsWcG)
  • USDC - USD Coin
  • USDT - Tether USD
  • ZEC - Zcash token
  • ORE - Ore token

🔒 Privacy Features

  • UTXO Model - Uses unspent transaction outputs for privacy
  • Zero-Knowledge Proofs - Proves transaction validity without revealing details
  • Encrypted Outputs - All transaction outputs are encrypted
  • No Linkability - Transactions cannot be linked to sender or receiver

📖 Examples

Check the /example folder for complete working examples:

cd example
npm install
cp ../.env_sample .env
# Edit .env with your configuration
npx ts-node index.ts

🧪 Testing

# Run unit tests
npm test

# Run end-to-end tests (requires .env with PRIVATE_KEY and RPC_URL)
npm run teste2e

📋 Requirements

  • Node.js version 24 or above
  • Solana wallet with sufficient balance for transaction fees

⚠️ Disclaimer

This SDK has been forked from Privacy Cash and modified for Nova Privacy. While based on audited code from Privacy Cash, please fully test before using in production and be aware of inherent software risks.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

🙏 Credits

This SDK is a fork of the Privacy Cash SDK.

Privacy Cash - https://www.privacycash.org/

Original Privacy Cash SDK was audited by Zigtur. We extend our gratitude to the Privacy Cash team for their excellent work on the original SDK.

📝 License

ISC

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📧 Support

For issues and questions, please open an issue on the GitHub repository.