Customize the Wholesale CBDC Application

You can customize wholesale CBDC application to work with different token use cases, default tokens, and transaction types.

Token Use Cases

You can repurpose the wholesale CBDC application without code changes, only changes to configuration values, to support other token use cases for any token defined using the extended Token Taxonomy Framework standard. For example, you can customize the application to work with deposit tokens instead of wholesale CBDC tokens. To do this, update the following parameters in the configuration variable object found in the global variables section.
tokenDisplayName
The name of the token as displayed in the application's user interface. The default value is Wholesale CBDC.
tokenAssetName
The asset identifier used in the smart contract, which is defined in the specification file when you use Blockchain App Builder to generate chaincode. This variable must match the asset name (the name: parameter) in the specification file, or the APIs will not function correctly. The default value is CBDC.

CBDC Token

The default token in the application is USD. To change the default token, complete the following steps.

  1. In the global variables section, update the following parameters in the configuration variable object.
    currencySymbol
    The symbol that represents the currency. The default value is the dollar sign ($).
    tokenId
    The token ID that represents the currency. The default value is USD.
  2. In the CurrencyCodeDetails business object, update the following parameters.
    currencyDesc
    The description of the currency. The default value is US Dollar.
    currencyName
    The token ID that represents the currency. The default value is USD.
  3. Update currency symbol in the CSS files.
    1. Navigate to Web Apps and then expand the Resources section.
    2. Open the Resources/css/app.css file.
    3. Update the value of the token-content variable on line 10 of the file. The default value is the dollar sign ($), as shown in the following example.
      :root {
          --token-content: "$";
      }

Transaction Types

The TransactionTypes business object maps the transaction types in the chaincode to the transaction types in the application. For example, the REQUEST_MINT transaction in the chaincode is mapped to the Creation Requested transaction in the application. You can update the value fields in this business object to change the mappings, as shown in the following table.

TransactionType value Description Use Case
CREDIT Credit Tokens are credited to the specified account. A system creator successfully requests minting tokens and the system credits the tokens to their account.
DEBIT Debit Tokens are debited from the specified account. A system creator transfers tokens to the system issuer.
REQUEST_MINT Creation Requested A request to mint tokens is submitted for approval. A system creator submits a request to mint tokens.
APPROVE_MINT Creation Approved A mint request is approved A system manager approves a mint request.
REJECT_MINT Creation Rejected A mint request is rejected. A system manager rejects a mint request.
REQUEST_BURN Retirement Requested A request to burn tokens is submitted for approval. A system retirer submits a request to burn tokens.
APPROVE_BURN Retirement Approved A burn request is approved. A system manager approves a burn request.
REJECT_BURN Retirement Rejected A burn request is rejected. A system manager rejects a burn request.
EXECUTEHOLD Issuance Approved An issuance request is approved. A system manager approves an issuance request.
RELEASEHOLD Issuance Rejected An issuance request is rejected. A system manager rejects an issuance request.
ONHOLD Request Issuance A request to issue tokens is submitted for approval. A system issuer submits a request to issue tokens to an organization officer.

Bank Account IDs

Confidential mode introduces the concept of a bank account ID, which replaces the user ID that is used to manage accounts in generic mode. In confidential mode, the bank account ID replaces the user ID everywhere in the application, including in account details, searches, and transaction history. The bank account is a random alphanumeric value that represents an account without revealing personal identifiers.

By default, the bank account ID is exactly 14 alphanumeric characters. You can customize the application to use a different bank account ID length. To do this, update the following parameter in the configuration variable object found in the global variables section.
bankAccountIdDataLength
The required character length for the bank account ID, which is generated when an account is created. The default value is 14.