機密批發 CBDC 包裝程式 API 套件

Oracle Blockchain Platform Digital Assets Edition 包含包裝函式 API 套件,可延伸 REST API 以支援批發 CBDC 案例的機密模式版本特定作業。

包裝函式 API 套裝程式使用 API 閘道服務和 OCI 函數 (使用 Oracle Cloud Infrastructure (OCI) 上的資源管理程式堆疊建立) 來部署專門為批發 CBDC 應用程式設計的 API 路由。您可以從 Oracle Blockchain Platform 主控台下載批發 CBDC 包裝程式 API 套件,其中包含下列元件。
  • WholesaleCBDCWithConfidentialPaymentWrapperAPI.zip,包含包裝函式 API 套件的封存檔案,包含部署所需的 Terraform 指令碼。您可以將此檔案部署到 OCI 上的「資源管理程式」堆疊,為包裝函式 API 建立必要的 Oracle 資源。
  • WholesaleCBDCWithConfidentialPayment_WrapperAPI.postman_collection -- Postman 集合,可讓您測試建置的包裝函式 API。此集合包括端點和有效負載 (與包裝程式 API 套裝程式中定義的 API 對應) 的預先設定要求。

包裝函式 API

activateCBDCAccount
原始方法名稱:activateAccount
此 POST 方法會啟用記號帳戶。只有指定的組織之 Token AdminOrg Admin 才能呼叫此方法。無法啟用已刪除的帳戶。
有效負載:
{
    "accountId": "account_id value",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • accountId: string – 帳戶的 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值:
  • 成功時,指定權杖帳戶之帳戶狀態物件的 JSON 表示法。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "864cdbc5b4ee1a6f2238301e75ee2ddff0ecfa490ddf490da33365cae92cb4ad",
        "payload": {
            "assetType": "oaccountStatus",
            "status_id": "oaccountStatus~4c900b07f6136f36854064c0c0ba97aa09c9734cbe11966cc83865f156ced2c6",
            "account_id": "oaccount~214ad54a30703412b195f36429607b08627dea893303870bf3372f944fe0c088",
            "status": "active"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010",
        "blockNumber": 58
    }
}
addCBAdmin
原始方法名稱:addTokenAdmin
此 POST 方法會將使用者新增為記號鏈碼的 Token Admin。此方法只能由記號鏈碼的 Token Admin 呼叫。第一次呼叫是來自建立鏈碼的管理員。
有效負載:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • orgId: string – 目前組織中使用者的會員服務提供者 (MSP) ID。
  • userId: string – 使用者的使用者名稱或電子郵件 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "a988dc3e9aab162508fd0555fec254f248e27fd0c5440d94e1f49fc65643cafa",
        "payload": {
            "msg": "Successfully added Token Admin (Org_Id: CentralBank, User_Id: user1)"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010",
        "blockNumber": 69
    }
}
addCBAuditor
原始方法名稱:addTokenAuditor
此 POST 方法會將記號稽核者新增至記號鏈碼。只有鏈碼的 Token Admin 才能呼叫此方法。
有效負載:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • orgId: string – 目前組織中使用者的會員服務提供者 (MSP) ID。
  • userId: string – 使用者的使用者名稱或電子郵件 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "864cdbc5b4ee1a6f2238301e75ee2ddff0ecfa490ddf490da33365cae92cb4ad",
        "payload": {
            "assetType": "oaccountStatus",
            "status_id": "oaccountStatus~4c900b07f6136f36854064c0c0ba97aa09c9734cbe11966cc83865f156ced2c6",
            "account_id": "oaccount~214ad54a30703412b195f36429607b08627dea893303870bf3372f944fe0c088",
            "status": "active"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010",
        "blockNumber": 58
    }
}
addFIAdmin
原始方法名稱:addOrgAdmin
此方法會將組織管理員新增至權杖鏈碼。只有指定的組織之 Token AdminOrg Admin 才能呼叫此方法。
有效負載:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • orgId: string – 目前組織中使用者的會員服務提供者 (MSP) ID。
  • userId: string – 使用者的使用者名稱或電子郵件 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "ab1544c0d23d930253e6e6020c7c9584f03d324fb1123cc96fe7e0573b232792",
        "payload": {
            "msg": "Successfully added Org Admin (Org_Id: CentralBank, User_Id: cb_admin_demo)"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010",
        "blockNumber": 61
    }
}
addFIAuditor
原始方法名稱:addOrgAuditor
此方法會將組織稽核者新增至記號鏈碼。只有指定的組織之 Token AdminOrg Admin 才能呼叫此方法。
有效負載:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • orgId: string – 目前組織中使用者的會員服務提供者 (MSP) ID。
  • userId: string – 使用者的使用者名稱或電子郵件 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "c0acbadfa461963a5d085bb12335dcf6d8ec566acf72a88a1f168b3a0435db89",
        "payload": {
            "msg": "Successfully added Org Auditor (Org_Id: CentralBank, User_Id: cb_admin_demo)"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010",
        "blockNumber": 62
    }
}
addRole
原始方法名稱:addRole
此方法會將角色新增至指定的使用者和記號。帳戶 ID 是透過建立鏈結權杖 ID、組織 ID 和使用者 ID 的 SHA-256 雜湊來形成。只有指定的組織之 Token AdminOrg Admin 才能呼叫此方法。
有效負載:
{
    "accountId": "account_id value",
    "role": "role value (for example minter / burner / notary)",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • accountId: string – 帳戶的 ID。
  • role: string – 要新增至指定使用者的角色名稱。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "c44931d2227305914db21564301775f8a4edc2aa7fef434d063be7e207b4fd20",
        "payload": {
            "msg": "Successfully added role 'minter' to Account Id: oaccount~214ad54a30703412b195f36429607b08627dea893303870bf3372f944fe0c088"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20009",
        "blockNumber": 63
    }
}
approveCBDCCreation
原始方法名稱:approveMint
Notaries 可以呼叫此 POST 方法來核准 Mint 要求。
有效負載:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • tokenId: string – 記號的 ID。
  • operationId: string – 要核准之 Mint 要求的唯一作業 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "4514aa229ebcc4d2fedcaa47c4301615e30c4a9bae45cf0256a5b80d75b3697a",
        "payload": {
            "msg": "Successfully minted 1000 tokens to Account Id: oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20011",
        "blockNumber": 337
    }
}
approveCBDCRetirement
原始方法名稱:approveBurn
Notaries 可以呼叫此 POST 方法來核准燒錄要求。
有效負載:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • tokenId: string – 記號的 ID。
  • operationId: string – 要核准之 Mint 要求的唯一作業 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "8c7b013765917ebade60c6e6e122ec9b94282349e630fa1f2a446c79cb9ef29c",
        "payload": {
            "msg": "Successfully burned 200 tokens from account id: oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98 (Org-Id: CentralBank, User-Id: cb_retirer_demo)"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20011",
        "blockNumber": 338
    }
}
approveHoldCBDCTokens
原始方法名稱:executeHoldTokens
Notaries 呼叫此方法來核准保留記號,此方法會觸發將記號從付款人轉移至此業務案例中的受款人。記號擁有者先前保留的記號數量,現在會移轉給收件者。如果 quantity 值小於實際保留值,則剩餘的金額會再度提供給記號的擁有者。如果在記號模型的 behaviors 區段中指定 roles 行為,且已設定 notary_role_name 值,則呼叫者帳戶必須具有公證角色。否則,任何具有帳戶的來電者都可以作為公證人。
有效負載:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "quantity": 1,
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • tokenId: string – 記號的 ID。
  • operationId: string – 要核准之 Mint 要求的唯一作業 ID。
  • quantity: number – 要轉移的保留記號數目。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "5177f7560d32838242a26ac74f2a90c6ff9b47aae0d0988f28d9b4cf7e27c097",
        "payload": {
            "msg": "Account Id: oaccount~1e31495a0c149b08cb9d02bdcac5e83d88c0f1557d954dda12bb807d7f6fc111 (Org-Id: Org1, User-Id: fi1_org_user1_demo) is successfully executed '10' tokens from Operation Id '454f4bf6'."
        },
        "encode": "JSON",
        "sourceURL": "org1-oabcs1-nrt.blockchain.ocp.example.com:20009",
        "blockNumber": 339
    }
}
consolidateRunningBalanceInTransactions
原始方法名稱:consolidateRunningBalanceInTransactions
這個方法會合併呼叫者組織中帳戶的變動餘額。只有 Token AdminOrg Admin 才能呼叫此方法。
有效負載:
{
    "endorsers": {{endorsers}}
}
參數:
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "f3c019974cd93eaa8f3171a36ec25009fa6925b5880cae8c9a49a141944039c0",
        "payload": {
            "msg": "Successfully updated account running balance for pending transactions."
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20009",
        "blockNumber": 340
    }
}        
associateTokenToAccount
原始方法名稱:associateTokenToAccount
此 POST 方法會將指定的帳號 ID 關聯到指定的記號。只有指定的組織之 Token AdminOrg Admin 才能呼叫此方法。
有效負載:
{
    "accountId": "account_id value",
    "tokenId": "{{bc-token-id}}",
    "customAccountId": "custom_account_id value",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • accountId: string – 帳戶的 ID。
  • tokenId: string – 記號的 ID。
  • customAccountId: string – 機密模式中帳號的唯一隨機 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "fc7e9297d1d7beef5567fbef873955f5a9759d031811198e24f67f064e0e80b0",
        "payload": {
            "bapAccountVersion": 0,
            "assetType": "oaccount",
            "account_id": "oaccount~b53cb2c19c92d1d5c8cb9f6e988e7761c34e03e014e6c4b889565fc0abf46c8a",
            "org_id": "CentralBank",
            "token_type": "fungible",
            "token_id": "USD",
            "token_name": "cbdc",
            "balance": "028b72742c8aa9a0395c828fe4f0e46226a3e40d4e731d0b994c8028c8b7bd4df6",
            "onhold_balance": "028b72742c8aa9a0395c828fe4f0e46226a3e40d4e731d0b994c8028c8b7bd4df6",
            "onhold_burn_balance": "028b72742c8aa9a0395c828fe4f0e46226a3e40d4e731d0b994c8028c8b7bd4df6",
            "application_groups": [
                "CENTRAL_BANK_USERS"
            ]
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20009",
        "blockNumber": 71
    }
}
createAccount
原始方法名稱:createAccount
這個方法會為指定的使用者與記號建立帳號。必須為任何需要記號的使用者建立帳戶。科目可追蹤餘額、保留餘額及交易歷史記錄。帳戶 ID 是一組英數字元,前面加上 oaccount~<token asset name>~,後面接著執行處理擁有者的使用者名稱或電子郵件 ID (userId) 雜湊,或登入執行處理的使用者 (目前網路組織中使用者的成員服務提供者 ID (orgId)。只有鏈碼的 Token Admin 或指定的組織 Org Admin 才能呼叫此方法。
有效負載:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "tokenType": "fungible",
    "applicationGroups": "[\"application_groups value\"]",
    "dailyLimits": "{\"max_daily_amount\":10000,\"max_daily_transactions\":100}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • orgId – 要為其建立帳戶之使用者的會員服務提供者 (MSP) ID。ID 必須以數字或英文字母字元為開頭,而且可以包含英文字母、數字以及特殊字元,例如底線 (_)、句號 (.)、@ 符號以及連字號 (-)。
  • userId – 使用者的使用者名稱或電子郵件 ID。ID 必須以數字或英文字母字元為開頭,而且可以包含英文字母、數字以及特殊字元,例如底線 (_)、句號 (.)、@ 符號以及連字號 (-)。
  • tokenType: TokenType – 記號的類型,必須是 fungible
  • applicationGroups: string[] – 使用者 ID 所屬的應用程式群組清單,在 CBDC 應用程式中定義使用者的關聯。
  • dailyLimits: JSON object – 下列類型的 JSON 物件。
    {
         "max_daily_amount": 100000
         "max_daily_transactions": 10000
     }
    在範例中,max_daily_amount 值是每日可交易的記號數量上限,而 max_daily_transactions 值是每日可完成的交易數上限。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "dc167f95bdcc246c9ecb20e56126c705f522cff30c94798f21a82de111367ab8",
        "payload": {
            "bapAccountVersion": 0,
            "assetType": "oaccount",
            "account_id": "oaccount~b53cb2c19c92d1d5c8cb9f6e988e7761c34e03e014e6c4b889565fc0abf46c8a",
            "org_id": "CentralBank",
            "token_type": "fungible",
            "token_id": "",
            "token_name": "",
            "balance": "028b72742c8aa9a0395c828fe4f0e46226a3e40d4e731d0b994c8028c8b7bd4df6",
            "onhold_balance": "028b72742c8aa9a0395c828fe4f0e46226a3e40d4e731d0b994c8028c8b7bd4df6",
            "onhold_burn_balance": "028b72742c8aa9a0395c828fe4f0e46226a3e40d4e731d0b994c8028c8b7bd4df6",
            "application_groups": [
                "CENTRAL_BANK_USERS"
            ]
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010",
        "blockNumber": 70
    }
}
getAccountDetailsByCustomAccountId
原始方法名稱:getAccountDetailsByCustomAccountId
此 GET 方法會傳回指定自訂帳戶 ID 的帳戶明細。此方法可由指定組織的 Token AdminToken AuditorOrg AdminOrg Auditor 呼叫。
查詢:
getAccountDetailsByCustomAccountId?customAccountId=customAccountId value&orgId={{bc-org-id}}&peer={{peer}}
參數:
  • customAccountId: string – 機密模式中帳號的唯一隨機 ID。
  • orgId: string – 目前組織中使用者的會員服務提供者 (MSP) ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "cf46211c670f7d21feb000a0161baaced91be314ea53981e26dc1482924055c9",
        "payload": [
            {
                "bapAccountVersion": 0,
                "assetType": "oaccount",
                "account_id": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61",
                "org_id": "CentralBank",
                "token_type": "fungible",
                "token_id": "USD",
                "token_name": "cbdc",
                "balance": "0",
                "onhold_balance": "0",
                "onhold_burn_balance": "0",
                "application_groups": [
                    "SYSTEM_ADMINS"
                ],
                "user_id": "cb_admin_demo",
                "custom_account_id": "10101234000123"
            }
        ],
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20012",
        "blockNumber": 341
    }
}
getAllActiveCBDCAccounts
原始方法名稱:getAllActiveAccounts
此 GET 方法會傳回與指定記號 ID 相關聯的所有作用中帳戶。
查詢:
getAllActiveCBDCAccounts?orgId={{bc-org-id}}&tokenId={{bc-token-id}}&peer={{peer}}
參數:
  • tokenId: string – 記號的 ID。
  • orgId: string – 目前組織中使用者的會員服務提供者 (MSP) ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值:
  • 成功時,包含使用者詳細資訊的訊息。輸出會根據使用者的角色而有所不同,如下列範例所示。
傳回值範例 (權杖管理、權杖稽核員、組織管理、組織稽核員):
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "key": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61",
                "role_name": null,
                "valueJson": {
                    "account_id": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61",
                    "org_id": "CentralBank",
                    "token_id": "USD",
                    "application_groups": [
                        "SYSTEM_ADMINS"
                    ],
                    "max_daily_amount": "10000",
                    "max_daily_transactions": "1000"
                },
                "non_account_role_name": [
                    "token_admin"
                ]
            },
            {
                "key": "oaccount~1a6ea9aaa59c9ae8385bfdc870bf02616995c881ffeb111f526c8b31dbbdd43c",
                "role_name": null,
                "valueJson": {
                    "account_id": "oaccount~1a6ea9aaa59c9ae8385bfdc870bf02616995c881ffeb111f526c8b31dbbdd43c",
                    "org_id": "CentralBank",
                    "token_id": "USD",
                    "application_groups": [
                        "SYSTEM_AUDITORS"
                    ],
                    "max_daily_amount": "10000",
                    "max_daily_transactions": "1000"
                },
                "non_account_role_name": [
                    "token_auditor"
                ]
            },
            {
                "key": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "role_name": "minter",
                "valueJson": {
                    "account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                    "org_id": "CentralBank",
                    "token_id": "USD",
                    "application_groups": [
                        "SYSTEM_CREATORS"
                    ],
                    "max_daily_amount": "1000000",
                    "max_daily_transactions": "100000"
                },
                "non_account_role_name": []
            },
            {
                "key": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "role_name": "notary",
                "valueJson": {
                    "account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                    "org_id": "CentralBank",
                    "token_id": "USD",
                    "application_groups": [
                        "SYSTEM_MANAGERS"
                    ],
                    "max_daily_amount": "10000",
                    "max_daily_transactions": "1000"
                },
                "non_account_role_name": []
            },
            {
                "key": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "role_name": null,
                "valueJson": {
                    "account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                    "org_id": "CentralBank",
                    "token_id": "USD",
                    "application_groups": [
                        "SYSTEM_ISSUERS"
                    ],
                    "max_daily_amount": "100000",
                    "max_daily_transactions": "10000"
                },
                "non_account_role_name": []
            },
            {
                "key": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98",
                "role_name": "burner",
                "valueJson": {
                    "account_id": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98",
                    "org_id": "CentralBank",
                    "token_id": "USD",
                    "application_groups": [
                        "SYSTEM_RETIRERS"
                    ],
                    "max_daily_amount": "10000",
                    "max_daily_transactions": "1000"
                },
                "non_account_role_name": []
            }
        ],
        "encode": "JSON"
    }
}
傳回值範例 (所有其他使用者):
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "key": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61",
                "role_name": null,
                "valueJson": {
                    "account_id": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61",
                    "org_id": "CentralBank",
                    "token_id": "USD",
                    "application_groups": [
                        "SYSTEM_ADMINS"
                    ]
                }
            },
            {
                "key": "oaccount~1a6ea9aaa59c9ae8385bfdc870bf02616995c881ffeb111f526c8b31dbbdd43c",
                "role_name": null,
                "valueJson": {
                    "account_id": "oaccount~1a6ea9aaa59c9ae8385bfdc870bf02616995c881ffeb111f526c8b31dbbdd43c",
                    "org_id": "CentralBank",
                    "token_id": "USD",
                    "application_groups": [
                        "SYSTEM_AUDITORS"
                    ]
                }
            },
            {
                "key": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "role_name": "minter",
                "valueJson": {
                    "account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                    "org_id": "CentralBank",
                    "token_id": "USD",
                    "application_groups": [
                        "SYSTEM_CREATORS"
                    ]
                }
            },
            {
                "key": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "role_name": "notary",
                "valueJson": {
                    "account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                    "org_id": "CentralBank",
                    "token_id": "USD",
                    "application_groups": [
                        "SYSTEM_MANAGERS"
                    ]
                }
            },
            {
                "key": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "role_name": null,
                "valueJson": {
                    "account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                    "org_id": "CentralBank",
                    "token_id": "USD",
                    "application_groups": [
                        "SYSTEM_ISSUERS"
                    ]
                }
            },
            {
                "key": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98",
                "role_name": "burner",
                "valueJson": {
                    "account_id": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98",
                    "org_id": "CentralBank",
                    "token_id": "USD",
                    "application_groups": [
                        "SYSTEM_RETIRERS"
                    ]
                }
            }
        ],
        "encode": "JSON"
    }
}
getAllSuspendedCBDCAccounts
原始方法名稱:getAllSuspendedAccounts
此 GET 方法會傳回與指定記號 ID 相關聯的所有暫停帳戶。
查詢:
/getAllSuspendedCBDCAccounts?orgId={{bc-org-id}}&tokenId={{bc-token-id}}&peer={{peer}}
參數:
  • tokenId: string – 記號的 ID。
  • orgId: string – 目前組織中使用者的會員服務提供者 (MSP) ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值:
  • 成功時,包含使用者詳細資訊的訊息。輸出會根據使用者的角色而有所不同,如下列範例所示。
傳回值範例 (權杖管理、權杖稽核員、組織管理、組織稽核員):
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "key": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61",
                "role_name": null,
                "valueJson": {
                    "account_id": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61",
                    "org_id": "CentralBank",
                    "token_id": "USD",
                    "application_groups": [
                        "SYSTEM_ADMINS"
                    ],
                    "max_daily_amount": "10000",
                    "max_daily_transactions": "1000"
                },
                "non_account_role_name": [
                    "token_admin"
                ]
            }
        ],
        "encode": "JSON"
    }
}
傳回值範例 (所有其他使用者):
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "key": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61",
                "role_name": null,
                "valueJson": {
                    "account_id": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61",
                    "org_id": "CentralBank",
                    "token_id": "USD",
                    "application_groups": [
                        "SYSTEM_ADMINS"
                    ]
                }
            }
        ],
        "encode": "JSON"
    }
}
getApproverActionHistory
原始方法名稱:getActionHistory
此 GET 方法會擷取呼叫程式針對 mint、 burn 和 transfer (issuance) 作業所進行的核准或拒絕歷史記錄,包括組織的詳細資訊,以及涉及帳戶的使用者 ID (寄件者、收件者和公證人)。只有 Token AdminToken AuditorOrg AdminOrg Auditor 或公證人才能呼叫此方法。
查詢:
getApproverActionHistory?tokenId={{bc-token-id}}&peer={{peer}}
參數:
  • tokenId: string – 記號的 ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "from_account_id": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98",
                "from_org_id": "CentralBank",
                "holding_id": "ohold~cbdc~USD~b770",
                "holding_status": "APPROVE_BURN",
                "last_updated_time": "2025-08-25T13:21:24.000Z",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": null,
                "timetoexpiration": null,
                "to_account_id": null,
                "to_org_id": null,
                "token_name": null,
                "quantity": 200
            },
            {
                "from_account_id": null,
                "from_org_id": null,
                "holding_id": "ohold~cbdc~USD~e7b6",
                "holding_status": "APPROVE_MINT",
                "last_updated_time": "2025-08-25T13:20:50.000Z",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": null,
                "timetoexpiration": null,
                "to_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "to_org_id": "CentralBank",
                "token_name": null,
                "quantity": 1000
            },
            {
                "from_account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "from_org_id": "CentralBank",
                "holding_id": "ohold~cbdc~USD~81d7c4ac",
                "holding_status": "EXECUTEHOLD",
                "last_updated_time": "2025-08-25T13:16:55.000Z",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": null,
                "timetoexpiration": null,
                "to_account_id": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3",
                "to_org_id": "Org1",
                "token_name": null,
                "quantity": 200
            },
            {
                "from_account_id": null,
                "from_org_id": null,
                "holding_id": "ohold~cbdc~USD~1e19",
                "holding_status": "APPROVE_MINT",
                "last_updated_time": "2025-08-13T06:12:41.000Z",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": null,
                "timetoexpiration": null,
                "to_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "to_org_id": "CentralBank",
                "token_name": null,
                "quantity": 10000
            },
            {
                "from_account_id": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98",
                "from_org_id": "CentralBank",
                "holding_id": "ohold~cbdc~USD~1f74",
                "holding_status": "REJECT_BURN",
                "last_updated_time": "2025-08-12T21:09:53.000Z",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": null,
                "timetoexpiration": null,
                "to_account_id": "",
                "to_org_id": null,
                "token_name": null,
                "quantity": 1000
            },
            {
                "from_account_id": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98",
                "from_org_id": "CentralBank",
                "holding_id": "ohold~cbdc~USD~d67c",
                "holding_status": "REJECT_BURN",
                "last_updated_time": "2025-08-12T21:09:47.000Z",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": null,
                "timetoexpiration": null,
                "to_account_id": "",
                "to_org_id": null,
                "token_name": null,
                "quantity": 2000
            },
            {
                "from_account_id": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98",
                "from_org_id": "CentralBank",
                "holding_id": "ohold~cbdc~USD~911b",
                "holding_status": "APPROVE_BURN",
                "last_updated_time": "2025-08-12T21:09:40.000Z",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": null,
                "timetoexpiration": null,
                "to_account_id": null,
                "to_org_id": null,
                "token_name": null,
                "quantity": 1000
            },
            {
                "from_account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "from_org_id": "CentralBank",
                "holding_id": "ohold~cbdc~USD~ed815e20",
                "holding_status": "EXECUTEHOLD",
                "last_updated_time": "2025-08-12T21:09:25.000Z",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": null,
                "timetoexpiration": null,
                "to_account_id": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709",
                "to_org_id": "org2",
                "token_name": null,
                "quantity": 10000
            },
            {
                "from_account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "from_org_id": "CentralBank",
                "holding_id": "ohold~cbdc~USD~12d87129",
                "holding_status": "EXECUTEHOLD",
                "last_updated_time": "2025-08-12T21:09:17.000Z",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": null,
                "timetoexpiration": null,
                "to_account_id": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3",
                "to_org_id": "Org1",
                "token_name": null,
                "quantity": 10000
            },
            {
                "from_account_id": "",
                "from_org_id": null,
                "holding_id": "ohold~cbdc~USD~54a4",
                "holding_status": "REJECT_MINT",
                "last_updated_time": "2025-08-12T21:01:27.000Z",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": null,
                "timetoexpiration": null,
                "to_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "to_org_id": "CentralBank",
                "token_name": null,
                "quantity": 40000
            },
            {
                "from_account_id": null,
                "from_org_id": null,
                "holding_id": "ohold~cbdc~USD~9b27",
                "holding_status": "APPROVE_MINT",
                "last_updated_time": "2025-08-12T21:01:16.000Z",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": null,
                "timetoexpiration": null,
                "to_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "to_org_id": "CentralBank",
                "token_name": null,
                "quantity": 30000
            },
            {
                "from_account_id": null,
                "from_org_id": null,
                "holding_id": "ohold~cbdc~USD~eda0",
                "holding_status": "APPROVE_MINT",
                "last_updated_time": "2025-08-12T21:01:05.000Z",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": null,
                "timetoexpiration": null,
                "to_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "to_org_id": "CentralBank",
                "token_name": null,
                "quantity": 20000
            },
            {
                "from_account_id": null,
                "from_org_id": null,
                "holding_id": "ohold~cbdc~USD~1baa",
                "holding_status": "APPROVE_MINT",
                "last_updated_time": "2025-08-12T21:01:03.000Z",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": null,
                "timetoexpiration": null,
                "to_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "to_org_id": "CentralBank",
                "token_name": null,
                "quantity": 10000
            }
        ],
        "encode": "JSON"
    }
}
getCBDCAccount
原始方法名稱:getCBDCAccount
此 GET 方法會傳回指定使用者和記號的帳戶詳細資訊。只有鏈碼的 Token AdminToken Auditor、指定組織的 Org AdminOrg Auditor 或帳戶的 AccountOwner 才能呼叫此方法。
查詢:
/getCBDCAccount?accountId=account_id value&peer={{peer}}
參數:
  • accountId: string – 帳戶的 ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "bapAccountVersion": 0,
            "assetType": "oaccount",
            "user_id": "cb_manager_demo",
            "custom_account_id": "10105678007891",
            "status": "active",
            "account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
            "org_id": "CentralBank",
            "token_type": "fungible",
            "token_id": "USD",
            "token_name": "cbdc",
            "balance": "0",
            "onhold_balance": "0",
            "onhold_burn_balance": "0",
            "application_groups": [
                "SYSTEM_MANAGERS"
            ]
        },
        "encode": "JSON"
    }
}
getCBDCAccountBalance
原始方法名稱:getAccountBalance
此 GET 方法會傳回指定帳戶和權杖的目前餘額。只有鏈碼的 Token AdminToken Auditor、指定組織的 Org AdminOrg Auditor 或帳戶的 AccountOwner 才能呼叫此方法。
/getCBDCAccountBalance?accountId=account_id value&peer={{peer}}
參數:
  • accountId: string – 帳戶的 ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "msg": "Current Balance is: 100",
            "user_balance": 100
        },
        "encode": "JSON"
    }
}
getCBDCAccountsByUser
原始方法名稱:getAccountsByUser
此方法會傳回指定組織 ID 與使用者 ID 之所有帳戶 ID 的清單。只有鏈碼的 Token AdminToken Auditor、指定組織的 Org AdminOrg Auditor 或帳戶的 AccountOwner 才能呼叫此方法。
/getCBDCAccountsByUser?orgId={{bc-org-id}}&userId={{bc-user-id}}&peer={{peer}}
參數:
  • orgId string – 目前組織中使用者的會員服務提供者 (MSP) ID。
  • userId string – 使用者的使用者名稱或電子郵件 ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "bapAccountVersion": 15,
                "assetType": "oaccount",
                "user_id": "cb__creator_demo",
                "custom_account_id": "10105678004567",
                "account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "org_id": "CentralBank",
                "token_type": "fungible",
                "token_id": "USD",
                "token_name": "cbdc",
                "balance": "21000",
                "onhold_balance": "0",
                "onhold_burn_balance": "0",
                "application_groups": [
                    "SYSTEM_CREATORS"
                ]
            },
            {
                "bapAccountVersion": 0,
                "assetType": "oaccount",
                "user_id": "cb__creator_demo",
                "custom_account_id": "Not Available",
                "account_id": "oaccount~388fb87df59c6a4fbf0400c58b61aa85f975a8c4209942006b0c0d6334fcf887",
                "org_id": "CentralBank",
                "token_type": "fungible",
                "token_id": "",
                "token_name": "",
                "balance": "0",
                "onhold_balance": "0",
                "onhold_burn_balance": "0",
                "application_groups": [
                    "application_groups value"
                ]
            }
        ],
        "encode": "JSON"
    }
}
getCBDCAccountTransactionHistory
原始方法名稱:getAccountTransactionHistory
此方法會傳回指定使用者與變數替代字的帳戶交易歷史記錄明細陣列。只有鏈碼的 Token AdminToken Auditor、指定組織的 Org AdminOrg Auditor 或帳戶的 AccountOwner 才能呼叫此方法。
/getCBDCAccountTransactionHistory?accountId=account_id value&peer={{peer}}
參數:
  • accountId: string – 帳戶的 ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "transaction_id": "otransaction~4514aa229ebcc4d2fedcaa47c4301615e30c4a9bae45cf0256a5b80d75b3697a",
                "transacted_amount": 1000,
                "timestamp": "2025-08-25T13:20:50.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "APPROVE_MINT",
                "balance": 21000,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~1982f73495060e0eef4d78282a91c41e27e8c95572739b0677a1e404a0d20aa9",
                "transacted_amount": 200,
                "timestamp": "2025-08-25T13:12:43.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "REQUEST_MINT",
                "balance": 20000,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~fedd714cf1509f7517819d7cd4c0921d0b2f5d1ff6a25dcb08ab411defd6b5f3",
                "transacted_amount": 2000,
                "timestamp": "2025-08-21T05:23:25.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "REQUEST_MINT",
                "balance": 20000,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~f33b47234f3ee0b636962c8c31c01d06523b789ca16b3b342d5080b71268bcc3",
                "transacted_amount": 1000,
                "timestamp": "2025-08-21T05:23:07.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "REQUEST_MINT",
                "balance": 20000,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~cf934527149bc24f62a8ddeeea7f74a19a0f84d8f161535a771be49d2520d5b3",
                "transacted_amount": 10000,
                "timestamp": "2025-08-13T06:12:41.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "APPROVE_MINT",
                "balance": 20000,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~f5c0e11ca61d9adc843658929e6de2a738ad586304f9e020f75bf4aac5e42a2c",
                "transacted_amount": 10000,
                "timestamp": "2025-08-13T06:12:04.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "REQUEST_MINT",
                "balance": 10000,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~862aa9d9e877d3ea209b87299ab5b12c13ed5ce43d1cf1b934043c1dd02f58f6",
                "transacted_amount": 50000,
                "timestamp": "2025-08-12T21:04:22.000Z",
                "token_id": "USD",
                "category": "transfer",
                "transacted_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "transaction_type": "DEBIT",
                "balance": 10000,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~8a74c6d87ca74a613aab9db5d40386f8d5b534f9800503af8ca27e8946d7616d",
                "transacted_amount": 40000,
                "timestamp": "2025-08-12T21:01:27.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "REJECT_MINT",
                "balance": 60000,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~28ac66ba33f7ad0648448964b2b74525c9e3f0c9908c7a0484690b9baa56c2db",
                "transacted_amount": 30000,
                "timestamp": "2025-08-12T21:01:16.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "APPROVE_MINT",
                "balance": 60000,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~7e32ad8f365ff59814e112f27602f30ab599fb9c1638784496c66a61a6277c22",
                "transacted_amount": 20000,
                "timestamp": "2025-08-12T21:01:05.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "APPROVE_MINT",
                "balance": 30000,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~1477050bb9e55f4f471872b31fce0d2097f5d5e57d89a842070df5e36d7ab0da",
                "transacted_amount": 10000,
                "timestamp": "2025-08-12T21:01:03.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "APPROVE_MINT",
                "balance": 10000,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~0e76c6931b7ee134e967e847d9730b867a0fd191d39697d83d36dd15745c02e3",
                "transacted_amount": 40000,
                "timestamp": "2025-08-12T21:00:20.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "REQUEST_MINT",
                "balance": 0,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~07bbf9c190694371626da59ded5d87434d26f612891e13bb15bdd28f6086e760",
                "transacted_amount": 30000,
                "timestamp": "2025-08-12T21:00:01.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "REQUEST_MINT",
                "balance": 0,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~8721175c6cbbce17b6c4bb6a444e475d07f52352dfd0d990679f342215153513",
                "transacted_amount": 20000,
                "timestamp": "2025-08-12T20:59:41.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "REQUEST_MINT",
                "balance": 0,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~dc24c24d43a6525e807a39edcf8c6a2b6ccb81f0d755958f509509687eacee84",
                "transacted_amount": 10000,
                "timestamp": "2025-08-12T20:59:13.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "REQUEST_MINT",
                "balance": 0,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~396e6ca5a11a9609632d0864026409d46a708fb95e3e21b39fa5f3fb78f90872",
                "transacted_amount": 0,
                "timestamp": "2025-08-12T20:43:20.000Z",
                "token_id": "",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transaction_type": "CREATE_ACCOUNT",
                "balance": 0,
                "onhold_balance": 0
            }
        ],
        "encode": "JSON"
    }
}
getCBDCAccountTransactionHistoryWithFilters
原始方法名稱:getAccountTransactionHistoryWithFiltersFromRichHistDB
此方法會從 RTF 歷史記錄資料庫傳回帳戶交易歷史記錄明細。只有鏈碼的 Token AdminToken Auditor、指定組織的 Org AdminOrg Auditor 或帳戶的 AccountOwner 才能呼叫此方法。
/getCBDCAccountTransactionHistoryWithFilters?accountId=account_id value&customEndpoint=custom_endpoint value&bearerToken=bearer_token value&filters={"pageSize":20,"bookmark":"","startTime":"1900-01-01T00:00:00+00:00","endTime":"2100-01-01T00:00:00+00:00"}&peer={{peer}}
參數:
  • accountId: string – 帳戶的 ID。
  • customEndpoint – RTF 歷史記錄資料庫的 RESTful 服務端點,用於擷取交易歷史記錄。
  • bearerToken – 用來呼叫 RESTful 端點以確保要求獲得授權的記號。
  • filters: JSON object – 選擇性參數。如果空白,則會傳回所有記錄。pageSize 特性決定要傳回的記錄數目。如果 pageSize 為 0,則預設頁面大小為 20。bookmark 特性決定要傳回之記錄的開始索引。必須以 RFC-3339 格式指定 startTimeendTime 特性。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "transaction_id": "otransaction~3140569a4ecb3c3f141cc2468fe21276640b7fd79013d951d9104b79072d8f9c",
                "transacted_amount": 200,
                "timestamp": "2025-08-25T13:16:55.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3",
                "transacted_org_id": "Org1",
                "transacted_user_id": "fi1_org_officer_demo",
                "transacted_custom_account_id": "20200222221111",
                "to_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3",
                "to_org_id": "Org1",
                "to_user_id": "fi1_org_officer_demo",
                "to_custom_account_id": "20200222221111",
                "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "from_org_id": "CentralBank",
                "from_user_id": "cb_issuer_demo",
                "from_custom_account_id": "10109999001234",
                "transaction_type": "EXECUTEHOLD",
                "category": "transfer",
                "balance": 26800,
                "onhold_balance": 300
            },
            {
                "transaction_id": "otransaction~2b75b3e8531a651f07c2d048d8546ad70ac49c66f0b82ed7626c1739090842ce",
                "transacted_amount": 100,
                "timestamp": "2025-08-25T13:16:06.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "transacted_org_id": "CentralBank",
                "transacted_user_id": "cb_issuer_demo",
                "transacted_custom_account_id": "10109999001234",
                "to_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3",
                "to_org_id": "Org1",
                "to_user_id": "fi1_org_officer_demo",
                "to_custom_account_id": "20200222221111",
                "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "from_org_id": "CentralBank",
                "from_user_id": "cb_issuer_demo",
                "from_custom_account_id": "10109999001234",
                "transaction_type": "ONHOLD",
                "holding_id": "ohold~cbdc~USD~e26f11da",
                "category": "transfer",
                "balance": 26800,
                "onhold_balance": 500
            },
            {
                "transaction_id": "otransaction~9e7bf14cf96c5f90170da9455b1318687785e936192f60b7cbeb1c8bfabc41d2",
                "transacted_amount": 100,
                "timestamp": "2025-08-21T06:57:19.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98",
                "transacted_org_id": "CentralBank",
                "transacted_user_id": "cb_retirer_demo",
                "transacted_custom_account_id": "10109999006543",
                "to_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "to_org_id": "CentralBank",
                "to_user_id": "cb_issuer_demo",
                "to_custom_account_id": "10109999001234",
                "from_account": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98",
                "from_org_id": "CentralBank",
                "from_user_id": "cb_retirer_demo",
                "from_custom_account_id": "10109999006543",
                "transaction_type": "CREDIT",
                "category": "transfer",
                "balance": 26900,
                "onhold_balance": 400
            },
            {
                "transaction_id": "otransaction~b3901b4754920a9c75e36069dc55024ad505e4c127f334eedf65ef6703dc6b86",
                "transacted_amount": 200,
                "timestamp": "2025-08-21T05:39:25.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "transacted_org_id": "CentralBank",
                "transacted_user_id": "cb_issuer_demo",
                "transacted_custom_account_id": "10109999001234",
                "to_account": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709",
                "to_org_id": "org2",
                "to_user_id": "fi2_org_officer_demo",
                "to_custom_account_id": "30300617202404",
                "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "from_org_id": "CentralBank",
                "from_user_id": "cb_issuer_demo",
                "from_custom_account_id": "10109999001234",
                "transaction_type": "ONHOLD",
                "holding_id": "ohold~cbdc~USD~77b75873",
                "category": "issuance",
                "balance": 26800,
                "onhold_balance": 400
            },
            {
                "transaction_id": "otransaction~d55c9dfc9feacb353544b5d8b2ae694162ade3890bcaaf715503fd1d6a73cd1a",
                "transacted_amount": 200,
                "timestamp": "2025-08-21T05:39:01.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "transacted_org_id": "CentralBank",
                "transacted_user_id": "cb_issuer_demo",
                "transacted_custom_account_id": "10109999001234",
                "to_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3",
                "to_org_id": "Org1",
                "to_user_id": "fi1_org_officer_demo",
                "to_custom_account_id": "20200222221111",
                "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "from_org_id": "CentralBank",
                "from_user_id": "cb_issuer_demo",
                "from_custom_account_id": "10109999001234",
                "transaction_type": "ONHOLD",
                "holding_id": "ohold~cbdc~USD~81d7c4ac",
                "category": "transfer",
                "balance": 27000,
                "onhold_balance": 200
            },
            {
                "transaction_id": "otransaction~751eaedbe4311edd5d17cae53d283caf397d0cb09f18d57a5e3fe61266875ff9",
                "transacted_amount": 200,
                "timestamp": "2025-08-13T09:59:22.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709",
                "transacted_org_id": "org2",
                "transacted_user_id": "fi2_org_officer_demo",
                "transacted_custom_account_id": "30300617202404",
                "to_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "to_org_id": "CentralBank",
                "to_user_id": "cb_issuer_demo",
                "to_custom_account_id": "10109999001234",
                "from_account": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709",
                "from_org_id": "org2",
                "from_user_id": "fi2_org_officer_demo",
                "from_custom_account_id": "30300617202404",
                "transaction_type": "CREDIT",
                "category": "transfer",
                "balance": 27200,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~70155a8f4e388cc9395dbd03bedaf5a878705f5ad02302c8e9163218a5c3875a",
                "transacted_amount": 1000,
                "timestamp": "2025-08-13T06:22:56.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3",
                "transacted_org_id": "Org1",
                "transacted_user_id": "fi1_org_officer_demo",
                "transacted_custom_account_id": "20200222221111",
                "to_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "to_org_id": "CentralBank",
                "to_user_id": "cb_issuer_demo",
                "to_custom_account_id": "10109999001234",
                "from_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3",
                "from_org_id": "Org1",
                "from_user_id": "fi1_org_officer_demo",
                "from_custom_account_id": "20200222221111",
                "transaction_type": "CREDIT",
                "category": "transfer",
                "balance": 27000,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~e595f3f0cc03fa5f58a546b8abbfaf155592e492f850581db2b8fed9a529c9e2",
                "transacted_amount": 10000,
                "timestamp": "2025-08-12T21:09:25.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709",
                "transacted_org_id": "org2",
                "transacted_user_id": "fi2_org_officer_demo",
                "transacted_custom_account_id": "30300617202404",
                "to_account": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709",
                "to_org_id": "org2",
                "to_user_id": "fi2_org_officer_demo",
                "to_custom_account_id": "30300617202404",
                "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "from_org_id": "CentralBank",
                "from_user_id": "cb_issuer_demo",
                "from_custom_account_id": "10109999001234",
                "transaction_type": "EXECUTEHOLD",
                "category": "issuance",
                "balance": 26000,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~da92402859d87ae3069722d8e39cb0da448e9a5f67468233ee9b1fe7a4ebeef8",
                "transacted_amount": 10000,
                "timestamp": "2025-08-12T21:09:17.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3",
                "transacted_org_id": "Org1",
                "transacted_user_id": "fi1_org_officer_demo",
                "transacted_custom_account_id": "20200222221111",
                "to_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3",
                "to_org_id": "Org1",
                "to_user_id": "fi1_org_officer_demo",
                "to_custom_account_id": "20200222221111",
                "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "from_org_id": "CentralBank",
                "from_user_id": "cb_issuer_demo",
                "from_custom_account_id": "10109999001234",
                "transaction_type": "EXECUTEHOLD",
                "category": "issuance",
                "balance": 26000,
                "onhold_balance": 10000
            },
            {
                "transaction_id": "otransaction~6915145aaf09fbf4d96456febddc2aa87b48c08ddd8ff17a6bab5d310f67bb36",
                "transacted_amount": 1000,
                "timestamp": "2025-08-12T21:07:11.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98",
                "transacted_org_id": "CentralBank",
                "transacted_user_id": "cb_retirer_demo",
                "transacted_custom_account_id": "10109999006543",
                "to_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "to_org_id": "CentralBank",
                "to_user_id": "cb_issuer_demo",
                "to_custom_account_id": "10109999001234",
                "from_account": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98",
                "from_org_id": "CentralBank",
                "from_user_id": "cb_retirer_demo",
                "from_custom_account_id": "10109999006543",
                "transaction_type": "CREDIT",
                "category": "transfer",
                "balance": 26000,
                "onhold_balance": 20000
            },
            {
                "transaction_id": "otransaction~244d7172d1dc90a142e1f22204c76614c7eea814b3d61f33016b786f1b347784",
                "transacted_amount": 10000,
                "timestamp": "2025-08-12T21:05:39.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "transacted_org_id": "CentralBank",
                "transacted_user_id": "cb_issuer_demo",
                "transacted_custom_account_id": "10109999001234",
                "to_account": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709",
                "to_org_id": "org2",
                "to_user_id": "fi2_org_officer_demo",
                "to_custom_account_id": "30300617202404",
                "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "from_org_id": "CentralBank",
                "from_user_id": "cb_issuer_demo",
                "from_custom_account_id": "10109999001234",
                "transaction_type": "ONHOLD",
                "holding_id": "ohold~cbdc~USD~ed815e20",
                "category": "issuance",
                "balance": 25000,
                "onhold_balance": 20000
            },
            {
                "transaction_id": "otransaction~c63ec37966264493bde6fa666527b9cca11695c15611c32e89af49a2246f13f6",
                "transacted_amount": 10000,
                "timestamp": "2025-08-12T21:05:20.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "transacted_org_id": "CentralBank",
                "transacted_user_id": "cb_issuer_demo",
                "transacted_custom_account_id": "10109999001234",
                "to_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3",
                "to_org_id": "Org1",
                "to_user_id": "fi1_org_officer_demo",
                "to_custom_account_id": "20200222221111",
                "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "from_org_id": "CentralBank",
                "from_user_id": "cb_issuer_demo",
                "from_custom_account_id": "10109999001234",
                "transaction_type": "ONHOLD",
                "holding_id": "ohold~cbdc~USD~12d87129",
                "category": "issuance",
                "balance": 35000,
                "onhold_balance": 10000
            },
            {
                "transaction_id": "otransaction~5112f576c94c2d23c342479bfa37e34612414b3258a64b43cf51b920f4ff5868",
                "transacted_amount": 5000,
                "timestamp": "2025-08-12T21:05:02.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98",
                "transacted_org_id": "CentralBank",
                "transacted_user_id": "cb_retirer_demo",
                "transacted_custom_account_id": "10109999006543",
                "to_account": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98",
                "to_org_id": "CentralBank",
                "to_user_id": "cb_retirer_demo",
                "to_custom_account_id": "10109999006543",
                "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "from_org_id": "CentralBank",
                "from_user_id": "cb_issuer_demo",
                "from_custom_account_id": "10109999001234",
                "transaction_type": "DEBIT",
                "category": "burn",
                "balance": 45000,
                "onhold_balance": 0
            },
            {
                "transaction_id": "otransaction~862aa9d9e877d3ea209b87299ab5b12c13ed5ce43d1cf1b934043c1dd02f58f6",
                "transacted_amount": 50000,
                "timestamp": "2025-08-12T21:04:22.000Z",
                "token_id": "USD",
                "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "transacted_org_id": "CentralBank",
                "transacted_user_id": "cb__creator_demo",
                "transacted_custom_account_id": "10105678004567",
                "to_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "to_org_id": "CentralBank",
                "to_user_id": "cb_issuer_demo",
                "to_custom_account_id": "10109999001234",
                "from_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                "from_org_id": "CentralBank",
                "from_user_id": "cb__creator_demo",
                "from_custom_account_id": "10105678004567",
                "transaction_type": "CREDIT",
                "category": "transfer",
                "balance": 50000,
                "onhold_balance": 0
            }
        ],
        "encode": "JSON"
    }
}
getCBDCRetiredQuantity
原始方法名稱:getBurnQuantity
此 GET 方法會傳回指定組織的燒錄記號總數量。只有 Token AdminToken Auditor 或具有燒錄機角色的使用者才能呼叫此方法。
/getCBDCRetiredQuantity?tokenId={{bc-token-id}}&peer={{peer}}
參數:
  • tokenId: string – 記號的 ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "burnt_quantity": 1200
        },
        "encode": "JSON"
    }
}
getOnHoldIds
原始方法名稱:getOnHoldIds
此 GET 方法會傳回指定帳戶之所有持有 ID 的清單。只有鏈碼的 Token AdminToken Auditor、指定組織的 Org AdminOrg Auditor 或帳戶的 AccountOwner 才能呼叫此方法。
/getOnHoldIds?accountId=account_id value&peer={{peer}}
參數:
  • accountId: string – 帳戶的 ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "msg": "Holding Ids are: ohold~cbdc~USD~8e3147,ohold~cbdc~USD~8e315",
            "holding_ids": [
                "ohold~cbdc~USD~8e3147",
                "ohold~cbdc~USD~8e315"
            ]
        },
        "encode": "JSON"
    }
}
getPendingCBDCIssuance
原始方法名稱:getPendingIssuance
此方法會擷取將來電者指派為核准者的所有待發放 (調動) 交易,包括組織的詳細資料,以及涉及帳戶的使用者 ID (寄件者、接收者與公證人)。只有鏈碼的 Token AdminToken AuditorOrg AdminOrg AuditorNotary 才能呼叫此方法。
/getPendingCBDCIssuance?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&peer={{peer}}
參數:
  • tokenId: string – 記號的 ID。
  • orgId: string – 目前組織中使用者的會員服務提供者 (MSP) ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "asset_type": "ONHOLD",
                "category": "issuance",
                "from_account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "from_org_id": "CentralBank",
                "holding_id": "ohold~cbdc~USD~77b75873",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": "77b75873",
                "timetoexpiration": "0",
                "to_account_id": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709",
                "to_org_id": "org2",
                "token_id": "USD",
                "token_name": "cbdc",
                "quantity": 200
            },
            {
                "asset_type": "ONHOLD",
                "category": "transfer",
                "from_account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                "from_org_id": "CentralBank",
                "holding_id": "ohold~cbdc~USD~e26f11da",
                "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                "notary_org_id": "CentralBank",
                "operation_id": "e26f11da",
                "timetoexpiration": "0",
                "to_account_id": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3",
                "to_org_id": "Org1",
                "token_id": "USD",
                "token_name": "cbdc",
                "quantity": 100
            }
        ],
        "encode": "JSON"
    }
}
getPendingCBDCRequest
原始方法名稱:getPendingRequest
此方法會擷取指定類型的所有待處理要求,其中呼叫者被指派為核准者。只有鏈碼的 Token AdminToken AuditorNotary 才能呼叫此方法。
/getPendingCBDCRequest?tokenId={{bc-token-id}}&requestType=request_type value&orgId={{bc-org-id}}&peer={{peer}}
參數:
  • tokenId: string – 記號的 ID。
  • requestType: string – 交易類型。例如,mintburn
  • orgId: string – 目前組織中使用者的會員服務提供者 (MSP) ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "valueJson": {
                    "assetType": "ohold",
                    "holding_id": "ohold~cbdc~USD~89ce",
                    "operation_id": "89ce",
                    "token_name": "cbdc",
                    "from_org_id": "CentralBank",
                    "operation_type": "mint",
                    "status": "pending",
                    "from_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                    "to_account_id": "",
                    "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                    "token_id": "USD",
                    "quantity": 2000,
                    "time_to_expiration": "0",
                    "description": "Minting 2000 tokens"
                }
            },
            {
                "valueJson": {
                    "assetType": "ohold",
                    "holding_id": "ohold~cbdc~USD~cf73",
                    "operation_id": "cf73",
                    "token_name": "cbdc",
                    "from_org_id": "CentralBank",
                    "operation_type": "mint",
                    "status": "pending",
                    "from_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41",
                    "to_account_id": "",
                    "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7",
                    "token_id": "USD",
                    "quantity": 200,
                    "time_to_expiration": "0",
                    "description": "Minting 200"
                }
            }
        ],
        "encode": "JSON"
    }
}
getTotalCBDCBalanceByCallerOrgId
原始方法名稱:getTotalBalanceByCallerOrgId
此方法會擷取呼叫者組織的總結餘。只有 Token AdminToken AuditorOrg AdminOrg Auditor 或任何帳戶擁有者才能呼叫此方法。
/getTotalCBDCBalanceByCallerOrgId?peer={{peer}}
參數:
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "totalBalance": 50500
        },
        "encode": "JSON"
    }
}
getTotalCreatedCBDCTokens
原始方法名稱:getTotalMintedTokens
此方法會傳回指定記號的預期記號總數。只有 Token AdminToken AuditorOrg AdminOrg Auditor 才能呼叫此方法。
查詢:
/getTotalCreatedCBDCTokens?tokenId={{bc-token-id}}&peer={{peer}}
參數:
  • tokenId: string – 記號的 ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "msg": "Total minted token for Token Id: USD is 71000 tokens.",
            "quantity": 71000
        },
        "encode": "JSON"
    }
}
getTransactionWithBlockNumber
原始方法名稱:getTransactionWithBlockNumber
此 GET 方法會傳回所指定交易 ID 之交易的詳細資料。
查詢:
/getTransactionWithBlockNumber?tokenId={{bc-token-id}}&transactionId=transaction_id value&peer={{peer}}
參數:
  • tokenId: string – 記號的 ID。
  • transactionId: string – 交易的 ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": [
            {
                "blockNo": 340,
                "key": "otransaction~3140569a4ecb3c3f141cc2468fe21276640b7fd79013d951d9104b79072d8f9c",
                "metadata": null,
                "txnNo": 0,
                "value": null,
                "valueJson": {
                    "assetType": "otransaction",
                    "blockNo": 336,
                    "txnNo": 1,
                    "transaction_id": "otransaction~3140569a4ecb3c3f141cc2468fe21276640b7fd79013d951d9104b79072d8f9c",
                    "token_id": "USD",
                    "from_account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
                    "from_account_balance": 26800,
                    "from_account_onhold_balance": 300,
                    "to_account_id": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3",
                    "transaction_type": "EXECUTE_HOLD_SENDER",
                    "amount": 200,
                    "timestamp": "2025-08-25T13:16:55.000Z",
                    "number_of_sub_transactions": 0,
                    "holding_id": "ohold~cbdc~USD~81d7c4ac",
                    "sub_transaction": "false",
                    "category": "transfer",
                    "global_transaction_id": "b54d4333-f4bb-4ca4-a7b7-cc75b659d912"
                }
            }
        ],
        "encode": "JSON"
    }
}
getUserByCBDCAccountId
原始方法名稱:getUserByAccountId
此方法會傳回指定帳戶的使用者詳細資訊 (orgIduserIdtokenId)。只有鏈碼的 Token AdminToken Auditor,或指定組織的 Org AdminOrg Auditor 才能呼叫此方法。
查詢:
/getUserByCBDCAccountId?accountId=account_id value&peer={{peer}}
參數:
  • accountId: string – 帳戶的 ID。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "token_id": "USD",
            "org_id": "CentralBank",
            "user_id": "cb_admin_demo",
            "custom_account_id": "10101234000123"
        },
        "encode": "JSON"
    }
}
getUsersByRole
原始方法名稱:getUsersByRole
此 GET 方法會傳回指定角色和記號之所有使用者的清單。只有鏈碼的 Token AdminToken Auditor 才能呼叫此方法。
查詢:
/getUsersByRole?tokenId={{bc-token-id}}&role=role value (for example minter / burner / notary)&peer={{peer}}
參數:
  • tokenId: string – 記號的 ID。
  • role: string – 要搜尋的角色名稱。
  • peer: string – 執行查詢的對等節點名稱。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "payload": {
            "users": [
                {
                    "token_id": "USD",
                    "org_id": "CentralBank"
                }
            ]
        },
        "encode": "JSON"
    }
}
holdCBDCTokens
原始方法名稱:holdTokens
此方法使用 to_account_id 帳戶代表權杖的擁有者建立保留。已指定公證人帳戶,該帳戶負責完成或解除保留。建立保留時,系統會保留付款人的指定變數替代字餘額。保留完成或解除之前,無法移轉保留餘額。此方法的來電者必須已建立帳戶。
有效負載:
{
    "operationId": "operation_id value",
    "toAccountId": "to_account_id value",
    "notaryAccountId": "notary_account_id value",
    "quantity": 1,
    "timeToExpiration": "time_to_expiration value",
    "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • operationId: string – 識別保留作業的唯一 ID。通常此 ID 會由用戶端應用程式傳送。
  • toAccountId: string – 接收者的帳戶 ID。
  • notaryAccountId: string – 公證人的帳戶 ID。
  • quantity: number – 保留的記號數目。
  • timeToExpiration – 保留到期的時間。為永久保留指定 0 。否則,請使用 RFC-3339 格式。例如,2021-06-02T12:46:06Z
  • infoDetails: JSON – 說明與類別,如下列範例所示。
    {
       "category" : "category input",
       "description" : "description input"
    }
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "4793f3907eefce2f9fca7ef107405b0f116efb3afbf83fa0e61fe763690c8235",
        "payload": {
            "msg": "AccountId oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3 is successfully holding 100 tokens"
        },
        "encode": "JSON",
        "sourceURL": "org1-oabcs1-nrt.blockchain.ocp.example.com:20012",
        "blockNumber": 343
    }
}
init
原始方法名稱:init
部署鏈碼時會呼叫此方法。使用者資訊會儲存為鏈碼的 Token Admin
有效負載:
{
    "adminList": "[{\"org_id\":\"{{bc-org-id}}\",\"user_id\":\"{{bc-admin-user}}\"}]",
    "transientMapArgsFlag": true
}
參數:
  • adminList array – 指定權杖管理員清單的 {user_id, org_id} 資訊陣列。adminList 陣列是必要參數。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "fdb7dc89832c8045a333823b77fa24ae628178148dc93b3550040e070d7cd807",
        "payload": "",
        "encode": "UTF-8",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
        "blockNumber": 263
    }
}
initializeCBDCToken
原始方法名稱:initializeCBDCToken
此方法會建立記號並初始化記號特性。資產及其特性會儲存在狀態資料庫中。只有鏈碼的 Token Admin 才能呼叫此方法。
有效負載:
{
    "tokenAsset": "{\"token_id\":\"{{bc-token-id}}\",\"token_desc\":\"USD dollar\",\"Currency_Name\":\"US currency\"}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • tokenAsset: <Token Class> – 將記號資產當作參數傳遞給此方法。模型檔案中描述記號資產的特性。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值:
  • 成功時,所建立權杖資產的 JSON 表示法。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "524be506f53ddf27c42db2be2d7d7ed7f8746880c3bf7990605a4b50fe62a616",
        "payload": {
            "assetType": "otoken",
            "events": true,
            "token_id": "PHP",
            "token_name": "cbdc",
            "token_desc": "token_desc value",
            "token_standard": "ttf+",
            "token_type": "fungible",
            "token_unit": "fractional",
            "behaviors": [
                "divisible",
                "mintable",
                "transferable",
                "burnable",
                "holdable",
                "roles"
            ],
            "roles": {
                "minter_role_name": "minter",
                "burner_role_name": "burner",
                "notary_role_name": "notary",
                "mint_approver_role_name": "notary",
                "burn_approver_role_name": "notary"
            },
            "mintable": {
                "max_mint_quantity": 0,
                "mint_approval_required": true
            },
            "burnable": {
                "burn_approval_required": true
            },
            "divisible": {
                "decimal": 2
            },
            "Currency_Name": "Currency_Name value"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20011",
        "blockNumber": 344
    }
}
rejectCBDCCreation
原始方法名稱:rejectMint
礦物公證人可以呼叫此方法,以拒絕採礦要求。
有效負載:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • tokenId: string – 要拒絕採礦的記號 ID。
  • operationId: string – 代表提示要求的唯一作業 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "182b99bb2ed753994a8c638ab9b08c3a4e73ac8159a3173a2a1f56b651d2eeac",
        "payload": {
            "msg": "Successfully rejected mint request with Operation Id '89ce' to mint 2000 tokens of token id USD"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20011",
        "blockNumber": 345
    }
}
rejectCBDCRetirement
原始方法名稱:rejectBurn
公證人可呼叫此方法以拒絕燒錄要求。
有效負載:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • tokenId: string – 要拒絕燒錄的記號 ID。
  • operationId: string – 代表燒錄要求的唯一作業 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "af2cc8e43ecb4c5520d90a8d7955b5a47623a29b13eef47e31c16eb48cc0adec",
        "payload": {
            "msg": "Successfully rejected burn request with Operation Id '8d34' to burn 100 tokens of token id USD"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20011",
        "blockNumber": 346
    }
}
rejectHoldCBDCTokens
原始方法名稱:releaseHoldTokens
此 POST 方法會解除保留記號。轉帳未完成,所有保留的權杖都會再次提供給原始擁有者使用。具有 notary 角色的 AccountOwner ID 可在指定的時間限制內呼叫此方法,或由付款人、受款人或公證人在指定的時間限制之後呼叫。
有效負載:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • tokenId: string – 記號的 ID。
  • operationId: string – 識別保留作業的唯一 ID。通常此 ID 會由用戶端應用程式傳送。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "c628fb7738222ed969295ccc8d21b4be95d96e3aada4f14570f7820a7051b5f7",
        "payload": {
            "msg": "Successfully released '200' tokens from Operation Id '77b75873' to Account Id: oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a (Org-Id: CentralBank, User-Id: cb_issuer_demo)."
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20009",
        "blockNumber": 347
    }
}
removeCBAdmin
原始方法名稱:removeTokenAdmin
此 POST 方法會移除使用者作為鏈碼的 Token Admin。只有鏈碼的 Token Admin 才能呼叫此方法。管理員無法自行移除。
有效負載:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • orgId: string – 目前組織中使用者的會員服務提供者 (MSP) ID。
  • userId: string – 使用者的使用者名稱或電子郵件 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "6a3b9b568d04b5beb29830f91efe4e8c6310b6cf36940cecfb4ab690fbfde739",
        "payload": {
            "msg": "Successfully removed Token Admin (Org_Id: CB, User_Id: cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 218
    }
}
removeCBAuditor
原始方法名稱:removeTokenAuditor
此 POST 方法會移除使用者作為鏈碼的 Token Auditor。只有鏈碼的 Token Admin 才能呼叫此方法。
有效負載:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • orgId: string – 目前組織中使用者的會員服務提供者 (MSP) ID。
  • userId: string – 使用者的使用者名稱或電子郵件 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "a886a6040fbc76374a3c78c89ab0ffc9f7b8391cc5239b169bf3b878cf40c67b",
        "payload": {
            "msg": "Successfully removed Token Auditor (Org_Id: CB, User_Id: cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 219
    }
}
removeFIAdmin
原始方法名稱:removeOrgAdmin
此 POST 方法會移除使用者作為鏈碼的 Org Admin。只有指定的組織之 Token AdminOrg Admin 才能呼叫此方法。Org Admin 無法移除本身。
有效負載:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • orgId: string – 目前組織中使用者的會員服務提供者 (MSP) ID。
  • userId: string – 使用者的使用者名稱或電子郵件 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "e2a634f6093f89b1984e20ff86a513fabb7c3ade7cc9e27d9734b4aaf6c88597",
        "payload": {
            "msg": "Successfully removed Org Admin (Org_Id: CB, User_Id: cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 220
    }
}
removeFIAuditor
原始方法名稱:removeOrgAuditor
此 POST 方法會移除使用者作為鏈碼的 Org Auditor。只有指定的組織之 Token AdminOrg Admin 才能呼叫此方法。
有效負載:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • orgId: string – 目前組織中使用者的會員服務提供者 (MSP) ID。
  • userId: string – 使用者的使用者名稱或電子郵件 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "c3bc720461004a53b37c68d4bb264858b88d980bc093a0a3ebb62a32974fb306",
        "payload": {
            "msg": "Successfully removed Org Auditor (Org_Id: CB, User_Id: cb)"
        },
        "encode": "JSON",
        "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010",
        "blockNumber": 221
    }
}
removeRole
原始方法名稱:removeRole
這個方法會從指定的使用者和記號中移除角色。只有鏈碼的 Token Admin 或指定的組織 Org Admin 才能呼叫此方法。
有效負載:
{
    "accountId": "account_id value",
    "role": "role value (for example minter / burner / notary)",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • accountId: string – 帳戶的 ID。
  • role: string – 要從指定使用者移除的角色名稱。mintableburnable 行為對應至規格檔案的 minter_role_nameburner_role_name 特性。同樣地,notary 角色對應至規格檔案的 notary_role_name 特性。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "d92538a8f9cf2d45a0c14307ce192c399230cbf4022cec5dd6ce560cca527bf3",
        "payload": {
            "msg": "Successfully removed role 'notary' from Account Id: oaccount~e8450f7a1f320658169315fb4148ad7cb4c47c31435420fd459665f41238221b"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010",
        "blockNumber": 72
    }
}
requestCBDCCreation
原始方法名稱:requestMint
礦工可以呼叫此方法,以傳送要求給礦工公證人以建立指定數量的權杖。
有效負載:
{
    "operationId": "operation_id value",
    "notaryAccountId": "notary_account_id value",
    "quantity": 1,
    "timeToExpiration": "time_to_expiration value",
    "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • operationId: string – 代表提示要求的唯一作業 ID。
  • notaryAccountId: string – 將處理要求的礦工公證人的帳戶 ID。
  • quantity: number – 要提示的記號數量。
  • timeToExpiration – 採礦要求到期且不再有效的時間。
  • infoDetails: JSON – 指定要求之類別 (category) 和描述 (description) 的物件,如下列範例所示。
    {
         "category" : "category input",
         "description" : "description input"
    }
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "1982f73495060e0eef4d78282a91c41e27e8c95572739b0677a1e404a0d20aa9",
        "payload": {
            "msg": "AccountId oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41 has successfully submitted request to mint 200 tokens"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20009",
        "blockNumber": 332
    }
}
requestCBDCRetirement
原始方法名稱:requestBurn
燒錄機可以呼叫此方法,以傳送要求給公證人以銷毀指定數量的記號。
有效負載:
{
    "operationId": "operation_id value",
    "notaryAccountId": "notary_account_id value",
    "quantity": 1,
    "timeToExpiration": "time_to_expiration value",
    "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • operationId: string – 代表燒錄要求的唯一作業 ID。
  • notaryAccountId: string – 將處理要求的公證人帳戶 ID。
  • quantity: number – 要燒錄的記號數量。
  • timeToExpiration – 燒錄要求到期且不再有效的時間。
  • infoDetails: JSON – 指定要求之類別 (category) 和描述 (description) 的物件,如下列範例所示。
    {
         "category" : "category input",
         "description" : "description input"
    }
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "3b1ba40490dea9bcc4df6ad22ffc7651fbbea5d1889e42a1841ee48d6ae653c6",
        "payload": {
            "msg": "AccountId oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98 has successfully submitted request to burn 100 tokens"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20011",
        "blockNumber": 333
    }
}
setApplicationGroups
原始方法名稱:setApplicationGroups
此 POST 方法是用來在指定應用程式群組的帳戶詳細資訊中設定 application_groups 參數。只有鏈碼的 Token Admin 或指定的組織 Org Admin 才能呼叫此方法。
有效負載:
{
    "accountId": "account_id value",
    "applicationGroups": "[\"application_groups value\"]",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • accountId: string – 權杖帳戶的帳戶 ID。
  • applicationGroups: string[] – 使用者 ID 所屬的應用程式群組清單,在 CBDC 應用程式中定義使用者的關聯。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "828fd2ece518fcf266868c840b3b1fc6b967c5c64d7591c42eb18c0c7850dc32",
        "payload": {
            "bapAccountVersion": 10,
            "assetType": "oaccount",
            "account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a",
            "org_id": "CentralBank",
            "token_type": "fungible",
            "token_id": "USD",
            "token_name": "cbdc",
            "balance": "02c4601262fa7ece1ffc909811f829ad973d4133ca27c9c0fa82972d441400ad3e",
            "onhold_balance": "028954d23bfabee1a10d9f5a07793dec08ab0f93fd506079b0fa33f525d527595f",
            "onhold_burn_balance": "028954d23bfabee1a10d9f5a07793dec08ab0f93fd506079b0fa33f525d527595f",
            "application_groups": [
                "SYSTEM_RETIRERS"
            ]
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010",
        "blockNumber": 348
    }
}
setMaxDailyAmount
原始方法名稱:setMaxDailyAmount
此 POST 方法是用來在帳戶詳細資訊中設定指定金額的 maxDailyAmount 參數。只有鏈碼的 Token Admin 或指定的組織 Org Admin 才能呼叫此方法。
有效負載:
{
    "accountId": "account_id value",
    "maxDailyAmount": "max_daily_amount value",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • accountId: string – 權杖帳戶的帳戶 ID。
  • maxDailyAmount: number – 指定帳戶的每日金額上限值,定義每日可交易的金額上限。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "d6a8c26602c2a9cef5d6d563dbc50044af6380c96f7295e2c8e1bbf576cef36f",
        "payload": {
            "msg": "Successfully set max daily amount for account id oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a to 1000000"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010",
        "blockNumber": 351
    }
}
setMaxDailyTransactionCount
原始方法名稱:setMaxDailyTransactionCount
此 POST 方法是用來在帳戶詳細資訊中設定指定金額的 maxDailyTransactions 參數。只有鏈碼的 Token Admin 或指定的組織 Org Admin 才能呼叫此方法。
有效負載:
{
    "accountId": "account_id value",
    "maxDailyTransactions": "max_daily_transactions value",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • accountId: string – 權杖帳戶的帳戶 ID。
  • maxDailyTransactions: number – 指定科目的每日金額上限值,定義每日允許的交易數上限。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "c819da688bbe9cd4ef6fae79af014c66438b5f9d17f771d3ffc5878288097614",
        "payload": {
            "msg": "Successfully set max daily transactions for account id oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a to 100000"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010",
        "blockNumber": 350
    }
}
suspendCBDCAccount
原始方法名稱:suspendAccount
這個方法會暫停一個有趣的記號帳號。如果在分類帳中找不到 accountStatus 值,就會發出錯誤。只有鏈碼的 Token Admin 或指定的組織 Org Admin 才能呼叫此方法。
有效負載:
{
    "accountId": "account_id value",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • accountId: string – 權杖帳戶的帳戶 ID。
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "1fa66e75ba2ab9376944a8b4e362d5fe54e167f8ada989bd9653ea54f7557aea",
        "payload": {
            "assetType": "oaccountStatus",
            "status_id": "oaccountStatus~d0b8ba4d154d19fd7e61e7793795a5a5b65e2266102aafdd6d01cec1a3336c71",
            "account_id": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61",
            "status": "suspended"
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20011",
        "blockNumber": 342
    }
}
transferCBDCTokens
原始方法名稱:transferTokens
此方法會將記號從呼叫程式轉移至指定的帳戶。方法的呼叫程式必須要有帳戶。數量必須在規格檔案中 divisible 行為的 decimal 參數所指定的小數值內。
有效負載:
{
    "toAccountId": "to_account_id value",
    "quantity": 1,
    "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
參數:
  • toAccountId: string – 接收者的帳戶 ID。
  • quantity: number – 要傳輸的記號數目。
  • infoDetails: JSON – 指定要求之類別 (category) 和描述 (description) 的物件,如下列範例所示。
    {
         "category" : "category input",
         "description" : "description input"
    }
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "txid": "62eb436be7c29fc2ed9cae221e874d9a31b163fa10374e7da09bf5e09a96c3ff",
        "payload": {
            "msg": "Successfully transferred 10000 tokens from account id: oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41  to account id: oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a."
        },
        "encode": "JSON",
        "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010",
        "blockNumber": 352
    }
}

包裝程式 API 套裝程式也包含 approveHoldCBDCTokensInterOrgcreateCBDCAccount API,可將鏈碼 API 和 Oracle Blockchain Platform 主控台 API 結合成單一端點,以建立帳戶。

approveHoldCBDCTokensInterOrg
此方法會在組織之間安全地轉移權杖。此方法在內部使用 Oracle Blockchain Platform 中的兩階段確認 API。
有效負載:
{
    "tokenId": "{{bc-token-id}}",
    "operationId": "operation_id value",
    "quantity": 1,
    "senderEndorsers": ["Sender Endorsers values"],
    "receiverEndorsers": ["Receiver Endorsers values"],
    "transientMapArgsFlag": true
}
承載參數:
  • tokenId: string – 要傳輸之 CBDC 權杖的 ID。變數替代字 ID 必須存在於分類帳中。
  • operationId: string – 要核准之傳輸 (保留) 要求的唯一作業 ID。
  • quantity: number – 要傳輸的記號數目。
  • senderEndorsers: string[] – 寄件者組織中必須為交易背書的對等體陣列 (例如 ["peer0.senderorg", "peer1.senderorg"])。
  • receiverEndorsers: string[] – 接收器組織中必須為交易背書的對等體陣列 (例如 ["peer0.receiverorg", "peer1.receiverorg")。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
{
    "returnCode": "Success",
    "error": "",
    "result": {
        "transactions": [
            {
                "channel": "buildtest",
                "chaincode": "WCBDCConfAug13",
                "txstatus": "Committed",
                "prepare": {
                    "txid": "3140569a4ecb3c3f141cc2468fe21276640b7fd79013d951d9104b79072d8f9c",
                    "blockNumber": 335
                },
                "commit": {
                    "txid": "9cfa020acc13c1de911e8a53eae799f47c1947d88a608753edb4b97fe45d00cc",
                    "blockNumber": 336
                },
                "rollback": {}
            },
            {
                "channel": "buildtest",
                "chaincode": "WCBDCConfAug13",
                "txstatus": "Committed",
                "prepare": {
                    "txid": "32137cd7e16c560f4d96d0f8999f6a267c1e95be2f5b11ef0541e574a6cd7275",
                    "blockNumber": 335
                },
                "commit": {
                    "txid": "ac55bd7648680ff6b795e4a99026d7c538f68167683e1e622e55778a2930614d",
                    "blockNumber": 336
                },
                "rollback": {}
            }
        ],
        "lrc": {},
        "globalStatus": "Success",
        "globalTxid": "b54d4333-f4bb-4ca4-a7b7-cc75b659d912",
        "txStartTime": "2025-08-25T13:16:55.825578503Z"
    }
}
createCBDCAccount

createCBDCAccount API 會依序完成下列作業。

  1. Oracle Blockchain Platform 中為使用者建立註冊 ID。建立的註冊 ID 與使用者 ID 相同,但有部分限制。ID 只能包含文數字字元、連字號 (-) 和底線 (_)。若使用者 ID 包含任何其他特殊字元,則會以底線 (_) 取代這些字元。例如,如果使用者 ID 為 adam.fripp@example.com,則建立的註冊 ID 為 adam_fripp_example_com。若指定的使用者 ID 已有註冊存在,則不會建立其他註冊。
  2. 使用有效負載中提供的明細,在分類帳中建立科目。
  3. 將新帳戶與有效負載中指定的權杖建立關聯。
  4. 將有效負載中指定的角色指定給使用者。

為了確保一致性並避免資料不完整,如果後續任何步驟失敗,在第一個步驟中建立的註冊 ID 會被刪除。

有效負載:
{
    "orgId": "{{bc-org-id}}",
    "userId": "{{bc-user-id}}",
    "applicationGroups": "[\"applicationGroups value\"]",
    "customAccountId": "custom_account_id value",
    "tokenId": "{{bc-token-id}}",
    "role": "role value (for example minter / burner / notary / tokenAdmin / tokenAuditor / orgAdmin / orgAuditor/ No)",
    "dailyLimits": "{\"max_daily_amount\":1000, \"max_daily_transactions\":100}",
    "endorsers": {{endorsers}},
    "transientMapArgsFlag": true
}
承載參數:
  • orgId – 要為其建立帳戶之使用者的會員服務提供者 (MSP) ID。ID 必須以數字或英文字母字元為開頭,而且可以包含英文字母、數字以及特殊字元,例如底線 (_)、句號 (.)、@ 符號以及連字號 (-)。
  • userId – 使用者的使用者名稱或電子郵件 ID。ID 必須以數字或英文字母字元為開頭,而且可以包含英文字母、數字以及特殊字元,例如底線 (_)、句號 (.)、@ 符號以及連字號 (-)。
  • applicationGroups – 帳戶所屬的應用程式群組。例如,System_Admins
  • customAccountId – 使用機密模式鏈碼之帳戶的唯一隨機 ID。
  • tokenId – 與帳戶相關聯之權杖的 ID。ID 必須以數字或英文字母字元為開頭,而且可以包含英文字母、數字以及底線 (_) 和連字號 (-) 的特殊字元。不得超過 16 個字元的長度。
  • role – 角色必須是下列其中一個值:minterburnernotarytokenAdmintokenAuditororgAdminorgAuditor
  • dailyLimits – 定義每日交易限制的兩個數值欄位:max_daily_amountmax_daily_transactions
  • endorsers: string[] – 必須為交易背書的對等體陣列 (例如 peer1peer2)。
  • transientMapArgsFlag – 布林值。如果為 True,則引數會透過暫時對映傳送以保密。如果為 false,就會透過標準有效負載 (Payload) 傳送引數。
傳回值範例:
"payload": {
 "msg": "Account created successfully and 'minter' role added to Account Id: oaccount~4a86f2843c2b0105c97a77202bd9aba519c81dcef27eccc1d89125ae32770700 (Org-Id: CB, User-Id: creator_user_cb)"
 "accountDetails":
      {           
            "bapAccountVersion": 0,
            "assetType": "oaccount",
            "account_id": "oaccount~ce5c56d2068ce31b82136c8eea110a80b9251595d361db70924c4e989032a1be",
            "user_id": "creator_user_cb",
            "org_id": "CB",
            "token_type": "fungible",
            "token_id": "USD",
            "token_name": "",
            "balance": 0,
            "onhold_balance": 0,
            "application_groups": [
                "CBDC_CREATORS"
            ],
            "max_daily_amount": 1000,
            "daily_amount": 0,
            "max_daily_transactions": 100,
            "daily_transactions": 0,
            "current_date": "2024-10-06T00:00:00.000Z"
     }
 }