机密批发 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 Admin
或Org Admin
调用。无法激活已删除的账户。 - 有效负载:
{ "accountId": "account_id value", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- 参数:
accountId: string
- 帐户的 ID。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回:
- 成功时,指定令牌账户的账户状态对象的 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
- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string
- 用户的用户名或电子邮件 ID。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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
- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string
- 用户的用户名或电子邮件 ID。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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 Admin
或Org Admin
调用。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- 参数:
orgId: string
- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string
- 用户的用户名或电子邮件 ID。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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 Admin
或Org Admin
调用。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- 参数:
orgId: string
- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string
- 用户的用户名或电子邮件 ID。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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 Admin
或Org Admin
调用。 - 有效负载:
{ "accountId": "account_id value", "role": "role value (for example minter / burner / notary)", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- 参数:
accountId: string
- 帐户的 ID。role: string
- 要添加到指定用户的角色的名称。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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
- 公证人可以调用此 POST 方法来批准 mint 请求。
- 有效负载:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- 参数:
tokenId: string
- 令牌的 ID。operationId: string
- 要批准的 mint 请求的唯一操作 ID。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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
- 公证人可以调用此 POST 方法来批准刻录请求。
- 有效负载:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- 参数:
tokenId: string
- 令牌的 ID。operationId: string
- 要批准的 mint 请求的唯一操作 ID。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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
- 公证人调用此方法来批准暂挂令牌,这将触发在此业务方案中将令牌从付款人转移到收款人。令牌所有者之前暂挂的令牌数量现在将转移给收件人。如果
quantity
值小于实际暂挂值,则剩余金额将再次可供标记的所有者使用。如果roles
行为在令牌模型的behaviors
部分中指定,并且设置了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[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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 Admin
或Org Admin
调用。 - 有效负载:
{ "endorsers": {{endorsers}} }
- 参数:
endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。
- 返回值示例:
{ "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 Admin
或Org 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[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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
- 要为其创建帐户的用户的成员资格服务提供商 (membership service provider,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[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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 Admin
或Token Auditor
或Org Admin
或Org Auditor
调用。 - 查询:
getAccountDetailsByCustomAccountId?customAccountId=customAccountId value&orgId={{bc-org-id}}&peer={{peer}}
- 参数:
customAccountId: string
- 机密模式下帐户的唯一随机 ID。orgId: string
- 当前组织中用户的成员服务提供商 (membership service provider,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
- 当前组织中用户的成员服务提供商 (membership service provider,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
- 当前组织中用户的成员服务提供商 (membership service provider,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 方法检索调用方对薄荷、消耗和转移(发放)操作进行的审批或拒绝的历史记录,包括组织的详细信息以及涉及的帐户(发件人、收件人和公证人)的用户 ID。此方法只能由
Token Admin
、Token Auditor
、Org Admin
、Org 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 Admin
或Token Auditor
、指定组织的Org Admin
或Org 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 Admin
或Token Auditor
、指定组织的Org Admin
或Org 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 Admin
或Token Auditor
、指定组织的Org Admin
或Org Auditor
或帐户的AccountOwner
调用。 /getCBDCAccountsByUser?orgId={{bc-org-id}}&userId={{bc-user-id}}&peer={{peer}}
- 参数:
orgId string
- 当前组织中用户的成员服务提供商 (membership service provider,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 Admin
或Token Auditor
、指定组织的Org Admin
或Org 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
- 此方法返回富历史记录数据库中的账户事务处理历史记录详细信息。此方法只能由链代码的
Token Admin
或Token Auditor
、指定组织的Org Admin
或Org 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
—用于从其提取事务处理历史记录的富历史记录数据库的 RESTful 服务端点。bearerToken
- 用于调用 RESTful 端点以确保请求获得授权的令牌。filters: JSON object
- 可选参数。如果为空,则返回所有记录。pageSize
属性确定要返回的记录数。如果pageSize
为 0,则默认页面大小为 20。bookmark
属性确定要返回的记录的起始索引。必须以 RFC-3339 格式指定startTime
和endTime
属性。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 Admin
、Token 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 Admin
或Token Auditor
、指定组织的Org Admin
或Org 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 Admin
或Token Auditor
、Org Admin
或Org Auditor
或Notary
调用。 /getPendingCBDCIssuance?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&peer={{peer}}
- 参数:
tokenId: string
- 令牌的 ID。orgId: string
- 当前组织中用户的成员服务提供商 (membership service provider,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
- 此方法检索指定类型的所有待处理请求,其中调用者被分配为审批人。此方法只能由链代码或
Notary
的Token Admin
或Token Auditor
调用。 /getPendingCBDCRequest?tokenId={{bc-token-id}}&requestType=request_type value&orgId={{bc-org-id}}&peer={{peer}}
- 参数:
tokenId: string
- 令牌的 ID。requestType: string
–事务处理类型。例如,mint
或burn
。orgId: string
- 当前组织中用户的成员服务提供商 (membership service provider,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 Admin
、Token Auditor
、Org Admin
、Org Auditor
或任何帐户所有者调用。 /getTotalCBDCBalanceByCallerOrgId?peer={{peer}}
- 参数:
peer: string
- 要对其运行查询的对等节点的名称。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "totalBalance": 50500 }, "encode": "JSON" } }
-
getTotalCreatedCBDCTokens
- 原始方法名称:
getTotalMintedTokens
- 此方法返回指定标记的铸造标记总数。此方法只能由
Token Admin
、Token Auditor
、Org Admin
或Org 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
- 此方法返回指定帐户的用户详细信息(
orgId
、userId
和tokenId
)。此方法只能由链代码的Token Admin
或Token Auditor
或指定组织的Org Admin
或Org 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 Admin
或Token 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[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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,则通过标准有效负载发送参数。
- 返回值示例:
{ "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[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回:
- 成功时,所创建的令牌资产的 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
- 表示 mint 请求的唯一操作 ID。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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
- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string
- 用户的用户名或电子邮件 ID。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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
- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string
- 用户的用户名或电子邮件 ID。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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 Admin
或Org Admin
调用。Org Admin
无法自行删除。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- 参数:
orgId: string
- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string
- 用户的用户名或电子邮件 ID。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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 Admin
或Org Admin
调用。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- 参数:
orgId: string
- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string
- 用户的用户名或电子邮件 ID。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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
- 要从指定用户中删除的角色的名称。mintable
和burnable
行为对应于规范文件的minter_role_name
和burner_role_name
属性。同样,notary
角色对应于规范文件的notary_role_name
属性。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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
- 表示 mint 请求的唯一操作 ID。notaryAccountId: string
- 将处理请求的公证人的帐户 ID。quantity: number
–要铸造的令牌数量。timeToExpiration
- 铸造请求过期且不再有效的时间。infoDetails: JSON
- 指定请求类别 (category
) 和说明 (description
) 的对象,如以下示例中所示。{ "category" : "category input", "description" : "description input" }
endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
{ "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 包还包括 approveHoldCBDCTokensInterOrg
和 createCBDCAccount
API。这些 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,则通过标准有效负载发送参数。
- 返回值示例:
{ "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 按顺序完成以下操作。- 在 Oracle Blockchain Platform 中为用户创建注册 ID。创建的注册 ID 与用户 ID 相同,但存在一些限制。ID 只能包含字母数字字符,连号 (-) 和下划线 (_)。如果用户 ID 包含任何其他特殊字符,则这些字符将替换为下划线 (_)。例如,如果用户 ID 为 adam.fripp@example.com,则创建的注册 ID 为 adam_fripp_example_com。如果指定用户 ID 已存在注册,则不会创建其他注册。
- 使用有效负载中提供的详细信息在分类账中创建账户。
- 将新帐户与有效负载中指定的令牌关联。
- 将有效负载中指定的角色分配给用户。
为了确保一致性并避免数据不完整,如果后续步骤中的任何步骤失败,将删除第一步中创建的注册 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
- 要为其创建帐户的用户的成员资格服务提供商 (membership service provider,MSP) ID。ID 必须以字母数字字符开头,并且可以包含字母、数字和特殊字符,例如下划线 (_)、句点 (.)、点号 (@) 和连字符 (-)。userId
- 用户的用户名或电子邮件 ID。ID 必须以字母数字字符开头,并且可以包含字母、数字和特殊字符,例如下划线 (_)、句点 (.)、点号 (@) 和连字符 (-)。applicationGroups
- 帐户所属的应用程序组。例如,System_Admins
。customAccountId
- 使用机密模式链代码的帐户的唯一随机 ID。tokenId
- 与帐户关联的令牌的 ID。ID 必须以字母数字字符开头,并且可以包含字母、数字以及特殊字符下划线 (_) 和连字符 (-)。它的长度不能超过 16 个字符。role
- 角色必须为以下值之一:minter
、burner
、notary
、tokenAdmin
、tokenAuditor
、orgAdmin
或orgAuditor
。dailyLimits
- 定义每日事务限制的两个数字字段:max_daily_amount
和max_daily_transactions
。endorsers: string[]
- 必须背书事务处理的对等节点(例如peer1
、peer2
)的数组。transientMapArgsFlag
- 布尔值。如果为 true,则通过瞬态映射发送参数以进行保密。如果为 false,则通过标准有效负载发送参数。
- 返回值示例:
"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" } }