web3
github:https://github.com/ethereum/web3.js/
Web3.js is a JavaScript library provided by the Etheric Square, which encapsulates the RPC communication API of Ethernet square, provides a series of interaction methods with block chain, makes JS and Ethernet square Interactive easy. Infura
Official website: https://infura.io/
The local installation of Geth requires more time and space to synchronize chunks, and Infura can be much simpler, Infura provides open Ethernet and test nodes, and can use the API provided by Infura to access the ether and IPFs. Go to the official website only need to provide email registered link can be. using WEB3 and Infura development
The most common operations such as looking at the ether balance of an Ethernet address (similar to Etherscan).
Introduce web3 through NPM or other means, and use Infura to provide the primary/test network for initialization.
XXXX for your application in Infura address
web3 = new Web3 (New Web3.providers.HttpProvider ("https://mainnet.infura.io/xxxxxxxx"));
You can then call the Web3 interface, such as getting a ether number of addresses
Wei is the smallest unit on the etheric square, ether 18 digits after the decimal point for a wei
var balancewei = web3.eth.getBalance (" 0xc257274276a4e539741ca11b590b9447b26a8051 "). Tonumber ();
Convert from Wei to ether
var balance = Web3.fromwei (Balancewei, ' ether ');
This can be done from the main Ethernet network, such as viewing block information, deploying smart contracts, and so on.
Specific development can refer to the ether square JS Api:https://github.com/ethereum/wiki/wiki/javascript-api
Demo Simple Etherscan
Demo Github:https://github.com/wlchn/ethersee