We need to build backend services that our frontend can access to write the hashes to the Fabric blockchain and read the hashes from the Fabric blockchain.
We'll be creating the Node.js utility using and building the following services:
- /api/hashwrite: This endpoint exposes a service that is used for calculating the hash of all the artifacts in a directory root, the hash of the file path of all the artifacts, and the hash of the modified timestamp of all the artifacts then submitting them to the blockchain.
- /api/hashread: This endpoint exposes a service that is used for re-calculating the hash of all the artifacts in a directory root, the hash of the file path of all the artifacts, and the hash of the modified timestamp of all the artifacts then verifying whether they match the hash values recorded in the blockchain. If there is a mismatch...