0

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

0

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");
| improve this answer | |
  • And what commands can you make transactions between addresses? – Madox Nov 26 '19 at 20:38

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