generate-key.js 244 B

12345678
  1. const { Wallet } = require("ethers");
  2. // Generate a random wallet
  3. const wallet = Wallet.createRandom();
  4. console.log("Private Key:", wallet.privateKey);
  5. console.log("Address:", wallet.address);
  6. console.log("Mnemonic:", wallet.mnemonic.phrase);