Reputation: 719
Since Hyperledger Fabric v1.2 there is the possibility to use "Private Data", see https://hyperledger-fabric.readthedocs.io/en/release-1.2/whatsnew.html
Is there a way to implement "Private Data Collections" via Hyperledger Composer - or is this only possible at the Fabric level?
Upvotes: 1
Views: 426
Reputation: 5868
To configure private data you need to define a JSON file and include it as part of the instantiation request. It's not possible to pass this configuration to the composer network start
command so you cannot configure the private collection for a business network.
Composer has no explicit APIs or knowledge of private data. You could use the getNativeAPI to gain access to the stub to interact with the chaincode private apis but that won't be enough
From a client side composer does not support the transient map for invoke, nor does it support peer targetting (which you could get around by defining unique connection profiles in a card) which you need in order to use private data. In theory again you could use the getNativeAPI call to gain access to the node sdk client and try and do it yourself by knowing how to construct the correct JSON and appropriate function to invoke on the composer runtime chaincode, but then you will need to do all the work of collecting the responses and submitting to the orderer and waiting for events, this is not something that is recommended or anything composer would support.
Upvotes: 2
Reputation: 31
As far as I know, you need to write your private data implementation in golang so composer doesn't support such feature. Maybe you can start to learn chaincode for fabric.
Upvotes: 0