Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chainsafe/bls-keystore

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chainsafe/bls-keystore

[![Build Status](https://travis-ci.com/ChainSafe/bls-keystore.svg?branch=master)](https://travis-ci.com/ChainSafe/bls-keystore) ![npm](https://img.shields.io/npm/v/@ChainSafe/bls-keystore) ![Discord](https://img.shields.io/discord/593655374469660673?color

  • 1.0.0-beta7
  • npm
  • Socket score

Version published
Weekly downloads
489
increased by33.61%
Maintainers
3
Weekly downloads
 
Created
Source

@ChainSafe/bls-keystore

Build Status npm Discord License: MIT

Bls keystore implementation as per draft EIP 2335 for node and browser.

Electron usage
  • Set env variable ELECTRON=true because electron replaces openssl with BoreSSL which causes some incompatibilities when using native modules.

How to use?

import {Buffer} from "buffer";
import {Keystore} from "@chainsafe/bls-keystore";

// encrypt private key
const privateKey: Buffer;
const password = "SomePassword123"; 
const keystore = Keystore.encrypt(privateKey, password, "m/12381/60/0/0");

//verify password
keystore.verifyPassword(password); //true | false

//decrypt
const decryptedPrivateKey: Buffer = keystore.decrypt(password);

//save as json
keystore.toJSON(); //string

For key derivation checkout @chainsafe/bls-ts-key-mgmt

Contribute

  • get yarn
  • yarn install
  • yarn test

FAQs

Package last updated on 10 Feb 2020

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