There is a site with simple registration and user login. How can I create a new ethereum account for each new user and store the keys of these accounts in my database


1 Answer 1


Try this:

const crypto = require("crypto");
const util = require("ethereumjs-util");

const privateKey = "0x" + crypto.randomBytes(32).toString("hex");
const publicAddr = "0x" + util.privateToAddress(privateKey).toString("hex");
  • And what commands can you make transactions between addresses?
    – Madox
    Nov 26, 2019 at 20:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.