Create an account with web3.js v0.2.6

爱⌒轻易说出口 提交于 2019-12-13 03:38:58

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!