Stablecoin 包装 API 包
Oracle Blockchain Platform Digital Assets Edition 包含一个包装 API 包,可扩展 REST API 以支持特定于稳定币生命周期的操作。
包装 API 程序包使用 API 网关服务和 OCI 函数部署 API 路由,专门用于管理稳定币生命周期。可从 Oracle Blockchain Platform 控制台下载稳定币包装 API 软件包,其中包含包含包装 API 软件包的归档文件,包括部署所需的 Terraform 脚本。您可以将此文件部署到 Oracle Cloud Infrastructure (OCI) 上的资源管理器堆栈,以便为包装 API 创建必要的 Oracle 资源。它还包括一个 Postman 集合,使您能够测试部署的包装 API。该集合包括具有端点和有效负载的预配置请求,这些端点和有效负载与包装 API 包中定义的 API 相对应。
包装 API
-
activateStablecoinAccount - 原始方法名称:
activateAccount - 此 POST 方法激活可替换的令牌帐户。此方法只能由指定组织的
Token Admin或Org Admin调用。无法激活已删除的账户。 - 有效负载:
{ "tokenId": "{{bc-token-id}}", "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}} } - 参数:
tokenId: string- 令牌的 ID。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回:
- 成功时,指定令牌账户的账户状态对象的 JSON 表示形式。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "6cea484aa4e311b3913e7706c668d1e7df1531b7561f4777ab8550542be18b5d", "payload": { "assetType": "oaccountStatus", "status_id": "oaccountStatus~cfe302f06bf732f248315725bb601d7906d7c1d4c167d04ac3a5283b8dbc7fc4", "account_id": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2", "status": "active" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 294 } } -
addOrgAdmin - 原始方法名称:
addOrgAdmin - 此方法将组织管理员添加到令牌链代码。此方法只能由指定组织的
Token Admin或Org Admin调用。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true } - 参数:
orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "96a84dffcb9156f7271dfb414e8c43b540595044cf9145f5fd56e9873797fc4a", "payload": { "msg": "Successfully added Org Admin (Org_Id: CB, User_Id: cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 197 } } -
addOrgAuditor - 原始方法名称:
addOrgAuditor - 此方法将组织审计程序添加到令牌链代码。此方法只能由指定组织的
Token Admin或Org Admin调用。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true } - 参数:
orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "44bbad35a1478cb714e32f7cfd551897868a203520aab9cea5771d3aadc1cf03", "payload": { "msg": "Successfully added Org Auditor (Org_Id: CB, User_Id: cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 198 } } -
addRole - 原始方法名称:
addRole - 此方法将角色添加到指定的用户和令牌。帐户 ID 通过创建串联令牌 ID、组织 ID 和用户 ID 的 SHA-256 散列来形成。此方法只能由指定组织的
Token Admin或Org Admin调用。 - 有效负载:
{ "tokenId": "{{bc-token-id}}", "role": "role value (for example minter / burner / notary)", "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}} } - 参数:
tokenId: string- 令牌的 ID。role: string- 要添加到指定用户的角色的名称。可铸造和可刻录的行为相应地与规范文件中的minter_role_name和burner_role_name属性关联。同样,公证行为与规范文件中的notary_role_name属性关联。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "29ea766dee8e6d273eba3c40a9fea75a1aa85dc3c280d40695f6224c5c52d93c", "payload": { "msg": "Successfully added role 'notary' to Account Id: oaccount~2eb5f8a9bc561f8f41a4ea3be9511958cc6684ef14f2337ca396efc301b627d8 (Org-Id: CB, User-Id: manager_user_cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 201 } } -
addTokenAdmin - 原始方法名称:
addTokenAdmin - 此 POST 方法将用户添加为令牌链代码的
Token Admin。该方法只能由令牌链代码的Token Admin调用。第一个调用来自实例化链代码的管理员。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true } - 参数:
orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "bd7416689b1acdace3c557faebbc0ad9a51671c10278ba6909350a6fe4b08eed", "payload": { "msg": "User (Org_Id: CB, User_Id: cb) is already Token Admin." }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 193 } } -
addTokenAuditor - 原始方法名称:
addTokenAuditor - 此 POST 方法将令牌审计器添加到令牌链代码。此方法只能由链代码的
Token Admin调用。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true } - 参数:
orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "cd81f6c4c9e7c18ece357dbf5c139ef66ef2d6566be3b14de5f6d0a3fd4bb2f0", "payload": { "msg": "Successfully added Token Auditor (Org_Id: CB, User_Id: cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 196 } } -
approveBurn - 原始方法名称:
approveBurn - 公证人可以调用此 POST 方法来批准刻录请求。
- 有效负载:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "sameOrgEndorser": true } - 参数:
tokenId: string- 令牌的 ID。operationId: string- 要批准的 mint 请求的唯一操作 ID。sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "8252371040e41753fd843bd086692f4e1ee7d89ffa3a50bfa121c5f1565f922f", "payload": { "msg": "Successfully burned 1 tokens from account id: oaccount~0d7b3f73aea28065017ce8b79c0bb19256dc0cb475a0b2a85192bd110f69535c (Org-Id: CB, User-Id: retirer_user_cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 209 } } -
approveMint - 原始方法名称:
approveMint - 公证人可以调用此 POST 方法来批准 mint 请求。
- 有效负载:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "sameOrgEndorser": true } - 参数:
tokenId: string- 令牌的 ID。operationId: string- 要批准的 mint 请求的唯一操作 ID。sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "a4537ef34a955b023b7c205b9abf06a6c79e4fdd761fb24f41b8eb34126b66c0", "payload": { "msg": "Successfully minted 10 tokens to Account Id: oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0 (Org-Id: CB, User-Id: creator_user_cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 204 } } -
approveTransaction - 原始方法名称:
approveTransaction - 审批人可以调用此 POST 方法来审批暂挂事务处理。
- 有效负载:
{ "tokenId": "{{bc-token-id}}", "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}} } - 参数:
tokenId: string- 令牌的 ID。orgId: string- 用户的成员资格服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "44685b0ff1b0ee72d57cb62900aae30638d65c82f264d5de7b28375732171702", "payload": { "assetType": "ApprovalTransactions", "approvalTransactionId": "hold1~oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f", "approvalOperationId": "hold1", "fromAccountId": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2", "toAccountId": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64", "approverAccountId": "oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f", "totalApprovals": 1, "timestamp": "2025-11-21T12:32:43.000Z" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010", "blockNumber": 289 } } -
associateTokenToAccount - 原始方法名称:
associateTokenToAccount - 此 POST 方法将指定的帐户 ID 与指定的令牌关联。此方法只能由指定组织的
Token Admin或Org Admin调用。 - 有效负载:
{ "accountId": "account_id value", "tokenId": "{{bc-token-id}}", "endorsers": {{endorsers}} } - 参数:
accountId: string- 帐户的 ID。tokenId: string- 令牌的 ID。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "efc7381fb6fc6174a40e83ff5f09d2bbf7f6f490365e3bbf19d5502c2cfec474", "payload": { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~1c6aa60e220b8fc70caf4cea1ed723ddb193a00321e5e0004def062816b77090", "user_id": "cb12", "org_id": "CB", "token_type": "fungible", "token_id": "USD", "token_name": "Stablecoin", "balance": 0, "onhold_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 100, "daily_transactions": 0, "current_date": "2024-12-11T00:00:00.000Z" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 216 } } -
bulkTransferTokens - 原始方法名称:
bulkTransferTokens - 此方法将令牌从调用方帐户批量传输到
flow对象中指定的帐户。数量必须在规范文件中divisible行为的decimal参数指定的十进制值内。 - 有效负载:
{ "tokenId": "{{bc-token-id}}", "flow": "[flow value]", "endorsers": {{endorsers}} } - 参数:
token_id: string- 令牌的 ID。flow : object[]- 指定接收器和数量的 JSON 对象数组。to_orgId: string- 当前组织中接收者的成员服务提供商 (MSP) ID。userId: string- 接收者的用户名或电子邮件 ID。quantity: number- 要传输的标记数。
flow参数。Visual Studio Code:[ { "to_org_id": "Org1MSP", "to_user_id": "user1", "quantity": 10 }, { "to_org_id": "Org1MSP", "to_user_id": "user2", "quantity": 10 } ]CLI / Postman:"[{ \"to_org_id\": \"Org1MSP\", \"to_user_id\": \"user1\", \"quantity\": 10 }, { \"to_org_id\": \"Org1MSP\", \"to_user_id\": \"user2\", \"quantity\": 10 }]"endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "ad6a9555e6512ffe4bd3500d0942e171deadc1d724cd80da7179e39e1d05aa4e", "payload": { "msg": "Successfully transferred 10 tokens from Account Id 'oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2' (Org-Id: CentralBank, User-Id: cb__creator_demo).", "from_account_id": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2", "sub_transactions": [ { "to_account_id": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64", "amount": 5 }, { "to_account_id": "oaccount~09abdd306d4fcbc1b794e2e0b8fc4ce3d8282e11846ef35d675cc9540da4ad1b", "amount": 5 } ] }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 302 } } -
createAccount - 原始方法名称:
createAccount - 此方法为指定的用户和令牌创建帐户。必须为在任何时候将具有令牌的任何用户创建账户。账户跟踪余额、暂挂余额和事务处理历史记录。帐户 ID 通过串联资产类型、令牌 ID 以及用户 ID 和组织(成员服务提供商)ID 的 SHA-256 散列来形成。此方法只能由链代码的
Token Admin或指定组织的Org Admin调用。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "tokenType": "fungible", "dailyLimits": "{\"max_daily_amount\":10000,\"max_daily_transactions\":100}", "endorsers": {{endorsers}} } - 参数:
orgId- 要为其创建帐户的用户的成员资格服务提供商 (membership service provider,MSP) ID。ID 必须以字母数字字符开头,并且可以包含字母、数字和特殊字符,例如下划线 (_)、句点 (.)、点号 (@) 和连字符 (-)。userId- 用户的用户名或电子邮件 ID。ID 必须以字母数字字符开头,并且可以包含字母、数字和特殊字符,例如下划线 (_)、句点 (.)、点号 (@) 和连字符 (-)。tokenType: TokenType- 标记的类型,必须是fungible。dailyLimits: JSON object- 以下类型的 JSON 对象。
在示例中,{ "max_daily_amount": 100000 "max_daily_transactions": 10000 }max_daily_amount值是每天可以处理的最大标记量,max_daily_transactions值是每天可以完成的最大事务处理数。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "453821c7ffd477987ef8ccbd836b893969531ab768098cd4a99e3b89cd38a391", "payload": { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~28ac774001f374064029d51af4fb67e26ea1ea9ef62828b7a72dbf3beb8efd8d", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "", "token_name": "", "balance": 0, "onhold_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 100, "daily_transactions": 0, "current_date": "2024-12-09T00:00:00.000Z" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 188 } } -
createApprovalPolicyCheck - 原始方法名称:
createApprovalPolicyCheck - 此方法创建新的审批策略,该策略定义事务处理阈值和所需的连续审批人。此方法只能由
Token Admin调用。 - 有效负载:
{ "asset": "{\"approvalPolicyId\":\"approvalPolicyId value\",\"transactionLowerLimit\":\"transactionLowerLimit value\",\"transactionUpperLimit\":\"transactionUpperLimit value\",\"numberOfApprovalsRequired\":999,\"approverDetails\":[{\"approverOrgId\":\"approverOrgId value\",\"approverUserId\":\"approverUserId value\",\"approvalSequence\":999}]}", "endorsers": {{endorsers}} } - 参数:
asset: ApprovalPolicyCheck class- 定义事务处理的审批规则的类,其中包括以下字段:approvalPolicyId- 系统将生成此 ID。您不手动提供此字段。transactionLowerLimit—审批策略适用的最小交易金额。transactionUpperLimit—审批策略应用的最大事务处理金额。numberOfApprovalsRequired—事务处理完成之前所需的审批总数。approverDetails- 审批者列表及其分配的审批顺序,用于定义审批的强制顺序。
endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "3a5701ca90ffb98832421c7d5377eb9c0df9fdab30a0a3ce06216808bdea098e", "payload": { "status": "active", "assetType": "ApprovalPolicyCheck", "approvalPolicyId": "GPID~500~1000", "transactionLowerLimit": "500", "transactionUpperLimit": "1000", "numberOfApprovalsRequired": 2, "approverDetails": [ { "approverOrgId": "CentralBank", "approverUserId": "manager", "approvalSequence": 1 }, { "approverOrgId": "CentralBank", "approverUserId": "creator", "approvalSequence": 2 } ] }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 284 } } -
createStablecoinAccountPolicyCheck - 原始方法名称:
createAccountPolicyCheck - 此方法为指定的帐户创建策略。此方法只能由指定组织的
Token Admin或Org Admin调用。 - 有效负载:
{ "asset": "{\"accountPolicyId\":\"accountPolicyId value\",\"orgId\":\"{{bc-org-id}}\",\"userId\":\"{{bc-user-id}}\",\"kycCompliance\":\"kycCompliance value\",\"amlCompliance\":\"amlCompliance value\",\"riskScore\":999,\"restrictionFlag\":\"restrictionFlag value\"}", "endorsers": {{endorsers}} } - 参数:
asset: AccountPolicyCheck class- 定义帐户策略参数的类,其中包括以下字段:accountPolicyId- 系统从指定的 orgId 和 userId 字段生成此 ID。您不手动提供此字段。orgId- 要为其创建策略的用户的成员资格服务提供商 (membership service provider,MSP) ID。userId- 要为其创建策略的用户的用户名或电子邮件 ID。kycCompliance–一个布尔值,指示帐户是否满足 KYC(了解您的客户)要求。amlCompliance–一个布尔值,指示帐户是否满足 AML(反洗钱)要求。riskScore- 与账户关联的风险评分,用于合规性评估。restrictionFlag- 一个布尔值,指示帐户是否受到限制的转移。如果设置为true,则仅允许在最低审批策略阈值范围内的传输。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "02875ca9c6a7408da3f81156214228b91b09c4bb2b8026d7a5733b53598c6635", "payload": { "assetType": "AccountPolicyCheck", "accountPolicyId": "APID~CentralBank~cb__creator_demo", "orgId": "CentralBank", "userId": "cb__creator_demo", "kycCompliance": "true", "amlCompliance": "true", "riskScore": 1000, "restrictionFlag": "false" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 272 } } -
deleteApprovalPolicyCheck - 原始方法名称:
deleteApprovalPolicyCheck - 此方法将删除指定策略 ID 的审批策略。此方法只能由
Token Admin调用。 - 有效负载:
{ "id": "id value", "endorsers": {{endorsers}} } - 参数:
id: string- 唯一的审批策略 ID。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "5ac54d3279a183022a00495aee3c25c2893388ff9aaaecd5c3b594edfa49ad8f", "payload": { "isValid": true, "message": "Successfully deleted asset with ID [GPID~500~1000] from ledger" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 286 } } -
deleteStablecoinAccount - 原始方法名称:
deleteAccount - 此方法将删除可替换的令牌帐户。如果未在分类账中找到账户的
accountStatus值,则会返回错误。此方法只能由Token Admin调用。 - 有效负载:
{ "tokenId": "{{bc-token-id}}", "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}} } - 参数:
tokenId: string- 令牌的 ID。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "4bec8fc6cf31f86944b4e73334a03c55ad5630625e8320f5b9cf7cca30af929b", "payload": { "assetType": "oaccountStatus", "status_id": "oaccountStatus~e0a22965c400dd325e386b862b2552bbd26a281ebe4d1c29c08ccc465a26678d", "account_id": "oaccount~e888c90d38470956e3d98eccaa158f86a1bf0923900803b2b7cb7b4e0c10a18e", "status": "deleted" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 297 } } -
deleteStablecoinAccountPolicyCheck - 原始方法名称:
deleteAccountPolicyCheck - 此方法将删除指定策略 ID 的策略。此方法只能由指定组织的
Token Admin或Org Admin调用。 - 有效负载:
{ "id": "id value", "endorsers": {{endorsers}} } - 参数:
id: string- 唯一的帐户策略 ID。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "5ac54d3279a183022a00495aee3c25c2893388ff9aaaecd5c3b594edfa49ad8f", "payload": { "isValid": true, "message": "Successfully deleted asset with ID [GPID~500~1000] from ledger" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 286 } } -
executeHoldTokens - 原始方法名称:
executeHoldTokens - 此方法批准对令牌的暂挂,这将触发令牌从发送方传输到接收方的过程。令牌所有者之前暂挂的令牌数量现在将转移给收件人。如果
quantity值小于实际暂挂值,则剩余金额将再次可供标记的所有者使用。如果roles行为在令牌模型的behaviors部分中指定,并且设置了notary_role_name值,则调用方帐户必须具有公证角色。否则,任何具有帐户的呼叫者都可以充当公证人。 - 有效负载:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "quantity": 1, "endorsers": {{endorsers}} } - 参数:
tokenId: string- 令牌的 ID。operationId: string- 要批准的 mint 请求的唯一操作 ID。quantity: number–要传输的持有令牌数。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "c1149aaa486abc4931d9024c18dfcb230bb321723d1160b0bf981c0011c4856a", "payload": { "msg": "Account Id: oaccount~51e676d7182a02ea7418ef58a6d54ecfe3858ef40b4ffb3d859b320da3921594 (Org-Id: CB, User-Id: issuer_user_cb) is successfully executed '10' tokens from Operation Id '8e3145'." }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 213 } } -
getStablecoinAccountTransactionHistory - 原始方法名称:
getAccountTransactionHistory - 此方法返回指定用户和令牌的账户事务处理历史记录详细信息数组。此方法只能由链代码的
Token Admin或Token Auditor、指定组织的Org Admin或Org Auditor或帐户的AccountOwner调用。 /getStablecoinAccountTransactionHistory?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}- 参数:
tokenId: string- 令牌的 ID。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "transaction_id": "otransaction~64c5a4830949eae1424600f3d4a438c6f603a7c3ea31a68e374b899803999e22", "transacted_amount": 10, "timestamp": "2024-12-11T13:37:28.000Z", "balance": 550, "onhold_balance": 10, "token_id": "USD", "category": "category value", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "REJECT_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" }, { "transaction_id": "otransaction~a4537ef34a955b023b7c205b9abf06a6c79e4fdd761fb24f41b8eb34126b66c0", "transacted_amount": 10, "timestamp": "2024-12-11T13:36:32.000Z", "balance": 550, "onhold_balance": 10, "token_id": "USD", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "APPROVE_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" }, { "transaction_id": "otransaction~6237a759422bd9fb112742e8cd7e6450df5a74a32236d9b1005571afed8904a4", "transacted_amount": 10, "timestamp": "2024-12-11T13:36:18.000Z", "balance": 540, "onhold_balance": 10, "token_id": "USD", "category": "category value", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "REQUEST_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" }, { "transaction_id": "otransaction~06b35071415d74aa1a7c18449149c937d886cae76a832c44cf8d98e84586e76e", "transacted_amount": 10, "timestamp": "2024-12-11T13:35:46.000Z", "balance": 540, "onhold_balance": 10, "token_id": "USD", "category": "category value", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "REQUEST_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" } ], "encode": "JSON" } } -
getAllAccounts - 原始方法名称:
getAllAccounts - 此方法返回所有帐户的列表。此方法只能由
Token Admin或Token Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getAllAccounts - 参数:
- 无
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "key": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2", "valueJson": { "account_id": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2", "assetType": "oaccount", "balance": 49390, "bapAccountVersion": 7, "current_date": "2025-11-21T00:00:00.000Z", "daily_amount": 610, "daily_transactions": 2, "max_daily_amount": 10000, "max_daily_transactions": 100, "onhold_balance": 0, "onhold_burn_balance": 0, "org_id": "CentralBank", "token_id": "t1", "token_name": "stablecoin", "token_type": "fungible", "user_id": "cb__creator_demo" } }, { "key": "oaccount~f44e4d75c0fec749392566e745cd39c453c3039aa7224ae417bc4379b645827c", "valueJson": { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~f44e4d75c0fec749392566e745cd39c453c3039aa7224ae417bc4379b645827c", "user_id": "cb_manager_demo", "org_id": "CentralBank", "token_type": "fungible", "token_id": "t1", "token_name": "stablecoin", "balance": 0, "onhold_balance": 0, "onhold_burn_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 100, "daily_transactions": 0, "current_date": "2025-11-20T00:00:00.000Z" } }, { "key": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64", "valueJson": { "account_id": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64", "assetType": "oaccount", "balance": 610, "bapAccountVersion": 2, "current_date": "2025-11-20T00:00:00.000Z", "daily_amount": 0, "daily_transactions": 0, "max_daily_amount": 10000, "max_daily_transactions": 100, "onhold_balance": 0, "onhold_burn_balance": 0, "org_id": "CentralBank", "token_id": "t1", "token_name": "stablecoin", "token_type": "fungible", "user_id": "cb_issuer_demo" } }, { "key": "oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f", "valueJson": { "account_id": "oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f", "assetType": "oaccount", "balance": 0, "bapAccountVersion": 1, "current_date": "2025-11-20T00:00:00.000Z", "daily_amount": 0, "daily_transactions": 0, "max_daily_amount": 10000, "max_daily_transactions": 100, "onhold_balance": 0, "onhold_burn_balance": 0, "org_id": "CentralBank", "token_id": "t1", "token_name": "stablecoin", "token_type": "fungible", "user_id": "manager" } }, { "key": "oaccount~09abdd306d4fcbc1b794e2e0b8fc4ce3d8282e11846ef35d675cc9540da4ad1b", "valueJson": { "account_id": "oaccount~09abdd306d4fcbc1b794e2e0b8fc4ce3d8282e11846ef35d675cc9540da4ad1b", "assetType": "oaccount", "balance": 0, "bapAccountVersion": 1, "current_date": "2025-11-20T00:00:00.000Z", "daily_amount": 0, "daily_transactions": 0, "max_daily_amount": 10000, "max_daily_transactions": 100, "onhold_balance": 0, "onhold_burn_balance": 0, "org_id": "CentralBank", "token_id": "t1", "token_name": "stablecoin", "token_type": "fungible", "user_id": "creator" } }, { "key": "oaccount~e888c90d38470956e3d98eccaa158f86a1bf0923900803b2b7cb7b4e0c10a18e", "valueJson": { "assetType": "oaccount", "account_id": "oaccount~e888c90d38470956e3d98eccaa158f86a1bf0923900803b2b7cb7b4e0c10a18e", "user_id": "user1", "org_id": "CentralBank", "token_type": "fungible", "token_id": "t1", "token_name": "stablecoin", "balance": 0, "onhold_balance": 0, "onhold_burn_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 100, "daily_transactions": 0, "current_date": "2025-11-24T00:00:00.000Z" } } ], "encode": "JSON" } } -
getAllOrgAccounts - 原始方法名称:
getAllOrgAccounts - 此方法返回属于指定组织的所有令牌帐户的列表。此方法只能由指定组织的
Token Admin、Token Auditor或Org Admin或Org Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getAllOrgAccounts?orgId={{bc-org-id}} - 参数:
orgId: string- 组织的成员服务提供商 (membership service provider,MSP) ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "key": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2", "valueJson": { "account_id": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2", "assetType": "oaccount", "balance": 49390, "bapAccountVersion": 7, "current_date": "2025-11-21T00:00:00.000Z", "daily_amount": 610, "daily_transactions": 2, "max_daily_amount": 10000, "max_daily_transactions": 100, "onhold_balance": 0, "onhold_burn_balance": 0, "org_id": "CentralBank", "token_id": "t1", "token_name": "stablecoin", "token_type": "fungible", "user_id": "cb__creator_demo" } }, { "key": "oaccount~f44e4d75c0fec749392566e745cd39c453c3039aa7224ae417bc4379b645827c", "valueJson": { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~f44e4d75c0fec749392566e745cd39c453c3039aa7224ae417bc4379b645827c", "user_id": "cb_manager_demo", "org_id": "CentralBank", "token_type": "fungible", "token_id": "t1", "token_name": "stablecoin", "balance": 0, "onhold_balance": 0, "onhold_burn_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 100, "daily_transactions": 0, "current_date": "2025-11-20T00:00:00.000Z" } }, { "key": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64", "valueJson": { "account_id": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64", "assetType": "oaccount", "balance": 610, "bapAccountVersion": 2, "current_date": "2025-11-20T00:00:00.000Z", "daily_amount": 0, "daily_transactions": 0, "max_daily_amount": 10000, "max_daily_transactions": 100, "onhold_balance": 0, "onhold_burn_balance": 0, "org_id": "CentralBank", "token_id": "t1", "token_name": "stablecoin", "token_type": "fungible", "user_id": "cb_issuer_demo" } }, { "key": "oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f", "valueJson": { "account_id": "oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f", "assetType": "oaccount", "balance": 0, "bapAccountVersion": 1, "current_date": "2025-11-20T00:00:00.000Z", "daily_amount": 0, "daily_transactions": 0, "max_daily_amount": 10000, "max_daily_transactions": 100, "onhold_balance": 0, "onhold_burn_balance": 0, "org_id": "CentralBank", "token_id": "t1", "token_name": "stablecoin", "token_type": "fungible", "user_id": "manager" } }, { "key": "oaccount~09abdd306d4fcbc1b794e2e0b8fc4ce3d8282e11846ef35d675cc9540da4ad1b", "valueJson": { "account_id": "oaccount~09abdd306d4fcbc1b794e2e0b8fc4ce3d8282e11846ef35d675cc9540da4ad1b", "assetType": "oaccount", "balance": 0, "bapAccountVersion": 1, "current_date": "2025-11-20T00:00:00.000Z", "daily_amount": 0, "daily_transactions": 0, "max_daily_amount": 10000, "max_daily_transactions": 100, "onhold_balance": 0, "onhold_burn_balance": 0, "org_id": "CentralBank", "token_id": "t1", "token_name": "stablecoin", "token_type": "fungible", "user_id": "creator" } }, { "key": "oaccount~e888c90d38470956e3d98eccaa158f86a1bf0923900803b2b7cb7b4e0c10a18e", "valueJson": { "assetType": "oaccount", "account_id": "oaccount~e888c90d38470956e3d98eccaa158f86a1bf0923900803b2b7cb7b4e0c10a18e", "user_id": "user1", "org_id": "CentralBank", "token_type": "fungible", "token_id": "t1", "token_name": "stablecoin", "balance": 0, "onhold_balance": 0, "onhold_burn_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 100, "daily_transactions": 0, "current_date": "2025-11-24T00:00:00.000Z" } } ], "encode": "JSON" } } -
getAllTokenAdmins - 原始方法名称:
getAllTokenAdmins - 此方法返回属于
Token Admin的所有用户的列表。此方法只能由Token Admin或Token Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getAllTokenAdmins - 参数:
- 无
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "admins": [ { "org_id": "CentralBank", "user_id": "cb_admin_demo" } ] }, "encode": "JSON" } } -
getAllTokens - 原始方法名称:
getAllTokens - 此方法返回存储在状态数据库中的所有令牌。此方法只能由
Token Admin、Token Auditor、Org Admin或Org Auditor调用。此方法使用 Berkeley DB SQL 丰富的查询,并且只能在连接到远程 Oracle Blockchain Platform 网络时调用。 - 有效负载:
{{api-gateway-endpoint1}}/getAllTokens - 参数:
- 无
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "key": "t1", "valueJson": { "assetType": "otoken", "events": false, "token_id": "t1", "token_name": "stablecoin", "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 }, "currencyName": "currencyName value", "conversionRate": 999 } } ], "encode": "JSON" } } -
getApprovalPolicyCheckById - 原始方法名称:
getApprovalPolicyCheckById - 此方法获取指定策略 ID 的审批策略详细信息。此方法只能由
Token Admin或Token Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getApprovalPolicyCheckById?id=id value - 参数:
id: string- 唯一的审批策略 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "assetType": "ApprovalPolicyCheck", "approvalPolicyId": "GPID~0~100", "transactionLowerLimit": "0", "transactionUpperLimit": "100", "numberOfApprovalsRequired": 0, "approverDetails": [] }, "encode": "JSON" } } -
getApprovalTransactionsById - 原始方法名称:
getApprovalTransactionsById - 此方法获取指定事务处理 ID 的审批事务处理。此方法只能由关联组织的
Token Admin或Org Admin调用。 - 有效负载:
{{api-gateway-endpoint1}}/getApprovalTransactionsById?id=id value - 参数:
id: string- 系统生成的审批事务处理 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "assetType": "ApprovalTransactions", "approvalTransactionId": "hold1~oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f", "approvalOperationId": "hold1", "fromAccountId": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2", "toAccountId": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64", "approverAccountId": "oaccount~1cf5d40c7ea7b9dceedfc66292ab843c1583564c3ecaf9f5ceb11f834018b02f", "totalApprovals": 1, "timestamp": "2025-11-21T12:32:43.000Z" }, "encode": "JSON" } } -
getApproverDetailsByTransferAmount - 原始方法名称:
getApproverDetailsByTransferAmount - 此方法获取给定转移金额所需的审批人详细信息。此方法只能由
Token Admin或Token Auditor调用。 - 有效负载:
{ "Amount": 1, "endorsers": {{endorsers}} } - 参数:
amount: number–转移金额。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "5874105c14abd67e68cb4dacf82f2a2dca6cc9da4f5b27fcc91c83a60b7249e1", "payload": { "approverDetails": [ { "approverOrgId": "CentralBank", "approverUserId": "manager", "approvalSequence": 1 }, { "approverOrgId": "CentralBank", "approverUserId": "creator", "approvalSequence": 2 } ] }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 292 } } -
getMaxDailyAmount - 原始方法名称:
getMaxDailyAmount - 此方法获取指定账户的最大每日累计事务处理金额。此方法只能由链代码的
Token Admin或Token Auditor、指定组织的Org Admin或Org Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getMaxDailyAmount?OrgId={{bc-org-id}}&UserId={{bc-user-id}}&TokenId={{bc-token-id}} - 参数:
tokenId: string- 令牌的 ID。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "max_daily_amount": 10000 }, "encode": "JSON" } } -
getMaxDailyTransactionCount - 原始方法名称:
getMaxDailyTransactionCount - 此方法获取指定账户的最大每日事务处理数。此方法只能由链代码的
Token Admin或Token Auditor、指定组织的Org Admin或Org Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getMaxDailyTransactionCount?OrgId={{bc-org-id}}&UserId={{bc-user-id}}&TokenId={{bc-token-id}} - 参数:
tokenId: string- 令牌的 ID。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "max_daily_transactions": 100 }, "encode": "JSON" } } -
getNetTokens - 原始方法名称:
getNetTokens - 此 GET 方法返回系统中指定令牌的可用令牌净总数。净令牌总数是令牌被烧毁后剩余的令牌数量。此方法只能由
Token Admin、Token Auditor、Org Admin或Org Auditor调用。 /getNetStablecoinTokens?tokenId={{bc-token-id}}- 参数:
tokenId: string- 令牌的 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "msg": "Net supply of token for Token Id: USD is 878 tokens.", "quantity": 878 }, "encode": "JSON" } } -
getOnHoldBalanceWithOperationId - 原始方法名称:
getOnHoldBalanceWithOperationId - 此方法返回指定操作 ID 和令牌的暂挂余额。此方法只能由
Token Admin或Token Auditor调用,也可以由与该操作关联的发件人、接收者或公证人调用。 - 有效负载:
{{api-gateway-endpoint1}}/getOnHoldBalanceWithOperationId?tokenId={{bc-token-id}}&operationId=operation_id value - 参数:
tokenId: string- 令牌的 ID。operationId: string- 用于标识暂挂操作的唯一 ID。通常,此 ID 由客户端应用程序传递。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "msg": "Current Holding Balance of Operation 'hold2' for token 't1' is: 600", "holding_balance": 600 }, "encode": "JSON" } } -
getOnHoldDetailsWithOperationId - 原始方法名称:
getOnHoldDetailsWithOperationId - 此方法返回指定操作 ID 和令牌的暂挂事务处理详细信息。此方法只能由
Token Admin或Token Auditor调用,也可以由与该操作关联的发件人、接收者或公证人调用。 - 有效负载:
{{api-gateway-endpoint1}}/getOnHoldDetailsWithOperationId?tokenId={{bc-token-id}}&operationId=operation_id value - 参数:
tokenId: string- 令牌的 ID。operationId: string- 用于标识暂挂操作的唯一 ID。通常,此 ID 由客户端应用程序传递。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "bapHoldVersion": 1, "assetType": "ohold", "holding_id": "ohold~stablecoin~t1~hold2", "operation_id": "hold2", "token_id": "t1", "token_name": "stablecoin", "operation_type": "transfer", "status": "pending", "from_account_id": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2", "to_account_id": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64", "notary_account_id": "oaccount~f44e4d75c0fec749392566e745cd39c453c3039aa7224ae417bc4379b645827c", "quantity": 600, "time_to_expiration": "0", "category": "category value", "description": "description value" }, "encode": "JSON" } } -
getOnHoldIds - 原始方法名称:
getOnHoldIds - 此 GET 方法返回指定帐户的所有暂挂 ID 的列表。此方法只能由链代码的
Token Admin或Token Auditor、指定组织的Org Admin或Org Auditor或帐户的AccountOwner调用。 /getOnHoldIds?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}- 参数:
tokenId: string- 令牌的 ID。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "msg": "Holding Ids are: ohold~Stablecoin~USD~8e3147,ohold~Stablecoin~USD~8e315", "holding_ids": [ "ohold~Stablecoin~USD~8e3147", "ohold~Stablecoin~USD~8e315" ] }, "encode": "JSON" } } -
getOrgAccountsByRole - 原始方法名称:
getOrgAccountsByRole - 此方法返回有关在指定组织中具有指定角色的所有帐户的信息。此方法只能由指定组织的
Token Admin或Token Auditor或Org Admin或Org Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getOrgAccountsByRole?tokenId={{bc-token-id}}&role=role value (for example minter / burner / notary)&orgId={{bc-org-id}} - 参数:
tokenId: string- 令牌的 ID。role: string- 要检查的角色的名称。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "accounts": [ "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2" ] }, "encode": "JSON" } } -
getOrgAdmins - 原始方法名称:
getOrgAdmins - 此方法返回属于组织
Org Admin的所有用户的列表。此方法只能由Token Admin或Token Auditor或关联组织的Org Admin或Org Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getOrgAdmins - 参数:
- 无
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "admins": [ { "org_id": "CentralBank", "user_id": "cb__creator_demo" } ] }, "encode": "JSON" } } -
getOrgAuditors - 原始方法名称:
getOrgAuditors - 此方法返回属于组织
Org Auditor的所有用户的列表。此方法只能由Token Admin或Token Auditor或关联组织的Org Admin或Org Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getOrgAuditors - 参数:
- 无
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "admins": [ { "org_id": "CentralBank", "user_id": "cb_auditor_demo" } ] }, "encode": "JSON" } } -
getOrgUsersByRole - 原始方法名称:
getOrgUsersByRole - 此方法返回有关在指定组织中具有指定角色的所有用户的信息。此方法只能由指定组织的
Token Admin或Token Auditor或Org Admin或Org Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getOrgUsersByRole?tokenId={{bc-token-id}}&role=role value (for example minter / burner / notary)&orgId={{bc-org-id}} - 参数:
tokenId: string- 令牌的 ID。role: string- 要检查的角色的名称。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "users": [ { "token_id": "t1", "user_id": "cb__creator_demo", "org_id": "CentralBank" } ] }, "encode": "JSON" } } -
getStablecoinAccount - 原始方法名称:
getAccount - 此 GET 方法返回指定用户和令牌的帐户详细信息。此方法只能由链代码的
Token Admin或Token Auditor、指定组织的Org Admin或Org Auditor或帐户的AccountOwner调用。 - 查询:
/getStablecoinAccount?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}} - 参数:
tokenId: string- 令牌的 ID。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "bapAccountVersion": 0, "assetType": "oaccount", "status": "active", "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "USD", "token_name": "Stablecoin", "balance": 0, "onhold_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 1000, "daily_transactions": 0, "current_date": "2024-11-20T00:00:00.000Z" }, "encode": "JSON" } } -
getStablecoinAccountBalance - 原始方法名称:
getAccountBalance - 此 GET 方法返回指定帐户和令牌的当前余额。此方法只能由链代码的
Token Admin或Token Auditor、指定组织的Org Admin或Org Auditor或帐户的AccountOwner调用。 /getStablecoinAccountBalance?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}- 参数:
tokenId: string- 令牌的 ID。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "msg": "Current Balance is: 100", "user_balance": 100 }, "encode": "JSON" } } -
getStablecoinAccountOnHoldBalance - 原始方法名称:
getAccountOnHoldBalance - 此方法返回指定账户和令牌的当前暂挂余额。此方法只能由指定组织的
Token Admin或Token Auditor、Org Admin或Org Auditor或帐户的所有者调用。 - 有效负载:
{{api-gateway-endpoint1}}/getStablecoinAccountOnHoldBalance?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}} - 参数:
tokenId: string- 令牌的 ID。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "msg": "Total Holding Balance is: 600", "holding_balance": 600 }, "encode": "JSON" } } -
getStablecoinAccountOnHoldBurnBalance - 原始方法名称:
getAccountOnHoldBurnBalance - 此方法返回指定用户的暂挂消耗余额。此方法只能由指定组织的
Token Admin或Token Auditor、Org Admin或Org Auditor或帐户的所有者调用。 - 有效负载:
{{api-gateway-endpoint1}}/getStablecoinAccountOnHoldBurnBalance?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}} - 参数:
tokenId: string- 令牌的 ID。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "msg": "Total On Hold Burning Balance is: 0", "onhold_burn_balance": 0 }, "encode": "JSON" } } -
getStablecoinAccountPolicyCheckById - 原始方法名称:
getAccountPolicyCheckById - 此方法获取指定策略 ID 的账户策略详细信息。此方法只能由指定组织的
Token Admin或Token Auditor或Org Admin或Org Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getStablecoinAccountPolicyCheckById?id=id value - 参数:
id: string- 唯一的帐户策略 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "02875ca9c6a7408da3f81156214228b91b09c4bb2b8026d7a5733b53598c6635", "payload": { "assetType": "AccountPolicyCheck", "accountPolicyId": "APID~CentralBank~cb__creator_demo", "orgId": "CentralBank", "userId": "cb__creator_demo", "kycCompliance": "true", "amlCompliance": "true", "riskScore": 1000, "restrictionFlag": "false" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 272 } } -
getStablecoinAccountsByRole - 原始方法名称:
getAccountsByRole - 此方法返回指定角色和令牌的所有账户 ID 的列表。此方法只能由
Token Admin或Token Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getStablecoinAccountsByRole?tokenId={{bc-token-id}}&role=role value (for example minter / burner / notary) - 参数:
tokenId: string- 令牌的 ID。role: string- 要检查的角色的名称。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "accounts": [ "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2" ] }, "encode": "JSON" } } -
getStablecoinAccountsByUser - 原始方法名称:
getAccountsByUser - 此方法返回指定组织 ID 和用户 ID 的所有帐户 ID 的列表。此方法只能由链代码的
Token Admin或Token Auditor、指定组织的Org Admin或Org Auditor或帐户的AccountOwner调用。 /getStablecoinAccountsByUser?orgId={{bc-org-id}}&userId={{bc-user-id}}- 参数:
orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~8db15b42910eeec401e1bf22c69dfdd11c820ecc26539ea03a3426fa25cb8c28", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "", "token_name": "", "balance": 0, "onhold_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 1000, "daily_transactions": 0, "current_date": "2024-11-20T00:00:00.000Z" }, { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "USD", "token_name": "Stablecoin", "balance": 0, "onhold_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 1000, "daily_transactions": 0, "current_date": "2024-11-20T00:00:00.000Z" }, { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~28ac774001f374064029d51af4fb67e26ea1ea9ef62828b7a72dbf3beb8efd8d", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "", "token_name": "", "balance": 0, "onhold_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 100, "daily_transactions": 0, "current_date": "2024-12-09T00:00:00.000Z" } ], "encode": "JSON" } } -
getStablecoinAccountStatus - 原始方法名称:
getAccountStatus - 此方法获取令牌帐户的当前状态。此方法可以由指定组织的
Token Admin或Token Auditor、Org Admin或Org Auditor调用,也可以由令牌帐户所有者调用。如果在分类帐中未找到accountStatus值,则此方法将返回状态设置为“活动”的accountStatus对象。 - 有效负载:
{{api-gateway-endpoint1}}/getStablecoinAccountStatus?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}} - 参数:
tokenId: string- 令牌的 ID。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "assetType": "oaccountStatus", "status_id": "oaccountStatus~cfe302f06bf732f248315725bb601d7906d7c1d4c167d04ac3a5283b8dbc7fc4", "account_id": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2", "status": "active" }, "encode": "JSON" } } -
getStablecoinAccountTransactionHistoryWithFilters - 原始方法名称:
getAccountTransactionHistoryWithFiltersFromRichHistDB - 此方法返回富历史记录数据库中的账户事务处理历史记录详细信息。此方法只能由链代码的
Token Admin或Token Auditor、指定组织的Org Admin或Org Auditor或帐户的AccountOwner调用。 /getStablecoinAccountTransactionHistoryWithFilters?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}&customEndpoint=custom_endpoint value&bearerToken=bearer_token value&filters={"pageSize":20,"bookmark":"","startTime":"2022-01-16T15:16:36+00:00","endTime":"2022-01-17T15:16:36+00:00"}- 参数:
tokenId: string- 令牌的 ID。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。customEndpoint—用于从其提取事务处理历史记录的富历史记录数据库的 RESTful 服务端点。bearerToken- 用于调用 RESTful 端点以确保请求获得授权的令牌。filters: JSON object- 可选参数。如果为空,则返回所有记录。pageSize属性确定要返回的记录数。如果pageSize为 0,则默认页面大小为 20。bookmark属性确定要返回的记录的起始索引。必须以 RFC-3339 格式指定startTime和endTime属性。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "transaction_id": "otransaction~64c5a4830949eae1424600f3d4a438c6f603a7c3ea31a68e374b899803999e22", "transacted_amount": 10, "timestamp": "2024-12-11T13:37:28.000Z", "balance": 550, "onhold_balance": 10, "token_id": "USD", "category": "category value", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "REJECT_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" }, { "transaction_id": "otransaction~a4537ef34a955b023b7c205b9abf06a6c79e4fdd761fb24f41b8eb34126b66c0", "transacted_amount": 10, "timestamp": "2024-12-11T13:36:32.000Z", "balance": 550, "onhold_balance": 10, "token_id": "USD", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "APPROVE_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" }, { "transaction_id": "otransaction~6237a759422bd9fb112742e8cd7e6450df5a74a32236d9b1005571afed8904a4", "transacted_amount": 10, "timestamp": "2024-12-11T13:36:18.000Z", "balance": 540, "onhold_balance": 10, "token_id": "USD", "category": "category value", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "REQUEST_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" }, { "transaction_id": "otransaction~06b35071415d74aa1a7c18449149c937d886cae76a832c44cf8d98e84586e76e", "transacted_amount": 10, "timestamp": "2024-12-11T13:35:46.000Z", "balance": 540, "onhold_balance": 10, "token_id": "USD", "category": "category value", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "REQUEST_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" } ], "encode": "JSON" } } -
getTokenAuditors - 原始方法名称:
getTokenAuditors - 此方法返回链代码的所有
Token Auditors。此方法只能由Token Admin或Token Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getTokenAuditors - 参数:
- 无
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "auditors": [ { "org_id": "CentralBank", "user_id": "cb_auditor_demo" } ] }, "encode": "JSON" } } -
getTokenById - 原始方法名称:
getTokenById - 此方法返回指定令牌 ID 的令牌详细信息。此方法只能由任何组织的
Token Admin或Token Auditor或Org Admin或Org Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getTokenById?tokenId={{bc-token-id}} - 参数:
tokenId: string- 令牌的 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "assetType": "otoken", "events": false, "token_id": "t1", "token_name": "stablecoin", "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 }, "currencyName": "currencyName value", "conversionRate": 999 }, "encode": "JSON" } } -
getTokenHistory - 原始方法名称:
getTokenHistory - 此方法返回指定标记 ID 的标记历史记录。此方法只能由任何组织的
Token Admin或Token Auditor或Org Admin或Org Auditor调用。 - 有效负载:
{{api-gateway-endpoint1}}/getTokenHistory?tokenId={{bc-token-id}} - 参数:
tokenId: string- 令牌的 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "trxId": "28c205ee6f607d77490ab28aa99729a700c34e524efe805b213a526e58dd2b40", "timeStamp": "2025-11-20T21:30:16.000Z", "value": { "assetType": "otoken", "events": false, "token_id": "t1", "token_name": "stablecoin", "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 }, "currencyName": "currencyName value", "conversionRate": 999 } } ], "encode": "JSON" } } -
getTotalMintedTokens - 原始方法名称:
getTotalMintedTokens - 此方法返回指定标记的铸造标记总数。此方法只能由
Token Admin、Token Auditor、Org Admin或Org Auditor调用。 - 查询:
/getTotalCreatedStablecoinTokens?tokenId={{bc-token-id}} - 参数:
tokenId: string- 令牌的 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "msg": "Total minted token for Token Id: USD is 910 tokens.", "quantity": 910 }, "encode": "JSON" } } -
getTransactionById - 原始方法名称:
getTransactionById - 此方法返回指定事务处理 ID 的详细事务处理记录。此方法只能由
Token Admin或交易指定的任何账户(发件人、接收者或公证人)调用。 - 有效负载:
{{api-gateway-endpoint1}}/getTransactionById?transactionId=transaction_id value - 参数:
transaction_id string- 事务处理的 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "transaction_id": "otransaction~493a6cdcaac058ab6ae2bd001e8a761e378e99e283b06443041d286d46d077c4", "history": [ { "trxId": "493a6cdcaac058ab6ae2bd001e8a761e378e99e283b06443041d286d46d077c4", "timeStamp": "2025-11-24T09:50:59.000Z", "value": { "assetType": "otransaction", "transaction_id": "otransaction~493a6cdcaac058ab6ae2bd001e8a761e378e99e283b06443041d286d46d077c4", "token_id": "t1", "from_account_id": "oaccount~374e4e762940fc185c7cd5b6528c7f94985b6c56acf46abb746de6381589edd2", "from_account_onhold_burn_balance": 0, "to_account_id": "oaccount~79c427e614530eacad6fb07cff6048f6b96283e65019301320c9684932846f64", "to_account_onhold_burn_balance": 0, "transaction_type": "ONHOLD", "amount": 600, "timestamp": "2025-11-24T09:50:59.000Z", "number_of_sub_transactions": 0, "holding_id": "ohold~stablecoin~t1~hold2", "sub_transaction": "false", "category": "category value", "description": "description value" } } ], "sub_transactions": [] }, "encode": "JSON" } } -
getUserByStablecoinAccountId - 原始方法名称:
getUserByAccountId - 此方法返回指定帐户的用户详细信息(
org_id、user_id和token_id)。此方法只能由链代码的Token Admin或Token Auditor或指定组织的Org Admin或Org Auditor调用。 - 查询:
/getUserByStablecoinAccountId?accountId=account_id value - 参数:
accountId: string- 帐户的 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "token_id": "USD", "user_id": "admin_user_cb", "org_id": "CB" }, "encode": "JSON" } } -
getUsersByRole - 原始方法名称:
getUsersByRole - 此 GET 方法返回指定角色和令牌的所有用户的列表。此方法只能由链代码的
Token Admin或Token Auditor调用。 - 查询:
/getUsersByRole?tokenId={{bc-token-id}}&role=role value (for example minter / burner / notary) - 参数:
tokenId: string- 令牌的 ID。role: string- 要搜索的角色的名称。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "users": [ { "token_id": "USD", "user_id": "creator_user_cb", "org_id": "CB" }, { "token_id": "USD", "user_id": "cb4", "org_id": "CB" } ] }, "encode": "JSON" } } -
holdTokens - 原始方法名称:
holdTokens - 此方法代表具有
to_account_id帐户的令牌的所有者创建暂挂。指定公证账户,该账户负责完成或释放暂挂。创建暂挂时,付款人的指定标记余额将被暂挂。在暂挂完成或释放之前,无法转移暂挂余额。此方法的调用方必须已创建帐户。 - 有效负载:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "toOrgId": "to_org_id value", "toUserId": "to_user_id value", "notaryOrgId": "notary_org_id value", "notaryUserId": "notary_user_id value", "quantity": 1, "timeToExpiration": "time_to_expiration value", "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}", "endorsers": {{endorsers}} } - 参数:
tokenId: string- 令牌的 ID。operationId: string- 用于标识暂挂操作的唯一 ID。通常,此 ID 由客户端应用程序传递。toOrgId: string- 当前组织中接收者的成员服务提供商 (MSP) ID。toUserId: string- 接收者的用户名或电子邮件 ID。notaryOrgId: string- 当前组织中公证人的成员服务提供商 (membership service provider,MSP) ID。notaryUserId: 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)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "e575d339299bb98afe83207e749cd07654f209673c84c6973738b6094da33062", "payload": { "msg": "AccountId oaccount~51e676d7182a02ea7418ef58a6d54ecfe3858ef40b4ffb3d859b320da3921594 (Org-Id: CB , User-Id: issuer_user_cb) is successfully holding 10 tokens" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 211 } } -
init - 原始方法名称:
init - 部署链代码时会调用此方法。用户信息将另存为链代码的
Token Admin。 - 有效负载:
{ "adminList": "[{\"org_id\":\"{{bc-org-id}}\",\"user_id\":\"{{bc-admin-user}}\"}]" } - 参数:
adminList: TokenAdminAsset[]- 包含组织 ID 和用户 ID 的 JSON 对象数组,用于指定令牌管理员,格式如下:{ "org_id":"{{bc-org-id}}", "user_id":"{{bc-admin-user} }
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "fdb7dc89832c8045a333823b77fa24ae628178148dc93b3550040e070d7cd807", "payload": "", "encode": "UTF-8", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 263 } } -
initializeStablecoinToken - 原始方法名称:
initializeStablecoinToken - 此方法创建令牌并初始化令牌属性。资产及其属性保存在状态数据库中。此方法只能由链代码的
Token Admin调用。 - 有效负载:
{ "tokenAsset": "{\"token_id\":\"{{bc-token-id}}\",\"token_desc\":\"token_desc value\",\"Currency_Name\":\"Currency_Name value\"}", "sameOrgEndorser": true } - 参数:
tokenAsset: <Token Class>- 标记资产作为参数传递到此方法。令牌资产的属性在模型文件中介绍。sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回:
- 成功时,所创建的令牌资产的 JSON 表示形式。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "aa7a4f4cc214e1a041a5a6fb7ca7530f08256559e538c9f9582e6fd12c9e65c8", "payload": { "assetType": "otoken", "events": false, "token_id": "t1", "token_name": "Stablecoin", "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": 1000, "mint_approval_required": true }, "burnable": { "burn_approval_required": true }, "divisible": { "decimal": 2 }, "currency_name": "currency_name value", "token_to_currency_ratio": 999 }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 267 } } -
isInRole - 原始方法名称:
isInRole - 此方法返回布尔值以指示用户和令牌是否具有指定的角色。此方法只能由
Token Admin或帐户的所有者调用。 - 有效负载:
{{api-gateway-endpoint2}}/isInRole?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}&role=role value (for example minter / burner / notary) - 参数:
tokenId: string- 令牌的 ID。orgId: string- 用户的成员资格服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。role: string- 角色名称。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "result": "true" }, "encode": "JSON" } } -
isTokenAdmin - 原始方法名称:
isTokenAdmin - 如果指定的帐户为
Token Admin,则此方法返回布尔值true,否则返回false。THis 方法只能由Token Admin调用。 - 有效负载:
{{api-gateway-endpoint2}}/isTokenAdmin?orgId={{bc-org-id}}&userId={{bc-user-id}} - 参数:
orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "result": false }, "encode": "JSON" } } -
rejectBurn - 原始方法名称:
rejectBurn - 公证人可以调用此方法来拒绝刻录请求。
- 有效负载:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "sameOrgEndorser": true } - 参数:
tokenId: string- 要拒绝燃烧的令牌的 ID。operationId: string- 表示刻录请求的唯一操作 ID。sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "474a08183986c84fe321aa925670539db3b1bc90b02fa65956ad8c771fff5bbe", "payload": { "msg": "Successfully rejected burn request with Operation Id 'burn1234' to burn 10 tokens of token id USD" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 210 } } -
rejectMint - 原始方法名称:
rejectMint - 公证人可以调用此方法来拒绝铸造请求。
- 有效负载:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "sameOrgEndorser": true } - 参数:
tokenId: string- 要拒绝铸造的令牌的 ID。operationId: string- 表示 mint 请求的唯一操作 ID。sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "64c5a4830949eae1424600f3d4a438c6f603a7c3ea31a68e374b899803999e22", "payload": { "msg": "Successfully rejected mint request with Operation Id 'op1234' to mint 10 tokens of token id USD" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 205 } } -
releaseHoldTokens - 原始方法名称:
releaseHoldTokens - 此 POST 方法释放对令牌的暂挂。传输未完成,所有保留的令牌将再次提供给原始所有者。此方法可以由具有
notary角色的AccountOwnerID 在指定时间限制内调用,也可以由付款人、收款人或公证人在指定时间限制之后调用。 - 有效负载:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "endorsers": {{endorsers}} } - 参数:
tokenId: string- 令牌的 ID。operationId: string- 用于标识暂挂操作的唯一 ID。通常,此 ID 由客户端应用程序传递。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "f04ba8895d52bc636d843f88476002bc99d01480c36be87c8fa259cd47a29380", "payload": { "msg": "Successfully released '10' tokens from Operation Id '8e3144' to Account Id: oaccount~51e676d7182a02ea7418ef58a6d54ecfe3858ef40b4ffb3d859b320da3921594 (Org-Id: CB, User-Id: issuer_user_cb)." }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 214 } } -
removeOrgAdmin - 原始方法名称:
removeOrgAdmin - 此 POST 方法将用户删除为链代码的
Org Admin。此方法只能由指定组织的Token Admin或Org Admin调用。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true } - 参数:
orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回值示例:
{ "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 } } -
removeOrgAuditor - 原始方法名称:
removeOrgAuditor - 此 POST 方法将用户删除为链代码的
Org Auditor。此方法只能由指定组织的Token Admin或Org Admin调用。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true } - 参数:
orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回值示例:
{ "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 - 此方法从指定的用户和令牌中删除 af 角色。此方法只能由链代码的
Token Admin或指定组织的Org Admin调用。 - 有效负载:
{ "tokenId": "{{bc-token-id}}", "role": "role value (for example minter / burner / notary)", "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}} } - 参数:
tokenId: string- 令牌的 ID。role: string- 要从指定用户中删除的角色的名称。mintable和burnable行为对应于规范文件的minter_role_name和burner_role_name属性。同样,notary角色对应于规范文件的notary_role_name属性。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回:
- 成功后,将显示包含客户详细信息的消息。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "274f0d0a2c4c3929817fb85b2e857519695c3c238ccf9903b084b87e9be7ee12", "payload": { "msg": "Successfully removed role 'notary' from Account Id: oaccount~2eb5f8a9bc561f8f41a4ea3be9511958cc6684ef14f2337ca396efc301b627d8 (Org-Id: CB, User-Id: manager_user_cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 200 } } -
removeTokenAdmin - 原始方法名称:
removeTokenAdmin - 此 POST 方法将用户删除为链代码的
Token Admin。此方法只能由链代码的Token Admin调用。管理员无法自行删除。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true } - 参数:
orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回值示例:
{ "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 } } -
removeTokenAuditor - 原始方法名称:
removeTokenAuditor - 此 POST 方法将用户删除为链代码的
Token Auditor。此方法只能由链代码的Token Admin调用。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true } - 参数:
orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回值示例:
{ "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 } } -
requestBurn - 原始方法名称:
requestBurn - 刻录器可以调用此方法,向公证人发送请求以销毁指定数量的令牌。
- 有效负载:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "notaryOrgId": "notary_org_id value", "notaryUserId": "notary_user_id value", "quantity": 1, "timeToExpiration": "time_to_expiration value", "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}", "sameOrgEndorser": true } - 参数:
tokenId: string- 要燃烧的令牌的 ID。operationId: string- 表示刻录请求的唯一操作 ID。notaryOrgId: string- 将处理请求的刻录公证人的成员服务提供商 (membership service provider,MSP) ID。notaryUserId: string- 将处理请求的刻录公证人的用户名或电子邮件 ID。quantity: number–要燃烧的令牌数量。timeToExpiration- 燃烧请求过期且不再有效的时间。infoDetails: JSON- 指定请求类别 (category) 和说明 (description) 的对象,如以下示例中所示。{ "category" : "category input", "description" : "description input" }sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "0adb57ca9776c8760468c40465e0f0d37472f0b4b32fd02561ef28b3f7b28cf1", "payload": { "msg": "AccountId oaccount~0d7b3f73aea28065017ce8b79c0bb19256dc0cb475a0b2a85192bd110f69535c (Org-Id: CB , User-Id: retirer_user_cb) has successfully submitted request to burn 10 tokens" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 206 } } -
requestMint - 原始方法名称:
requestMint - 矿工可以调用此方法,向矿工公证人发送请求以创建指定数量的令牌。
- 有效负载:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "notaryOrgId": "notary_org_id value", "notaryUserId": "notary_user_id value", "quantity": 1, "timeToExpiration": "time_to_expiration value", "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}", "sameOrgEndorser": true } - 参数:
tokenId: string- 要铸造的令牌的 ID。operationId: string- 表示 mint 请求的唯一操作 ID。notaryOrgId: string- 将处理请求的公证人的成员服务提供商 (MSP) ID。notaryUserId: string–将处理请求的公证人的用户名或电子邮件 ID。quantity: number–要铸造的令牌数量。timeToExpiration- 铸造请求过期且不再有效的时间。infoDetails: JSON- 指定请求类别 (category) 和说明 (description) 的对象,如以下示例中所示。{ "category" : "category input", "description" : "description input" }sameOrgEndorser: boolean–一个布尔值,指示事务处理背书是否必须来自与请求者相同的组织。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "06b35071415d74aa1a7c18449149c937d886cae76a832c44cf8d98e84586e76e", "payload": { "msg": "AccountId oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0 (Org-Id: CB , User-Id: creator_user_cb) has successfully submitted request to mint 10 tokens" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 202 } } -
setMaxDailyAmount - 原始方法名称:
setMaxDailyAmount - 此 POST 方法用于在账户详细信息中为指定金额设置
maxDailyAmount参数。此方法只能由链代码的Token Admin或指定组织的Org Admin调用。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "tokenId": "{{bc-token-id}}", "maxDailyAmount": 1, "endorsers": {{endorsers}} } - 参数:
orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。tokenId: string- 令牌的 ID。maxDailyAmount: number- 指定帐户的最大日金额值,该值定义可以每天处理的最大金额。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "28682e0564e4721b6c1a8ec106f8c5c98319e9439959dbb9f83d8e6f111d9975", "payload": { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "USD", "token_name": "Stablecoin", "balance": 0, "onhold_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 1000, "daily_transactions": 0, "current_date": "2024-11-20T00:00:00.000Z" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 222 } } -
setMaxDailyTransactionCount - 原始方法名称:
setMaxDailyTransactionCount - 此 POST 方法用于在账户详细信息中为指定金额设置
maxDailyTransactions参数。此方法只能由链代码的Token Admin或指定组织的Org Admin调用。 - 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "tokenId": "{{bc-token-id}}", "maxDailyTransactions": 1, "endorsers": {{endorsers}} } - 参数:
orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。tokenId: string- 令牌的 ID。maxDailyTransactions: number- 指定账户的最大每日金额值,用于定义每天允许的最大事务处理数。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "8b6fb01de697562ee098110054f05d4a314933bd11ef471991cb43e25b68bad9", "payload": { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "USD", "token_name": "Stablecoin", "balance": 0, "onhold_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 1000, "daily_transactions": 0, "current_date": "2024-11-20T00:00:00.000Z" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 223 } } -
suspendStablecoinAccount - 原始方法名称:
suspendAccount - 此方法将暂停可变令牌帐户。如果未在分类帐中找到
accountStatus值,则会引发错误。此方法只能由链代码的Token Admin或指定组织的Org Admin调用。 - 有效负载:
{ "tokenId": "{{bc-token-id}}", "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}} } - 参数:
tokenId: string- 令牌的 ID。orgId: string- 当前组织中用户的成员服务提供商 (membership service provider,MSP) ID。userId: string- 用户的用户名或电子邮件 ID。endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "e21d91d98091df77f90105d84074c0b802b01fc97a6b1304247774397fed1294", "payload": { "assetType": "oaccountStatus", "status_id": "oaccountStatus~d5814d96d8517ac31727d60aace0519c58a425892ab0d378fcfb0a35771f65ae", "account_id": "oaccount~802bf8da5579c6103b2dddaa6c4385df8e722d639a18029e0e93d7a5d6f826d6", "status": "suspended" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 195 } } -
transferStablecoinTokens - 原始方法名称:
transferTokens - 此方法将令牌从调用方转移到指定的帐户。该方法的调用方必须具有帐户。数量必须在规范文件中
divisible行为的decimal参数指定的小数值内。 - 有效负载:
{ "tokenId": "{{bc-token-id}}", "toOrgId": "to_org_id value", "toUserId": "to_user_id value", "quantity": 1, "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}", "endorsers": {{endorsers}} } - 参数:
tokenId: string- 令牌的 ID。toOrgId: string- 当前组织中接收方(收款人)的成员服务提供商 (MSP) ID。toUserId: string- 接收者的用户名或电子邮件 ID。quantity: number- 要传输的标记数。infoDetails: JSON- 指定请求类别 (category) 和说明 (description) 的对象,如以下示例中所示。{ "category" : "category input", "description" : "description input" }endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "d613b2494b965811b2fa2106152b7085f2d6d7d43e949b10b8668722d3636fe7", "payload": { "msg": "Successfully transferred 10 tokens from account id: oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0 (Org-Id: CB, User-Id: creator_user_cb) to account id: oaccount~51e676d7182a02ea7418ef58a6d54ecfe3858ef40b4ffb3d859b320da3921594 (Org-Id: CB, User-Id: issuer_user_cb). Only 999 number of transactions and 1990 amount transfer left for today: 12/11/2024" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 224 } } -
updateAccountPolicyCheck - 原始方法名称:
updateAccountPolicyCheck - 此方法更新指定帐户的策略。此方法只能由指定组织的
Token Admin或Org Admin调用。 - 有效负载:
{ "asset": "{\"accountPolicyId\":\"accountPolicyId value\",\"orgId\":\"{{bc-org-id}}\",\"userId\":\"{{bc-user-id}}\",\"kycCompliance\":\"kycCompliance value\",\"amlCompliance\":\"amlCompliance value\",\"riskScore\":999,\"restrictionFlag\":\"restrictionFlag value\"}", "endorsers": {{endorsers}} } - 参数:
asset: AccountPolicyCheck object- 定义帐户策略参数的对象,包括以下字段:accountPolicyId- 唯一的帐户策略 ID。orgId- 要为其创建策略的用户的成员资格服务提供商 (membership service provider,MSP) ID。userId- 要为其创建策略的用户的用户名或电子邮件 ID。kycCompliance–一个布尔值,指示帐户是否满足 KYC(了解您的客户)要求。amlCompliance–一个布尔值,指示帐户是否满足 AML(反洗钱)要求。riskScore- 与账户关联的风险评分,用于合规性评估。restrictionFlag- 一个布尔值,指示帐户是否受到限制的转移。如果设置为true,则仅允许在最低审批策略阈值范围内的传输。
endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "02875ca9c6a7408da3f81156214228b91b09c4bb2b8026d7a5733b53598c6635", "payload": { "assetType": "AccountPolicyCheck", "accountPolicyId": "APID~CentralBank~cb__creator_demo", "orgId": "CentralBank", "userId": "cb__creator_demo", "kycCompliance": "true", "amlCompliance": "true", "riskScore": 1000, "restrictionFlag": "true" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 272 } } -
updateApprovalPolicyCheck - 原始方法名称:
updateApprovalPolicyCheck - 此方法将更新审批策略。此方法只能由
Token Admin调用。 - 有效负载:
{ "asset": "{\"approvalPolicyId\":\"approvalPolicyId value\",\"transactionLowerLimit\":\"transactionLowerLimit value\",\"transactionUpperLimit\":\"transactionUpperLimit value\",\"numberOfApprovalsRequired\":999,\"approverDetails\":[{\"approverOrgId\":\"approverOrgId value\",\"approverUserId\":\"approverUserId value\",\"approvalSequence\":999}]}", "endorsers": {{endorsers}} } - 参数:
asset: ApprovalPolicyCheck class- 定义事务处理的审批规则的类,其中包括以下字段:approvalPolicyId- 唯一的审批策略 ID。transactionLowerLimit—审批策略适用的最小交易金额。transactionUpperLimit—审批策略应用的最大事务处理金额。numberOfApprovalsRequired—事务处理完成之前所需的审批总数。approverDetails- 审批者列表及其分配的审批顺序,用于定义审批的强制顺序。
endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "ed1e1950fe02dbab74fa3aa7630b8dc6096e30aae5c81bab0dd22d5232c44fc9", "payload": { "status": "active", "assetType": "ApprovalPolicyCheck", "approvalPolicyId": "GPID~500~1000", "transactionLowerLimit": "500", "transactionUpperLimit": "1000", "numberOfApprovalsRequired": 1, "approverDetails": [ { "approverOrgId": "CentralBank", "approverUserId": "manager", "approvalSequence": 1 } ] }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 285 } } -
updateStablecoinToken - 原始方法名称:
updateStablecoinToken - 此方法更新稳定币令牌。此方法只能由
Token Admin调用。 - 有效负载:
{ "tokenAsset": "{\"token_id\":\"{{bc-token-id}}\",\"token_desc\":\"token_desc value\",\"currencyName\":\"currencyName value\",\"conversionRate\":999}", "endorsers": {{endorsers}} } - 参数:
asset <Token Class>- 标记资产作为参数传递到此方法。标记资产的属性可能会有所不同,并在标记规范文件中进行说明。请勿在规范文件中包括标记为只读的参数。如果使用的是 Visual Studio Code 与 CLI 或 Postman 集合,则可以采用不同的格式指定
asset参数。Visual Studio Code:使用 GUI 传递与令牌类字段对应的单个参数。
CLI / Postman:传递包含令牌规范字段的序列化 JSON 字符串,如以下示例所示。
"{\"token_id\":\"USD\",\"token_desc\":\"token_desc value\",\"Currency_Name\":\"Currency_Name value\"}"endorsers: string[]- 必须背书事务处理的对等节点(例如peer1、peer2)的数组。
- 返回值示例:
{ "returnCode": "Success", "error": "", "result": { "txid": "aa7a4f4cc214e1a041a5a6fb7ca7530f08256559e538c9f9582e6fd12c9e65c8", "payload": { "assetType": "otoken", "events": false, "token_id": "t1", "token_name": "Stablecoin", "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": 1000, "mint_approval_required": true }, "burnable": { "burn_approval_required": true }, "divisible": { "decimal": 2 }, "currency_name": "currency_name value", "token_to_currency_ratio": 999 }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 267 } } -
createStablecoinAccount - 原始方法名称:
createStablecoinAccount - 此定制包装 API 将链代码 API 和 Oracle Blockchain Platform 控制台 API 组合到一个端点中。此方法按顺序完成以下步骤。
- 在实例的 REST 代理中为用户创建注册 ID。如果用户 ID 已存在注册,则不会再次创建注册。注册 ID 与用户 ID 相同。注册 ID 只能包含字母数字字符,连号 (-) 和下划线 (_)。如果用户 ID 包含任何其他特殊字符,则这些字符将替换为下划线 (_)。
- 在分类账中创建账户。
- 将新帐户与指定的令牌关联。
- 将指定的角色分配给用户。
- 有效负载:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "tokenId": "{{bc-token-id}}", "role": "role value (for example minter / burner / notary / tokenAdmin / tokenAuditor / orgAdmin / orgAuditor)", "dailyLimits": "{\"max_daily_amount\":1000, \"max_daily_transactions\":100}" } - 参数:
orgId- 要为其创建帐户的用户的成员资格服务提供商 (membership service provider,MSP) ID。ID 必须以字母数字字符开头,并且可以包含字母、数字和特殊字符,例如下划线 (_)、句点 (.)、点号 (@) 和连字符 (-)。userId- 用户的用户名或电子邮件 ID。ID 必须以字母数字字符开头,并且可以包含字母、数字和特殊字符,例如下划线 (_)、句点 (.)、点号 (@) 和连字符 (-)。tokenId: string- 标记 ID,该 ID 必须以字母数字字符开头,可以包含字母、数字以及特殊字符下划线 (_) 和连字符 (-)。它的长度不能超过 16 个字符。role: string- 要添加到指定用户的角色的名称,该名称必须为以下值之一:minter、burner、notary、tokenAdmin、tokenAuditor、orgAdmin或orgAuditor。dailyLimits: JSON object- 以下类型的 JSON 对象。
在示例中,{ "max_daily_amount": 100000 "max_daily_transactions": 10000 }max_daily_amount值是每天可以处理的最大标记量,max_daily_transactions值是每天可以完成的最大事务处理数。
- 返回:
- 成功时,已创建的账户的 JSON 对象。
- 返回值示例:
"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, "max_daily_amount": 1000, "daily_amount": 0, "max_daily_transactions": 100, "daily_transactions": 0, "current_date": "2024-10-06T00:00:00.000Z" } } -
createIDCSUser - 原始方法名称:
createIDCSUser - 此 POST 方法在
terraform.tfvars文件中的 URL 指定的租户中创建 Identity Cloud Service 用户,并将该用户分配给指定的用户组。 - 有效负载:
{ "userName": "userName value", "firstName": "firstName value", "lastName": "lastName value", "email": "email value", "groupName": "groupName value" } - 参数:
userName: string- 用户的 ID。firstName: string–用户的名字。lastName: string–用户的姓。email: string–用户的电子邮件地址。groupName: string- 要分配给用户的 Identity Cloud Service 组的名称。
- 返回值示例:
{ "status": "Success", "msg": "User user1 is created and assigned to the group BOND_ADMIN" }