This is a simple blockchain implementation in Go.
| Feature | Description |
|---|---|
| Block creation and validation | Implements the creation and validation of blocks |
| Proof-of-work consensus algorithm | Implements the proof-of-work consensus algorithm |
| Transaction management | Handles transactions within the blockchain |
| Chain integrity and validation | Ensures the integrity and validity of the chain |
- Go 1.15 or above
- Clone the repository:
git clone https://github.com/Avionic22/go_blockchain.git- Run the wallet server
cd go_blockchain/wallet_server
go build
./wallet_server- Run the blockchain node:
cd go_blockchain/blockchain_server
go build
./blockchain_server- To view the wallet balance:
curl -d "blockchain_address=0x000000" http://localhost:8080/wallet/amount- To create a new transaction:
curl -X POST -H "Content-Type: application/json" -d '{"sender_private_key": "private_key", "sender_blockchain_address": "0x0000", "recipient_blockchain_address": "0x0001", "sender_public_key": "public_key", "value": 20.00}' http://localhost:8080/transaction- To view the current blockchain:
curl http://localhost:5000/- To start mining:
curl http://localhost:5000/mine/start