{"id":13818107,"url":"https://github.com/olistic/simplechain","last_synced_at":"2025-04-19T23:33:35.218Z","repository":{"id":66330402,"uuid":"109534074","full_name":"olistic/simplechain","owner":"olistic","description":"⛓✨ Interactive blockchain built with Node.js","archived":false,"fork":false,"pushed_at":"2018-04-03T23:06:46.000Z","size":218,"stargazers_count":71,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-08-04T07:01:12.623Z","etag":null,"topics":["blockchain","cryptocurrency","nodejs","proof-of-work"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olistic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-11-04T22:12:05.000Z","updated_at":"2024-07-23T01:32:41.000Z","dependencies_parsed_at":"2024-01-18T03:48:32.751Z","dependency_job_id":null,"html_url":"https://github.com/olistic/simplechain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olistic%2Fsimplechain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olistic%2Fsimplechain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olistic%2Fsimplechain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olistic%2Fsimplechain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olistic","download_url":"https://codeload.github.com/olistic/simplechain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224970885,"owners_count":17400480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","cryptocurrency","nodejs","proof-of-work"],"created_at":"2024-08-04T07:00:32.559Z","updated_at":"2024-11-16T21:22:16.840Z","avatar_url":"https://github.com/olistic.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e✨⛓ Simplechain ⛓✨\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://circleci.com/gh/olistic/simplechain\"\u003e\u003cimg alt=\"CircleCI Status\" src=\"https://img.shields.io/circleci/project/github/olistic/simplechain.svg?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://codeclimate.com/github/olistic/simplechain\"\u003e\u003cimg alt=\"Coverage Status\" src=\"https://img.shields.io/codeclimate/coverage/olistic/simplechain.svg?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Interactive blockchain built with Node.js.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"demo\" src=\"https://i.imgur.com/cwEbxMJ.gif\" height=\"480\"\u003e\n\u003c/p\u003e\n\n## Intro\n\nThe blockchain is a fascinating technology, but it can also be intimidating. At the time I wrote this code, I had consumed a lot of material regarding the blockchain and cryptocurrencies, but I hadn't satisfied my hunger for knowledge (and still haven't). I wanted to create my own blockchain for some of that knowledge to sink in, and I wanted it to be simple. Simplechain is the result of that, and I hope you find it as helpful as it was for me when I created it.\n\n\u003e Check out [Simplechain++](https://github.com/olistic/simplechainpp) for a C++ port.\n\n## Usage\n\nFirst, clone the repo:\n\n```sh\n$ git clone https://github.com/olistic/simplechain.git\n$ cd simplechain\n```\n\nThen, install the dependencies:\n\n```sh\n$ npm install\n```\n\nAnd finally, launch the REPL:\n\n```sh\n$ npm start\n```\n\n_Voilà!_ If you see the `SIMPLECHAIN\u003e` prompt, it means you're inside the REPL.\n\nGo ahead and try the following commands:\n\n* `ADDBLOCK \u003cdata\u003e`: Mines a block with the provided data and adds it to the chain.\n* `LISTBLOCKS`: Lists all the blocks in the chain.\n\nWell done! If you want to learn more, please don't forget to [look at the code](https://github.com/olistic/simplechain/tree/master/lib).\n\n## Advanced Usage\n\n### Adjust Difficulty\n\nIf you want to tweak the blockchain's difficulty, you can do so via the CLI:\n\n```sh\n$ npm start -- --difficulty \u003cnumber\u003e\n```\n\nThis number represents the amount of zeros the hashes of the blocks in the blockchain need to begin with. A greater number makes it more difficult (more computationally expensive) to mine a block.\n\n## Next Steps\n\n* Implement P2P network of nodes where:\n  * Miner nodes broadcast mined blocks\n  * User nodes broadcast data to be included in blocks by miners\n* Implement peer discovery protocol so nodes can find each other\n\n## Resources\n\n* [_Ever wonder how Bitcoin (and other cryptocurrencies) actually work?_](https://youtu.be/bBC-nXj3Ng4)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folistic%2Fsimplechain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folistic%2Fsimplechain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folistic%2Fsimplechain/lists"}