Reader small image

You're reading from  Blockchain Development for Finance Projects

Product typeBook
Published inJan 2020
Reading LevelBeginner
PublisherPackt
ISBN-139781838829094
Edition1st Edition
Languages
Concepts
Right arrow
Author (1)
Ishan Roy
Ishan Roy
author image
Ishan Roy

Ishan Roy leads the Blockchain initiative at the Centre of Excellence for Emerging Technologies (CEET) at the Tamil Nadu e-Governance Agency (TNeGA). He is currently working on the Tamil Nadu Blockchain Backbone project. His foray into blockchain began in the year 2016, at the blockchain team at ICICI Bank. This team carried out the first blockchain remittance in India. Since then he has worked as the Head of Products at HashCash Consultants where he built blockchain-enabled financial solutions for global clients. He has also mentored students and industry veterans as a blockchain trainer with Edureka. He is extremely passionate about technology and loves to keep himself abreast of new developments in the field through the community
Read more about Ishan Roy

Right arrow

Writing and deploying the DocsApp chaincode

Now that our network is online, the next step we need to do is write and deploy our chaincode contract. The chaincode DocsApp consists of the following methods:

  • addDocHash: This method adds a new document hash to the blockchain. Document hashes are indexed by the hash of the file path.
  • addParamHash: This method adds the FTH and the MTH to the blockchain indexed by a timestamp. The timestamp indicates the time at which the FTH and MTH were calculated and stored to the blockchain.
  • queryDocHash: This method retrieves the last updated hash for a document using the hash of the file path.
  • queryParamHash: This method retrieves the FTH and the MTH stored in the blockchain at a particular time using the timestamp indicating the time that it was stored.

We'll also have to install the chaincode for all the nodes that are part of our network...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Blockchain Development for Finance Projects
Published in: Jan 2020Publisher: PacktISBN-13: 9781838829094

Author (1)

author image
Ishan Roy

Ishan Roy leads the Blockchain initiative at the Centre of Excellence for Emerging Technologies (CEET) at the Tamil Nadu e-Governance Agency (TNeGA). He is currently working on the Tamil Nadu Blockchain Backbone project. His foray into blockchain began in the year 2016, at the blockchain team at ICICI Bank. This team carried out the first blockchain remittance in India. Since then he has worked as the Head of Products at HashCash Consultants where he built blockchain-enabled financial solutions for global clients. He has also mentored students and industry veterans as a blockchain trainer with Edureka. He is extremely passionate about technology and loves to keep himself abreast of new developments in the field through the community
Read more about Ishan Roy