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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@cryptokass/zkauth-sdk

v0.0.4

Published

ZKAuth SDK for authentication using zero-knowledge proofs

Readme

ZKAuth SDK

ZKAuth is a zero-knowledge proof-based crypto wallet, controlled by your google, apple, twitter or facebook account, using ZK-Snarks to verify your identity without revealing any personal information on-chain.

Usage

npm install @cryptokass/zkauth-sdk
import { ZKAuth } from "@cryptokass/zkauth-sdk";

const zkauth = new ZKAuth({
  name: "My Awesome App",
  url: "https://example.com",
  icon: "https://example.com/icon.png",
});

Connection

zkauth.connect() will open a popup displaying login options. Upon successful login, it will return the wallet address.

const walletAddress = await zkauth.connect();

zkauth.reconnect() will attempt to use the same wallet as the last connection. If the user is not connected, it will prompt the user to connect.

Alternatively, you can connect directly with a given provider:

const walletAddress = await zkauth.reconnect("google");

Disconnect

zkauth.disconnect();

Will disconnect the currently connected user.

Send a transaction

const txHash = await zkauth.sendTransaction({
  to: "0x123...",
  value: 1000000000000000000, // value in wei
});

State

zkauth.connected() will return true if the user is connected, false otherwise.

const isConnected = zkauth.connected();

zkauth.currentUser() will return the currently connected user, or null if the user is not connected.

const walletAddress = zkauth.currentUser();

How the ZKAuth SDK works

The SDK interacts with the ZKAuth gateway, which prompts users to login with their provider of choice, produces required ZK proofs, and creates/retrieves a users ZKAuth smart contract wallet, on all supported networks.

The SDK requires popup windows to be enabled for the domain of the DApp, as it communicates with the gateway via the PostMessage API.

The typical login flow looks like this:

ZKAuth DApp Flow

  1. The user clicks the connect button, which calls zkauth.connect().
  2. The SDK opens a popup prompting the user to select their login method. The gateway also creates/loads a local ephemeral key for temporary use with the smart wallet. It forwards the user to the OUAuth login page.
  3. The Gateway receives the users OAuth JWT from the trusted provider for processing.
  4. The Gateway infers the users smart wallet address from the JWT and returns it instantly to the SDK for display/use.

Background Tasks

  1. The Gateway service triggers the wallet setup, if the smart wallet does not exist or the ephemeral key is not registered. The background service manages this setup, handling any failures and retries.
  2. The background runner service forwards the request to a high-performance, secure zk-SNARK proving system which generates proofs for our Zero Knowledge Proof Circuits.
  3. With the proofs generated, the background service creates the smart wallet on the desired network, and registers the ephemeral key.

TODO:

  • ✅ ZK Auth Login with Google – Basic implementation.
  • ❌ Viem Bindings – We need to create a wrapper that works with viem.
  • ❌ Ethers Bindings – We need to create a wrapper that works with ethers.