Socket
Socket
Sign inDemoInstall

@chainsafe/bls-keygen

Package Overview
Dependencies
5
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

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
4.1K
increased by95.85%
Maintainers
3
Created
Weekly downloads
 

Readme

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

Last updated on 04 Dec 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc