{"repo":"amarukensei/nodejs-blockchain","free":true,"listed":false,"github":"https://github.com/amarukensei/nodejs-blockchain","clone":"git clone https://github.com/amarukensei/nodejs-blockchain.git","description":"Simple blockchain implementation in Node.js","language":"JavaScript","stars":19,"topics":["node-js","blockchain","javascript","rest-api"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"Simple Blockchain in Node.js This is a very simple blockchain implementation in Node.js. It is just a proof of concept so as to understand how a blockchain may be created, including decentralized and distributed ledger concept. Getting Started Prerequisites You need node.js and npm package manager to be installed. I developed this code using node v12.10.0, but should work with previous versions. Installation Go into the code root and install all the packages. Node list Not mandatory, but it is recommended to have a list of nodes for having the distributed ledger mode. There is already a default list of nodes set in config/nodes.json , but you may change it as you wish. Running one instance Use this for starting one single instance (a node). Running multiple nodes Use this if you want to have multiple instances in the same machine. Nodes defined in the config file above will be accessed and keep updated. This is a convinient way for playing around with distributed ledger quickly. API POST requests need to have Content-Type as application/json GET /nodes Returns a list of registered nodes. Response: POST /transaction Add a transaction to the blockchain transaction queue. This needs to be mined afterwards so as to be added to the blockchain. The body of the request should contain a json string with these keys: from , to and amount . I all went fine you should be getting a response like: GET /transactions Returns all pending transactions waiting to be mined. Response: GET /mine T","default_branch":null,"files":null,"tree":[],"storefront":"/r/amarukensei","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/amarukensei/nodejs-blockchain/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}