diff --git a/README.md b/README.md index 25d606d..1b09039 100644 --- a/README.md +++ b/README.md @@ -445,8 +445,10 @@ const publicKey = recoverPublicKeyTyped(signature, typedData); ```ts import { KZG } from 'micro-eth-signer/kzg'; -import { trustedSetup } from 'trusted-setups'; // 400kb, 4-sec init -import { trustedSetup as fastSetup } from 'trusted-setups/fast.js'; // 800kb, instant init +// 400kb, 4-sec init +import { trustedSetup } from '@paulmillr/trusted-setups'; +// 800kb, instant init +import { trustedSetup as fastSetup } from '@paulmillr/trusted-setups/fast.js'; const kzg = new KZG(trustedSetup); diff --git a/package-lock.json b/package-lock.json index 066141b..8329304 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ }, "devDependencies": { "@paulmillr/jsbt": "0.2.1", + "@paulmillr/trusted-setups": "0.1.0", "micro-bmark": "0.3.1", "micro-ftch": "0.4.0", "micro-should": "0.4.0", @@ -61,6 +62,13 @@ "jsbt": "jsbt.js" } }, + "node_modules/@paulmillr/trusted-setups": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@paulmillr/trusted-setups/-/trusted-setups-0.1.0.tgz", + "integrity": "sha512-HehK60oGqSp7osgdnjv8doAsf0hCVHA4FPwhaJGWORvvxsfIlV1+izXf0jZH9UE5qh1EFBrwXdwhH703Op+kPQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@scure/base": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.8.tgz", diff --git a/package.json b/package.json index c777748..cd35a3c 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ }, "devDependencies": { "@paulmillr/jsbt": "0.2.1", + "@paulmillr/trusted-setups": "0.1.0", "micro-bmark": "0.3.1", "micro-ftch": "0.4.0", "micro-should": "0.4.0", diff --git a/test/kzg.test.js b/test/kzg.test.js index 40426a9..e9af7dd 100644 --- a/test/kzg.test.js +++ b/test/kzg.test.js @@ -3,8 +3,8 @@ import { describe, should } from 'micro-should'; import { KZG } from '../kzg.js'; import { jsonGZ } from './util.js'; import { default as KZG_VERIFY_PROOF } from './vectors/kzg/go_kzg_4844_verify_kzg_proof.json' with { type: 'json' }; -// import { trustedSetup as s_small } from 'trusted-setups'; -// import { trustedSetup as s_fast } from 'trusted-setups/fast.js'; +import { trustedSetup as s_small } from '@paulmillr/trusted-setups'; +import { trustedSetup as s_fast } from '@paulmillr/trusted-setups/fast.js'; import ROOTS_UN from './vectors/kzg/roots_of_unity.json' with { type: "json" }; // These are same as millions of yaml files in official repo, but easier to use @@ -95,14 +95,14 @@ function run(kzg) { } // Comment-out until package is published -// describe('KZG', () => { -// describe('trusted_setups/index.js', () => { -// run(new KZG(s_small)); -// }); -// describe('trusted_setups/fast.js', () => { -// run(new KZG(s_fast)); -// }); -// }); +describe('KZG', () => { + describe('trusted_setups/index.js', () => { + run(new KZG(s_small)); + }); + describe('trusted_setups/fast.js', () => { + run(new KZG(s_fast)); + }); +}); // ESM is broken. import url from 'node:url';