Home

Awesome

Build Status

BLS signature for Node.js by WebAssembly

Abstract

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

News

How to use

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

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-wasmeth2.0 spec name
SecretKey::signSign
PublicKey::verifyVerify
Sign::aggregateAggregate
Sign::fastAggregateVerifyFastAggregateVerify
Sign::aggregateVerifyNoCheckAggregateVerify

The size of message must be 32 byte.

Check functions:

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(herumi@nifty.com)

Sponsors welcome

GitHub Sponsor