#consensus #bft #cometbft #tendermint #blockchain


cometbft-light-client-js provides a lightweight, WASM-based interface to the CometBFT Light Client's verification functionality

1 unstable release

0.1.0-alpha.2 Jan 27, 2024

#9 in #cometbft


16K SLoC

Light-Client API for JavaScript

At present this just exposes the CometBFT Light Client's verification logic via WASM. This allows simple access to verification from JavaScript:

import * as LightClient from 'cometbft-light-client-js';

// Verify an untrusted block against a trusted one, given the specified options
// and current date/time.
let verdict = LightClient.verify(untrusted, trusted, options, now);

For an example of how to use this, please see the verifier-web example.


CometBFT Light Client JavaScript/WASM interface.

This crate exposes some of the cometbft-light-client-verifier crate's functionality to be used from the JavaScript ecosystem.

For a detailed example, please see the verifier-web example in the repository.


~157K SLoC