问题
so everytime i try to create an account with web3 i always get errors like the wrong version of web3 and that i should switch to v1.0.0
i used this command to install web3
npm install ethereum/web3.js --save
i ve tried these commands to create an account but there is always a mismatch
web3.eth.accounts.create();
web3.eth.personal.newAccount('!@superpassword')
.then(console.log);
and i always get errors even though i installed
npm install web3-eth-account --save
npm install web3-eth-personal --save
can anyone help me?
回答1:
the answer is
let a=web3.personal.newAccount('!@superpassword')
来源:https://stackoverflow.com/questions/49762853/create-an-account-with-web3-js-v0-2-6