Add contributing note

This commit is contained in:
dancoffman 2022-11-17 16:47:47 -08:00
parent 3bd84cfae6
commit 1d3282895d
No known key found for this signature in database
GPG Key ID: 47B1F53E36A9B3CC
2 changed files with 34 additions and 2 deletions

View File

@ -1,5 +1,37 @@
This package wraps the c-kzg C code in C++ NAPI bindings which allow it to be imported into a NodeJS program.
Spec: https://github.com/ethereum/consensus-specs/blob/dev/specs/eip4844/polynomial-commitments.md
# Usage
Install this library with
```sh
yarn add c-kzg
```
Import from it like any other library
```js
import {
KZGCommitment,
blobToKzgCommitment,
verifyAggregateKzgProof,
loadTrustedSetup,
transformTrustedSetupJSON,
} from "c-kzg";
```
Requirements
- The C and C++ code is compiled by node-gyp on installation, so your environment will need a compiler like GCC or clang
# Contributing
This directory contains the code necessary to generate NodeJS bindings for C-KZG.
The bindings file has the following interface:
```js
loadTrustedSetup: (filePath: string) => SetupHandle;
@ -21,7 +53,7 @@ This directory contains the code necessary to generate NodeJS bindings for C-KZG
) => boolean;
```
Spec: https://github.com/ethereum/consensus-specs/blob/dev/specs/eip4844/polynomial-commitments.md
But this library wraps it in module with manages the setupHandle internally.
First,
`npm install -g yarn` if you don't have it.

View File

@ -1,6 +1,6 @@
{
"name": "c-kzg",
"version": "1.0.4",
"version": "1.0.5",
"description": "NodeJS bindings for C-KZG",
"author": "Dan Coffman",
"license": "MIT",