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

@nodefactory/bls-keystore

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nodefactory/bls-keystore

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

  • 1.0.0-beta7
  • latest
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

@nodefactory/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 "@nodefactory/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
Built by

NodeFactory

FAQs

Package last updated on 22 Nov 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