From fbf9f17b16ea464296b3394a1a9fe06d3639a8ae Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Mon, 22 Apr 2024 08:18:05 +0900 Subject: [PATCH] update according to bls-wasm --- src/bls.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bls.js b/src/bls.js index 548410e..9be193e 100644 --- a/src/bls.js +++ b/src/bls.js @@ -9,6 +9,7 @@ const _blsSetupFactory = (createModule) => { /* eslint-disable */ exports.BN254 = 0 exports.BN381_1 = 1 + exports.BN_SNARK1 = 4 exports.BLS12_381 = 5 exports.ethMode = ETH_MODE exports.ETH_MODE_DRAFT_05 = 1 @@ -568,13 +569,17 @@ const _blsSetupFactory = (createModule) => { _free(pubPos) if (r !== 0) throw new Error('bad public key') } - exports.getGeneratorofPublicKey = () => { + exports.getGeneratorOfPublicKey = () => { const pub = new exports.PublicKey() const pubPos = _malloc(BLS_SIGNATURE_SIZE) mod._blsGetGeneratorOfPublicKey(pubPos) pub._saveAndFree(pubPos) return pub } + exports.getGeneratorofPublicKey = () => { + console.log('WARNING : getGeneratorofPublicKey is renamed to getGeneratorOfPublicKey') + return exports.getGeneratorOfPublicKey() + } exports.Signature = class extends Common { constructor () {