https://github.com/generic-matrix/test-chain
https://github.com/generic-matrix/test-chain
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/generic-matrix/test-chain
- Owner: generic-matrix
- Created: 2021-10-25T10:12:03.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-30T14:16:41.000Z (over 4 years ago)
- Last Synced: 2025-10-29T03:35:28.730Z (9 months ago)
- Language: JavaScript
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
### About The Project
> This is a blockchain project from scratch , using the custom made blockchain have created a cryptocurrency.
### The project features:
* P2P connections to create a blockchain
### To install
Run
```
npm install .
```
### To Run test
```
npm run test
```
### How to use
You can open two terminal
```
Terminal 1 : npm run dev
Terminal 2 : HTTP_PORT=3002 P2P_PORT=5002 PEERS=ws://localhost:5001 npm run dev
```
This ports were given for an exampple, you can use any
You can head over to cURL or Postman to check the blocks in the blockchain:
```
curl --location --request GET 'http://:/blocks'
```
To mine a block in blockchain:
```
curl --location --request POST 'http://:/mine' \
--header 'Content-Type: application/json' \
--data-raw '{
"data" : "your data"
}'
```
### Functional Requirements
* To create a distributed and decentrilized blockchain
* To implement POW algo
* To use SHA256 algo to generate hash
* To implement variable mine rate