- Oracle Blockchain Platformデジタル・アセット・エディション
- 卸売中央銀行デジタル通貨アプリケーション
- 卸売CBDCラッパーAPIパッケージ
卸売CBDCラッパーAPIパッケージ
Oracle Blockchain Platform Digital Assets Editionには、REST APIを拡張して卸売CBDCに固有の操作をサポートするラッパーAPIパッケージが含まれています。
ラッパーAPIパッケージは、Oracle Cloud Infrastructure (OCI)上のリソース・マネージャ・スタックを使用して作成されたAPIゲートウェイ・サービスとOCIファンクションを使用して、卸売CBDCアプリケーション専用に設計されたAPIルートをデプロイします。卸売CBDCラッパーAPIパッケージは、Oracle Blockchain Platformコンソールからダウンロードでき、次のコンポーネントが含まれています。
WholesaleCBDCWrapperAPI.zip
。デプロイメントに必要なTerraformスクリプトを含むラッパーAPIパッケージを含むアーカイブ・ファイル。このファイルをOCI上のリソース・マネージャ・スタックにデプロイして、ラッパーAPIに必要なOracleリソースを作成します。WholesaleCBDC_WrapperAPI.postman_collection.json
: デプロイされたラッパーAPIをテストできるPostmanコレクション。このコレクションには、ラッパーAPIパッケージで定義されたAPIに対応するエンドポイントおよびペイロードを含む事前構成されたリクエストが含まれます。
ラッパーAPI
-
activateCBDCAccount
- 元のメソッド名:
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
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(MSP)ID。userId: string
– ユーザーのユーザー名または電子メールID。endorsers: string[]
– トランザクションを承認する必要があるピアの配列(peer1
、peer2
など)。
- 戻り値:
- 成功すると、指定したトークン・アカウントのアカウント・ステータス・オブジェクトのJSON表現。
- 戻り値の例:
{ "returnCode": "Success", "error": "", "result": { "txid": "db0738d4a44f6d9c80b24fce7c518c07023f7be19edaa69b272eaf7886b4b925", "payload": { "assetType": "oaccountStatus", "status_id": "oaccountStatus~d5814d96d8517ac31727d60aace0519c58a425892ab0d378fcfb0a35771f65ae", "account_id": "oaccount~802bf8da5579c6103b2dddaa6c4385df8e722d639a18029e0e93d7a5d6f826d6", "status": "active" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 194 } }
- パラメータ:
orgId: string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(MSP)ID。userId: string
– ユーザーのユーザー名または電子メールID。sameOrgEndorser: boolean
– トランザクション・エンドースメントがリクエスタと同じ組織からのものである必要があるかどうかを示すブール値。
-
addCBAdmin
- 元のメソッド名:
addTokenAdmin
- このPOSTメソッドは、ユーザーをトークン・チェーンコードの
Token Admin
として追加します。このメソッドは、トークン・チェーンコードのToken Admin
によってのみコールできます。最初の呼出しは、チェーンコードをインスタンス化する管理者からのものです。 - ペイロード:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- パラメータ:
orgId: string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(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 } }
-
addCBAuditor
- 元のメソッド名:
addTokenAuditor
- このPOSTメソッドは、トークン・チェーンコードにトークン監査者を追加します。このメソッドをコールできるのは、チェーンコードの
Token Admin
のみです。 - ペイロード:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- パラメータ:
orgId: string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(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 } }
-
addFIAdmin
- 元のメソッド名:
addOrgAdmin
- このメソッドは、組織管理者をトークン・チェーンコードに追加します。このメソッドは、指定した組織の
Token Admin
またはOrg Admin
によってのみコールできます。 - ペイロード:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- パラメータ:
orgId: string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(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 } }
-
addFIAuditor
- 元のメソッド名:
addOrgAuditor
- このメソッドは、組織監査者をトークンチェーンコードに追加します。このメソッドは、指定した組織の
Token Admin
またはOrg Admin
によってのみコールできます。 - ペイロード:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- パラメータ:
orgId: string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(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
– 指定したユーザーを追加するロールの名前。orgId: string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(MSP)ID。userId: string
– ユーザーのユーザー名または電子メールID。sameOrgEndorser: boolean
– トランザクション・エンドースメントがリクエスタと同じ組織からのものである必要があるかどうかを示すブール値。
- 戻り値の例:
{ "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 } }
-
approveCBDCCreation
- 元のメソッド名:
approveMint
- Notariesは、このPOSTメソッドをコールして、ミントのリクエストを承認できます。
- ペイロード:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "sameOrgEndorser": true }
- パラメータ:
tokenId: string
– トークンのID。operationId: string
– 承認するミント・リクエストの一意の操作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 } }
-
approveCBDCRetirement
- 元のメソッド名:
approveBurn
- Notariesは、このPOSTメソッドをコールして、書込みリクエストを承認できます。
- ペイロード:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "sameOrgEndorser": true }
- パラメータ:
tokenId: string
– トークンのID。operationId: string
– 承認するミント・リクエストの一意の操作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 } }
-
approveHoldCBDCTokens
- 元のメソッド名:
executeHoldTokens
- 公証人はこのメソッドをコールしてトークンの保留を承認します。これにより、このビジネス・シナリオで支払者から受取人へのトークンの転送がトリガーされます。トークン所有者によって以前に保留されたトークンの数量が、受信者に転送されるようになりました。
quantity
値が実際の保留値より小さい場合、残りの金額はトークンの所有者が再度使用できます。roles
動作がトークン・モデルのbehaviors
セクションで指定され、notary_role_name
値が設定されている場合、コール元アカウントにはノータリー・ロールが必要です。それ以外の場合、アカウントを持つすべての発信者が公証人として機能できます。 - ペイロード:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "quantity": 1, "endorsers": {{endorsers}} }
- パラメータ:
tokenId: string
– トークンのID。operationId: string
– 承認するミント・リクエストの一意の操作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 } }
-
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": "cbdc", "balance": 0, "onhold_balance": 0, "application_groups": [ "CBDC_ADMINS" ], "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 } }
-
createAccount
- 元のメソッド名:
createAccount
- このメソッドは、指定されたユーザーおよびトークンのアカウントを作成します。任意の時点でトークンを持つすべてのユーザーに対してアカウントを作成する必要があります。勘定科目は、残高、保留残高およびトランザクション履歴を追跡します。アカウントIDは、
oaccount~<token asset name>~
という接頭辞が付いた英数字のセットで、インスタンス所有者またはインスタンスにログインしているユーザー(現在のネットワーク組織内のユーザーのメンバーシップ・サービス・プロバイダID (orgId
)のユーザー名または電子メールID (userId
)のハッシュが続きます。このメソッドは、チェーンコードの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}} }
- パラメータ:
orgId
– アカウントを作成するユーザーのメンバーシップ・サービス・プロバイダ(MSP)ID。IDは英数字で始める必要があり、文字、数字、およびアンダースコア(_)、ピリオド(.)、アットマーク(@)、ハイフン(-)などの特殊文字を含めることができます。userId
– ユーザーのユーザー名または電子メールID。IDは英数字で始める必要があり、文字、数字、およびアンダースコア(_)、ピリオド(.)、アットマーク(@)、ハイフン(-)などの特殊文字を含めることができます。tokenType: TokenType
– トークンのタイプ。fungible
である必要があります。applicationGroups: string[]
– ユーザーIDが属するアプリケーション・グループのリストで、CBDCアプリケーションでユーザーの関連付けを定義します。dailyLimits: JSON object
– 次の型のJSONオブジェクト。
この例では、{ "max_daily_amount": 100000 "max_daily_transactions": 10000 }
max_daily_amount
値は毎日処理できるトークンの最大量であり、max_daily_transactions
値は毎日完了できるトランザクションの最大数です。endorsers: string[]
– トランザクションを承認する必要があるピアの配列(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, "application_groups": [ "CBDC_ADMINS" ], "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 } }
-
getAllActiveCBDCAccounts
- 元のメソッド名:
getAllActiveAccounts
- このGETメソッドは、指定されたトークンIDに関連付けられているすべてのアクティブなアカウントを返します。
- Query:
/getAllActiveCBDCAccounts?tokenId={{bc-token-id}}
- パラメータ:
tokenId: string
– トークンのID。
- 戻り値:
- 成功時に、ユーザーの詳細を含むメッセージ。次の例に示すように、出力はユーザーの役割によって異なります。
- 戻り値の例(トークン管理、トークン監査者):
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "key": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe", "non_account_role_name": [ "token_admin" ], "role_name": null, "valueJson": { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "USD", "token_name": "cbdc", "balance": 0, "onhold_balance": 0, "application_groups": [ "CBDC_ADMINS" ], "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 1000, "daily_transactions": 0, "current_date": "2024-11-20T00:00:00.000Z" } } ], "encode": "JSON" } }
- 戻り値の例(組織管理、組織監査者):
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "key": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe", "non_account_role_name": [ "token_admin" ], "role_name": null, "valueJson": { "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe", "org_id": "CB", "user_id": "admin_user_cb", "token_id": "USD", "max_daily_amount": 10000, "max_daily_transactions": 1000 } } ], "encode": "JSON" } }
- 戻り値の例(他のすべてのユーザー):
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "key": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe", "non_account_role_name": [ "token_admin" ], "role_name": null, "valueJson": { "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe", "org_id": "CB", "user_id": "admin_user_cb", "token_id": "USD", "max_daily_amount": 10000, "max_daily_transactions": 1000 } } ], "encode": "JSON" } }
-
getAllSuspendedCBDCAccounts
- 元のメソッド名:
getAllSuspendedAccounts
- このGETメソッドは、指定されたトークンIDに関連付けられているすべての中断アカウントを返します。
- Query:
/getAllSuspendedCBDCAccounts?tokenId={{bc-token-id}}
- パラメータ:
tokenId: string
– トークンのID。
- 戻り値:
- 成功時に、ユーザーの詳細を含むメッセージ。次の例に示すように、出力はユーザーの役割によって異なります。
- 戻り値の例(トークン管理、トークン監査者):
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "key": "oaccount~802bf8da5579c6103b2dddaa6c4385df8e722d639a18029e0e93d7a5d6f826d6", "non_account_role_name": null, "role_name": null, "valueJson": { "assetType": "oaccount", "bapAccountVersion": 1, "account_id": "oaccount~802bf8da5579c6103b2dddaa6c4385df8e722d639a18029e0e93d7a5d6f826d6", "user_id": "user1_fi1", "org_id": "FI1", "token_type": "fungible", "token_id": "USD", "token_name": "cbdc", "balance": 5, "onhold_balance": 0, "application_groups": [ "FI_CBDC_USERS" ], "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 1000, "daily_transactions": 0, "current_date": "2024-11-20T00:00:00.000Z" } } ], "encode": "JSON" } }
- 戻り値の例(組織管理、組織監査者):
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "key": "oaccount~802bf8da5579c6103b2dddaa6c4385df8e722d639a18029e0e93d7a5d6f826d6", "non_account_role_name": null, "role_name": null, "valueJson": { "account_id": "oaccount~802bf8da5579c6103b2dddaa6c4385df8e722d639a18029e0e93d7a5d6f826d6", "org_id": "FI1", "user_id": "user1_fi1", "token_id": "USD", "max_daily_amount": 10000, "max_daily_transactions": 1000 } } ], "encode": "JSON" } }
- 戻り値の例(他のすべてのユーザー):
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "key": "oaccount~802bf8da5579c6103b2dddaa6c4385df8e722d639a18029e0e93d7a5d6f826d6", "non_account_role_name": null, "role_name": null, "valueJson": { "account_id": "oaccount~802bf8da5579c6103b2dddaa6c4385df8e722d639a18029e0e93d7a5d6f826d6", "org_id": "FI1", "user_id": "user1_fi1", "token_id": "USD" } } ], "encode": "JSON" } }
-
getApproverActionHistory
- 元のメソッド名:
getActionHistory
- このGETメソッドは、組織の詳細、関連するアカウント(送信者、受信者および公証人)のユーザーIDなど、ミント、バーンおよび転送(発行)操作のコール元による承認または拒否の履歴を取得します。このメソッドは、
Token Admin
、Token Auditor
、Org Admin
、Org Auditor
または公証人によってのみコールできます。 - Query:
/getApproverActionHistory?tokenId={{bc-token-id}}
- パラメータ:
tokenId: string
– トークンのID。
- 戻り値の例:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "from_account_id": "oaccount~0d7b3f73aea28065017ce8b79c0bb19256dc0cb475a0b2a85192bd110f69535c", "from_org_id": "CB", "from_user_id": "retirer_user_cb", "holding_id": "ohold~cbdc~USD~eaf6", "holding_status": "REJECT_BURN", "last_updated_time": "2024-11-26T21:43:22.000Z", "notary_account_id": null, "notary_org_id": null, "notary_user_id": null, "operation_id": null, "quantity": 3, "timetoexpiration": null, "to_account_id": "", "to_org_id": null, "to_user_id": null, "token_id": "USD", "token_name": null }, { "from_account_id": "oaccount~0d7b3f73aea28065017ce8b79c0bb19256dc0cb475a0b2a85192bd110f69535c", "from_org_id": "CB", "from_user_id": "retirer_user_cb", "holding_id": "ohold~cbdc~USD~0031", "holding_status": "REJECT_BURN", "last_updated_time": "2024-11-26T21:43:15.000Z", "notary_account_id": null, "notary_org_id": null, "notary_user_id": null, "operation_id": null, "quantity": 2, "timetoexpiration": null, "to_account_id": "", "to_org_id": null, "to_user_id": null, "token_id": "USD", "token_name": null } ], "encode": "JSON" } }
-
getCBDCAccount
- 元のメソッド名:
getAccount
- このGETメソッドは、指定されたユーザーおよびトークンのアカウント詳細を返します。このメソッドは、チェーンコードの
Token Admin
またはToken Auditor
、指定された組織のOrg Admin
またはOrg Auditor
、またはアカウントのAccountOwner
によってのみコールできます。 - Query:
/getCBDCAccount?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
- パラメータ:
tokenId: string
– トークンのID。orgId: string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(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": "cbdc", "balance": 0, "onhold_balance": 0, "application_groups": [ "CBDC_ADMINS" ], "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 1000, "daily_transactions": 0, "current_date": "2024-11-20T00:00:00.000Z" }, "encode": "JSON" } }
-
getCBDCAccountBalance
- 元のメソッド名:
getAccountBalance
- このGETメソッドは、指定されたアカウントおよびトークンの現在の残高を返します。このメソッドは、チェーンコードの
Token Admin
またはToken Auditor
、指定された組織のOrg Admin
またはOrg Auditor
、またはアカウントのAccountOwner
によってのみコールできます。 /getCBDCAccountBalance?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
- パラメータ:
tokenId: string
– トークンのID。orgId: string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(MSP)ID。userId: string
– ユーザーのユーザー名または電子メールID。
- 戻り値の例:
{ "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}}
- パラメータ:
orgId string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(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, "application_groups": [ "CBDC_ADMINS" ], "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": "cbdc", "balance": 0, "onhold_balance": 0, "application_groups": [ "CBDC_ADMINS" ], "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, "application_groups": [ "CBDC_ADMINS" ], "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 100, "daily_transactions": 0, "current_date": "2024-12-09T00:00:00.000Z" } ], "encode": "JSON" } }
-
getCBDCAccountTransactionHistory
- 元のメソッド名:
getAccountTransactionHistory
- このメソッドは、指定されたユーザーおよびトークンのアカウント・トランザクション履歴詳細の配列を返します。このメソッドは、チェーンコードの
Token Admin
またはToken Auditor
、指定された組織のOrg Admin
またはOrg Auditor
、またはアカウントのAccountOwner
によってのみコールできます。 /getCBDCAccountTransactionHistory?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
- パラメータ:
tokenId: string
– トークンのID。orgId: string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(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" } }
-
getAccountTransactionHistoryWithFilters
- 元のメソッド名:
getAccountTransactionHistoryWithFiltersFromRichHistDB
- このメソッドは、リッチ履歴データベースから勘定科目トランザクション履歴詳細を返します。このメソッドは、チェーンコードの
Token Admin
またはToken Auditor
、指定された組織のOrg Admin
またはOrg Auditor
、またはアカウントのAccountOwner
によってのみコールできます。 /getCBDCAccountTransactionHistoryWithFilters?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
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(MSP)ID。userId: string
– ユーザーのユーザー名または電子メールID。customEndpoint
– トランザクション履歴をフェッチするリッチ履歴データベースのRESTfulサービス・エンドポイント。bearerToken
– リクエストが認可されていることを確認するためにRESTfulエンドポイントをコールするために使用するトークン。filters: JSON object
– オプションのパラメータ。空の場合は、すべてのレコードが返されます。pageSize
プロパティは、戻すレコード数を決定します。pageSize
が0の場合、デフォルトのページ・サイズは20です。bookmark
プロパティは、返されるレコードの開始索引を決定します。startTime
およびendTime
プロパティは、RFC-3339形式で指定する必要があります。
- 戻り値の例:
{ "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" } }
-
getCBDCRetiredQuantity
- 元のメソッド名:
getBurnQuantity
- このGETメソッドは、指定された組織の書込みトークンの合計量を返します。このメソッドは、
Token Admin
、Token Auditor
またはバーナー・ロールを持つユーザーによってのみコールできます。 /getCBDCRetiredQuantity?tokenId={{bc-token-id}}
- パラメータ:
tokenId: string
– トークンのID。
- 戻り値の例:
{ "returnCode": "Success", "error": "", "result": { "payload": { "burnt_quantity": 31 }, "encode": "JSON" } }
-
getNetCBDCTokens
- 元のメソッド名:
getNetTokens
- このGETメソッドは、指定されたトークンに対してシステムで使用可能なトークンの合計正味数を返します。ネット・トークンの合計は、トークンの書込み後に残っているトークンの量です。このメソッドは、チェーンコードの
Token Admin
またはToken Auditor
、あるいはOrg Admin
またはOrg Auditor
によってのみコールできます。 /getNetCBDCTokens?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" } }
-
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
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(MSP)ID。userId: string
– ユーザーのユーザー名または電子メールID。
- 戻り値の例:
{ "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}}
- パラメータ:
tokenId: string
– トークンのID。
- 戻り値の例:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "asset_type": "ONHOLD", "category": "category value", "from_account_id": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "from_org_id": "CB", "from_user_id": "creator_user_cb", "holding_id": "ohold~cbdc~USD~8e314", "notary_account_id": "oaccount~2eb5f8a9bc561f8f41a4ea3be9511958cc6684ef14f2337ca396efc301b627d8", "notary_org_id": "CB", "notary_user_id": "manager_user_cb", "operation_id": "8e314", "quantity": 10, "timetoexpiration": "0", "to_account_id": "oaccount~44b844deccc6c314e14b8b9b95b51db5c8de499dbdbd3def2a44ba54c899c142", "to_org_id": "FI1", "to_user_id": "officer_user1_fi1", "token_id": "USD", "token_name": "cbdc" }, { "asset_type": "ONHOLD", "category": "category value", "from_account_id": "oaccount~51e676d7182a02ea7418ef58a6d54ecfe3858ef40b4ffb3d859b320da3921594", "from_org_id": "CB", "from_user_id": "issuer_user_cb", "holding_id": "ohold~cbdc~USD~8e315", "notary_account_id": "oaccount~2eb5f8a9bc561f8f41a4ea3be9511958cc6684ef14f2337ca396efc301b627d8", "notary_org_id": "CB", "notary_user_id": "manager_user_cb", "operation_id": "8e315", "quantity": 10, "timetoexpiration": "0", "to_account_id": "oaccount~44b844deccc6c314e14b8b9b95b51db5c8de499dbdbd3def2a44ba54c899c142", "to_org_id": "FI1", "to_user_id": "officer_user1_fi1", "token_id": "USD", "token_name": "cbdc" } ], "encode": "JSON" } }
-
getPendingCBDCRequest
- 元のメソッド名:
getPendingRequest
- このメソッドは、コール元が承認者として割り当てられている、指定されたタイプのすべての保留リクエストを取得します。このメソッドは、チェーンコードの
Token Admin
またはToken Auditor
またはNotary
によってのみコールできます。 /getPendingCBDCRequest?tokenId={{bc-token-id}}&requestType=request_type value
- パラメータ:
tokenId: string
– トークンのID。requestType: string
– トランザクション・タイプ。たとえば、mint
またはburn
です。
- 戻り値の例:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "valueJson": { "assetType": "ohold", "holding_id": "ohold~cbdc~USD~op123", "operation_id": "op123", "token_id": "USD", "token_name": "cbdc", "operation_type": "mint", "status": "pending", "from_account_id": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "to_account_id": "", "notary_account_id": "oaccount~2eb5f8a9bc561f8f41a4ea3be9511958cc6684ef14f2337ca396efc301b627d8", "quantity": 10, "time_to_expiration": "0", "category": "category value", "description": "description value" } } ], "encode": "JSON" } }
-
getTotalBalanceByCallerOrgId
- 元のメソッド名:
getTotalBalanceByCallerOrgId
- このメソッドは、発信者の組織の合計残高を取得します。このメソッドは、
Token Admin
、Token Auditor
、Org Admin
、Org Auditor
または任意のアカウント所有者によってのみコールできます。 /getTotalCBDCBalanceByCallerOrgId
- パラメータ:
tokenId: string
– トークンのID。
- 戻り値の例:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "totalBalance": 704 } ], "encode": "JSON" } }
-
getTotalCreatedCBDCTokens
- 元のメソッド名:
getTotalMintedTokens
- このメソッドは、指定されたトークンのミント・トークンの合計数を返します。このメソッドは、
Token Admin
、Token Auditor
、Org Admin
またはOrg Auditor
によってのみコールできます。 - Query:
/getTotalCreatedCBDCTokens?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" } }
-
getTransactionWithBlockNumber
- 元のメソッド名:
getTransactionWithBlockNumber
- このGETメソッドは、指定されたトランザクションIDのトランザクションの詳細を返します。
- Query:
/getTransactionWithBlockNumber?tokenId={{bc-token-id}}&transactionId=transaction_id value
- パラメータ:
tokenId: string
– トークンのID。transactionId: string
– トランザクションのID。
- 戻り値の例:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "blockNo": 82, "key": "otransaction~24f391919a8837d654beaa7346148ea8b2b9704624aef482ce68078c485f5b1b", "metadata": null, "txnNo": 0, "value": null, "valueJson": { "assetType": "otransaction", "transaction_id": "otransaction~24f391919a8837d654beaa7346148ea8b2b9704624aef482ce68078c485f5b1b", "token_id": "USD", "from_account_id": "", "from_account_balance": 0, "from_account_onhold_balance": 0, "to_account_id": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "to_account_balance": 100, "to_account_onhold_balance": 0, "transaction_type": "REQUEST_MINT", "amount": 200, "timestamp": "2024-11-20T06:48:42.000Z", "number_of_sub_transactions": 0, "holding_id": "", "sub_transaction": "false", "description": "" } } ], "encode": "JSON" } }
-
getUserByCBDCAccountId
- 元のメソッド名:
getUserByAccountId
- このメソッドは、指定されたアカウントのユーザー詳細(
orgId
、userId
およびtokenId
)を返します。このメソッドは、チェーンコードのToken Admin
またはToken Auditor
、または指定された組織のOrg Admin
またはOrg Auditor
によってのみコールできます。 - Query:
/getUserByCBDCAccountId?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
によってのみコールできます。 - Query:
/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" } }
-
holdCBDCTokens
- 元のメソッド名:
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
– 現在の組織の公証人のメンバーシップ・サービス・プロバイダ(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 array
– トークン管理者のリストを指定する{user_id, org_id}
情報の配列。adminList
配列は必須パラメータです。
- 戻り値の例:
{ "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\":\"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": "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": 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 } }
-
rejectCBDCCreation
- 元のメソッド名:
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 } }
-
rejectCBDCRetirement
- 元のメソッド名:
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 } }
-
rejectHoldCBDCTokens
- 元のメソッド名:
releaseHoldTokens
- このPOSTメソッドは、トークンの保留を解除します。転送が完了しておらず、すべての保留トークンは元の所有者が再度使用できます。このメソッドは、指定された時間制限内の
notary
ロールを持つAccountOwner
ID、または指定された時間制限後の支払者、受取人または公証人によってコールできます。 - ペイロード:
{ "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 } }
-
removeCBAdmin
- 元のメソッド名:
removeTokenAdmin
- このPOSTメソッドは、チェーンコードの
Token Admin
としてユーザーを削除します。このメソッドをコールできるのは、チェーンコードのToken Admin
のみです。管理者は自分自身を削除できません。 - ペイロード:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- パラメータ:
orgId: string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(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 } }
-
removeCBAuditor
- 元のメソッド名:
removeTokenAuditor
- このPOSTメソッドは、チェーンコードの
Token Auditor
としてユーザーを削除します。このメソッドをコールできるのは、チェーンコードのToken Admin
のみです。 - ペイロード:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- パラメータ:
orgId: string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(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 } }
-
removeFIAdmin
- 元のメソッド名:
removeOrgAdmin
- このPOSTメソッドは、チェーンコードの
Org Admin
としてユーザーを削除します。このメソッドは、指定した組織のToken Admin
またはOrg Admin
によってのみコールできます。 - ペイロード:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- パラメータ:
orgId: string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(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 } }
-
removeFIAuditor
- 元のメソッド名:
removeOrgAuditor
- このPOSTメソッドは、チェーンコードの
Org Auditor
としてユーザーを削除します。このメソッドは、指定した組織のToken Admin
またはOrg Admin
によってのみコールできます。 - ペイロード:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- パラメータ:
orgId: string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(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
- このメソッドは、指定されたユーザーおよびトークンからロールを削除します。このメソッドは、チェーンコードの
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
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(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 } }
-
requestCBDCCreation
- 元のメソッド名:
requestMint
- このメソッドは、minterがリクエストを送信して、指定した量のトークンを作成するためにminter notaryに送信できます。
- ペイロード:
{ "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
–mintへのトークンのID。operationId: string
–mintリクエストを表す一意の操作ID。notaryOrgId: string
– リクエストを処理するミナー公証人のメンバーシップ・サービス・プロバイダ(MSP)ID。notaryUserId: string
– リクエストを処理する鉱夫のユーザー名または電子メールID。quantity: number
–mintへのトークンの量。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 } }
-
requestCBDCRetirement
- 元のメソッド名:
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
– リクエストを処理するバーナー公証人のメンバーシップ・サービス・プロバイダ(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 } }
-
setApplicationGroups
- 元のメソッド名:
setApplicationGroups
- このPOSTメソッドは、指定したアプリケーション・グループのアカウント詳細で
application_groups
パラメータを設定するために使用します。このメソッドは、チェーンコードのToken Admin
または指定された組織のOrg Admin
によってのみコールできます。 - ペイロード:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "tokenId": "{{bc-token-id}}", "applicationGroups": "[\"application_groups value\"]", "endorsers": {{endorsers}} }
- パラメータ:
orgId: string
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(MSP)ID。userId: string
– ユーザーのユーザー名または電子メールID。tokenId: string
– トークンのID。applicationGroups: string[]
– ユーザーIDが属するアプリケーション・グループのリストで、CBDCアプリケーションでユーザーの関連付けを定義します。endorsers: string[]
– トランザクションを承認する必要があるピアの配列(peer1
、peer2
など)。
- 戻り値:
- 成功すると、トークンの数量とアカウントIDを含む成功メッセージが表示されます。
- 戻り値の例:
{ "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, "application_groups": [ "CBDC_ADMINS" ], "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 } }
-
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
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(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": "cbdc", "balance": 0, "onhold_balance": 0, "application_groups": [ "CBDC_ADMINS" ], "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
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(MSP)ID。userId: string
– ユーザーのユーザー名または電子メールID。tokenId: string
– トークンのID。maxDailyTransactions: number
–1日当たりに許可されるトランザクションの最大数を定義する、指定されたアカウントの最大日次金額値。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": "cbdc", "balance": 0, "onhold_balance": 0, "application_groups": [ "CBDC_ADMINS" ], "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 } }
-
suspendCBDCAccount
- 元のメソッド名:
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
– 現在の組織内のユーザーのメンバーシップ・サービス・プロバイダ(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 } }
-
transferCBDCTokens
- 元のメソッド名:
transferTokens
- このメソッドは、トークンをコール元から指定されたアカウントに転送します。メソッドのコール元にはアカウントが必要です。数量は、仕様ファイルの
divisible
動作のdecimal
パラメータで指定された10進数値内にする必要があります。 - ペイロード:
{ "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 } }
ラッパーAPIパッケージには、チェーンコードAPIとOracle Blockchain PlatformコンソールAPIをアカウント作成用の単一のエンドポイントに結合するcreateCBDCAccount
APIも含まれています。
-
createCBDCAccount
- ペイロード:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "applicationGroups": "[\"applicationGroups value\"]", "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
– アカウントを作成するユーザーのメンバーシップ・サービス・プロバイダ(MSP)ID。IDは英数字で始める必要があり、文字、数字、およびアンダースコア(_)、ピリオド(.)、アットマーク(@)、ハイフン(-)などの特殊文字を含めることができます。userId
– ユーザーのユーザー名または電子メールID。IDは英数字で始める必要があり、文字、数字、およびアンダースコア(_)、ピリオド(.)、アットマーク(@)、ハイフン(-)などの特殊文字を含めることができます。applicationGroups
– アカウントが属するアプリケーション・グループ。たとえば、CBDC_ADMINS
です。tokenId
– アカウントに関連付けられたトークンのID。IDは英数字で始める必要があり、文字、数字、および特殊文字のアンダースコア(_)とハイフン(-)を含めることができます。長さは16文字を超えることはできません。role
– ロールは、minter
、burner
、notary
、tokenAdmin
、tokenAuditor
、orgAdmin
またはorgAuditor
のいずれかの値である必要があります。dailyLimits
– 日次トランザクション制限を定義する2つの数値フィールド:max_daily_amount
およびmax_daily_transactions
。
- 戻り値の例:
"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" } }
createCBDCAccount
APIは、次の操作を順番に完了します。
- Oracle Blockchain Platformでユーザーの登録IDを作成します。作成される登録IDはユーザーIDと同じですが、いくつかの制限があります。IDには、英数字、ハイフン(-)およびアンダースコア(_)のみを含めることができます。ユーザーIDにその他の特殊文字が含まれている場合は、アンダースコア(_)に置き換えられます。たとえば、ユーザーIDがadam.fripp@example.comの場合、作成される登録IDはadam_fripp_example_comです。指定したユーザーIDの登録がすでに存在する場合、別の登録は作成されません。
- ペイロードに指定された詳細を含む勘定科目を元帳に作成します。
- 新しいアカウントをペイロードで指定されたトークンに関連付けます。
- ペイロードで指定されたロールをユーザーに割り当てます。
一貫性を確保し、不完全なデータを回避するために、後続のステップのいずれかが失敗した場合は、最初のステップで作成した登録IDが削除されます。