Chapter 4. Getting Started with web3.js
In the previous chapter, we learned how to write smart contracts and used geth's interactive console to deploy and broadcast transactions using web3.js. In this chapter, we will learn web3.js and how to import, connect to geth, and use it in Node.js or client-side JavaScript. We will also learn how to build a web client using web3.js for the smart contract that we created in the previous chapter.
In this chapter, we'll cover the following topics:
- Importing web3.js in Node.js and client-side JavaScript
- Connecting to geth
- Exploring the various things that can be done using web3.js
- Discovering various most used APIs of web3.js
- Building a Node.js application for an ownership contract