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()
 
看这个吧,讲得挺好的 
 
 
 
 
 
 
posted @ 2018-04-19 22:17  tianlongtc  阅读(233)  评论(0编辑  收藏  举报