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

@freedomofpress/cometbft

v0.1.4

Published

A CometBFT light client for the browser.

Readme

cometbft-ts

Note: this library has not been audited, thus its security has not been independently verified.

cometbft-ts is a small TypeScript library for verifying CometBFT commits in the browser. It takes the JSON you get from CometBFT ABCI/RPC for a commit and its validators, constructs canonical sign-bytes via protobuf, and verifies Ed25519 signatures and >2/3 quorum. It is verification-only and throws on any cryptographic or format error. It uses the native Web Crypto API. The library is developed as part of WEBCAT and is not audited.

Usage

import { importCommit } from "./src/commit";
import { importValidators } from "./src/validators";
import { verifyCommit } from "./src/lightclient";

// JSON from CometBFT RPC: /commit and /validators
const sh = importCommit(commitJson);
const { proto: vset, cryptoIndex } = await importValidators(validatorsJson);

const result = await verifyCommit(sh, vset, cryptoIndex);

Tests

$ npm run coverage

> [email protected] coverage
> vitest run --coverage


 RUN  v3.2.4 /Users/g/cometbft-ts
      Coverage enabled with v8

 ✓ src/tests/encoding.test.ts (6 tests) 2ms
 ✓ src/tests/commit.test.ts (27 tests) 7ms
 ✓ src/tests/validators.test.ts (18 tests) 13ms
 ✓ src/tests/lightclient.test.ts (19 tests) 11ms

 Test Files  4 passed (4)
      Tests  70 passed (70)
   Start at  20:45:26
   Duration  377ms (transform 133ms, setup 0ms, collect 222ms, tests 33ms, environment 0ms, prepare 241ms)

 % Coverage report from v8
----------------|---------|----------|---------|---------|-------------------
File            | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------------|---------|----------|---------|---------|-------------------
All files       |     100 |      100 |     100 |     100 |
 commit.ts      |     100 |      100 |     100 |     100 |
 encoding.ts    |     100 |      100 |     100 |     100 |
 lightclient.ts |     100 |      100 |     100 |     100 |
 types.ts       |       0 |        0 |       0 |       0 |
 validators.ts  |     100 |      100 |     100 |     100 |
----------------|---------|----------|---------|---------|-------------------