-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
37 lines (27 loc) · 850 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const { ethers } = require("ethers");
//By : 0xdaebak
//https://github.com/0xdaebak
//Generate Single Wallet
let singleWallet = () => {
let createWallet = ethers.Wallet.createRandom();
console.log('address:', createWallet.address)
console.log('mnemonic:', createWallet.mnemonic.phrase)
console.log('privateKey:', createWallet.privateKey)
}
//Generate Multi Wallet
let multiWallet = () =>{
//create 5 wallets
let walletCount = 5;
//wallet Array
let wallets = [];
for (let i = 0; i < walletCount; i++) {
let createWallet = ethers.Wallet.createRandom();
wallets.push(createWallet);
}
console.log(wallets[0].address);
console.log(wallets[1].address);
console.log(wallets[2].address);
console.log(wallets[3].address);
console.log(wallets[4].address);
}
singleWallet();