npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gen-hd-keypair

v2.1.1

Published

Generate a Bitcoin BIP39/BIP44 Keypair

Downloads

3

Readme

gen-hd-keypair - Generate a Bitcoin BIP39/BIP44 Keypair

Easily generate a Bitcoin master key mnemonic.

Example Usage:

$ npm install -g gen-hd-keypair
$ gen-hd-keypair 

🔒  Root mnemonic (private): lake effort journey rug stairs embark journey load decline riot dynamic cram
🔒  Master xprivkey (private): xprv9s21ZrQH143K2a6bXRKgyyECju6LHzKo8SbnsEXoYa2f3fgHBLDtc7dPEv63HMfmee7bxaAmhEPDjWhztmDaAwKhQsKAMJuL2EYSQfkzGhe
-----
🔒  First WIF (private): L5JvffBunctw2yfLV6GMD43FJgyNmfNPSZXyAUsPq72VmkjR5xrY
⭐  First receiving address (public): 1NwZRGUTw4khTmuV31EUBBQQv37Zrxi9Uu

Notes for Beginners

If you're relatively new to Bitcoin, note that this does not make any external API requests to generate this address. This generates a "keypair" locally using cryptographic functions. That said, you can immediately use these keys on the real Bitcoin network.

It is imperative that you keep the text marked private a secret and only share them with parties you trust.

The public receiving address can be shared freely. You give this address to someone who should send you Bitcoin.

The mnemonic is standard and compatible with "HD wallets" such as Multibit HD. Specifically, the standard used here is BIP44.

Options

  • --help - display the help
  • --json - display as JSON instead of a console output
  • --mnemonic - pass your own mnemonic and use it to view the keys

A Word on Security

As a beginner it can be hard to know if you can trust a command like this that generates keys for you. For example, an evil version of a this program could generate real keys, but secretly store them. When you send funds to the generated address it could then use the generated keys to steal the coins.

One way to mitigate this is to run this program with your internet turned off. Another would be to inspect the source.

You can cross-reference that the keys generated by this program are, in fact, standard keys by pasting your mnemonic into a code converter such as this one and comparing that the outputs are the same. Of course, once you have done this, throw away those particular keys because of the reasons given above.

References

This software uses bcoin.

To understand how these keys work see:

Future Improvements

  • Accept a password for the key
  • Derive custom key paths

License

MIT