Customize Wrapper APIs for Wholesale CBDC

The wholesale CBDC wrapper API is a modified version of the wrapper API package that is generated by Blockchain App Builder.

Complete the following steps if you regenerate the wrapper API package after adding custom methods to the wholesale CBDC chaincode. To ensure that your changes are compatible, you must modify the newly generated wrapper API package by using the wholesale CBDC wrapper API package that is bundled with the product.
  1. Use Blockchain App Builder to generate a wrapper API package for the wholesale CBDC chaincode.
  2. Extract the files from the package.
  3. Copy the createCBDCAccount folder from the wrapper API package that is bundled with the product into the directory structure of the newly generated wrapper API package.
  4. Add an entry at the end of the terraform.vars file for the createCBDCAccount method, as shown in the following example JSON string.
    \"createCBDCAccount\": {\"path\":\"/createCBDCAccount\",\"type\":[\"POST\"]}
    The following text shows the general format of the JSON string in the function_path variable in the terraform.vars file.
    {"<methodName>":{"path":"/<methodFolderName>","type":["<HTTP Method POST or GET>"]}}
  5. Replace the main.tf file in the newly generated wrapper API package with the main.tf file from the wrapper API package that is bundled with the product.