Hi Salman,

Nice work! Just a small point on the two CouchDB screen shot. I am sure your data stored in the state database is encrypted per your chaincode design. However, the bottom screenshot shows an object header is not the encrypted version of the credential. It is just because you have PutState the value on a key (line 56) instead of a JSON object.

If you wish to take a look on the actual value stored, you can directly access the object with curl http://<yourhost_ip>:5984/mychannel_mycc/salman279?attachments=true and see the actual value you put in the state database. Try your luck as I found sometimes it is gzipped.

Again, I’m sure it works as your chaincode that the value stored is encrypted. Just the bottom screenshot cannot prove it. You can try ./byfn.sh up -s couchdb, and you will see similar headers when you check the value for a and b.

cheers, kc

Written by

Happy to share what I learn on blockchain. Visit http://www.ledgertech.biz/kcarticles.html for my works. or reach me on https://www.linkedin.com/in/ktam1/.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store