【问题标题】:Create an account with web3.js v0.2.6使用 web3.js v0.2.6 创建帐户
【发布时间】:2018-09-20 14:49:18
【问题描述】:

所以每次我尝试使用 web3 创建帐户时,我总是会遇到错误,例如 web3 的错误版本,我应该切换到 v1.0.0

我使用这个命令安装 web3

  npm install ethereum/web3.js --save

我试过这些命令来创建一个帐户,但总是不匹配

  web3.eth.accounts.create();
web3.eth.personal.newAccount('!@superpassword')
.then(console.log);

即使我安装了我也总是出错

npm install web3-eth-account --save 
npm install web3-eth-personal --save

谁能帮帮我?

【问题讨论】:

    标签: ethereum web3js ether


    【解决方案1】:

    答案是

    let a=web3.personal.newAccount('!@superpassword')
    

    【讨论】:

    猜你喜欢
    • 2018-10-01
    • 2021-08-23
    • 2019-01-26
    • 2022-07-15
    • 2018-10-30
    • 2020-10-15
    • 1970-01-01
    • 1970-01-01
    • 2013-06-29
    相关资源
    最近更新 更多