| Crates.io | cometbft-light-client-js |
| lib.rs | cometbft-light-client-js |
| version | 0.1.0-alpha.2 |
| created_at | 2024-01-27 09:43:37.790201+00 |
| updated_at | 2024-01-27 09:43:37.790201+00 |
| description | cometbft-light-client-js provides a lightweight, WASM-based interface to the CometBFT Light Client's verification functionality. |
| homepage | |
| repository | https://github.com/cometbft/cometbft-rs |
| max_upload_size | |
| id | 1116628 |
| size | 271,291 |
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.