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

@edycutjong/lethe-sdk

v1.0.4

Published

Lethe Client SDK for secure right-to-erasure blinding, ECIES envelopes, and ZK proof generation

Readme

Lethe SDK (@edycutjong/lethe-sdk)

TypeScript client SDK for interacting with the Lethe erasure agent. Handles all client-side cryptographic operations: ECIES envelope encryption, ZK proof generation, campaign enqueuing, VC receipt verification, and self-destruct triggering.

Security Model: PII is encrypted locally in the client's environment using the enclave's public key before any network transmission. The coordinator agent only handles ciphertext.

Exports

LetheClient Class

import { LetheClient } from '@edycutjong/lethe-sdk';

const client = new LetheClient({
  rpcUrl: 'https://rpc.bot-chain.sandbox.test',
  enclaveUrl: 'http://localhost:8080'
});

Methods

| Method | Description | |---|---| | encryptPayload(pii, enclavePubKey) | Encrypts a PII object using ECIES (secp256k1 ECDH + HKDF-SHA256 + AES-256-GCM). Returns an EciesEnvelope. | | generateZkProof(email, salt) | Generates a mock Groth16 ZK proof with SHA-256 public signal commitment. | | enqueueErasure(params) | Submits an erasure campaign to the coordinator agent gateway. | | verifyReceipt(vc) | Validates a W3C Verifiable Credential deletion receipt structure. | | selfDestruct(userDid) | Triggers the TEE cryptographic purge and profile self-destruct. |

Interfaces

| Interface | Description | |---|---| | EciesEnvelope | { ephemeralPublicKey, iv, ciphertext, authTag } — ECIES encrypted payload | | ZkProof | { pi_a, pi_b, pi_c, publicSignals } — Groth16 proof structure |

Cryptographic Details

The encryptPayload method implements real ECIES encryption:

  1. Ephemeral keypaircrypto.createECDH('secp256k1') generates a fresh keypair per encryption
  2. ECDH shared secret — Diffie-Hellman against the enclave's public key
  3. HKDF-SHA256 — Derives 44 bytes: 32-byte AES key + 12-byte GCM IV
  4. AES-256-GCM — Encrypts JSON-serialized PII with authenticated encryption

The generateZkProof method currently produces a simulated Groth16 proof with hardcoded curve points. The publicSignals[0] field contains a real SHA-256 hash of email + salt.

Development

# Install dependencies
npm install

# Build TypeScript
npm run build

# Run unit tests (Jest)
npm test

Testing

The SDK has 9 test cases in src/index.test.ts covering:

  • Constructor initialization
  • ZK proof structure validation
  • ECIES encryption output format (65-byte uncompressed pubkey, hex fields)
  • VC receipt verification (valid + 5 invalid shapes)
  • Enqueue success/failure/network-error paths
  • Self-destruct success/failure/network-error paths