1 unstable release
0.1.0-alpha.2 | Jan 27, 2024 |
---|
#8 in #cometbft
1MB
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.
lib.rs
:
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.
Dependencies
~8.5MB
~160K SLoC