Socket
Socket
Sign inDemoInstall

@chainsafe/bls-keygen

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chainsafe/bls-keygen

Typescript key management tool that works in the browser


Version published
Weekly downloads
1.3K
increased by12.54%
Maintainers
3
Weekly downloads
 
Created
Source

BLS TypeScript Key Management

npm (tag) Discord GitHub

Utility methods for generating valid BLS keys from random bytes or mnemonic for NodeJs and Browser.

Implementation is following EIPS: EIP-2334, EIP-2333

For low level methods of EIP-2333, check out @chainsafe/bls-hd-key.

How to use?



import {generateRandomSecretKey, mnemonicToSecretKey, deriveKey} from "@chainsafe/bls-keygen";

//random secret key
const secretKey = generateRandomSecretKey();

...

//secret key from mnemonic and path
const secretKey = mnemonicToSecretKey(
    "impact exit example acquire drastic cement usage float mesh source private bulb twenty guitar neglect",
    "m/12381/3600/0/0"    
);

...

//secret key from seed and path
const secretKey = deriveKey(
    seed,
    "m/12381/3600/0/0"    
);

Contribution

Requirements:

  • nodejs
  • yarn
    yarn install
    yarn run test

FAQs

Package last updated on 09 Dec 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