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

@lof-lang/toolkit-node

v0.1.2

Published

Node.js helpers for verifying Lof proofs with wasm-bindgen bindings.

Readme

@lof/toolkit-node

Node-focused helpers for loading verification keys and checking proofs using the wasm-bindgen bindings generated from the lofit crate.

The package wraps the lower-level WASM exports with a familiar, promise-based API. Pair it with the assets emitted by lof compile … --target wasm and the Node-targeted wasm-pack build of the prover/verifier.

Installation

npm install @lof/toolkit-node

Usage

Simple (auto-discovery)

The easiest way is to specify bundlePath, which automatically discovers the verification key and verifier module:

import { loadVerifier, verifyProof } from '@lof-lang/toolkit-node';
import path from 'path';

const verifier = await loadVerifier({
  bundlePath: path.resolve(__dirname, './dist/multiply/web/multiply')
});

const ok = await verifyProof(verifier, proofBytes, publicInputs);

With bundlePath, the toolkit automatically discovers:

  • ${bundlePath}/keys/${circuitName}_vk.bin
  • ${bundlePath}/prover-node/lofit.js

The circuit name is inferred from the basename of bundlePath (e.g., dist/multiply/web/multiplymultiply).

Explicit paths

For full control, you can specify each path individually:

import { pathToFileURL } from 'url';

const verifier = await loadVerifier({
  verificationKeyPath: 'web/circuit/keys/circuit_vk.bin',
  verifierModuleUrl: pathToFileURL('./prover-node/lofit.js').href
});

const ok = await verifyProof(verifier, proofBytes, publicSignals);

Notes:

  • proofBytes can be a Uint8Array, Node Buffer, or array-like of numbers
  • publicInputs can be:
    • An object: { a: '5', b: '7' } (field values as strings)
    • An array: ['5', '7'] (ordered field elements as strings)
    • An iterable: Any iterable of field element strings

API

loadVerifier(options)

Loads the WASM verifier module, reads the verification key, and returns a handle containing the instantiated WasmVerifier.

Options:

  • bundlePath?: string – Directory containing the circuit bundle (enables auto-discovery)
  • artifactName?: string – Circuit name (defaults to basename of bundlePath)
  • verificationKeyPath?: string – Explicit path to verification key file
  • verifierModuleUrl?: string – Explicit file:// URL to verifier module (use pathToFileURL)
  • verificationKey?: Uint8Array – Pre-loaded verification key bytes
  • verifierModule?: VerifierModule – Pre-imported verifier module
  • loadVerifierModule?: () => Promise<VerifierModule> – Custom module loader
  • fs?: { readFile } – Custom file reader (for testing)

Returns: A VerifierHandle object containing the instantiated verifier.

verifyProof(verifier, proofBytes, publicInputs)

Verifies a Groth16 proof against public inputs.

Parameters:

  • verifier – The verifier handle from loadVerifier()
  • proofBytes – Proof as Uint8Array, Buffer, or array of numbers
  • publicInputs – Public inputs as:
    • Object: { signal1: 'value1', signal2: 'value2' }
    • Array: ['value1', 'value2']
    • Iterable: Any iterable of field element strings

Returns: Promise<boolean>true if the proof is valid, false otherwise.