Name: web3.js
Owner: Parity Technologies
Description: Ethereum Compatible JavaScript API
Forked from: ethereum/web3.js
Created: 2016-05-29 14:04:19.0
Updated: 2018-05-12 23:10:46.0
Pushed: 2016-05-29 14:05:26.0
Homepage: null
Size: 19621
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
web3.js version 0.14.0 supports multiple instances of web3 object. To migrate to this version, please follow the guide:
web3 = require('web3');
Web3 = require('web3');
web3 = new Web3();
This is the Ethereum compatible JavaScript API which implements the Generic JSON RPC spec. It's available on npm as a node module, for bower and component as an embeddable js and as a meteor.js package.
You need to run a local Ethereum node to use this library.
install web3
or add ethereum:web3
Bower
r install web3
Component
onent install ethereum/web3.js
ethereum.min.js
in your html file. (not required for the meteor package)Use the web3
object directly from global namespace:
ole.log(web3); // {eth: .., shh: ...} // it's here!
Set a provider (HttpProvider)
.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));
There you go, now you can use it:
coinbase = web3.eth.coinbase;
balance = web3.eth.getBalance(coinbase);
You can find more examples in example
directory.
apt-get update
apt-get install nodejs
apt-get install npm
apt-get install nodejs-legacy
run-script build
test