{"id":20270631,"url":"https://github.com/ac12644/blockchain","last_synced_at":"2025-08-10T08:38:53.429Z","repository":{"id":50528958,"uuid":"479880394","full_name":"ac12644/Blockchain","owner":"ac12644","description":"Create Blockchain With NodeJs🚀","archived":false,"fork":false,"pushed_at":"2025-06-25T20:30:13.000Z","size":174,"stargazers_count":20,"open_issues_count":0,"forks_count":16,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-25T21:31:43.233Z","etag":null,"topics":["blockchain","cli","crypto-js","discovery-swarm","ecdsa","falcon512","leveldb","nodejs","peer2peer","proof-of-stake","proof-of-work","wallet"],"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/ac12644.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-10T01:02:44.000Z","updated_at":"2025-06-25T20:30:17.000Z","dependencies_parsed_at":"2024-01-26T23:25:38.949Z","dependency_job_id":"8daa55a9-0874-466e-bba9-072d1cd0cd46","html_url":"https://github.com/ac12644/Blockchain","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ac12644/Blockchain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac12644%2FBlockchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac12644%2FBlockchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac12644%2FBlockchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac12644%2FBlockchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ac12644","download_url":"https://codeload.github.com/ac12644/Blockchain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac12644%2FBlockchain/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269698108,"owners_count":24461190,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","cli","crypto-js","discovery-swarm","ecdsa","falcon512","leveldb","nodejs","peer2peer","proof-of-stake","proof-of-work","wallet"],"created_at":"2024-11-14T12:32:05.674Z","updated_at":"2025-08-10T08:38:53.421Z","avatar_url":"https://github.com/ac12644.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/ac12644/Blockchain\"\u003e\n    \u003cimg src=\"blockchain.svg\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003eBlockchain\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    A modular educational blockchain built in Node.js.\u003cbr\u003e\n    Switch consensus (PoW/PoS) and cryptography (secp256k1/Falcon PQC) on the fly.\u003cbr\u003e\n    \u003ca href=\"https://abhishek-chauhan.medium.com/e65dfc40479e\"\u003e\u003cstrong\u003eRead the Medium article »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003cstrong\u003e⭐ Star this repo if you like real, hackable blockchain code!\u003c/strong\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n## Features\n\n- Modular **P2P blockchain network**\n- Pluggable **consensus**: Proof-of-Work (PoW) or Proof-of-Stake (PoS)\n- Pluggable **cryptography**: Classic (secp256k1) or **Post-Quantum** (Falcon-512)\n- Automatic **fork detection** and **chain re-org**\n- Educational **wallet** and **transaction** system (works with any crypto mode)\n- Syncs with peers, broadcasts blocks, and supports miner registration\n- CLI and REST API for block, wallet, and chain interaction\n\n---\n\n## Steps Implemented\n\n  \u003col\u003e\n    \u003cli\u003eCreating a basic P2P network\u003c/li\u003e\n    \u003cli\u003eSending and receiving blocks\u003c/li\u003e\n    \u003cli\u003eRegistering miners and creating new blocks\u003c/li\u003e\n    \u003cli\u003eSetting up a name-value database (LevelDB/RocksDB)\u003c/li\u003e\n    \u003cli\u003eCreating a private-public wallet with pluggable crypto\u003c/li\u003e\n    \u003cli\u003eREST API for chain/wallet interaction\u003c/li\u003e\n    \u003cli\u003eCommand-line interface\u003c/li\u003e\n    \u003cli\u003eConsensus switch (PoW / PoS)\u003c/li\u003e\n    \u003cli\u003eCryptography switch (secp256k1 / Falcon PQC)\u003c/li\u003e\n    \u003cli\u003eAutomatic fork detection and chain re-org\u003c/li\u003e\n  \u003c/ol\u003e\n\n---\n\n## Getting Started\n\n```sh\nnpm install\n```\n\n## Usage\n\n### Run in Default Mode (PoW, secp256k1):\n\n```sh\nnode p2p.js\n\n```\n\nSwitch Consensus (PoW / PoS):\n\n```sh\nnpm run start:pow    # Proof-of-Work (default)\nnpm run start:pos    # Proof-of-Stake\n```\n\nOr with environment variable:\n\n```sh\nCONSENSUS_MODE=pow node p2p.js\nCONSENSUS_MODE=pos node p2p.js\n```\n\nSwitch Cryptography (secp256k1 / Falcon Post-Quantum):\n\n```sh\nnpm run start:secp    # Classic ECDSA (default)\nnpm run start:falcon  # Falcon-512 (Post-Quantum, requires pqclean)\n```\n\nOr with environment variable:\n\n```sh\nCRYPTO_MODE=secp256k1 node p2p.js\nCRYPTO_MODE=falcon node p2p.js\n```\n\nYou can combine switches:\n\n```sh\nCRYPTO_MODE=falcon CONSENSUS_MODE=pos node p2p.js\n```\n\n### Advanced\n\n- Run multiple nodes: Use multiple terminals, each in a separate folder, or clear /wallet before launching to simulate multiple identities.\n\n- Fork detection/re-org: Disconnect peers and create different blocks, then reconnect to see automatic chain resolution.\n\n- Stake management: Edit stake values in code for PoS testing.\n\n\u003c!-- CONTRIBUTING --\u003e\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fac12644%2Fblockchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fac12644%2Fblockchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fac12644%2Fblockchain/lists"}