Wholesale CBDC Model
The enhanced version of Blockchain App Builder includes a model attribute that generates additional methods for the wholesale central bank digital currency (CBDC) scenario.
If you include the model: wcbdc
parameter in the specification file for tokens that use the extended Token Taxonomy Framework standard, Blockchain App Builder application-specific chaincode, including the following additional methods and functionality for use with the wholesale CBDC application.
TypeScript Methods for Wholesale CBDC
The wholesale CBDC chaincode includes all methods available in the generic Token Taxonomy Framework NFT chaincode. The following additional methods that are specific to the wholesale CBDC scenario are available.-
setApplicationGroups
- This method sets the
application_groups
parameter in the account details for the specified application groups in the API. This method can be called only by aToken Admin
orOrg Admin
of the specified organization. -
getAllActiveAccounts
- This method returns all of the active accounts that are associated with the specified token ID. Any user can call this method.
-
getAllSuspendedAccounts
- This method returns all of the suspended accounts that are associated with the specified token ID. Any user can call this method.
-
getBurnQuantity
- This method returns the total quantity of burned tokens for a specified organization. This method can be called only by a
Token Admin
,Token Auditor
, or a user with the burner role. -
getActionHistory
- This method retrieves the history of approvals or rejections made by the caller for mint, burn, and transfer (issuance) operations, including details of the organization, and user IDs of accounts involved (sender, recipient, and notary).
-
getPendingIssuance
- This method retrieves all pending issuance (transfer) transactions where the caller is assigned as an approver, including details of the organization, and user IDs of accounts involved (sender, recipient, and notary). This method can be called only by a
Token Admin
orToken Auditor
of the chaincode, anOrg Admin
orOrg Auditor
of the specified organization, or theNotary
. -
getPendingRequest
- This method retrieves all pending requests of a specified type where the caller is assigned as an approver. This method can be called only by a
Token Admin
orToken Auditor
of the chaincode, anOrg Admin
orOrg Auditor
of the specified organization, or theNotary
. -
getTotalBalanceByCallerOrgId
- This method retrieves the total balance of the caller's organization. It can be called by a
Token Admin
,Token Auditor
,Org Admin
,Org Auditor
, or any account owner. -
getTransactionWithBlockNumber
- This method returns the details of the transaction for the specified transaction ID.
The following API is modified for the wholesale CBDC model.
-
createAccount
- This method creates an account for a specified user and token. An account must be created for any user who will have tokens at any point. Accounts track balances, on-hold balances, and transaction history. An account ID is formed by concatenating the asset type and token ID and then creating a SHA-256 hash over a concatenation of the organization ID and user ID. This method can be called only by a
Token Admin
of the chaincode.
Go Methods for Wholesale CBDC
The wholesale CBDC chaincode includes all methods available in the generic Token Taxonomy Framework NFT chaincode. The following additional methods that are specific to the wholesale CBDC scenario are available.-
SetApplicationGroups
- This method sets the
application_groups
parameter in the account details for the specified application groups in the API. This method can be called only by aToken Admin
orOrg Admin
of the specified organization. -
GetAllActiveAccounts
- This method returns all of the active accounts that are associated with the specified token ID. Any user can call this method.
-
GetAllSuspendedAccounts
- This method returns all of the suspended accounts that are associated with the specified token ID. Any user can call this method.
-
GetBurnQuantity
- This method returns the total quantity of burned tokens for a specified organization. This method can be called only by a
Token Admin
,Token Auditor
, or a user with the burner role. -
GetActionHistory
- This method retrieves the history of approvals or rejections made by the caller for mint, burn, and transfer (issuance) operations, including details of the organization, and user IDs of accounts involved (sender, recipient, and notary).
-
GetPendingIssuance
- This method retrieves all pending issuance (transfer) transactions where the caller is assigned as an approver, including details of the organization, and user IDs of accounts involved (sender, recipient, and notary). This method can be called only by a
Token Admin
orToken Auditor
of the chaincode, anOrg Admin
orOrg Auditor
of the specified organization, or theNotary
. -
GetPendingRequest
- This method retrieves all pending requests of a specified type where the caller is assigned as an approver. This method can be called only by a
Token Admin
orToken Auditor
of the chaincode, anOrg Admin
orOrg Auditor
of the specified organization, or theNotary
. -
GetTotalBalanceByCallerOrgId
- This method retrieves the total balance of the caller's organization. It can be called by a
Token Admin
,Token Auditor
,Org Admin
,Org Auditor
, or any account owner. -
GetTransactionWithBlockNumber
- This method returns the details of the transaction for the specified transaction ID.
The following API is modified for the wholesale CBDC model.
-
CreateAccount
- This method creates an account for a specified user and token. An account must be created for any user who will have tokens at any point. Accounts track balances, on-hold balances, and transaction history. An account ID is formed by concatenating the asset type and token ID and then creating a SHA-256 hash over a concatenation of the organization ID and user ID. This method can be called only by a
Token Admin
of the chaincode.
TypeScript SDK Methods for Wholesale CBDC
-
setApplicationGroups
- This method sets the
application_groups
parameter in the account details for the specified application groups in the API. -
getAllActiveAccounts
- This method returns all of the active accounts that are associated with the specified token ID.
-
getAllSuspendedAccounts
- This method returns all of the suspended accounts that are associated with the specified token ID.
-
getBurnQuantity
- This method returns the total quantity of burned tokens for a specified organization.
-
getActionHistory
- This method retrieves the history of approvals or rejections made by the caller for mint, burn, and transfer (issuance) operations, including details of the organization, and user IDs of accounts involved (sender, recipient, and notary).
-
getPendingIssuance
- This method retrieves all pending issuance (transfer) transactions where the caller is assigned as an approver, including details of the organization, and user IDs of accounts involved (sender, recipient, and notary).
-
getPendingRequest
- This method retrieves all pending requests of a specified type where the caller is assigned as an approver.
-
getTotalBalanceByCallerOrgId
- This method retrieves the total balance of the caller's organization.
-
getTransactionWithBlockNumber
- This method returns the details of the transaction for the specified transaction ID.
The following SDK method is modified for the wholesale CBDC model.
-
createAccount
- This method creates an account for a specified user and token. An account must be created for any user who will have tokens at any point. Accounts track balances, on-hold balances, and transaction history. An account ID is formed by concatenating the asset type and token ID and then creating a SHA-256 hash over a concatenation of the organization ID and user ID.
Go SDK Methods for Wholesale CBDC
-
SetApplicationGroups
- This method sets the
application_groups
parameter in the account details for the specified application groups in the API. -
GetAllActiveAccounts
- This method returns all of the active accounts that are associated with the specified token ID.
-
GetAllSuspendedAccounts
- This method returns all of the suspended accounts that are associated with the specified token ID.
-
GetBurnQuantity
- This method returns the total quantity of burned tokens for a specified organization.
-
GetActionHistory
- This method retrieves the history of approvals or rejections made by the caller for mint, burn, and transfer (issuance) operations, including details of the organization, and user IDs of accounts involved (sender, recipient, and notary).
-
GetPendingIssuance
- This method retrieves all pending issuance (transfer) transactions where the caller is assigned as an approver, including details of the organization, and user IDs of accounts involved (sender, recipient, and notary).
-
GetPendingRequest
- This method retrieves all pending requests of a specified type where the caller is assigned as an approver.
-
GetTotalBalanceByCallerOrgId
- This method retrieves the total balance of the caller's organization.
-
GetTransactionWithBlockNumber
- This method returns the details of the transaction for the specified transaction ID.
The following SDK method is modified for the wholesale CBDC model.
-
CreateAccount
- This method creates an account for a specified user and token. An account must be created for any user who will have tokens at any point. Accounts track balances, on-hold balances, and transaction history. An account ID is formed by concatenating the asset type and token ID and then creating a SHA-256 hash over a concatenation of the organization ID and user ID.