Skip to content

BahadorGh/wallet-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

wallet-generator

Easily generate wallet with ethers package, bsc ( and other similar networks)

Instruction:

Prepare the project:

  • mkdir walletGenerator && cd walletGenerator
  • npm init -y
  • npm install ethers
  • create new js file(such as "walletgenerator.js").

Then, insert codes as below:

var ethers = require("ethers");
var crypto = require("crypto");

var id = crypto.randomBytes(32).toString('hex'); // generating 32bytes random string 
var privateKey = '0x' + id; // 0x is used to make private key in hexadecimal

console.log("PrivateKey(don't share this with anyone!): ", privateKey);

var wallet = new ethers.Wallet(privateKey);
console.log("Wallet address:", wallet.address);
  • Finally : node walletgenerator

After generating wallet you will have public and private key of your newly generated wallet. To check your wallet, you can test assets in it from explorer:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published