Skip to content

Commit

Permalink
update according to bls-wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
herumi committed Apr 21, 2024
1 parent af2c22d commit fbf9f17
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 () {
Expand Down

0 comments on commit fbf9f17

Please sign in to comment.