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

@confidentialkit/sdk

v0.2.0

Published

Ergonomic TypeScript SDK for Solana Token-2022 Confidential Balances.

Readme

@confidentialkit/sdk

Ergonomic TypeScript SDK for Solana Token-2022 Confidential Balances, built on the audited @solana/zk-sdk WASM module. It parses the on-chain confidential-transfer account state and decrypts balances — the read/inspect path that powers debugging (the missing spl-token --decrypt, token-2022#145).

All cryptography is delegated to @solana/zk-sdk. This package never implements ElGamal/AES itself — it provides parsing, ergonomics, and lifecycle management around the audited primitives.

Install

npm install @confidentialkit/sdk

Network-free. This package makes no network calls — pass it account bytes you already have. To fetch from an RPC, use @confidentialkit/kit's inspectConfidentialAccount, or your own RPC client + decodeConfidentialAccount.

Usage

Decode account bytes (offline / browser)

import { decodeConfidentialAccount } from "@confidentialkit/sdk";

// Inspector mode — raw ciphertexts, no keys needed:
const raw = await decodeConfidentialAccount(accountData);
console.log(raw.state.ciphertexts);

// With owner keys — decrypted balances:
const result = await decodeConfidentialAccount(accountData, { keys: { aeKey, elgamalSecret } });
console.log(result.availableBalance, result.pendingBalance);

Fetch + decode via RPC (using @confidentialkit/kit)

import { createSolanaRpc } from "@solana/kit";
import { inspectConfidentialAccount } from "@confidentialkit/kit";

const rpc = createSolanaRpc("http://127.0.0.1:8899");
const result = await inspectConfidentialAccount(rpc, accountAddress, { aeKey });
console.log(result.availableBalance);

Decrypt a single ciphertext

import { decryptAeCiphertext, decryptElGamalCiphertext } from "@confidentialkit/sdk";

const available = await decryptAeCiphertext(aeCiphertext, aeKey);
const pendingLo = await decryptElGamalCiphertext(elgamalCiphertext, elgamalSecret);

Derive keys from a wallet signature

import {
  elgamalSignerMessage,
  deriveElGamalSecretFromSignature,
} from "@confidentialkit/sdk";

const message = await elgamalSignerMessage(accountAddressBytes);
const signature = await wallet.signMessage(message); // 64-byte ed25519
const elgamalSecret = await deriveElGamalSecretFromSignature(signature);

Browser usage

The Node WASM build loads automatically. In a browser, inject the bundler/web build once at startup:

import { setZkModule } from "@confidentialkit/sdk";
setZkModule(await import("@solana/zk-sdk/bundler"));

Notes

  • Available balance is read from the AES "decryptable" ciphertext (instant, exact) using the AES key. Pending balance is reconstructed from the lo/hi ElGamal ciphertexts using the ElGamal secret (a bounded discrete-log search — fast for small pending balances).
  • Confidential transfers hide amounts, not identities.
  • This SDK covers the read path. On-chain transfer construction is gated on the ZK ElGamal proof program being re-enabled — see the repo roadmap.

MIT