#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

36 releases (17 breaking)

0.36.0 Apr 25, 2024
0.35.0 Mar 14, 2024
0.34.1 Feb 22, 2024
0.34.0 Oct 2, 2023
0.21.0 Jul 21, 2021

#2878 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 313/week @ 2024-04-05 18/week @ 2024-04-12 82/week @ 2024-04-19 43/week @ 2024-04-26 1/week @ 2024-05-03

146 downloads per month

Apache-2.0

1MB
14K 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
~156K SLoC