https://github.com/ysm-dev/ts-coin
⛓ Simple Blockchain implementation with Express, TypeScript.
https://github.com/ysm-dev/ts-coin
Last synced: 10 months ago
JSON representation
⛓ Simple Blockchain implementation with Express, TypeScript.
- Host: GitHub
- URL: https://github.com/ysm-dev/ts-coin
- Owner: ysm-dev
- License: mit
- Created: 2018-01-27T15:42:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-28T01:56:14.000Z (over 8 years ago)
- Last Synced: 2025-08-09T08:40:02.316Z (11 months ago)
- Language: TypeScript
- Homepage:
- Size: 82 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
TS-Coin
[golbin](https://github.com/golbin)님의 [G-Coin](https://github.com/golbin/g-coin)
을 보고 [Express](http://expressjs.com), [TypeScript](https://www.typescriptlang.org)
로 작성한 TS-Coin 입니다.
Simple BlockChain implementation with [Express](http://expressjs.com), [TypeScript](https://www.typescriptlang.org).
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Endpoints](#endpoints)
- [References](#references)
## Installation
```sh
$ git clone https://github.com/ysm0622/ts-coin.git
$ npm i
$ node index.js
```
And go to [http://localhost:3000](http://localhost:3000)
## Usage
Using [Postman](https://www.getpostman.com/apps) which is API test tool.

## Endpoints
- `POST` /transaction
- Add transaction.
- Transaction format :
```json
{
"sender": "0",
"recipient": "foo",
"amount": 0
}
```
- `GET` /transaction
- Get pending transactions.
- `POST` /mine
- Mining. Find proof and make block with rewards.
- `GET` /chain
- Get full chain to validate.
- `POST` /node
- Add a node.
- `GET` /node
- Get all nodes.
- `GET` /chain/valid
- Valid chain.
## References
- [https://tykimos.github.io/2018/01/21/g_coin_analysis_part1/](https://tykimos.github.io/2018/01/21/g_coin_analysis_part1/) (Korean)
- [https://github.com/golbin/g-coin](https://github.com/golbin/g-coin)
- [http://ecomunsing.com/build-your-own-blockchain](http://ecomunsing.com/build-your-own-blockchain)