Skip to content

Latest commit

 

History

History
64 lines (39 loc) · 4.03 KB

README.md

File metadata and controls

64 lines (39 loc) · 4.03 KB

Fabric Admin SDK

The fabric-admin-sdk provides administrative APIs for creating and configuring Hyperledger Fabric networks, and for deploying smart contracts (chaincode) to those networks.

For information on using the fabric-admin-sdk, please visit the Go API documentation. The API documentation includes some usage examples. Additionally, the scenario tests can be used as an example of an end-to-end flow, covering channel creation and smart contract deployment.

Overview

The current API for client applications to transact with Fabric networks (the Fabric Gateway client API) does not provide the administrative capabilities of the legacy client application SDKs. The fabric-admin-sdk aims to provide this programmatic administrative capability for use-cases where the Fabric CLI commands are not the best fit. A specific objective is to support the development of Kubernetes operators.

More detailed information on the motivation and objectives of the fabric-admin-sdk can be found in the associated Fabric Admin SDK RFC.

Building and testing

Install pre-reqs

This repository contains APIs written in Go and JavaScript. In order to build these components, the following need to be installed and available in the PATH:

In order to run scenario test, Docker is also required.

Dev Container

This project includes a Dev Container configuration that includes all of the pre-requisite software described above in a Docker container, avoiding the need to install them locally. The only requirement is that Docker is installed and available.

Opening the project folder in an IDE such as VS Code (with the Dev Containers extention) should offer the option of opening in the Dev Container. Alternatively, VS Code allows the remote repository to opened directly in an isolated Dev Container.

Build using make

Note: When the repository is first cloned, some mock implementations used for testing will not be present and the Go code will show compile errors. These can be generated explicitly by running make generate.

The following Makefile targets are available:

  • make generate - generate mock implementations used by unit tests
  • make lint - run linting checks for the Go code
  • make unit-test-go - run unit tests for the Go API
  • make unit-test-node - run unit tests for the Node API
  • make unit-test - run unit tests for all language implementations

History

The initial submission and implementation of fabric-admin-sdk was driven by members of the Technical Working Group China / 超级账本中国技术工作组 (TWGC):

Contribute

Here are steps in short for any contribution.

  1. check license and code of conduct
  2. fork this project
  3. make your own feature branch
  4. change and commit your changes, please use git commit -s to commit as we enabled DCO
  5. raise PR

Code of Conduct guidelines

Please review the Hyperledger Code of Conduct before participating. It is important that we keep things civil.