
正文
web3.js
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
安装
别按照官网上面 npm install web3 下载,我已经吃过一次亏了
npm init
npm install ethereum/web3.js --save
web3.isConnected()#检查结点的连接是否存在
web3.reset()#重置web3
web3.sha3(string,options)#加密
web3.toHex()#将任何值转为hex
web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
web3.net.peerCounnt#连接节点的数量
web3.eth.defaultBlock#默认地址
web3.eth.getBalance()
看这个吧,讲得挺好的
https://bitshuo.com/topic/5954b6764a7a061b785db726





