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

@probatio/commit

v0.1.0

Published

Canonical trade encoding, merkle trees and proofs. The primitives that make a Probatio record checkable by someone who does not trust Probatio.

Readme

@probatio/commit

The primitives that make a Probatio trading record checkable by someone who does not trust Probatio: canonical trade encoding, merkle trees, proofs and a hash chain.

npm i @probatio/commit

Most people want @probatio/sdk, which fetches a record and checks it in one call and re-exports everything here. Reach for this package directly when you already hold the data, or when you want the hashing on its own.

Why a package at all

A trade is only checkable if two parties encode it the same way, byte for byte. If the encoding lives inside the server, "verify" means asking the thing under scrutiny to mark its own work. So the encoding is here, in the open, and it is the same module the engine seals fills with. There is no second implementation to drift.

import { hashLeaf, buildTree, buildProof, verifyProof, toHex } from '@probatio/commit';

const leaves = trades.map(hashLeaf);    // each fill's canonical hash
const tree = buildTree(leaves);         // fills, in order
toHex(tree.root);                       // one hash for the whole record

const proof = buildProof(tree, 3);      // fill 3 belongs to that root
verifyProof(leaves[3], proof, tree.root); // true

merkleRoot(leaves) gives the root on its own when you do not need proofs, and computeRoot(leafHash, proof) rebuilds a root from one leaf and its proof, which is what a verifier does when it holds a single fill rather than the set.

What is in it

  • leaf encodes a fill to fixed-width bytes and hashes it. The figures covered are the ones the fill was priced from: reserves, amounts, fee, the slot clicked and the slot filled.
  • merkle builds trees, roots and inclusion proofs. Leaves and interior nodes are hashed under different prefixes, so a pair of hashes can never be read as a single trade.
  • chain folds batch roots into a running accumulator.
  • verify puts those together into a checked result with a readable explanation.

Dependencies are @noble/hashes and bs58. Nothing else, and nothing that touches a network.

Licence

MIT. The Probatio application itself is AGPL-3.0; this library is permissive on purpose, so that checking a record carries no licensing consequence for whoever checks it.