Updated on 2023-03-07 GMT+08:00

Development

Develop your own application code. You can use the SDK provided by BCS or the SDK provided by the official Fabric community that matches the version of your instance.

The version of the Fabric package should match that of the blockchain. For example, if a blockchain is v4.x.x, it uses Fabric v2.2, so you need to download the Fabric v2.2 package.

Configuring the Organization ID

Modify the application code for configuring the organization ID of the BCS instance. After the downloaded certificate file is decompressed, the peer file name contains the directory name and the organization ID.

The following figure is for reference only. Use the actual certificate file.

After the certificate file is decompressed, the directory name is 6c448740d50d6197dc86b36b0abd0bc639a788a7.peer and the organization ID is 6c448740d50d6197dc86b36b0abd0bc639a788a7.

Figure 1 Decompressing the certificate file

Configuring the SDK file

  1. Modify the application code related to the SDK configuration file. As shown in the following example, you must configure the correct absolute path of the SDK configuration file.
    var (    
        configFile = "/root/gosdkdemo/config/go-sdk-demo-channel-sdk-config.yaml"    
        org = " 6c448740d50d6197dc86b36b0abd0bc639a788a7"
     )

2. If the paths in the SDK configuration file are different from the actual ones, you must manually change all certificate paths in the SDK configuration file.