Contains competed code for the following: funfirst.blog article
Make sure to download the required packages:
pip install rsa
Here is a rundown of all the files:
Has the Transaction
class and all logic for signing and verifying transactions. Also, includes the BlockReward
class.
Has the Block
class which also implements logic for mining a block.
Has logic for getting RSA public, private key pair and also a public address for each account.
Implements the core Blockchain
class which combines other subclasses and is used to get the current balance of a public_address
Optional file to highlight an example for the usage of the blockchain