先在npm中安装eth的依赖库ethereumjs-wallet
npm i ethereumjs-wallet
编写生成脚本gen.js
var Wallet = require('ethereumjs-wallet')
// 生成50个钱包地址数量
for(var i = 0; i < 50; i++){
const EthWallet = Wallet.default.generate(false);
console.log("address: " + EthWallet.getAddressString());
console.log("privateKey: " + EthWallet.getPrivateKeyString());
}
最后直接用命令运行生成
node gen.js