harb/services/txnBot/generateKey.js
2024-09-17 11:23:43 +02:00

11 lines
No EOL
290 B
JavaScript

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);