Skip to content

EdouardCourty/ts-blockchain

Repository files navigation

TypeScript Blockchain

CI Pipeline

This is a simple blockchain implementation in TypeScript.

Installation

git clone git@github.com:EdoardCourty/ts-blockchain
cd ts-blockchain
yarn
yarn start

Features

  • 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

To do

  • Implement a proper P2P networking layer
  • Implement a discovery mechanism to find new peers
  • Implement node types: full, light, mining, etc.

Contributing

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

About

A TypeScript-written Blockchain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages