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

ootle-wasm

v0.2.0

Published

WASM bindings for Tari Ootle client-side crypto — thin wasm-bindgen shell over ootle-wasm-core

Readme

ootle-wasm

Client-side WebAssembly crypto for Tari Ootle L2. Handles BOR encoding, transaction hashing, Schnorr signing, and key management — with output byte-identical to the native Rust implementation.

Installation

npm install @tari-project/ootle-wasm

API

All keys and signatures are Uint8Array (raw 32-byte values).

generateKeypair()

Generate a new random Ristretto255 keypair.

import { generateKeypair } from "@tari-project/ootle-wasm";

const { secret_key, public_key } = generateKeypair();
// secret_key: Uint8Array (32 bytes)
// public_key: Uint8Array (32 bytes)

publicKeyFromSecretKey(secretKey)

Derive the public key from a secret key.

import { publicKeyFromSecretKey } from "@tari-project/ootle-wasm";

const publicKey = publicKeyFromSecretKey(secretKey);
// publicKey: Uint8Array (32 bytes)

hashUnsignedTransaction(unsignedTxJson, sealSignerPublicKey)

Hash an UnsignedTransactionV1 for signing. Returns a 64-byte Uint8Array that should be passed to schnorrSign.

  • unsignedTxJson — JSON-serialised UnsignedTransactionV1
  • sealSignerPublicKey — raw public key bytes of the account owner (seal signer)
import { hashUnsignedTransaction } from "@tari-project/ootle-wasm";

const hash = hashUnsignedTransaction(
  JSON.stringify(unsignedTransaction),
  sealSignerPublicKey,
);

schnorrSign(secretKey, message)

Schnorr-sign a message (typically the hash from hashUnsignedTransaction).

import { schnorrSign } from "@tari-project/ootle-wasm";

const { public_nonce, signature } = schnorrSign(secretKey, hash);
// public_nonce: Uint8Array (32 bytes)
// signature:    Uint8Array (32 bytes)

borEncodeTransaction(transactionJson)

BOR-encode a signed Transaction into a base64 TransactionEnvelope string, ready to submit to the network.

import { borEncodeTransaction } from "@tari-project/ootle-wasm";

const envelope = borEncodeTransaction(JSON.stringify(transaction));

Working with keys

Keys and signatures are raw Uint8Array bytes. Convert to and from hex strings using the built-in methods (Node 22+, modern browsers):

import { generateKeypair, publicKeyFromSecretKey } from "@tari-project/ootle-wasm";

// Generate a keypair and display as hex
const { secret_key, public_key } = generateKeypair();
console.log("Public key:", public_key.toHex());

// Load a key from a hex string
const restored = Uint8Array.fromHex("a1b2c3...");
const derivedPublicKey = publicKeyFromSecretKey(restored);

Full example

import {
  generateKeypair,
  publicKeyFromSecretKey,
  hashUnsignedTransaction,
  schnorrSign,
  borEncodeTransaction,
} from "@tari-project/ootle-wasm";

// 1. Generate or load a keypair
const { secret_key, public_key } = generateKeypair();

// 2. Build an unsigned transaction (application-specific)
const unsignedTx = {
  /* ... UnsignedTransactionV1 fields ... */
};

// 3. Hash for signing
const hash = hashUnsignedTransaction(JSON.stringify(unsignedTx), public_key);

// 4. Sign
const { public_nonce, signature } = schnorrSign(secret_key, hash);

// 5. Assemble the signed transaction and BOR-encode
const signedTx = {
  /* ... Transaction with signature attached ... */
};
const envelope = borEncodeTransaction(JSON.stringify(signedTx));

// 6. Submit envelope to the Ootle network

License

BSD-3-Clause