August 2018
Intermediate to advanced
404 pages
11h 19m
English
We are now going to learn how to manage accounts and send transactions:
// v0.2x.xweb3.eth.accounts;// v1.x.xweb3.eth.getAccounts().then(console.log);
// For v1.x.xweb3.eth.accounts.create();web3.eth.accounts.create("<random entropy>");
The create function accepts an entropy as input for randomness. If not specified, it will generate a random hex of 32 bytes by using web3.utils.randomHex(32) and will use it as the entropy input. This method will return the new address, private key, and methods ...