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

cooller458-wallet-npm-package

v1.31.0

Published

Crypto wallet generator CLI tool

Downloads

24

Readme

CryptoWallet Library

This library enables interaction with various cryptocurrency wallets, providing functionalities like wallet generation, transaction signing, and more, adapted for use within Node.js applications.

Installation

npm install cooller458-wallet-npm-package

Usage Examples

Below are examples demonstrating how to use this library to perform various wallet operations:

const { Wallet, utils } = require('cooller458-wallet-npm-package');

// Generate a random EVM-compatible wallet (Ethereum, Polygon, etc.)
const evmWallet = new Wallet('eth');
console.log(evmWallet.generate());

// Generate a random Bitcoin wallet (default format: bech32)
const btcWallet = new Wallet('btc');
console.log(btcWallet.generate());

// Generate a random mnemonic string (12 words) and generate a wallet from it
const mnemonic = utils.generateMnemonic(12);
const walletFromMnemonic = new Wallet('eth');
console.log(walletFromMnemonic.fromMnemonic(mnemonic));

// Generate multiple wallets
const wallets = [];
for (let i = 0; i < 10; i++) {
    wallets.push(new Wallet('eth').generate());
}
console.log(wallets);

// Advanced Usage: Generate a wallet with specific requirements
const btcWalletCustom = new Wallet('btc', { prefix: 'abc', format: 'bech32' });
console.log(btcWalletCustom.generate());

Supported Features and Operations

  • Generate wallets for EVM-compatible chains like Ethereum, Polygon, etc.
  • Generate Bitcoin wallets with various formats: legacy, segwit, bech32, taproot.
  • Create wallets from mnemonic phrases.
  • Advanced wallet creation with desired prefixes or suffixes.
  • Export wallet details into a CSV file.

Generating Wallets with Specific Parameters

// Generate a wallet with a desired prefix (case-sensitive option available)
const walletWithPrefix = new Wallet('btc', { prefix: 'abc' });
console.log(walletWithPrefix.generate());

// Generate wallets from a mnemonic with specific formats and save them to a CSV
const mnemonic = "radio bright pizza pluck family crawl palm flame forget focus stock stadium";
const btcWalletBech32 = new Wallet('btc', { format: 'bech32' });
console.log(btcWalletBech32.fromMnemonic(mnemonic));

// Output to CSV example (Node.js doesn't support command line options like `-D` directly)
const fs = require('fs');
const csvData = wallets.map(w => `${w.address},${w.privateKey}`).join('\n');
fs.writeFileSync('output.csv', csvData);

Supported Blockchains

  • EVM (Ethereum, Polygon, Arbitrum, Optimism, etc.)
  • BTC (Bitcoin) [legacy, segwit, bech32, taproot]
  • BNB (Binance Coin) [BEP2, BEP20]
  • And many others...

For a complete list of supported blockchains and more detailed examples of each functionality, please refer to the comprehensive API documentation included with the package.

Contributing

Contributions to the library are welcome. Please refer to the CONTRIBUTING.md file for guidelines.

License

This project is licensed under the MIT License. See the LICENSE file for more details.