Streamlined blockchain deployment kit.
Find a file
madhuLin ccec2565de
3.4.1 - fix: remote solc Repair analysis (#140)
* 3.4.1 - fix: fixed remote solc & updated packages (#139)

* Feat: Added Ethereum contract compilation, deployment, and retrieval on Besu and Quorum (#119)

* feat: initial implementation of contract deployment

* feat: support contract compile and deploy on Besu and Quorum

* feat: add `bdk eth contract get` command
doc: update doc

* fix: fix import error in compile
refactor: refactor contract service structure

* test: add unit tests for compile and deploy

* test: add unit tests for contract deploy and tool

* test: Reduce uncoverage

* chore: workflows newly installed solc

* feat: Added remote download solc version function

* chore: change CHAMGELOG.md, package.json

* test:complete loadRemoteVersion unit test

* chore: update comments and minor non-functional code changes

* fix: load remote solc not used

* feat: Automatically load a specific version of solc from the Internet

* test: add getPragmaVersion、findVersion unit test

* doc: Added contract compilation, deployment, and query documents

* chore: eslint corrections, documentation adjustments,...

* chore: Change version, update doc

* fix: Solc deployment error when the contract version is greater than 0.8.20

* test: add checkSolcAvailability test

* chore: Remove openzeppelin

* chore: chage evmVersion to istanbul

* Update CHANGELOG.md

---------

Co-authored-by: York Chang <31153913+Yorkchung@users.noreply.github.com>

* chore: Insufficient modification permissions

* chore: fix merge issue

* chore: merge issue

* chore: skip the unit-test error code

* feat: select a node to deploy the contract

* fix: quickly build the besu chain to build a quorum

* chore: changelog、test fix、doc change

* chore: remove console、fix doc

* 3.4.0 - feat: fabric channel snapshot (#132)

* chore: update fabric version to 2.3.1

* chore: update fabric version to 2.5.10

* feat: add snapshot command

* fix: force delete file after test

* chore: fit eslint

* fix: use try catch to resolve the rmSync error

* fix: fix e type unknown

* chore: gitignore go vendor packages

* docs: add snapshot operations to docs

* fix: fix unit test permission denied error

* fix: force delete by deleteNetworkFolder in bdkFile.ts

* fix: comment mounted folder to fix permission error

* check github runner UID and GID

* fix: run the container as user to fix permission denied error

* fix: try mounted tmp file for endorser connection error

* refactor: copy the snapshots content from /var/ to /tmp/

* refactor: copy snapshots content under /var/ to /peerOrganizations/ on host

* Update unit-test.yml

* docs: modify snapshot example

* chore: remove useless line of code and update docs and changelog

* chore: remove uselessline and add error handling

* chore: update changelog and snapshot command message

* chore: apply custom error for snapshot

---------

Co-authored-by: casper <casper900212@gmail.com>

* 3.4.3 - test: snapshot unit test (#134)

* chore: update fabric version to 2.3.1

* chore: update fabric version to 2.5.10

* feat: add snapshot command

* fix: force delete file after test

* chore: fit eslint

* fix: use try catch to resolve the rmSync error

* fix: fix e type unknown

* chore: gitignore go vendor packages

* docs: add snapshot operations to docs

* fix: fix unit test permission denied error

* fix: force delete by deleteNetworkFolder in bdkFile.ts

* fix: comment mounted folder to fix permission error

* check github runner UID and GID

* fix: run the container as user to fix permission denied error

* fix: try mounted tmp file for endorser connection error

* refactor: copy the snapshots content from /var/ to /tmp/

* refactor: copy snapshots content under /var/ to /peerOrganizations/ on host

* Update unit-test.yml

* docs: modify snapshot example

* test: add snapshot unit test

* fix: revise the snapshot path of joinBysnapshot unit test

* test: apply conditional snapshot path for joinBySnapshot unit test

* test: check snapshot path

* chore: remove debugging console log

* chore: remove useless log

* chore: remove useless import

* chore: remove useless import

* chore: update changelog

* chore: remove useless comment

---------

Co-authored-by: casper <casper900212@gmail.com>

* chore: remove console log

* doc: update EXAMPLE.md (#136)

* fix: Remote solc compilation path problem、The get command is not displayed

* chore: version update

* chore: Repair analysis

* fix: Repair Project Safety Warning

* chore: Style Restoration

* chore: Restore fabric doc

* chore: localSolcCOmpile recover try catch

* chore:  unit-test fix

* chore: update axios verson

* fix: Besu.Backup done() called multiple times

* chore:  fix test-results.json error

* Update CHANGELOG.md

---------

Co-authored-by: York Chang <31153913+Yorkchung@users.noreply.github.com>
Co-authored-by: casper-ubereats <casper900212ubereats@gmail.com>
Co-authored-by: casper <casper900212@gmail.com>

* chore: update test yaml

* chore: update release date for v3.4.1 in CHANGELOGc

---------

Co-authored-by: York Chang <31153913+Yorkchung@users.noreply.github.com>
Co-authored-by: casper-ubereats <casper900212ubereats@gmail.com>
Co-authored-by: casper <casper900212@gmail.com>
2025-11-21 17:14:13 +08:00
.github 3.4.1 - fix: remote solc Repair analysis (#140) 2025-11-21 17:14:13 +08:00
chaincode/fabcar/go 3.4.0 - feat: add snapshot command (#135) 2025-09-03 17:00:20 +08:00
cicd/test_script 3.4.0 - feat: add snapshot command (#135) 2025-09-03 17:00:20 +08:00
docs 3.4.1 - fix: remote solc Repair analysis (#140) 2025-11-21 17:14:13 +08:00
src 3.4.1 - fix: remote solc Repair analysis (#140) 2025-11-21 17:14:13 +08:00
test 3.4.1 - fix: remote solc Repair analysis (#140) 2025-11-21 17:14:13 +08:00
.eslintignore migration from private repository 2021-11-02 17:38:08 +08:00
.eslintrc update: 2.0.5 ui enhancement (#95) 2023-12-05 14:31:05 +08:00
.gitignore Feat: Added Ethereum contract compilation, deployment, and retrieval … (#123) 2025-06-30 15:17:08 +08:00
.npmignore migration from private repository 2021-11-02 17:38:08 +08:00
.nvmrc update: 2.0.5 ui enhancement (#95) 2023-12-05 14:31:05 +08:00
.nycrc.json Update: 3.1.0 besu network (#113) 2024-12-26 14:18:53 +08:00
CHANGELOG.md 3.4.1 - fix: remote solc Repair analysis (#140) 2025-11-21 17:14:13 +08:00
check_node_version.js migration from private repository 2021-11-02 17:38:08 +08:00
cliff.toml update: 2.0.5 ui enhancement (#95) 2023-12-05 14:31:05 +08:00
CODE_OF_CONDUCT.md migration from private repository 2021-11-02 17:38:08 +08:00
LICENSE migration from private repository 2021-11-02 17:38:08 +08:00
MAINTAINERS.md Add Quorum docs and example (#66) 2022-10-31 09:06:09 +08:00
NOTICE migration from private repository 2021-11-02 17:38:08 +08:00
package-lock.json 3.4.1 - fix: remote solc Repair analysis (#140) 2025-11-21 17:14:13 +08:00
package.json 3.4.1 - fix: remote solc Repair analysis (#140) 2025-11-21 17:14:13 +08:00
README.md 3.4.1 - fix: remote solc Repair analysis (#140) 2025-11-21 17:14:13 +08:00
SECURITY.md migration from private repository 2021-11-02 17:38:08 +08:00
tsconfig.eslint.json migration from private repository 2021-11-02 17:38:08 +08:00
tsconfig.json update: 2.0.4 ink ui prototype (#85) 2023-09-27 15:08:18 +08:00

Blockchain Development Kit

            ::::::::    :::::::     :::    :::
         :+:   :+:   :+:   :+:   :+:   :+:
      +:+    +:+  +:+    +:+  +:+  +:+
   +#++:++#+   +#+    +:+  +#++:++
  +#+    +#+  +#+    +#+  +#+  +#+
 #+#   #+#   #+#   #+#   #+#   #+#
########    ########    ###    ###

NPM License codeql-analysis test-report unit-test

提供指令快速建立、管理、監控 blockchain最大的特色是可以使用互動式的問答讓使用者可以依續性的問答來完成指令所需要的指令在每個 BDK 指令的後面,加入 -i 或是 --interactive 的參數,來使用互動式問答

BDK streamlines the normally complicated process of creating a blockchain with command-line tools and npm packages. Creating, managing, monitoring a blockchain network has never been easier. We support interactive prompts which can be triggered with -i or --interactive behind all cli commands

e.g.

bdk eth network create -i

Quorum

bdk eth network create -i

Besu

bdk eth network create -i

bdk fabric network create -i

Fabric

bdk fabric network create -i

版本 (Releases)

Latest Stable
v3.4.1 v3.4.1

更新內容 (Changelog)

文件 (Documentation)

安裝流程 (Getting Started)

環境 (Prerequisites)

主程式安裝 (Installation)

直接安裝 (Direct Install)

npm install -g @cathaybc/bdk@latest

# 初始化 (initialize)
bdk fabric config init

從原始碼安裝 (Install from Source)

git clone https://github.com/cathayddt/bdk.git
cd bdk

npm install

npm run build:console

設定 (Configuration)

設定自動完成 (Configure AutoComplete)

bdk completion

腳本 (script source is as follows)

###-begin-bdk-completions-###
#
# yargs command completion script
#
# Installation: bdk completion >> ~/.zshrc
#    or bdk completion >> ~/.zsh_profile on OSX.
#
_bdk_yargs_completions()
{
  local reply
  local si=$IFS
  IFS=$'
' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" bdk --get-yargs-completions "${words[@]}"))
  IFS=$si
  _describe 'values' reply
}
compdef _bdk_yargs_completions bdk
###-end-bdk-completions-###

Hello BDK

使用以下的指令,可以確認 BDK 已安裝完成並且可以開始操作使用

Use the following command to verify that BDK has completed installation and is now ready to be used.

bdk hello

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

You will see You have installed bdk successfully!!! if the command line tool is installed successfully.

建立一個 Test Network (Create a test network)

使用以下指令,可以建立一個簡單的 Hyperledger Fabric 網路

Use the following command to create a simple Hyperledger Fabric Network.

  # create network
  bdk fabric network create --test-network
  # start orderer docker container (interactive mode)
  bdk fabric orderer up -i
  # start peer docker container (interactive mode)
  bdk fabric peer up -i

LICENSE

Apache2.0

src/quorum/instance/infra/kubernetes/charts follow quorum-kubernetes repository