https://github.com/wangdahoo/coin
https://github.com/wangdahoo/coin
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/wangdahoo/coin
- Owner: wangdahoo
- Created: 2019-06-27T03:32:54.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T23:23:22.000Z (over 3 years ago)
- Last Synced: 2025-02-11T12:41:23.960Z (over 1 year ago)
- Language: TypeScript
- Size: 599 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# coin
> cryptocurrency study.
## Startup
- install dependencies
```bash
yarn
```
- start a peer
```bash
yarn dev
```
- start another peer
```bash
WEB_PORT=5001 PEER_PORT=8001 yarn dev
```
- connect to peer
```bash
curl -H "content-type:application/json" --data '{"endpoint" : "ws://127.0.0.1:8001"}' http://localhost:5000/peer
```
- mine a block
```bash
curl -H "content-type:application/json" --data '{"data" : "Not Enough Minerals"}' http://localhost:5000/mine
```