Deploy and Test Wrapper APIs for Bond Marketplace

Deploying the Wrapper API Package

Before you can deploy the wrapper API package, you must update the required configuration variables. Some configuration variables have default values, but you must manually update any variable that contains a placeholder as its default value. Configuration variables are stored in the terraform.tfvars file in the wrapper API archive. For more information about deploying wrapper APIs and about configuration variables, see Wrapper APIs and Wholesale CBDC Wrapper API Package. The following table lists the configuration variables and their defaults values for the bond marketplace wrapper API package.

Variable name Default value Description
compartment_ocid <compartment_ocid> The OCID of the compartment in Oracle Cloud Infrastructure (OCI).
compartment_name <compartment_name> The name of the OCI compartment.
identity_domain <identity_domain> The identity domain to use.
blockchain_channel <blockchain_channel> The name of the Oracle Blockchain Platform channel where the chaincode is deployed.
blockchain_url <blockchain_url> The Oracle Blockchain Platform URL associated with the chaincode deployment.
idcs_url <idcs_url> The URL of the Identity Cloud Service.
idcs_port <idcs_port> The port number of the Identity Cloud Service.
cbdc_chaincode <cbdc_chaincode> The name of the wholesale CBDC chaincode.
cbdc_channel <cbdc_channel> The channel where the wholesale CBDC chaincode is deployed.
isolation_level <isolation_level> The isolation level for atomic transactions. Typically, this is serializable..
blockchain_chaincode WholesaleCBDC The name of the chaincode to generate wrapper APIs for.
blockchain_sync true The sync value to include in the payload for API calls.
blockchain_timeout 6000 The timeout value to include in the payload for API calls.
vcn_display_name WholesaleCBDC The display name of the OCI virtual cloud network.
application_display_name WholesaleCBDC The display name of the OCI application.
gateway_display_name WholesaleCBDC The display name of API Gateway.
deployment_display_name WholesaleCBDC The display name of the deployment in API Gateway.
deployment_path_prefix /WholesaleCBDC The deployment path prefix in API Gateway, which specifies the path where routes are deployed. The deployment_path_prefix variable must begin with a slash (/).
ocir_repo_name wholesalecbdc The OCI Registry repository name. The ocir_repo_name variable must be all lowercase letters.
policy_name WholesaleCBDC The name of the policy that enables controlled management and access to APIs through defined permissions for groups and compartments within the organization

Bond Marketplace Sample Process Flow

A typical process flow using the bond marketplace wrapper APIs follows these basic steps.
  1. Admins use the createUserAccount and createTokenAccount methods to create individual NFT accounts for all users.
  2. Admins use the addRole method to assign the minter role to the officers of participating financial institutions (for example, FI-1 Bond Issuer).
  3. Financial institution officers (bond issuers) use the createBondToken method to issue bonds as fractional NFTs.
  4. Financial institution officers use the getTokenById method to review and confirm the details of issued bonds.
  5. Bond purchasers (for example, FI User) use the atomicTransaction method to call the purchaseToken method to buy the fractional NFT bond and to make a payment using the wholesale CBDC chaincode.
  6. Purchasers use the balanceOfBatch method to verify the receipt of the bond in their wallet.
  7. Purchasers use the getAccountBalance method (wholesale CBDC chaincode) to confirm the transfer in their wholesale CBDC wallet.
  8. Bond issuers use the atomicTransaction method to call the payInterest method to pay periodic interest to bondholders using the wholesale CBDC chaincode.
  9. Purchasers use the requestTokenRedemption method to submit a request to redeem their bond after it has matured.
  10. Financial institution officers use the atomicTransaction method to call the approveTokenRedemption method to approve the redemption request and to transfer wholesale CBDC funds to the bond holder.
  11. The bond holder uses the balanceOfBatch method (bond marketplace chaincode) and getAccountBalance method (wholesale CBDC chaincode) to verify that the bond was redeemed and that they received funds in their wholesale CBDC wallet.

Postman Collection

The Postman collection in the bond marketplace wrapper API package includes additional attributes and methods that support the bond marketplace chaincode. For more information, see Wrapper API Package Components.