Get private data collection's key history #hyperledger-fabric #fabric-sdk-node #fabric-questions


Is there any way to get a private data collection's history for a particular key in Hyperledger Fabric 2.3? We are using Nodejs for our chaincode implementation

I read about a workaround here, which consists of writing to the public state when updating the private data, and then use the normal getHistoryForKey method to retrieve the transactions where the private data was modified.

  1. In this case, how could we then access the private data from these transactions Ids inside the chaincode?
  2. Is there a different way of doing this right now?