Blockchain implementation in Kotlin featuring wallets, transactions and a rudimentary proof-of-work algorithm.
The goal of this small project was to learn about blockchain internals and pick up some Kotlin in the process.
When Main.kt is ran:
-
A blockchain and two wallets are created
-
Some credit is given to one wallet in a transaction and the transaction gets signed with the wallet's private key
-
The transaction is added to a new block which gets mined using a rudimentary proof-of-work algorithm and added to the blockchain.
-
Another transaction takes place, transferring some credit from one wallet to the other. The process is similar to above, however the second block gets linked to the first block by storing the first block's hash.
Make sure you have JDK 11 installed. Then, run:
./gradlew runAlternatively, use Docker:
docker build .