/cckit

Hyperledger Fabric chaincode kit (CCKit)

Primary LanguageGoApache License 2.0Apache-2.0

Hyperledger Fabric chaincode kit (CCKit)

Go Report Card Coverage Status

Overview

A smart contract is code, invoked by a client application external to the blockchain network – that manages access and modifications to a set of key-value pairs in the World State. In Hyperledger Fabric, smart contracts are referred to as chaincode.

CCKit is a programming toolkit for

  • developing and testing Hyperledger Fabric golang chaincodes
  • generating access layer for query / invoke chaincodes and chaincode event streaming

It enhances the development experience while providing developers components for creating more readable and secure smart contracts. Getting started

CCKit features

Extensions

Examples

There are several chaincode "official" examples available:

and others

Main problems with existing examples are:

  • Working with chaincode state at very low level
  • Lots of code duplication (JSON marshalling / unmarshalling, validation, access control, etc)
  • Chaincode methods routing appeared only in HLF 1.4 and only in Node.Js chaincode
  • Uncompleted testing tools (MockStub)

Examples based on CCKit

Publications with usage examples

Installation

CCKit requires Go 1.16+

Standalone

git clone git@github.com:hyperledger-labs/cckit.git

go mod vendor

As dependency

go get github.com/hyperledger-labs/cckit