#tendermint #light-client #consensus #bft #blockchain

tendermint-light-client-js

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

35 releases

0.35.0 Mar 14, 2024
0.34.0 Oct 2, 2023
0.33.0 Jul 24, 2023
0.30.0 Mar 7, 2023
0.21.0 Jul 21, 2021

#2787 in Magic Beans

Download history 80/week @ 2024-02-16 71/week @ 2024-02-23 49/week @ 2024-03-01 99/week @ 2024-03-08 46/week @ 2024-03-15 8/week @ 2024-03-22 18/week @ 2024-03-29 289/week @ 2024-04-05

454 downloads per month

Apache-2.0

1MB
13K SLoC

Light-Client API for JavaScript

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

import * as LightClient from 'tendermint-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:

Tendermint Light Client JavaScript/WASM interface.

This crate exposes some of the tendermint-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
~155K SLoC