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

@zpcash/sdk

v0.1.0

Published

Identity and proof SDK for ZpCash with optional Starknet proof registry

Readme

ZpCash SDK

Privacy-preserving identity SDK for the hypothetical ZpCash ecosystem. The toolkit mirrors the ideas from @zkterm/zkid and augments them with a Cairo smart contract for immutable proof anchoring on Starknet.

Features

  • did:zpcash:xxxx identity generation backed by Ed25519 keypairs
  • Password-based encryption (AES-256-GCM + PBKDF2, 200k iterations)
  • Deterministic proof messages with short-lived nonces and timestamping
  • Built-in utilities to hash proofs and prepare Starknet call data
  • Starknet (STARK curve) wallet management for OpenZeppelin or ArgentX flows
  • Cairo smart contract (contracts/src/lib.cairo) to store proof hashes on-chain

Installation

npm install @zpcash/sdk
# or
pnpm add @zpcash/sdk

Install dependencies after cloning this workspace with npm install before running TypeScript builds.

Quick Start

import {
  createZpIdentity,
  generateProof,
  hashProof,
  assembleOnChainProof,
  buildStoreProofCalldata,
} from '@zpcash/sdk';

async function main() {
  const password = 'ChangeMe123!';
  const identity = await createZpIdentity(password);

  const proof = await generateProof({
    zpId: identity.zpId,
    password,
    encrypted: identity.encryptedPrivateKey.encrypted,
    salt: identity.encryptedPrivateKey.salt,
    iv: identity.encryptedPrivateKey.iv,
    iterations: identity.encryptedPrivateKey.iterations,
  });

  const proofHash = hashProof(proof);
  const payload = assembleOnChainProof(proof, identity.zpId);
  const calldata = buildStoreProofCalldata(payload);

  console.log('Proof ID (felt):', payload.proofId);
  console.log('Proof hash (hex):', proofHash.hashHex);
  console.log('Starknet calldata:', calldata);
}

main().catch(console.error);

Starknet Wallet Helpers

import { createZpcashWallet, decryptZpcashPrivateKey } from '@zpcash/sdk';

const wallet = await createZpcashWallet('MyWalletPassword', 'openzeppelin');
console.log(wallet.address);

const privateKey = await decryptZpcashPrivateKey(wallet.encryptedPrivateKey, 'MyWalletPassword');

The helpers rely on the starknet library internally and work with both OpenZeppelin and ArgentX class hashes.

Cairo Contract

The Starknet contract is packaged in contracts/ with Scarb metadata:

contracts/
 ├── README.md
 ├── Scarb.toml
 └── src/
     └── lib.cairo

The contract exposes:

  • store_proof(proof_id, proof_hash, zp_id)
  • get_proof(proof_id)
  • verify_proof_exists(proof_id)

See contracts/README.md for compilation and deployment steps.

Building

npm run build

TypeScript sources compile to dist/ with declaration files for downstream projects.

Security Notes

  • Private keys are zeroed in memory immediately after encryption/decryption helpers finish.
  • PBKDF2 iterations default to 200,000. Override with caution and always prefer values ≥ 100,000.
  • Proof messages expire after 10 minutes by default. Adjust ttlSeconds when calling generateProof if necessary.

License

MIT