This assignment is based on getting real-time blockchain data from blockchain nodes.
node bitcoin-network-data.js
The code in this file connects to the available bitcoin servers using a pre-defined list of DNS and tries to establish a connection to all of the IP addresses associated to each of the DNS servers. If the connection is made successfully, we send the version payload ahead to the node to communicate with the node.
npm install net crypto long dns
node bitcoin-data-through-api.js
In this code, I use the blockchain API in order to pull the latest block which was mined and then show it's details in the console.
npm install axios crypto