The web3
library is an open source JavaScript library that can be used to connect to Ethereum nodes from the same or a remote computer. It allows IPC as well as RPC to connect to Ethereum nodes. web3
is a client-side library and can be used alongside a web page and query and can submit transactions to Ethereum nodes. It can be installed using the node package manager as a node module like the Solidity compiler. At the time of writing, the latest version of web3
is broken and does not install appropriately because of the missing BigNumber.js
file. However, previous stable versions can be used for connecting web applications to backend Ethereum nodes. Let's take a look at the following steps to install the web3
JavaScript library:
- The command used to install
web3
is as follows:
npm install [email protected]
The preceding command generates the following output:
- After
web3
is installed, it can be used using Node.js. From Command Prompt, enter the node workspace by executing the...