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

@solsticeprotocol/sdk

v1.2.0

Published

Zero-Knowledge Identity Verification SDK for Solana

Downloads

85

Readme

Solstice SDK

NPM Version License TypeScript Build Status

Zero-Knowledge Identity Verification SDK for Solana using India's Aadhaar infrastructure.

Overview

The Solstice SDK enables privacy-preserving identity verification using zero-knowledge proofs on Solana. Transform government-issued identity credentials into portable, verifiable proofs without revealing personal data.

Key Features

  • Privacy-First: All proof generation happens client-side
  • High Performance: 5-second proof generation, sub-second verification
  • Compressed: 256-byte proofs with Light Protocol compression
  • Three Proof Types: Age, nationality, and uniqueness verification
  • Solana Native: Built for the Solana ecosystem
  • mAadhaar Integration: Uses India's Aadhaar QR code system
  • Sybil Resistant: Cryptographic uniqueness guarantees

Installation

npm install @solsticeprotocol/sdk
# or
yarn add @solsticeprotocol/sdk

Prerequisites

  • Node.js 16+
  • A Solana wallet (Phantom, Solflare, etc.)
  • mAadhaar QR code for identity verification

Quick Start

Basic Setup

import { SolsticeSDK } from '@solsticeprotocol/sdk';
import { PublicKey } from '@solana/web3.js';

// Initialize SDK
const sdk = new SolsticeSDK({
  endpoint: 'https://api.devnet.solana.com',
  programId: new PublicKey('8jrTVUyvHrL5WTWyDoa6PTJRhh3MwbvLZXeGT81YjJjz'),
  network: 'devnet',
  debug: true
});

// Initialize and connect
await sdk.initialize();
await sdk.connect(walletAdapter);

Age Verification Example

// Register identity (one-time setup)
await sdk.registerIdentity(qrData);

// Generate age proof
const ageProof = await sdk.generateAgeProofWithQR(qrData, {
  threshold: 18  // Prove age >= 18
});

// Verify on-chain
const result = await sdk.verifyIdentity(ageProof);
console.log('User is 18+:', result.verified);

Nationality Verification Example

// Generate nationality proof
const nationalityProof = await sdk.generateNationalityProofWithQR(qrData, {
  allowedCountries: ['US', 'CA', 'UK', 'AU', 'IN']
});

// Verify on-chain
const result = await sdk.verifyIdentity(nationalityProof);
console.log('User from allowed country:', result.verified);

Sybil Resistance Example

// Generate uniqueness proof for DAO voting
const uniquenessProof = await sdk.generateUniquenessProofWithQR(qrData, {
  daoId: 'my-dao',
  epochId: 'proposal-123'
});

// Verify on-chain (prevents double voting)
const result = await sdk.verifyIdentity(uniquenessProof);
console.log('Unique voter:', result.verified);

API Reference

SolsticeSDK

Constructor

new SolsticeSDK(config?: Partial<SolsticeConfig>)

Methods

initialize(): Promise<void>

Initialize the SDK and load ZK circuits.

connect(wallet: WalletAdapter): Promise<void>

Connect a Solana wallet for blockchain operations.

registerIdentity(qrData: string): Promise<string>

Register identity commitment on blockchain from mAadhaar QR.

generateAgeProofWithQR(qrData: string, params: AgeProofParams): Promise<ProofData>

Generate age verification proof.

Parameters:

  • qrData: mAadhaar QR code data
  • params.threshold: Minimum age to prove
  • params.includeNationality?: Include nationality in proof
  • params.nonce?: Custom nonce for uniqueness
generateNationalityProofWithQR(qrData: string, params: NationalityProofParams): Promise<ProofData>

Generate nationality verification proof.

Parameters:

  • qrData: mAadhaar QR code data
  • params.allowedCountries: Array of allowed country codes
  • params.includeAge?: Include age verification
  • params.ageThreshold?: Minimum age if including age
  • params.nonce?: Custom nonce for uniqueness
generateUniquenessProofWithQR(qrData: string, params: UniquenessProofParams): Promise<ProofData>

Generate uniqueness proof for Sybil resistance.

Parameters:

  • qrData: mAadhaar QR code data
  • params.daoId: DAO or application identifier
  • params.epochId?: Voting round or epoch identifier
  • params.nonce?: Custom nonce for uniqueness
verifyIdentity(proof: ProofData): Promise<VerificationResult>

Verify proof on Solana blockchain.

verifyProofOffChain(proof: ProofData): Promise<boolean>

Verify proof client-side (faster, less secure).

getIdentityStatus(): Promise<IdentityStatus>

Get current identity status from blockchain.

batchGenerate(qrData: string, requests: BatchProofRequest[]): Promise<BatchProofResult>

Generate multiple proofs in parallel.

Environment Setup

Web Applications

Copy circuit files to your public directory:

cp -r node_modules/@solsticeprotocol/sdk/circuits public/

Node.js Applications

Basic functionality available immediately. Full ZK proof generation requires browser environment.

Testing

Use included testing utilities:

import { Testing } from '@solsticeprotocol/sdk';

// Generate mock data for testing
const mockQRData = Testing.generateMockQRData();

// Validate QR format
const isValid = Testing.validateQRFormat(qrCodeData);

Security

  • UIDAI Signature Validation: Verify official Aadhaar signatures
  • Zero-Knowledge Proofs: No sensitive data revealed
  • Cryptographic Commitments: Only hash commitments stored
  • Memory Protection: Sensitive data cleared after use

Performance

| Operation | Time | Output Size | |-----------|------|-------------| | QR Processing | ~50ms | - | | Age Proof | ~500ms | 256 bytes | | Nationality Proof | ~600ms | 256 bytes | | Uniqueness Proof | ~550ms | 256 bytes |

Links

Support

For questions and support, please open an issue on our GitHub repository.