Application Configuration and Development
Before developing an application, you need to download certificates and SDK configuration file. Then, you can use Golang to develop your application and use the available APIs in the Hyperledger Fabric SDK for Go to invoke the chaincode to complete transaction processing in the blockchain network.
Two types of certificates are now supported: administrator certificate and user certificate. The administrator certificate is required to create, join, and update a channel, and install, instantiate, upgrade, and delete a chaincode. For transactions and query, you are advised to use the user certificate.
The administrator certificate differs between an orderer and a peer. For management within a channel, you need to use the administrator certificate for peers instead of that for orderers.
- Download the certificates of a service on the Service Management page, as shown in the following figure.
- Decompress the downloaded certificate files and store the files in an application directory for the application to access.
Downloading the SDK Configuration
- On the Service Management page, choose More > Download SDK Configuration, as shown in the following figure.
- Configure the SDK file parameters, as shown in the following figure.
Table 1 Parameters
Set it as required.
Set it as required.
Certificate Root Path
Enter the root path of the certificates specified during application compilation.
Select a channel.
Select a peer organization in the channel.
- Click Download. The downloaded file package is named test-sdk-config.zip.
- Decompress the file package and store the retrieved test-sdk-config.yaml file
Developing an Application
You need to develop the service logic. The Chinese cryptographic algorithm SDK and homomorphic encryption library can be used for the application development. For details, see Encryption Using Chinese Cryptographic Algorithms and Homomorphic Encryption.
Configuring the Application
The chaincode_id and channel_id values in the app.conf file must be the same as the chaincode and channel IDs specified during chaincode installation.