Skip to content

Instantly share code, notes, and snippets.

@lowk3v
Created December 26, 2022 02:42
Show Gist options
  • Save lowk3v/f5eaede757159351f99ebf8241090e67 to your computer and use it in GitHub Desktop.
Save lowk3v/f5eaede757159351f99ebf8241090e67 to your computer and use it in GitHub Desktop.
var ethers = require('ethers');
var crypto = require('crypto');
var id = crypto.randomBytes(32).toString('hex');
var privateKey = "0x"+id;
var wallet = new ethers.Wallet(privateKey);
if (wallet.address.endsWith('979')){
console.log("SAVE BUT DO NOT SHARE THIS:", privateKey);
console.log("Address: " + wallet.address);
}
if (wallet.address.startsWith('84')){
console.log("SAVE BUT DO NOT SHARE THIS:", privateKey);
console.log("Address: " + wallet.address);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment