Socket
Socket
Sign inDemoInstall

bls-signatures

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bls-signatures

The most advanced BLS library for JavaScript


Version published
Weekly downloads
9K
increased by11.76%
Maintainers
1
Weekly downloads
 
Created
Source

bls-signatures

JavaScript library that implements BLS signatures with aggregation as in Boneh, Drijvers, Neven 2018, using the relic toolkit for cryptographic primitives (pairings, EC, hashing).

This library is a JavaScript port of the Chia Network's BLS lib. We also have typings, so you can use it with TypeScript too!

Usage

npm i bls-signatures --save
const { PrivateKey } = require('bls-js');
const privateKey = PrivateKey.fromSeed(Buffer.from([1,2,3]));
const sig = privateKey.sign(Buffer.from("Hello world!"));
sig.verify();

Please refer to the library's typings or detailed API information. Use cases can be found in the original lib's readme.

Build

Building requires Node.js (with npm) and Emcripten to be installed. The build process is the same as for the c++ lib, with one additional step: pass the Emscripten toolchain file as an option to CMake. From the project root directory, run:

git submodule update --init --recursive
mkdir js_build
cd js_build
cmake ../ -DCMAKE_TOOLCHAIN_FILE={path_to_your_emscripten_installation}/emsdk/emscripten/{version}/cmake/Modules/Platform/Emscripten.cmake
cmake --build . --

Run tests

To run tests, build the library, then go to the js_bindings folder in the build directory and run

npm test

Keywords

FAQs

Package last updated on 04 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc