DL Fabric Gateway™ — User Guide

DL Fabric Gateway™ is a platform intended to facilitate the deployment and execution of chaincode on Hyperledger Fabric blockchain without the need for network configuration or management. It provides a powerful and easy to use REST API to interact with a Hyperledger Fabric Network hosted by DLT Labs.
This User Guide consists of 10 steps. Each step is explained as a section below.
- Section 1: Getting Started
- Section 2: Register a User
- Section 3: Creating Channels
- Section 4: Checking Created Channels (Optional)
- Section 5: Converting Chaincode to Base64
- Section 6: Installing Chaincode
- Section 7: Instantiating Chaincode
- Section 8: Invoking Chaincode
- Section 9: Fetching Transaction Details
- Section 10: Upgrade Chaincode
#Section 1: Getting Started
Goal
Before anything can be done on DL Fabric Gateway™, an Authentication Token is required.
Please refer to the hyperlink to view detailed steps — Section 1.
#Section 2: Register a User on DL Fabric Gateway™
The first step is to register the user on the Fabric network. This is required in order to verify whether the user has a valid account on network.
IMPORTANT — Until the fab_registerUser API is called, all other API calls will fail.
Goal
Register a user on DL Fabric Gateway™ using the fab_registerUser API
POST
https://dlfabricnetwork.dltlabs.com/api/1.0/fab_registerUser
Please refer to the hyperlink to view detailed steps — Section 2.
#Section 3: Creating Channels on DL Fabric Gateway™
Creating a channel is required to protect your Chaincode from other users.
Goal
Create a channel on DL Fabric Gateway™ using the fab_createChannel API:
POST
https://dlfabricnetwork.dltlabs.com/api/1.0/fab_createChannel
Please refer to the hyperlink to view detailed steps — Section 3.
#Section 4: Checking Created Channels on DL Fabric Gateway™ (Optional)
Checking created channels allows the user to check which channels they are able to interact with on the Fabric network.
Goal
Checking created channels on DL Fabric Gateway™ using the fab_queryChannel API:
POST
https://dlfabricnetwork.dltlabs.com/api/1.0/fab_queryChannel
Please refer to the hyperlink to view detailed steps — Section 4.
#Section 5: Converting Chaincode to Base64
The conversion steps take place outside the DL Fabric Gateway™ Platform. The steps, however, are still required to fully utilize the functionality provided by DL Fabric Gateway™.
Goal
Convert Chaincode to Base64 in order to install on DL Fabric Gateway™.
Please refer to the hyperlink to view detailed steps — Section 5.
#Section 6: Installing Chaincode on DL Fabric Gateway™
Installing chaincode allows you to upload your code to the Fabric network, which can then be deployed (instantiated) onto channels of your choosing.
Goal:
Install chaincode on DL Fabric Gateway™ using the fab_installChaincodeAPI:
POST
https://dlfabricnetwork.dltlabs.com/api/1.0/fab_installChaincode
Please refer to the hyperlink to view detailed steps — Section 6.
#Section 7: Instantiating Chaincode on DL Fabric Gateway™
Instantiating chaincode is another way of saying “deploy”. This will allow anyone on the channel to invoke (call functions from) your chaincode.
IMPORTANT — In order to instantiate chaincode, a channel and installed chaincode is required. If you are following this guide in sequence, you should have already done both.
Goal
Instantiate chaincode on DL Fabric Gateway™ using the fab_instantiateChaincode API:
POST
https://dlfabricnetwork.dltlabs.com/api/1.0/fab_instantiateChaincode
Please refer to the hyperlink to view detailed steps — Section 7.
#Section 8: Invoking Chaincode on DL Fabric Gateway™
Invocation is the primary method of interaction with chaincode — invocation being another way of saying “call a function from the chaincode”.
IMPORTANT — In order to invoke chaincode, it must be installed on a given channel. This was done in the previous section.
Goal
Invoke chaincode on DL Fabric Gateway™ using the fab_invokeChaincodeAPI:
POST
https://dlfabricnetwork.dltlabs.com/api/1.0/fab_invokeChaincode
Please refer to the hyperlink to view detailed steps — Section 8.
#Section 9: Fetching Transaction Details on DL Fabric Gateway™
Fetching transaction details post-invocation is the mechanism that the Fabric network provides so that users can reference permanent records of actions on the network.
IMPORTANT — In order to fetch transaction details, a transactionId will be required. This was created in the previous section.
Goal
Fetch transaction info on DL Fabric Gateway™ using the fab_getTransactionInfoByTransactionId API:
GET
https://dlfabricnetwork.dltlabs.com/api/1.0/fab_getTransactionInfoByTransactionId?userName=<userName>&transactionId=<transactionId>
Please refer to the hyperlink to view detailed steps — Section 9.
#Section 10: Upgrade Chaincode on DL Fabric Gateway™
Upgrading chaincode enables revisions to be made on older chaincode. This ensures that your chaincode can always be modified or improved.
Goal
Upgrade chaincode on DL Fabric Gateway™ using the fab_upgradeChaincode API:
POST
https://dlfabricnetwork.dltlabs.com/api/1.0/fab_upgradeChaincode
Please refer to the hyperlink to view detailed steps — Section 10.
