harb/services/txnBot/generateKey.js

11 lines
290 B
JavaScript
Raw Normal View History

const { Wallet } = require('ethers');
// Generate a random wallet
const wallet = Wallet.createRandom();
// Extract the private key and address
const privateKey = wallet.privateKey;
const address = wallet.address;
console.log('Private Key:', privateKey);
console.log('Address:', address);