A simple blockchain with an api for make new transaction or mining 😊
Clone Project
git clone https://github.com/tchala120/simple-blockchain.git
cd simple-blockchain
Install Dependencies
npm install
Create mock Database
- Create file with name
database.json
// database.json
{
"blockchain": [],
"transactions": [],
"wallets": [],
"difficulty": 5,
"reward": 10
}
Start Project
npm start
# Listening on port 3000...
API Endpoint
- /blockchain - Route for check all blocks data.
- /transactions - Route for make new transaction and get all pending transactions in lists.
- /mine - Route for mining.