Merge pull request #6 from dgcoffman/dgc/nodejs-bindings-1.0.7

NodeJS bindings version 1.0.7
This commit is contained in:
Ramana Kumar 2022-11-22 20:50:48 +00:00 committed by GitHub
commit 2a722bfd52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 6 deletions

View File

@ -1,6 +1,9 @@
# Exists as a test harness for building and running tests in Linux # Exists as a test harness for building and running tests in Linux
FROM node:16
FROM node:16-alpine
RUN apk update && apk add --no-cache g++ make python3
COPY ./dist/ /app/dist/ COPY ./dist/ /app/dist/
COPY test.ts /app COPY test.ts /app

View File

@ -10,6 +10,7 @@ clean:
build: kzg.cxx kzg.ts package.json binding.gyp Makefile build: kzg.cxx kzg.ts package.json binding.gyp Makefile
cd ../../src; make lib cd ../../src; make lib
yarn install
yarn node-gyp rebuild yarn node-gyp rebuild
test: build test: build

View File

@ -22,9 +22,13 @@ import {
} from "c-kzg"; } from "c-kzg";
``` ```
Requirements # Requirements
- The C and C++ code is compiled by node-gyp on installation, so your environment will need a compiler like GCC or clang The C and C++ code is compiled by node-gyp on installation. Your environment will need
- A compiler like g++ or clang
- `make`
- `python3`
# Contributing # Contributing

View File

@ -9,8 +9,8 @@
#include "blst.h" #include "blst.h"
Napi::Value throw_invalid_arguments_count( Napi::Value throw_invalid_arguments_count(
const uint expected, const unsigned int expected,
const uint actual, const unsigned int actual,
const Napi::Env env const Napi::Env env
) { ) {
Napi::RangeError::New( Napi::RangeError::New(

View File

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