Hyperledger Fabric 2.2 - securing private data with collection-config

277 Views Asked by At

I have gone through documentation and I want to secure private data using GetTransient but I am not having idea that where to put collection-config.json.

If it is needed to be put under package root, then when should I pass it by flag --collections-config. As per documentation, it is suggested to pass for all three later methods - approveformyorg, checkcommitreadiness & commit. I could not get example for this (node chaincode example will be preferred).

Any help or direction, will be appreciated.

1

There are 1 best solutions below

1
On BEST ANSWER

--collections-config is a flag on the peer lifecycle chaincode commands. It is independent of the chaincode package and chaincode language, the actual JSON file can reside anywhere as long as the flag specifies the location.

You can see an example in the private data tutorial.