Skip to content

Commit

Permalink
Add Quorum docs and example (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
kidneyweakx authored Oct 31, 2022
1 parent f7aa131 commit e005d26
Show file tree
Hide file tree
Showing 9 changed files with 120 additions and 9 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ All notable changes to BDK project will be documented here.

[1.0.4]: https://github.com/cathayddt/bdk/releases/tag/v1.0.4

[2.0.0]: https://github.com/cathayddt/bdk/releases/tag/v2.0.0

## [2.0.0][2.0.0] - 2022-10-

### new

- BREAKING CHANGE: Quorum Network Feature (#65)
- New Command: `bdk quorum network`
- New Command: `bdk quorum explorer`
- New Commands API Docs

### changed
- Refactor: move Fabric commands from 'src/' to 'src/fabric'
- Refactor: Fabric command form `bdk` to `bdk fabric`

## [1.0.4][1.0.4] - 2022-02-

### new
Expand Down
6 changes: 6 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
| 林妤儒 | [yujugrace][yujugrace] | <[email protected]> |
| 黃冠庭 | [kth-tw][kth-tw] | <[email protected]> |
| 林睿庠 | [RuiSiang][RuiSiang] | <[email protected]> |
| 黃俊友 | [PianoChicken][PianoChicken]| <[email protected]> |
| 陳聖勳 | [kidneyweakx][kidneyweakx] | <[email protected]> |

**主要開發成員 (Core Developers)**

Expand All @@ -17,8 +19,12 @@
| 林妤儒 | [yujugrace][yujugrace] | <[email protected]> |
| 黃冠庭 | [kth-tw][kth-tw] | <[email protected]> |
| 林睿庠 | [RuiSiang][RuiSiang] | <[email protected]> |
| 黃俊友 | [PianoChicken][PianoChicken]| <[email protected]> |
| 陳聖勳 | [kidneyweakx][kidneyweakx] | <[email protected]> |

[SecondDim]: https://github.com/SecondDim
[yujugrace]: https://github.com/yujugrace
[kth-tw]: https://github.com/kth-tw
[RuiSiang]: https://ruisiang.github.io
[PianoChicken]: https://github.com/Pianochicken
[kidneyweakx]: https://github.com/kidneyweakx
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ bdk fabric network create -i
| ---------------- | ---------------- |
| [v2.0.0][v2.0.0] | [v1.0.4][v1.0.4] |

[v1.0.3]: https://github.com/cathayddt/bdk/releases/tag/v1.0.3
[v1.0.4]: https://github.com/cathayddt/bdk/releases/tag/v1.0.4

[更新內容 (Changelog)](CHANGELOG.md)

## 文件 (Documentation)

- 指令文件 CLI Documentation (Work in Progress)
- [Fabric 使用範例 (Examples)](docs/fabric/EXAMPLE.md)
- Quorum 使用範例 (Examples) (Work in Progress)
- [核心API文件 (Core API Documentation)](link-to-api-documentation)
- [Quorum 使用範例 (Examples)](docs/quorum/EXAMPLE.md)
- [開發指南 (Contributing)](CONTRIBUTING.md)
- [資安通報 (Security Issues)](SECURITY.md)

Expand Down
4 changes: 2 additions & 2 deletions docs/fabric/COMMANDS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 指令文件
# Fabric 指令文件

[(English version)](COMMANDS-EN.md)
(English version)(Work In Progress)

## 目錄

Expand Down
50 changes: 50 additions & 0 deletions docs/quorum/COMMANDS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Quorum 指令文件

(English version)(Work In Progress)

## 目錄

- [Network](#network)
- [Explorer](#explorer)

## Network

### `bdk quorum network create`

Description: 產生 Quorum network 所需的相關設定檔案

| Options | Type | Description | Required | Default |
| --------------------- | :-----: | ------------------------------ | :------: | ------- |
| --help | boolean | Show help | | |
| --version | boolean | Show version number | | |
| -i, --interactive | boolean | 是否使用 Cathay BDK 互動式問答 | | |

## Explorer

### `bdk quorum network delete`

Description: 刪除現有的 Quorum Network.

| Options | Type | Description | Required | Default |
| --------------------- | :-----: | ------------------------------ | :------: | ------- |
| --help | boolean | Show help | | |
| --version | boolean | Show version number | | |

### `bdk quorum explorer create`

Description: 產生 Quorum Explorer 所需的相關設定檔案

| Options | Type | Description | Required | Default |
| --------------------- | :-----: | ------------------------------ | :------: | ------- |
| --help | boolean | Show help | | |
| --version | boolean | Show version number | | |
| -i, --interactive | boolean | 是否使用 Cathay BDK 互動式問答 | | |

### `bdk quorum explorer delete`

Description: 刪除現有的 Quorum Explorer.

| Options | Type | Description | Required | Default |
| --------------------- | :-----: | ------------------------------ | :------: | ------- |
| --help | boolean | Show help | | |
| --version | boolean | Show version number | | |
36 changes: 36 additions & 0 deletions docs/quorum/EXAMPLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 使用範例
(English version)(Work In Progress)

## 目錄
- [建立 Blockchain network](#建立-blockchain-network)
- [部署 Chaincode](#部署-chaincode)

## 建立 Blockchain network

Quorum 無須做過多的前置設定,只需確認 bdk 套件是否安裝完成即可。

```bash
bdk hello
```

如果指令已順利安裝,你會看到 `You have installed bdk successfully!!!`

### 建立 Network

輸入指令,啟動 Quorum 網路互動式介面

```bash
bdk quorum network create -i
```

依序輸入 chain id (預設為1337)、validator 以及 member 的數量,以及填入自己的錢包,如無填入(選擇 false ),則會提供一組公私鑰來作為使用 Quorum 網路的帳號,該組帳號會在創始區塊擁有代幣。

### 建立 Blockscout Explorer

輸入指令,啟動 Blockscout 區塊鏈瀏覽器

```bash
bdk quorum explorer create -i
```

輸入 port ,並稍待片刻,即可使用區塊鏈瀏覽器
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cathayddt/bdk",
"version": "1.0.4",
"version": "2.0.0",
"description": "Blockchain Deploy Kit",
"homepage": "https://github.com/cathayddt/bdk#readme",
"bugs": {
Expand All @@ -16,7 +16,9 @@
"SecondDim (https://github.com/SecondDim)",
"yujugrace (https://github.com/yujugrace)",
"kth-tw (https://github.com/kth-tw)",
"RuiSiang (https://github.com/RuiSiang)"
"RuiSiang (https://github.com/RuiSiang)",
"PianoChicken (https://github.com/Pianochicken)",
"kidneyweak (https://github.com/kidneyweakx)"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
3 changes: 3 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
sonar.projectKey=bdk-github
sonar.qualitygate.wait=true
sonar.sources=src
sonar.coverage.jacoco.xmlReportPaths=coverage/xunit.xml
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.typescript.tsconfigPath=tsconfig.json

0 comments on commit e005d26

Please sign in to comment.