Downloading SDK Configurations and Certificates
BCS supports chaincode functions such as execution and query. Before developing an application, download the certificates and SDK configuration. The SDKs can use the configuration file to easily access the blockchain network and complete transactions. You do not need to manually configure the SDKs.
Prerequisites
Before downloading the SDK configuration, ensure that the chaincode has been installed and instantiated.
Downloading SDK Configurations and Certificates
The SDK configuration, certificates, and application must be used together. The SDK configuration file contains chaincode and certificate path information. Specify the chaincode name and the storage path of the downloaded certificate on the application executor when downloading the SDK configurations. If the certificate path changes, you must manually change all certificate paths in the SDK configuration file.
BCS supports three types of certificates: administrator certificate, user certificate, and CA certificate. The administrator certificate is required to create, join, and update a channel, and install, instantiate, update, and delete a chaincode. For transactions and query, you are advised to use the user certificate. Download the certificates on the Instance Management page.
- An administrator certificate contains the organization's administrator permission certificate and private key and can be used to manage channels and contracts.
- A user certificate contains the organization's user permission certificate and private key and can be used for transactions and queries.
- A CA certificate is the root certificate of an organization. The CA public and private key pair can be used to issue lower-level certificates.
- The administrator certificate differs between an orderer and a peer. For management within a channel, use the administrator certificate for peers instead of that for orderers.
- Encrypt the private keys in the downloaded certificates for storage.
- Log in to the BCS console.
- In the navigation pane on the left, click Instance Management.
- Click Download Client Configuration on an instance card.
- Select configuration files to download.
- SDK Configuration File: Specify the member, chaincode name, certificate path as required.
Table 1 SDK file parameters Parameter
Description
Chaincode Name
Set it as required. The chaincode name must be the same as the name specified during chaincode installation and instantiation.
Certificate Path
Final path for storing the certificate for application compilation. If the certificate path changes, you must manually change all certificate paths in the SDK configuration file.
Channel
Select a channel.
Member
Select peer organizations in the channel.
- An orderer certificate is used for interacting with the blockchain system. Encrypt the private keys in the downloaded certificates for storage.
- A peer certificate is used for performing management operations within a channel. Encrypt the private keys in the downloaded certificates for storage. Select a peer organization and the certificates to be downloaded.
- SDK Configuration File: Specify the member, chaincode name, certificate path as required.
- Click Download. Decompress the SDK and store the retrieved .yaml file. Decompress the downloaded certificate packages and store the files in an application directory for the application to access.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot