Created
January 27, 2023 16:26
-
-
Save zh/aa4fed54f3908035c297aef5f7a04ce3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ethers = require('ethers'); | |
var crypto = require('crypto'); | |
var id = crypto.randomBytes(32).toString('hex'); | |
var privateKey = "0x"+id; | |
console.log("SAVE BUT DO NOT SHARE THIS:", privateKey); | |
var wallet = new ethers.Wallet(privateKey); | |
console.log("Address: " + wallet.address); | |
// L I N K . | |
// https://www.quicknode.com/guides/web3-sdks/how-to-generate-a-new-ethereum-address-in-javascript |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment