Developer Guide
How to extend VGM usecase implementation
2 minute read
VGM solution can be divided into three parts:
- The blockchain smart contract (called chaincode in Hyperledger Fabric jargon)
- The blockchain client allowing interaction with the chaincode and submission of transactions and queries
- The frontend application This guide contains general guidance on how to extend each of the parts of the solution
Chaincode development
To extend the current implementation of the VGM chaincode the following steps should be taken:
- We recommend working with Vscode with IBM Blockchain Platform extension as the development and testing environment for chaincode
- Installation for VScode can be found here
- Installation instructions and list of prerequisites for IBM Blockchain Platform Extension for Vscode can be found here
- Guided tutorials for using the IBM Blockchain Platform extension for VScode can be found within the extension itself, instructions on how to access tutorial gallary can be found here
- Clone the chaincode source code from Dataports repository
- Import the chaincode project into Vscode development environment and continue development as described in the extension documentation
- Chaincode (written in typescript) can be extended to support more data elements, additional access rules and additional business logic. Current documentation of available chaincode functionality can be found here
Blockchain client development
Blockchain client application written in typescript makes use of Hyperledger Fabric nodejs SDK to connect to blockchain network, authenticate the invoking user with Fabric CA client and invoke and evaluation blockchain transactions.
Blockchain client is integrated within the code of conPESO application.
The source code for blockchain client can be found here.
Main methods of the blockchain client are captured in vgm-client.ts
Frontend development
Last modified April 19, 2023: Files update (a811bf0)