Building a Blockchain

In the previous chapter, we learned about what a blockchain is and how it functions. In addition, we learned how to set up a project to build our blockchain. In this chapter, you will begin building the blockchain and all of its functionalities. First, let's create the blockchain data structure using a constructor function, and then we'll add a lot of different types of functionalities to our blockchain by adding different methods to its prototype.

We're then going to give the blockchain certain functionalities, such as creating new blocks and transactions, as well as the ability to hash data and blocks. We'll also give it the ability to do a proof of work and many other functionalities that a blockchain should be able ...

Get Learn Blockchain Programming with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.