Generate type defs
This commit is contained in:
parent
bbc90b7da1
commit
7668c4ffa4
|
@ -0,0 +1,11 @@
|
||||||
|
export declare type BLSFieldElement = Uint8Array;
|
||||||
|
export declare type KZGProof = Uint8Array;
|
||||||
|
export declare type KZGCommitment = Uint8Array;
|
||||||
|
export declare type Blob = Uint8Array;
|
||||||
|
export declare const FIELD_ELEMENTS_PER_BLOB: any;
|
||||||
|
export declare const BYTES_PER_FIELD: any;
|
||||||
|
export declare function loadTrustedSetup(filePath: string): void;
|
||||||
|
export declare function freeTrustedSetup(): void;
|
||||||
|
export declare function blobToKzgCommitment(blob: Blob): KZGCommitment;
|
||||||
|
export declare function computeAggregateKzgProof(blobs: Blob[]): KZGProof;
|
||||||
|
export declare function verifyAggregateKzgProof(blobs: Blob[], expectedKzgCommitments: KZGCommitment[], kzgAggregatedProof: KZGProof): boolean;
|
|
@ -0,0 +1 @@
|
||||||
|
export {};
|
|
@ -4,7 +4,7 @@
|
||||||
"description": "NodeJS bindings for C-KZG",
|
"description": "NodeJS bindings for C-KZG",
|
||||||
"author": "Dan Coffman",
|
"author": "Dan Coffman",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "dist/index.js",
|
"main": "dist/kzg.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "node-gyp clean",
|
"clean": "node-gyp clean",
|
||||||
"build": "node-gyp rebuild",
|
"build": "node-gyp rebuild",
|
||||||
|
|
|
@ -3,7 +3,7 @@ import typescript from "@rollup/plugin-typescript";
|
||||||
export default {
|
export default {
|
||||||
input: "kzg.ts",
|
input: "kzg.ts",
|
||||||
output: {
|
output: {
|
||||||
file: "dist/index.js",
|
dir: "dist",
|
||||||
format: "cjs",
|
format: "cjs",
|
||||||
},
|
},
|
||||||
plugins: [typescript()],
|
plugins: [typescript()],
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"declaration": true,
|
||||||
|
"declarationDir": "dist/dts",
|
||||||
"target": "esnext",
|
"target": "esnext",
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
|
|
Loading…
Reference in New Issue