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

@zylith/sdk

v0.1.0

Published

TypeScript SDK for Zylith shielded CLMM on Starknet

Readme

@zylith/sdk

TypeScript client SDK for interacting with the Zylith shielded CLMM on Starknet.

Features

  • Two proving modes: Server-side (ASP) or client-side (snarkjs)
  • Full UTXO note management with encrypted local storage
  • BN128 Poseidon commitment and nullifier computation
  • Merkle tree construction and proof generation
  • Typed ASP client covering all 9 REST endpoints
  • Starknet contract readers for pool state and coordinator queries
  • Circuit input builders for membership, swap, mint, and burn proofs

Installation

bun add @zylith/sdk
# or
npm install @zylith/sdk

Quick Start

import { ZylithClient } from "@zylith/sdk";

const client = new ZylithClient({
  starknetRpcUrl: "https://starknet-sepolia.g.alchemy.com/...",
  contracts: {
    pool: "0x...",
    coordinator: "0x...",
  },
  mode: "asp",
  aspUrl: "http://localhost:3000",
  password: "encryption-password-for-notes",
});

await client.init();

// Deposit into the shielded pool
const result = await client.deposit({
  token: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
  amount: 1000000000000000000n,
});

// Check shielded balance
const balance = client.getBalance("0x049d...");

// Execute a shielded swap
const swap = await client.swap({
  poolKey: { token_0: "0x...", token_1: "0x...", fee: 3000, tick_spacing: 60 },
  tokenIn: "0x...",
  amountIn: 500000000000000000n,
  amountOutMin: 490000000000000000n,
});

Modules

| Module | Description | |--------|-------------| | ZylithClient | Main entry point — wraps all operations, queries, and note management | | AspClient | HTTP client for the ASP REST API | | NoteManager | Encrypted UTXO note storage (AES-256-GCM) | | ClientProver | Local Groth16 proof generation via snarkjs | | PoolReader | Read pool state, positions, and ticks from Starknet | | CoordinatorReader | Read Merkle root, nullifiers, and pause state from Starknet | | MerkleTree | BN128 Poseidon Merkle tree (height 20, LeanIMT) |

Exports

// Client
import { ZylithClient, AspClient } from "@zylith/sdk";

// Crypto (advanced)
import { initPoseidon, hash, computeCommitment, MerkleTree } from "@zylith/sdk";

// Starknet readers
import { PoolReader, CoordinatorReader, SEPOLIA_ADDRESSES } from "@zylith/sdk";

// Constants
import { TREE_HEIGHT, TICK_OFFSET, FEE_TIERS, BN254_SCALAR_FIELD } from "@zylith/sdk";

// Utilities
import { hexToDecimal, u256Split, generateRandomSecret } from "@zylith/sdk";

Testing

bun test        # run once
bun test:watch  # watch mode

Tests cover crypto primitives, ASP client, operations, storage, and utility functions.

Requirements

  • Node.js 18+ or Bun
  • For client-side proving: circuit artifacts in artifacts/ (run bun run copy-artifacts)

License

MIT