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

@zkfold/smart-wallet-sdk

v0.1.1

Published

Browser-safe Rust/WASM SDK for zkFold Smart Wallet v2.

Downloads

70

Readme

smart-wallet-sdk

Browser-safe Rust/WASM SDK for Smart Wallet v2.

The SDK contains the client-side protocol helpers needed by applications that integrate Smart Wallet:

  • API request and response data types.
  • Gmail address canonicalization and email hash helpers.
  • Google JWT parsing for the proof flow.
  • Sigma proof generation for escrow claims.
  • Opaque-byte 2-of-3 key-share split and combine helpers.

The SDK does not generate wallet keys, derive blockchain addresses, validate public keys, integrate with browser wallets, store custody data, submit transactions, query RPC providers, or send API requests.

Rust

let email = smart_wallet_sdk::email::canonicalize_email(" [email protected] ")?;
let shares = smart_wallet_sdk::key_share::split_secret(b"ordinary wallet secret")?;
let secret = smart_wallet_sdk::key_share::combine_shares(&shares[0], &shares[1])?;

WASM

Install the published browser package with:

npm install @zkfold/smart-wallet-sdk

Use the generated module from browser code:

import init, { canonicalize_email, prove_claim } from "@zkfold/smart-wallet-sdk";

await init();
const email = canonicalize_email(" [email protected] ");

Build the browser package with:

wasm-pack build --scope zkfold --target web --out-dir pkg --out-name smart_wallet_sdk --features wasm

The WASM facade exports JSON-oriented functions for browser callers:

  • canonicalize_email(email)
  • email_hash(email)
  • key_share_email_hash(email)
  • split_secret(secretBase64url)
  • combine_secret_shares(firstShare, secondShare)
  • parse_google_jwt(compactJwt)
  • prove_claim(inputJson)
  • prove_key_share(inputJson)

Browser Function Contracts

canonicalize_email(email) trims ASCII whitespace, lowercases ASCII characters, rejects unsupported characters, and returns the canonical Gmail address string.

email_hash(email) returns the 0x-prefixed Keccak-256 hash of the supplied email string. Call canonicalize_email first for user-entered send and balance inputs.

key_share_email_hash(email) canonicalizes the email and returns the 0x-prefixed SHA-256 hash used to key optional key-share storage.

parse_google_jwt(compactJwt) accepts a compact Google ID token and returns a JSON string with headerB64, payloadB64, kid, email, emailHash, and the public JWT offset data needed by the proof flow. The JWT signature remains local to the browser.

prove_claim(inputJson) accepts:

{
  "compactJwt": "header.payload.signature",
  "googleKey": {
    "kid": "google-key-id",
    "modulus": "0x...",
    "exponent": 65537
  },
  "chain": {
    "type": "evm",
    "chainId": 11155111,
    "escrow": "0x1111111111111111111111111111111111111111"
  },
  "refs": [
    "0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
  ],
  "to": "0x3333333333333333333333333333333333333333",
  "relayer": "0x2222222222222222222222222222222222222222"
}

For Cardano, use:

{
  "type": "cardano",
  "network": "preprod"
}

with Cardano refs in txHash#index form and Cardano to and relayer addresses. The function returns the JSON request body for /v1/claim.

prove_key_share(inputJson) accepts:

{
  "compactJwt": "header.payload.signature",
  "googleKey": {
    "kid": "google-key-id",
    "modulus": "0x...",
    "exponent": 65537
  },
  "operation": "store",
  "keyShareEmailHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "clientId": "partner-app",
  "challenge": "base64url-32-byte-challenge",
  "share": "serialized-share-for-store"
}

For retrieve proofs, set operation to retrieve and omit share. The function returns the proof object used by /v1/key-share or /v1/key-share/retrieve.