@nodeberry/node-wallet-generator

1.0.0 • Public • Published

node-wallet-generator

A plug-and-play module for generating keypair for multiple cryptocurrencies.
code style: prettier Code-coverage: 96.72%

Documentation

  • Examples and usage are listed below

Installation

  • npm install @nodeberry/node-wallet-generator

Examples

Usage

  const wallet = require('@nodeberry/node-wallet-generator')  

Generate a mnemonic

  let mnemonic 
  const getMnemonic = ()=>{
      mnemonic = wallet.generateMnemonic() 
      console.log(mnemonic)
  }
  getMnemonic()

Generate ethereum wallet from mnemonic

  let ethereum 
  const getEthereum = async()=>{
      ethereum = await wallet.getEthWalletFromMnemonic(mnemonic)  
      console.log(ethereum)
  }   
  getEthereum()

Generate MAINNET bitcoin wallet from mnemonic

  let bitcoin 
  const getBitcoin = async()=>{
      bitcoin = await wallet.getBtcWalletFromMnemonic(mnemonic,'MAINNET')  
      console.log(bitcoin)   
  }
  getBitcoin()  

Generate TESTNET bitcoin wallet from mnemonic

  let bitcoin 
  const getBitcoin = async()=>{
      bitcoin = await wallet.getBtcWalletFromMnemonic(mnemonic,'TESTNET')  
      console.log(bitcoin)   
  }
  getBitcoin()  

Generate Litecoin wallet

  let litecoin 
  const getLitecoin = async()=>{
      litecoin = await wallet.getLtcWalletFromMnemonic(mnemonic)  
      console.log(litecoin)   
  }
  getLitecoin() 

Generate Dogecoin wallet

  let dogecoin 
  const getDogecoin = async()=>{
      dogecoin = await wallet.getDogeWalletFromMnemonic(mnemonic)  
      console.log(dogecoin)   
  }
  getDogecoin() 

Running test suite

  • npm test
  • npx jest --coverage

For any improvements, create issue here!

Complementing libraries

Readme

Keywords

none

Package Sidebar

Install

npm i @nodeberry/node-wallet-generator

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

47.8 kB

Total Files

15

Last publish

Collaborators

  • saranrts
  • npm-i-sudhanshu
  • sujithsomraaj
  • nodeberry-ltd