Part 1: Creating a blockchain with Javascript

In this video I’ll show you what is behind a blockchain by using simple code. It’s not a complete implementation, but enough to understand how blockchains work and how they guarantee that blocks can never be changed.

After creating our blockchain we’ll try and tamper with it. This will demonstrate a blockchains ability to detect fraud.

► Source code Available on GitHub

Part 2: Implementing Proof-of-Work in Javascript

Adding the proof-of-work mechanism to our homemade Javascript blockchain.

Proof-of-work will secure our blockchain against spammers and people trying to tamper with our blocks.

► Source code Available on GitHub

Part 3: Miner rewards & transactions

Implementing miner rewards and basic transactions in our Javascript based blockchain.

Mining rewards steadily introduce new coins into the system.

OOPS, I made a small mistake! In the minePendingTransactions() method, you have to pass the hash of the previous block when you’re creating a new Block() instance

► Source code Available on GitHub

Part 4: Signing transactions

Transactions on a blockchain have to be signed with a private key. This makes sure that people can only spend coins if they have the private key of their wallet.

In this video we will refactor our Javascript blockchain so that it will only accept signed transactions.

We’ll use the secp256k1 elliptic curve to generate a keypair. The same algorithm used in Bitcoin. But you can use other algorithms as well.

► Source code Available on GitHub

Part 5: Angular frontend

Blockchains are hard to understand, so let’s visualize their inner workings by building a front-end application in Angular. I’ll show you how to visualize blocks on the chain and the transactions inside them. We’ll also make a UI to create new transactions and to mine new blocks.

All of this is based on the Javascript blockchain implementation that we made in the previous 4 parts: SavjeeCoin!

► Source code Available on GitHub

I hope this tutorial will surely help and you if you liked this tutorial, please consider sharing it with others. Thank you!

#blockchain #javascript #cryptocurrency #bitcoin

Building a Blockchain with JavaScript - Complete Guide (5 parts)
2.90 GEEK