lets try create a Blockchain with nodejs and frontend with angular. need collaborations, feel free to create a pull request.
for now available APIS:
- /blocks (GET)
- /mine (POST)
- /transactions (GET)
- /mine-transactions (GET)
- /transact (POST)
- /public-key (GET)
frontend will be created with Angular.
- to start the application npm i, after done run
npm run dev - to run test
npm run testshe application will run in localhost:3001
- open terminal first window and run
npm run devthis will run in port 3001 - open second window run
HTTP_PORT=3002 P2P_PORT=5002 PEERS=ws://localhost:5001 npm run dev (to run in port 3002)
-
to create a transaction localhost:<3001 or 3002>/transact
- example params:
{ "recipient": "3002-4ddr355", "amount": 30 }
- example params:
-
to fetch all blocks transaction
http://localhost:<3001 or 3002>/transactions -
to get publicKey
http://localhost:<3001 or 3002>/public-key