This is a simple blockchain implementation in TypeScript.
git clone git@github.com:EdoardCourty/ts-blockchain
cd ts-blockchain
yarn
yarn start
- Persistence
- Blockchain history persistence (JSON file)
- Peers persistence (JSON file)
- Peers
- Add / Delete / List peers
- Broadcast new blocks to known peers
- Synchronise current blockchain state with known peers
- Accept longest chain as valid when synchronising
- Transactions
- Only signed transactions can be pushed and mined on the blockchain
- Regular / Reward transactions
- Wallets (CLI)
- Generate
- Sign transaction
- Balance
- Get balance of an address
- Mining
- Proof of Work (Multi-threaded worker threads to ensure non-blocking workflow)
- Rewarding
- Implement a proper P2P networking layer
- Implement a discovery mechanism to find new peers
- Implement node types: full, light, mining, etc.
Feel free to contribute to this project by opening issues or pull requests.
Please make sure the CI passes and that you've added unit tests covering your changes.
© Edouard Courty, 2024