機密批發 CBDC 鏈碼套件

Oracle Blockchain Platform Digital Assets Edition 包含批發中央銀行數位貨幣 (CBDC) 情境機密版本的鏈碼範例。

批發 CBDC 機密鏈碼套件導入與原始批發 CBDC 鏈碼套件相同案例的方法,並新增機密付款功能。該鏈碼使用延伸的權杖分類架構標準,增強功能可搭配機密付款使用,並針對批發 CBDC 情境自訂。代表法定貨幣的代幣於金融機構持有,並由受監管的金融機構發行及管理。您可以使用區塊鏈 App 產生器,從 TypeScript 中的 WholesaleCBDC-Confidential.yml 規格檔案產生此鏈碼。

您可以從 Oracle Blockchain Platform 主控台下載批發 CBDC 鏈碼套件,其中包含下列元件。
  • WholesaleCBDC-Confidential.zip,包含要部署之封裝鏈碼的封存檔案。
  • WholesaleCBDC-Confidential.yml,您可以與區塊鏈應用程式建置器搭配使用的規格檔案,用來編排 WholesaleCBDC Confidential 鏈碼。
  • WholesaleCBDC-Confidential_postman_collection.json 是一種 Postman 集合,可讓您測試鏈碼中的 API。
  • README.md,使用鏈碼的逐步指引。

若要取得批發 CBDC 鏈碼套件,請在 Oracle Blockchain Platform 數位資產主控台中按一下數位資產頁籤,然後選取批發 CBDC - 機密應用程式

規格檔案

機密批發 CBDC 規格檔案 (WholesaleCBDC-Confidential.yml) 是以延伸的「權杖分類架構」規格檔案為基礎。它包含 model 屬性,可產生應用程式特定的鏈碼。在此情況下,model: wcbdc 會在產生鏈碼時,為批發 CBDC 應用程式建立其他方法。它也包含設為 trueconfidential 屬性,該屬性會在機密模式中產生鏈碼。下列規格檔案顯示 confidentialmodel 屬性,以及必要的行為。

附註:

機密模式鏈碼使用 Pedersen 承諾,只能確認整數值。在內部,輸入值會根據規格檔案中的小數值乘以 10 的指數,而結果會儲存為整數。若要避免在使用鏈碼套件時出現不一致的計算,請勿修改規格檔案中的 decimal 行,然後同步鏈碼。
#
# Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
#
confidential: true # Privacy-preserving feature to enable transaction-level confidentiality
assets:
 
# Token asset to manage the complete life cycle of Wholesale CBDC token.
 
    - name: CBDC # Asset name
      type: token # Asset type
      standard: ttf+   # Token standard
      events: true # Supports event code generation for non-GET methods
      model: wcbdc # Supports creation of additional methods for Wholesale CBDC application
 
      anatomy:
          type: fungible # Token type
          unit: fractional # Token unit
 
      behavior: # Token behaviors
          - divisible:
                decimal: 2
          - mintable:
                mint_approval_required: true
          - transferable
          - burnable:
                burn_approval_required: true
          - holdable
          - roles:
                minter_role_name: minter
                burner_role_name: burner
                notary_role_name: notary
                mint_approver_role_name: notary
                burn_approver_role_name: notary
 
      properties: # Custom asset attributes for wholesale CBDC token
 
          - name: Currency_Name # The digital form of the national currency issued by a central bank for wholesale transactions between financial institutions
            type: string
            mandatory: true
 
customMethods: