This library provides a multi-threaded implementation of KZG commitments, optimized for handling multiple blobs efficiently. It is built on top of kzg-wasm, ensuring fast and reliable cryptographic computations.
- Multi-threaded execution for faster computation.
- Supports Node.js (CommonJS and ESM) and browser environments.
- Automatically adapts to the execution environment (threads in Node.js, single-threaded fallback in browsers).
- Efficiently handles multiple blob computations in parallel.
- Uses thread pools to maximize performance and minimize overhead.
npm install js-kzgimport { KZG } from 'js-kzg';
const kzg = KZG.create();
const blobs = [blob1, blob2, blob3];
const commitments = await kzg.commitmentBatch(blobs);
console.log(commitments);
const proofs = await kzg.cellProofBatch(blobs);
console.log(proofs);