New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

verifiablejs

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

verifiablejs

WebAssembly bindings for the Parity `verifiable` crate

latest
Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
3.7K
123.11%
Maintainers
1
Weekly downloads
 
Created
Source

Verifiable JS

This package provides JavaScript/TypeScript bindings for the Parity Verifiable crate.

Features

  • Generate proofs of membership in a set with known members
  • Validate proofs
  • Sign and verify messages
  • All cryptographic operations are performed using the Bandersnatch curve implementation

Installation

npm install verifiablejs

Usage

For bundler environments (Webpack, Vite, Rollup, etc.)

import init, { one_shot, validate, sign, verify_signature, member_from_entropy } from 'verifiablejs/bundler';

// Initialize the WASM module
await init();

// Generate a proof
const entropy = new Uint8Array(32); // Your entropy bytes
const members = new Uint8Array(...); // Your encoded members list
const context = new TextEncoder().encode("my-context");
const message = new TextEncoder().encode("my-message");

const result = one_shot(entropy, members, context, message);
const { proof, alias, member } = result;

// Validate a proof
const validatedAlias = validate(proof, members, context, message);

// Sign a message
const signature = sign(entropy, message);

// Verify a signature
const isValid = verify_signature(signature, message, member);

For Node.js or Bun

import init, { one_shot, validate, sign, verify_signature, member_from_entropy } from 'verifiablejs/nodejs';

// Initialize the WASM module
await init();

// Use the same API as above

Building

npm run build

This builds both bundler and Node.js targets:

  • wasm-pack build --release --target bundler --features small-ring
  • wasm-pack build --release --target nodejs --features small-ring

Testing

npm test

This will run both Rust and WASM tests:

  • cargo test --features "small-ring"
  • wasm-pack test --node --features small-ring

Releasing

This project uses Changesets for version management.

  • Create a changeset: pnpm changeset (select bump type: patch/minor/major)
  • Version bump: pnpm version (consumes changesets, updates package.json and CHANGELOG.md)
  • Publish: pnpm release (builds and publishes to npm)

License

Licensed under GPL-3.0-or-later WITH Classpath-exception-2.0

Keywords

wasm

FAQs

Package last updated on 02 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts