Skip to content

Instantly share code, notes, and snippets.

@barrasso
Created December 5, 2022 04:37
Show Gist options
  • Select an option

  • Save barrasso/15682f9a04814ffeaab22af4efc1047c to your computer and use it in GitHub Desktop.

Select an option

Save barrasso/15682f9a04814ffeaab22af4efc1047c to your computer and use it in GitHub Desktop.
create ETH wallet
const Web3 = require('web3');
const provider = new Web3.providers.HttpProvider('https://mainnet.infura.io/v3/YOUR_API_KEY');
const web3 = new Web3(provider);
// Generate a new Ethereum account
const account = web3.eth.accounts.create();
console.log('Your Ethereum wallet address is:', account.address);
console.log('Your private key is:', account.privateKey);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment