https://github.com/waynechang65/basic-blockchain
basic-blockchain is a simple cryptocurrency blockchain implementation that mimics the principles of Bitcoin.
https://github.com/waynechang65/basic-blockchain
Last synced: 8 days ago
JSON representation
basic-blockchain is a simple cryptocurrency blockchain implementation that mimics the principles of Bitcoin.
- Host: GitHub
- URL: https://github.com/waynechang65/basic-blockchain
- Owner: WayneChang65
- License: mit
- Created: 2022-04-02T13:31:55.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-03T11:52:30.000Z (almost 4 years ago)
- Last Synced: 2024-10-19T11:16:24.183Z (about 1 year ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# basic-blockchain
basic-blockchain 是一個模彷比特幣原理的簡單虛擬貨幣區塊鍊實作。
basic-blockchain is a simple cryptocurrency blockchain implementation that mimics the principles of Bitcoin.
## 前言(Overview)
自己對區塊鍊有興趣,透過實作較能清楚了解區塊鍊的內容。參考一位youtuber的影片並且加上自己的想法後,寫成這個簡單的範例。這範例中清楚說明有關區塊鍊的幾項內容,如區塊鍊的架構、挖礦、交易、簽章認證等。另外,自己在程式中也加註中文的詳細註解,供有興趣的人能更快速了解程式內容。
I am interested in the blockchain, and I can understand the content of the blockchain more clearly through the implementation. After referring to a youtuber's video and adding my own thoughts, I wrote this simple example. This example clearly illustrates several aspects of the blockchain, such as the structure of the blockchain, mining, transactions, signature authentication, etc. In addition, I also add detailed comments in Chinese in the program, so that those who are interested can understand the content of the program more quickly.
## 如何跑範例程式? (How to run the example ?)
* 從Github下載basic-blockchain專案程式碼。
Clone basic-blockchain from GitHub
```bash
git clone https://github.com/WayneChang65/basic-blockchain.git
```
* 進入basic-blockchain專案目錄
Get into basic-blockchain directory
```bash
cd basic-blockchain
```
* 下載跑範例程式所需要的環境組件
Install dependencies in the cloned basic-blockchain folder
```bash
npm ci
```
* 透過 npm 直接使用以下指令。(實際範例程式在 ./main.js)
Run it with npm. (the demo example is in ./main.js)
```bash
npm run start
```
## 參考(Reference)
[Youtuber:Simply Explained](https://www.youtube.com/channel/UCnxrdFPXJMeHru_b4Q_vTPQ)