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

crypto-wallets-fork-1

v1.0.2

Published

Simple cryptocurrency wallet generator for javascript

Downloads

3

Readme

crypto-wallets

Javascript/Node library for generating cryptocurrency addresses and private keys.

Supported Currencies:

  • Bitcoin (BTC)
  • Bitcoin Cash (BCH)
  • Dogecoin (DOGE)
  • Ethereum (ETH)
  • IOTA (IOTA)
  • Litecoin (LTC)
  • Monero (XMR)
  • Namecoin (NMC)
  • Peercoin (PPC)
  • Tezos (XTZ)

Usage

Install crypto-wallets with npm install --save crypto-wallets

Example: Generate Bitcoin Wallet

var cw = require('crypto-wallets');
var bitcoinWallet = cw.generateWallet('BTC');
console.log("Address: " + bitcoinWallet.address);
console.log("Private Key: " + bitcoinWallet.privateKey);

Example: Generate Ethereum Wallet

var cw = require('crypto-wallets');
var ethWallet = cw.generateWallet('ETH');
console.log("Address: " + ethWallet.address);
console.log("Private Key: " + ethWallet.privateKey);

Example: Generate Monero Wallet

Note: Generating Monero (XMR) and IOTA (IOTA) wallets are both asynchronous and return a promise, unlike the other currencies.

var cw = require('crypto-wallets');
cw.generateWallet('XMR').then(function(moneroWallet){
	console.log("Address: " + moneroWallet.address);
	console.log("Private Key: " + moneroWallet.privateKey);
});

CLI - Command Line Interface

crypto-wallets can also be used in the command line.

Commands:

generate <currency> [number] [--save <file>]

Generates and prints wallets in given currency. If [number] is not given, it defaults to 1. If the optional --save flag is provided, the generated wallets will be saved to the specified file in CSV format.

Generate bitcoin wallet

>crypto-wallets generate btc
[ { currency: 'BTC',
    privateKey: 'L3Qa2u7nkHaNYZdsQYi2gVmBEtpppk4JrvQqaSYx51HWG51uwaTa',
    address: '1HMt2J3dQE428krHQEmFRFNDv2DyGAaMfb' } ]

Generate 3 dogecoin wallets

>crypto-wallets generate doge 3
[ { currency: 'DOGE',
    privateKey: 'QWgiPqSPNXTtTt32hffy8C1uvHT4BJcbo78TSJcEmvf6AyhE85L3',
    address: 'DJnvD1NxRjgmXKGbCR98QEneFYcGGmnquc' },
  { currency: 'DOGE',
    privateKey: 'QPfrc7ahUuXqqd8oeETGh4ZzCrS1wNhognEx4N5my6MK3e6qQh1o',
    address: 'DN6uQWUNDfzjsXdaTtMhxwRK4hZ4RJJ357' },
  { currency: 'DOGE',
    privateKey: 'QTgfpCVt8CW1bgw9PdfmsSNY1FKodM65bLYYkQeaoqm1CkNgD3MK',
    address: 'DC7xVTob9XE6Soy6TjeWySinS3hG4cjR3F' } ]

Generate 100 monero wallets and save them to 'xmrWallets.csv'

>crypto-wallets generate xmr 100 --save xmrWallets.csv
Successfully saved to file: xmrWallets.csv

verify <currency> <privateKey> <address>

Checks if the given private key controls the given address.

>crypto-wallets verify doge QWgiPqSPNXTtTt32hffy8C1uvHT4BJcbo78TSJcEmvf6AyhE85L3 DJnvD1NxRjgmXKGbCR98QEneFYcGGmnquc
Success: The private key matches the address
>crypto-wallets verify btc foo bar
Failure: The private key does not match the address

Security

This library uses other third party libraries to generate the cryptocurrency addresses. So this library is secure if you trust the other libraries.

The libraries used are: