Regen dist

This commit is contained in:
dancoffman 2022-11-04 12:06:06 -07:00
parent 062e4e0f30
commit 1d20797874
No known key found for this signature in database
GPG Key ID: 47B1F53E36A9B3CC
4 changed files with 6 additions and 4 deletions

View File

@ -1,3 +1,5 @@
all: clean build format test bundle
clean:
yarn node-gyp clean
rm -rf build

View File

@ -3,7 +3,7 @@ export declare type KZGProof = Uint8Array;
export declare type KZGCommitment = Uint8Array;
export declare type Blob = Uint8Array;
export declare const FIELD_ELEMENTS_PER_BLOB: number;
export declare const BYTES_PER_FIELD: number;
export declare const BYTES_PER_FIELD_ELEMENT: number;
export declare function loadTrustedSetup(filePath: string): void;
export declare function freeTrustedSetup(): void;
export declare function blobToKzgCommitment(blob: Blob): KZGCommitment;

View File

@ -6,7 +6,7 @@
*/
const kzg = require("./kzg.node");
const FIELD_ELEMENTS_PER_BLOB = kzg.FIELD_ELEMENTS_PER_BLOB;
const BYTES_PER_FIELD = kzg.BYTES_PER_FIELD;
const BYTES_PER_FIELD_ELEMENT = kzg.BYTES_PER_FIELD_ELEMENT;
// Stored as internal state
let setupHandle;
function loadTrustedSetup(filePath) {
@ -41,7 +41,7 @@ function verifyAggregateKzgProof(blobs, expectedKzgCommitments, kzgAggregatedPro
return kzg.verifyAggregateKzgProof(blobs, expectedKzgCommitments, kzgAggregatedProof, setupHandle);
}
exports.BYTES_PER_FIELD = BYTES_PER_FIELD;
exports.BYTES_PER_FIELD_ELEMENT = BYTES_PER_FIELD_ELEMENT;
exports.FIELD_ELEMENTS_PER_BLOB = FIELD_ELEMENTS_PER_BLOB;
exports.blobToKzgCommitment = blobToKzgCommitment;
exports.computeAggregateKzgProof = computeAggregateKzgProof;

View File

@ -9,7 +9,7 @@ blst:
cp bindings/*.h ../inc
c_kzg_4844.o: c_kzg_4844.c Makefile
clang -Wall -I$(INCLUDE_DIRS) $(CFLAGS) -c c_kzg_4844.c
clang -Wall -I$(INCLUDE_DIRS) $(CFLAGS) -c $<
lib: c_kzg_4844.o Makefile
cp *.o ../bindings/node.js