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

zypherscan-zcash-wasm

v0.1.4

Published

High-performance Rust-based WebAssembly SDK for Zcash. Provides efficient private transaction scanning (trial decryption) and key utilities for JavaScript/TypeScript environments (Node.js & Web).

Downloads

27

Readme

Zcash WASM Scanning SDK

High-performance Rust-based WebAssembly SDK for Zcash. Provides efficient private transaction scanning (trial decryption) and key utilities for JavaScript/TypeScript environments (Node.js & Web).

Features

  • High-Performance Scanning: Batch trial decryption for Orchard actions using WASM.
  • Privacy Handling: Decrypt transaction specific details (memos, amounts) securely.
  • Address Management: Parse Unified Addresses (UA).
  • Cross-Platform: Works in both Browser and Node.js.

Installation

1. In this project (local dev)

# Build (required)
wasm-pack build --target nodejs --out-dir pkg-node

# Install deps
npm install

2. In an External Project

If you have published this package to NPM or are installing via git/local path:

# Install via NPM/pnpm/yarn
pnpm install zypherscan-zcash-wasm

Then import normally in your code:

import {
  get_addresses,
  batch_filter_compact_outputs,
} from "zypherscan-zcash-wasm";

Prerequisite: Building the SDK

To use this SDK in a Node.js environment (like the CLI scanner), build it with the nodejs target:

# Install wasm-pack
npm install -g wasm-pack

# Build for Node.js
wasm-pack build --target nodejs --out-dir pkg-node

Usage Example

1. Basic Setup & Scanning

import {
  batch_filter_compact_outputs,
  get_addresses,
} from "zypherscan-zcash-wasm";

async function main() {
  // 1. Setup Keys
  // Note: Addresses must be derived from a Unified Address string, not raw keys.
  const ua = "u1...";
  const addresses = JSON.parse(get_addresses(ua));
  console.log("Orchard Address:", addresses.orchard);

  // 2. Scan Compact Outputs (from Lightwalletd)
  const outputs = [
    {
      txid: "...",
      height: 123456,
      nullifier: "hex...",
      cmx: "hex...",
      ephemeral_key: "hex...",
      ciphertext: "hex...",
    },
  ];

  // match against your Viewing Key (UFVK)
  const ufvk = "uview...";
  const matchesJson = batch_filter_compact_outputs(
    JSON.stringify(outputs),
    ufvk
  );
  console.log("Matches:", JSON.parse(matchesJson));
}

2. Live Scanner CLI

This repository includes a fully functional CLI tool to scan the Zcash blockchain for transactions.

Setup:

# Install dependencies
npm install

# Build WASM
wasm-pack build --target nodejs --out-dir pkg-node

Run Scanner:

npm start

Follow the interactive prompts:

  1. Lightwalletd URL: e.g., lightwalletd.zypherscan.com
  2. UFVK: Your Unified Full Viewing Key.
  3. Birthday Height: Block height to start scanning from.
  4. Unified Address: (Optional) Your UA for display purposes.

API Reference

get_addresses(ua: string) -> string (JSON)

Parses a Unified Address and returns its component receivers (Orchard, Sapling, Transparent).

  • Input: Unified Address string (u1...).
  • Returns: JSON string { orchard: "...", sapling: "...", transparent: "..." }.

batch_filter_compact_outputs(json_outputs: string, ufvk: string) -> string (JSON)

Scans a batch of compact outputs to find those owned by the viewing key.

  • Input: JSON array of compact output objects, UFVK string.
  • Returns: JSON array of matches { txid: "...", index: ... }.

decrypt_memo(tx_hex: string, ufvk: string) -> string (JSON)

Decrypts a full transaction hex to retrieve amounts, memos, and directions.

  • Input: Raw transaction hex, UFVK string.
  • Output: JSON array of decrypted outputs.

License

MIT