npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bls-eth-wasm

v1.4.0

Published

BLS signature for Node.js by WebAssembly for Ethereum 2.0

Downloads

10,340

Readme

Build Status

BLS signature for Node.js by WebAssembly

Abstract

This module is built with BLS_ETH=1 for Ethereum 2.0 spec.

News

  • 2024/Sep/18 : About 10% performance improvement
  • 2022/Jul/20 : 1.1 times improved
  • 2021/Aug/28 : improve performance of {G1,G2}::isValidOrder()
  • 2020/Nov/04 : break backward compatibility (bls.js is renamed to index.js)
    • use blsSetupFactory to make bls instance on browser (see the top of bls-demo.js)
  • 2020/Oct/01 : add bls.multiVerify to verify all {sigs, pubs, msgs}.
  • 2020/Jul/06 ; setETHmode(bls.ETH_MODE_DRAFT_07) is default mode

How to use

The version v0.4.2 breaks backward compatibility of the entry point.

  • Node.js : const bls = require('bls-eth-wasm')
  • React : const bls = require('bls-eth-wasm/browser')
  • HTML : <script src="https://herumi.github.io/bls-eth-wasm/browser/bls.js"></script>

Init as the followings:

bls.init(bls.BLS12_381)

(old) The new eth2.0 functions are supported. This mode will be removed in the future.

Init as the followings:

bls.init(bls.BLS12_381)

then, you can use the following functions.

bls-eth-wasm | eth2.0 spec name| ------|-----------------| SecretKey::sign|Sign| PublicKey::verify|Verify| Sign::aggregate|Aggregate| Sign::fastAggregateVerify|FastAggregateVerify| Sign::aggregateVerifyNoCheck|AggregateVerify|

The size of message must be 32 byte.

Check functions:

  • verifySignatureOrder ; make deserialize check the correctness of the order
  • Sign::isValidOrder ; check the correctness of the order
  • verifyPublicKeyOrder ; make deserialize check the correctness of the order
  • PublicKey::isValidOrder ; check the correctness of the order
  • areAllMsgDifferent ; check that all messages are different each other

see bls

How to build src/bls_c.js

Install Emscripten.

cd src
git submodule update --init
make

For Node.js

node test.js

Browser demo

see bls-demo.

See browser/readme.md to make browser/bls.js.

for React

const bls = require('bls-eth-wasm/browser')

License

modified new BSD License http://opensource.org/licenses/BSD-3-Clause

Author

MITSUNARI Shigeo([email protected])

Sponsors welcome

GitHub Sponsor