Understanding Blockchain Private Data. A Hands-on Example

Hyperledger Fabric 1.2+ supports a recent feature called Private Data. In this Convector example I want to show how it works.

WorldSibu Media
Mar 29 · 5 min read
Official Hyperledger diagram — https://hyperledger-fabric.readthedocs.io/en/release-1.4/private-data/private-data.html

The example

https://github.com/worldsibu/convector-example-private-data/blob/master/packages/product-cc/src/product.controller.ts
https://github.com/worldsibu/convector-example-private-data/blob/master/packages/product-cc/src/product.model.ts
https://github.com/worldsibu/convector-example-private-data/blob/master/packages/product-cc/tests/product.e2e.ts

Test the code example

$ git clone https://github.com/worldsibu/convector-example-private-data.git
$ cd convector-example-private-data
$ npm i
# Start a development blockchain on your computer
$ npm run env:restart
# Install the smart contract
$ npm run cc:start -- product
# Run a test
$ npm run test:e2e


WorldSibu

A unified development platform to create and deploy enterprise smart contract systems.

WorldSibu Media

Written by

The Enterprise Blockchain Development Platform​. A unified development platform to create and deploy enterprise smart contract systems. https://worldsibu.tech

WorldSibu

WorldSibu

A unified development platform to create and deploy enterprise smart contract systems.