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

@qubic-labs/schnorrq

v1.0.2

Published

Standalone SchnorrQ (FourQ) + K12 library for Qubic.

Downloads

320

Readme

ts-schnorrq

Standalone SchnorrQ (FourQ) + K12 library for Qubic.

Status: implemented (pure TypeScript). unsafeSign/sign is not side-channel hardened.

When to use this

  • You need a pure-TS SchnorrQ implementation for Qubic-compatible keygen, signing, and verification.
  • You’re targeting browsers, Bun, or Node and want a single, portable crypto backend.
  • You need deterministic compatibility with the existing Qubic SchnorrQ behavior.

When not to use this

  • You need side-channel hardened signing in hostile or multi-tenant environments.
  • You need high-throughput signing; use a native/WASM backend instead.

Where to use this

  • Good fit: local tools, CLIs, offline signing, server-side verification, browser verification.
  • Use with caution: browser or shared servers for signing; prefer external signer backends.

Why this exists

Qubic tooling historically relied on a WASM shim for SchnorrQ. This library replaces that dependency with a portable, readable TypeScript implementation while keeping behavior compatible.

Install

bun add @qubic-labs/schnorrq

Usage

import { generatePublicKey, sign, verify } from "@qubic-labs/schnorrq";

// Qubic convention: `subSeed32` is a 32-byte value derived from the 55-char seed elsewhere.
// `messageDigest32` must be a 32-byte digest (SchnorrQ signs digests, not arbitrary-length messages).
const subSeed32 = new Uint8Array(32);
const publicKey32 = generatePublicKey(subSeed32);
const messageDigest32 = new Uint8Array(32);

const signature64 = sign(subSeed32, publicKey32, messageDigest32);
const ok = verify(publicKey32, messageDigest32, signature64);

External signer (recommended for production)

import { createSchnorrq } from "@qubic-labs/schnorrq";

const schnorrq = createSchnorrq({
  signer: {
    sign(subSeed32, publicKey32, messageDigest32) {
      // Call into native/WASM/HW/external signer here.
      return mySigner.sign(subSeed32, publicKey32, messageDigest32);
    },
  },
});

const signature64 = schnorrq.sign(subSeed32, publicKey32, messageDigest32);

API

  • k12(input: Uint8Array, dkLen: number): Uint8Array
  • generatePublicKey(subSeed32: Uint8Array): Uint8Array (32 bytes)
  • verify(publicKey32: Uint8Array, messageDigest32: Uint8Array, signature64: Uint8Array): 0 | 1
  • unsafeSign(subSeed32: Uint8Array, publicKey32: Uint8Array, messageDigest32: Uint8Array): Uint8Array (64 bytes)
  • sign(...): alias of unsafeSign(...)
  • createSchnorrq({ signer }): helper for wiring an external signer backend (recommended for production)

Security notes

  • unsafeSign/sign is a pure-JS/TS implementation and is not designed to be constant-time or side-channel resistant.
  • “Side-channel hardened” means the implementation avoids leaking secrets through timing, cache/memory access patterns, or branch behavior.
  • Prefer createSchnorrq({ signer }) with a constant-time backend (native/WASM/HW/external signer) for high-value secrets.

Performance

  • The FourQ math here uses bigint and is correctness-first.
  • If you need high throughput, use a native/WASM backend and wire it in via createSchnorrq.

Development

bun install
bun test
bun run build

Release (semantic-release)

Automated releases run on pushes to main via .github/workflows/release.yml.

Required secrets:

  • NPM_TOKEN (npm publish)