Pacchetto API wrapper CBDC all'ingrosso riservato
Oracle Blockchain Platform Digital Assets Edition include un package API wrapper che estende l'API REST per supportare operazioni specifiche della versione in modalità riservata dello scenario CBDC all'ingrosso.
Il package API wrapper utilizza il servizio Gateway API e le funzioni OCI, create utilizzando uno stack Resource Manager su Oracle Cloud Infrastructure (OCI), per distribuire instradamenti API progettati specificamente per l'applicazione CBDC all'ingrosso. Il package API wrapper CBDC all'ingrosso può essere scaricato dalla console di Oracle Blockchain Platform e include i componenti riportati di seguito.
WholesaleCBDCWithConfidentialPaymentWrapperAPI.zip
, un file di archivio che contiene il package API wrapper, inclusi gli script Terraform necessari per la distribuzione. Questo file viene distribuito in uno stack di Resource Manager su OCI per creare le risorse Oracle necessarie per le API wrapper.WholesaleCBDCWithConfidentialPayment_WrapperAPI.postman_collection
, una raccolta Postman che consente di eseguire il test delle API wrapper distribuite. La raccolta include richieste preconfigurate con endpoint e payload corrispondenti alle API definite nel package API wrapper.
API wrapper
-
activateCBDCAccount
- Nome metodo originale:
activateAccount
- Questo metodo POST attiva un account token. Questo metodo può essere chiamato solo da un
Token Admin
oOrg Admin
dell'organizzazione specificata. Impossibile attivare gli account eliminati. - Payload:
{ "accountId": "account_id value", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
accountId: string
– L'ID dell'account.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Restituisce:
- In caso di operazione riuscita, una rappresentazione JSON dell'oggetto di stato dell'account per l'account token specificato.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "864cdbc5b4ee1a6f2238301e75ee2ddff0ecfa490ddf490da33365cae92cb4ad", "payload": { "assetType": "oaccountStatus", "status_id": "oaccountStatus~4c900b07f6136f36854064c0c0ba97aa09c9734cbe11966cc83865f156ced2c6", "account_id": "oaccount~214ad54a30703412b195f36429607b08627dea893303870bf3372f944fe0c088", "status": "active" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010", "blockNumber": 58 } }
-
addCBAdmin
- Nome metodo originale:
addTokenAdmin
- Questo metodo POST aggiunge un utente come
Token Admin
del codice concatenato del token. Il metodo può essere chiamato solo da unToken Admin
del codice concatenato del token. Il primo richiamo proviene dall'amministratore che crea un'istanza del codice concatenato. - Payload:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
orgId: string
- L'ID MSP (Membership Service Provider) dell'utente nell'organizzazione corrente.userId: string
: il nome utente o l'ID e-mail dell'utente.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "a988dc3e9aab162508fd0555fec254f248e27fd0c5440d94e1f49fc65643cafa", "payload": { "msg": "Successfully added Token Admin (Org_Id: CentralBank, User_Id: user1)" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010", "blockNumber": 69 } }
-
addCBAuditor
- Nome metodo originale:
addTokenAuditor
- Questo metodo POST aggiunge gli auditor del token al codice concatenato del token. Questo metodo può essere chiamato solo dal
Token Admin
del codice concatenato. - Payload:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
orgId: string
- L'ID MSP (Membership Service Provider) dell'utente nell'organizzazione corrente.userId: string
: il nome utente o l'ID e-mail dell'utente.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "864cdbc5b4ee1a6f2238301e75ee2ddff0ecfa490ddf490da33365cae92cb4ad", "payload": { "assetType": "oaccountStatus", "status_id": "oaccountStatus~4c900b07f6136f36854064c0c0ba97aa09c9734cbe11966cc83865f156ced2c6", "account_id": "oaccount~214ad54a30703412b195f36429607b08627dea893303870bf3372f944fe0c088", "status": "active" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010", "blockNumber": 58 } }
-
addFIAdmin
- Nome metodo originale:
addOrgAdmin
- Questo metodo aggiunge amministratori dell'organizzazione al codice concatenato del token. Questo metodo può essere chiamato solo da un
Token Admin
oOrg Admin
dell'organizzazione specificata. - Payload:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
orgId: string
- L'ID MSP (Membership Service Provider) dell'utente nell'organizzazione corrente.userId: string
: il nome utente o l'ID e-mail dell'utente.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "ab1544c0d23d930253e6e6020c7c9584f03d324fb1123cc96fe7e0573b232792", "payload": { "msg": "Successfully added Org Admin (Org_Id: CentralBank, User_Id: cb_admin_demo)" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010", "blockNumber": 61 } }
-
addFIAuditor
- Nome metodo originale:
addOrgAuditor
- Questo metodo aggiunge gli auditor dell'organizzazione al codice concatenato del token. Questo metodo può essere chiamato solo da un
Token Admin
oOrg Admin
dell'organizzazione specificata. - Payload:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
orgId: string
- L'ID MSP (Membership Service Provider) dell'utente nell'organizzazione corrente.userId: string
: il nome utente o l'ID e-mail dell'utente.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "c0acbadfa461963a5d085bb12335dcf6d8ec566acf72a88a1f168b3a0435db89", "payload": { "msg": "Successfully added Org Auditor (Org_Id: CentralBank, User_Id: cb_admin_demo)" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010", "blockNumber": 62 } }
-
addRole
- Nome metodo originale:
addRole
- Questo metodo aggiunge il ruolo all'utente e al token specificati. Gli ID account sono formati creando un hash SHA-256 dell'ID token concatenato, dell'ID organizzazione e dell'ID utente. Questo metodo può essere chiamato solo da un
Token Admin
oOrg Admin
dell'organizzazione specificata. - Payload:
{ "accountId": "account_id value", "role": "role value (for example minter / burner / notary)", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
accountId: string
– L'ID dell'account.role: string
: il nome del ruolo da aggiungere all'utente specificato.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "c44931d2227305914db21564301775f8a4edc2aa7fef434d063be7e207b4fd20", "payload": { "msg": "Successfully added role 'minter' to Account Id: oaccount~214ad54a30703412b195f36429607b08627dea893303870bf3372f944fe0c088" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20009", "blockNumber": 63 } }
-
approveCBDCCreation
- Nome metodo originale:
approveMint
- I notai possono chiamare questo metodo POST per approvare una richiesta di zecca.
- Payload:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
tokenId: string
: l'ID del token.operationId: string
: l'ID operazione univoco della richiesta mint da approvare.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "4514aa229ebcc4d2fedcaa47c4301615e30c4a9bae45cf0256a5b80d75b3697a", "payload": { "msg": "Successfully minted 1000 tokens to Account Id: oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20011", "blockNumber": 337 } }
-
approveCBDCRetirement
- Nome metodo originale:
approveBurn
- I notai possono chiamare questo metodo POST per approvare una richiesta di burn.
- Payload:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
tokenId: string
: l'ID del token.operationId: string
: l'ID operazione univoco della richiesta mint da approvare.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "8c7b013765917ebade60c6e6e122ec9b94282349e630fa1f2a446c79cb9ef29c", "payload": { "msg": "Successfully burned 200 tokens from account id: oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98 (Org-Id: CentralBank, User-Id: cb_retirer_demo)" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20011", "blockNumber": 338 } }
-
approveHoldCBDCTokens
- Nome metodo originale:
executeHoldTokens
- I notai chiamano questo metodo per approvare un blocco sui token, che attiva il trasferimento dei token dal pagatore al beneficiario in questo scenario aziendale. La quantità di token messi in sospeso in precedenza dal proprietario del token viene ora trasferita al destinatario. Se il valore
quantity
è inferiore al valore di blocco effettivo, l'importo rimanente sarà nuovamente disponibile per il proprietario del token. Se il comportamentoroles
è specificato nella sezionebehaviors
del modello di token e il valorenotary_role_name
è impostato, l'account chiamante deve avere un ruolo notarile. In caso contrario, qualsiasi chiamante con un account può funzionare come notaio. - Payload:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "quantity": 1, "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
tokenId: string
: l'ID del token.operationId: string
: l'ID operazione univoco della richiesta mint da approvare.quantity: number
: il numero di token detenuti da trasferire.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "5177f7560d32838242a26ac74f2a90c6ff9b47aae0d0988f28d9b4cf7e27c097", "payload": { "msg": "Account Id: oaccount~1e31495a0c149b08cb9d02bdcac5e83d88c0f1557d954dda12bb807d7f6fc111 (Org-Id: Org1, User-Id: fi1_org_user1_demo) is successfully executed '10' tokens from Operation Id '454f4bf6'." }, "encode": "JSON", "sourceURL": "org1-oabcs1-nrt.blockchain.ocp.example.com:20009", "blockNumber": 339 } }
-
consolidateRunningBalanceInTransactions
- Nome metodo originale:
consolidateRunningBalanceInTransactions
- Questo metodo consolida i saldi correnti dei conti nell'organizzazione del chiamante. Questo metodo può essere chiamato solo da un
Token Admin
oOrg Admin
. - Payload:
{ "endorsers": {{endorsers}} }
- Parametri:
endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "f3c019974cd93eaa8f3171a36ec25009fa6925b5880cae8c9a49a141944039c0", "payload": { "msg": "Successfully updated account running balance for pending transactions." }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20009", "blockNumber": 340 } }
-
associateTokenToAccount
- Nome metodo originale:
associateTokenToAccount
- Questo metodo POST associa un ID account specificato a un token specificato. Questo metodo può essere chiamato solo da un
Token Admin
oOrg Admin
dell'organizzazione specificata. - Payload:
{ "accountId": "account_id value", "tokenId": "{{bc-token-id}}", "customAccountId": "custom_account_id value", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
accountId: string
– L'ID dell'account.tokenId: string
: l'ID del token.customAccountId: string
: l'ID casuale univoco degli account in modalità riservata.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "fc7e9297d1d7beef5567fbef873955f5a9759d031811198e24f67f064e0e80b0", "payload": { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~b53cb2c19c92d1d5c8cb9f6e988e7761c34e03e014e6c4b889565fc0abf46c8a", "org_id": "CentralBank", "token_type": "fungible", "token_id": "USD", "token_name": "cbdc", "balance": "028b72742c8aa9a0395c828fe4f0e46226a3e40d4e731d0b994c8028c8b7bd4df6", "onhold_balance": "028b72742c8aa9a0395c828fe4f0e46226a3e40d4e731d0b994c8028c8b7bd4df6", "onhold_burn_balance": "028b72742c8aa9a0395c828fe4f0e46226a3e40d4e731d0b994c8028c8b7bd4df6", "application_groups": [ "CENTRAL_BANK_USERS" ] }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20009", "blockNumber": 71 } }
-
createAccount
- Nome metodo originale:
createAccount
- Questo metodo crea un account per un utente e un token specificati. È necessario creare un account per qualsiasi utente che avrà token in qualsiasi momento. I conti tengono traccia dei saldi, dei saldi in sospeso e della cronologia delle transazioni. Un ID account è un set alfanumerico di caratteri, preceduto da
oaccount~<token asset name>~
e seguito da un hash del nome utente o dell'ID e-mail (userId
) del proprietario dell'istanza o dell'utente che ha eseguito il login all'istanza, l'ID del provider di servizi di appartenenza (orgId
) dell'utente nell'organizzazione di rete corrente. Questo metodo può essere chiamato solo da unToken Admin
del codice concatenato o da unOrg Admin
dell'organizzazione specificata. - Payload:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "tokenType": "fungible", "applicationGroups": "[\"application_groups value\"]", "dailyLimits": "{\"max_daily_amount\":10000,\"max_daily_transactions\":100}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
orgId
- L'ID MSP (Membership Service Provider) dell'utente per cui creare l'account. L'ID deve iniziare con un carattere alfanumerico e può includere lettere, numeri e caratteri speciali come caratteri di sottolineatura (_), punti (.), simboli at (@) e trattini (-).userId
: il nome utente o l'ID e-mail dell'utente. L'ID deve iniziare con un carattere alfanumerico e può includere lettere, numeri e caratteri speciali come caratteri di sottolineatura (_), punti (.), simboli at (@) e trattini (-).tokenType: TokenType
: il tipo di token, che deve esserefungible
.applicationGroups: string[]
: lista di gruppi di applicazioni a cui appartiene l'ID utente, che definiscono le associazioni dell'utente nell'applicazione CBDC.dailyLimits: JSON object
: oggetto JSON del tipo seguente.
Nell'esempio, il valore{ "max_daily_amount": 100000 "max_daily_transactions": 10000 }
max_daily_amount
è la quantità massima di token che è possibile effettuare transazioni giornaliere e il valoremax_daily_transactions
è il numero massimo di transazioni che è possibile completare quotidianamente.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "dc167f95bdcc246c9ecb20e56126c705f522cff30c94798f21a82de111367ab8", "payload": { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~b53cb2c19c92d1d5c8cb9f6e988e7761c34e03e014e6c4b889565fc0abf46c8a", "org_id": "CentralBank", "token_type": "fungible", "token_id": "", "token_name": "", "balance": "028b72742c8aa9a0395c828fe4f0e46226a3e40d4e731d0b994c8028c8b7bd4df6", "onhold_balance": "028b72742c8aa9a0395c828fe4f0e46226a3e40d4e731d0b994c8028c8b7bd4df6", "onhold_burn_balance": "028b72742c8aa9a0395c828fe4f0e46226a3e40d4e731d0b994c8028c8b7bd4df6", "application_groups": [ "CENTRAL_BANK_USERS" ] }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010", "blockNumber": 70 } }
-
getAccountDetailsByCustomAccountId
- Nome metodo originale:
getAccountDetailsByCustomAccountId
- Questo metodo GET restituisce i dettagli del conto per un ID conto personalizzato specificato. Questo metodo può essere chiamato da un
Token Admin
oToken Auditor
, o unOrg Admin
oOrg Auditor
dell'organizzazione specificata. - Query:
getAccountDetailsByCustomAccountId?customAccountId=customAccountId value&orgId={{bc-org-id}}&peer={{peer}}
- Parametri:
customAccountId: string
: l'ID casuale univoco degli account in modalità riservata.orgId: string
- L'ID MSP (Membership Service Provider) dell'utente nell'organizzazione corrente.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "cf46211c670f7d21feb000a0161baaced91be314ea53981e26dc1482924055c9", "payload": [ { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61", "org_id": "CentralBank", "token_type": "fungible", "token_id": "USD", "token_name": "cbdc", "balance": "0", "onhold_balance": "0", "onhold_burn_balance": "0", "application_groups": [ "SYSTEM_ADMINS" ], "user_id": "cb_admin_demo", "custom_account_id": "10101234000123" } ], "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20012", "blockNumber": 341 } }
-
getAllActiveCBDCAccounts
- Nome metodo originale:
getAllActiveAccounts
- Questo metodo GET restituisce tutti gli account attivi associati all'ID token specificato.
- Query:
getAllActiveCBDCAccounts?orgId={{bc-org-id}}&tokenId={{bc-token-id}}&peer={{peer}}
- Parametri:
tokenId: string
: l'ID del token.orgId: string
- L'ID MSP (Membership Service Provider) dell'utente nell'organizzazione corrente.peer: string
: il nome del nodo peer su cui eseguire la query.
- Restituisce:
- In caso di operazione riuscita, un messaggio che include i dettagli utente. L'output varia in base al ruolo dell'utente, come mostrato negli esempi riportati di seguito.
- Esempio di valore restituito (amministratore token, auditor token, amministratore organizzazione, auditor organizzazione):
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "key": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61", "role_name": null, "valueJson": { "account_id": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61", "org_id": "CentralBank", "token_id": "USD", "application_groups": [ "SYSTEM_ADMINS" ], "max_daily_amount": "10000", "max_daily_transactions": "1000" }, "non_account_role_name": [ "token_admin" ] }, { "key": "oaccount~1a6ea9aaa59c9ae8385bfdc870bf02616995c881ffeb111f526c8b31dbbdd43c", "role_name": null, "valueJson": { "account_id": "oaccount~1a6ea9aaa59c9ae8385bfdc870bf02616995c881ffeb111f526c8b31dbbdd43c", "org_id": "CentralBank", "token_id": "USD", "application_groups": [ "SYSTEM_AUDITORS" ], "max_daily_amount": "10000", "max_daily_transactions": "1000" }, "non_account_role_name": [ "token_auditor" ] }, { "key": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "role_name": "minter", "valueJson": { "account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "org_id": "CentralBank", "token_id": "USD", "application_groups": [ "SYSTEM_CREATORS" ], "max_daily_amount": "1000000", "max_daily_transactions": "100000" }, "non_account_role_name": [] }, { "key": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "role_name": "notary", "valueJson": { "account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "org_id": "CentralBank", "token_id": "USD", "application_groups": [ "SYSTEM_MANAGERS" ], "max_daily_amount": "10000", "max_daily_transactions": "1000" }, "non_account_role_name": [] }, { "key": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "role_name": null, "valueJson": { "account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "org_id": "CentralBank", "token_id": "USD", "application_groups": [ "SYSTEM_ISSUERS" ], "max_daily_amount": "100000", "max_daily_transactions": "10000" }, "non_account_role_name": [] }, { "key": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98", "role_name": "burner", "valueJson": { "account_id": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98", "org_id": "CentralBank", "token_id": "USD", "application_groups": [ "SYSTEM_RETIRERS" ], "max_daily_amount": "10000", "max_daily_transactions": "1000" }, "non_account_role_name": [] } ], "encode": "JSON" } }
- Esempio di valore restituito (tutti gli altri utenti):
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "key": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61", "role_name": null, "valueJson": { "account_id": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61", "org_id": "CentralBank", "token_id": "USD", "application_groups": [ "SYSTEM_ADMINS" ] } }, { "key": "oaccount~1a6ea9aaa59c9ae8385bfdc870bf02616995c881ffeb111f526c8b31dbbdd43c", "role_name": null, "valueJson": { "account_id": "oaccount~1a6ea9aaa59c9ae8385bfdc870bf02616995c881ffeb111f526c8b31dbbdd43c", "org_id": "CentralBank", "token_id": "USD", "application_groups": [ "SYSTEM_AUDITORS" ] } }, { "key": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "role_name": "minter", "valueJson": { "account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "org_id": "CentralBank", "token_id": "USD", "application_groups": [ "SYSTEM_CREATORS" ] } }, { "key": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "role_name": "notary", "valueJson": { "account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "org_id": "CentralBank", "token_id": "USD", "application_groups": [ "SYSTEM_MANAGERS" ] } }, { "key": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "role_name": null, "valueJson": { "account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "org_id": "CentralBank", "token_id": "USD", "application_groups": [ "SYSTEM_ISSUERS" ] } }, { "key": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98", "role_name": "burner", "valueJson": { "account_id": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98", "org_id": "CentralBank", "token_id": "USD", "application_groups": [ "SYSTEM_RETIRERS" ] } } ], "encode": "JSON" } }
-
getAllSuspendedCBDCAccounts
- Nome metodo originale:
getAllSuspendedAccounts
- Questo metodo GET restituisce tutti gli account sospesi associati all'ID token specificato.
- Query:
/getAllSuspendedCBDCAccounts?orgId={{bc-org-id}}&tokenId={{bc-token-id}}&peer={{peer}}
- Parametri:
tokenId: string
: l'ID del token.orgId: string
- L'ID MSP (Membership Service Provider) dell'utente nell'organizzazione corrente.peer: string
: il nome del nodo peer su cui eseguire la query.
- Restituisce:
- In caso di operazione riuscita, un messaggio che include i dettagli utente. L'output varia in base al ruolo dell'utente, come mostrato negli esempi riportati di seguito.
- Esempio di valore restituito (amministratore token, auditor token, amministratore organizzazione, auditor organizzazione):
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "key": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61", "role_name": null, "valueJson": { "account_id": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61", "org_id": "CentralBank", "token_id": "USD", "application_groups": [ "SYSTEM_ADMINS" ], "max_daily_amount": "10000", "max_daily_transactions": "1000" }, "non_account_role_name": [ "token_admin" ] } ], "encode": "JSON" } }
- Esempio di valore restituito (tutti gli altri utenti):
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "key": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61", "role_name": null, "valueJson": { "account_id": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61", "org_id": "CentralBank", "token_id": "USD", "application_groups": [ "SYSTEM_ADMINS" ] } } ], "encode": "JSON" } }
-
getApproverActionHistory
- Nome metodo originale:
getActionHistory
- Questo metodo GET recupera la cronologia delle approvazioni o dei rifiuti effettuati dal chiamante per le operazioni di menta, masterizzazione e trasferimento (emissione), inclusi i dettagli dell'organizzazione e gli ID utente degli account coinvolti (mittente, destinatario e notaio). Questo metodo può essere chiamato solo da un
Token Admin
,Token Auditor
,Org Admin
,Org Auditor
o dal notaio. - Query:
getApproverActionHistory?tokenId={{bc-token-id}}&peer={{peer}}
- Parametri:
tokenId: string
: l'ID del token.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "from_account_id": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98", "from_org_id": "CentralBank", "holding_id": "ohold~cbdc~USD~b770", "holding_status": "APPROVE_BURN", "last_updated_time": "2025-08-25T13:21:24.000Z", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": null, "timetoexpiration": null, "to_account_id": null, "to_org_id": null, "token_name": null, "quantity": 200 }, { "from_account_id": null, "from_org_id": null, "holding_id": "ohold~cbdc~USD~e7b6", "holding_status": "APPROVE_MINT", "last_updated_time": "2025-08-25T13:20:50.000Z", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": null, "timetoexpiration": null, "to_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "to_org_id": "CentralBank", "token_name": null, "quantity": 1000 }, { "from_account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_org_id": "CentralBank", "holding_id": "ohold~cbdc~USD~81d7c4ac", "holding_status": "EXECUTEHOLD", "last_updated_time": "2025-08-25T13:16:55.000Z", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": null, "timetoexpiration": null, "to_account_id": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3", "to_org_id": "Org1", "token_name": null, "quantity": 200 }, { "from_account_id": null, "from_org_id": null, "holding_id": "ohold~cbdc~USD~1e19", "holding_status": "APPROVE_MINT", "last_updated_time": "2025-08-13T06:12:41.000Z", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": null, "timetoexpiration": null, "to_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "to_org_id": "CentralBank", "token_name": null, "quantity": 10000 }, { "from_account_id": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98", "from_org_id": "CentralBank", "holding_id": "ohold~cbdc~USD~1f74", "holding_status": "REJECT_BURN", "last_updated_time": "2025-08-12T21:09:53.000Z", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": null, "timetoexpiration": null, "to_account_id": "", "to_org_id": null, "token_name": null, "quantity": 1000 }, { "from_account_id": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98", "from_org_id": "CentralBank", "holding_id": "ohold~cbdc~USD~d67c", "holding_status": "REJECT_BURN", "last_updated_time": "2025-08-12T21:09:47.000Z", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": null, "timetoexpiration": null, "to_account_id": "", "to_org_id": null, "token_name": null, "quantity": 2000 }, { "from_account_id": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98", "from_org_id": "CentralBank", "holding_id": "ohold~cbdc~USD~911b", "holding_status": "APPROVE_BURN", "last_updated_time": "2025-08-12T21:09:40.000Z", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": null, "timetoexpiration": null, "to_account_id": null, "to_org_id": null, "token_name": null, "quantity": 1000 }, { "from_account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_org_id": "CentralBank", "holding_id": "ohold~cbdc~USD~ed815e20", "holding_status": "EXECUTEHOLD", "last_updated_time": "2025-08-12T21:09:25.000Z", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": null, "timetoexpiration": null, "to_account_id": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709", "to_org_id": "org2", "token_name": null, "quantity": 10000 }, { "from_account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_org_id": "CentralBank", "holding_id": "ohold~cbdc~USD~12d87129", "holding_status": "EXECUTEHOLD", "last_updated_time": "2025-08-12T21:09:17.000Z", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": null, "timetoexpiration": null, "to_account_id": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3", "to_org_id": "Org1", "token_name": null, "quantity": 10000 }, { "from_account_id": "", "from_org_id": null, "holding_id": "ohold~cbdc~USD~54a4", "holding_status": "REJECT_MINT", "last_updated_time": "2025-08-12T21:01:27.000Z", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": null, "timetoexpiration": null, "to_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "to_org_id": "CentralBank", "token_name": null, "quantity": 40000 }, { "from_account_id": null, "from_org_id": null, "holding_id": "ohold~cbdc~USD~9b27", "holding_status": "APPROVE_MINT", "last_updated_time": "2025-08-12T21:01:16.000Z", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": null, "timetoexpiration": null, "to_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "to_org_id": "CentralBank", "token_name": null, "quantity": 30000 }, { "from_account_id": null, "from_org_id": null, "holding_id": "ohold~cbdc~USD~eda0", "holding_status": "APPROVE_MINT", "last_updated_time": "2025-08-12T21:01:05.000Z", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": null, "timetoexpiration": null, "to_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "to_org_id": "CentralBank", "token_name": null, "quantity": 20000 }, { "from_account_id": null, "from_org_id": null, "holding_id": "ohold~cbdc~USD~1baa", "holding_status": "APPROVE_MINT", "last_updated_time": "2025-08-12T21:01:03.000Z", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": null, "timetoexpiration": null, "to_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "to_org_id": "CentralBank", "token_name": null, "quantity": 10000 } ], "encode": "JSON" } }
-
getCBDCAccount
- Nome metodo originale:
getCBDCAccount
- Questo metodo GET restituisce i dettagli dell'account per un utente e un token specificati. Questo metodo può essere chiamato solo da un
Token Admin
oToken Auditor
del codice concatenato, unOrg Admin
oOrg Auditor
dell'organizzazione specificata, o ilAccountOwner
dell'account. - Query:
/getCBDCAccount?accountId=account_id value&peer={{peer}}
- Parametri:
accountId: string
– L'ID dell'account.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "payload": { "bapAccountVersion": 0, "assetType": "oaccount", "user_id": "cb_manager_demo", "custom_account_id": "10105678007891", "status": "active", "account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "org_id": "CentralBank", "token_type": "fungible", "token_id": "USD", "token_name": "cbdc", "balance": "0", "onhold_balance": "0", "onhold_burn_balance": "0", "application_groups": [ "SYSTEM_MANAGERS" ] }, "encode": "JSON" } }
-
getCBDCAccountBalance
- Nome metodo originale:
getAccountBalance
- Questo metodo GET restituisce il saldo corrente per un conto e un token specificati. Questo metodo può essere chiamato solo da un
Token Admin
oToken Auditor
del codice concatenato, unOrg Admin
oOrg Auditor
dell'organizzazione specificata, o ilAccountOwner
dell'account. /getCBDCAccountBalance?accountId=account_id value&peer={{peer}}
- Parametri:
accountId: string
– L'ID dell'account.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "payload": { "msg": "Current Balance is: 100", "user_balance": 100 }, "encode": "JSON" } }
-
getCBDCAccountsByUser
- Nome metodo originale:
getAccountsByUser
- Questo metodo restituisce un elenco di tutti gli ID account per un ID organizzazione e un ID utente specificati. Questo metodo può essere chiamato solo da un
Token Admin
oToken Auditor
del codice concatenato, unOrg Admin
oOrg Auditor
dell'organizzazione specificata, o ilAccountOwner
dell'account. /getCBDCAccountsByUser?orgId={{bc-org-id}}&userId={{bc-user-id}}&peer={{peer}}
- Parametri:
orgId string
- L'ID MSP (Membership Service Provider) dell'utente nell'organizzazione corrente.userId string
: il nome utente o l'ID e-mail dell'utente.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "bapAccountVersion": 15, "assetType": "oaccount", "user_id": "cb__creator_demo", "custom_account_id": "10105678004567", "account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "org_id": "CentralBank", "token_type": "fungible", "token_id": "USD", "token_name": "cbdc", "balance": "21000", "onhold_balance": "0", "onhold_burn_balance": "0", "application_groups": [ "SYSTEM_CREATORS" ] }, { "bapAccountVersion": 0, "assetType": "oaccount", "user_id": "cb__creator_demo", "custom_account_id": "Not Available", "account_id": "oaccount~388fb87df59c6a4fbf0400c58b61aa85f975a8c4209942006b0c0d6334fcf887", "org_id": "CentralBank", "token_type": "fungible", "token_id": "", "token_name": "", "balance": "0", "onhold_balance": "0", "onhold_burn_balance": "0", "application_groups": [ "application_groups value" ] } ], "encode": "JSON" } }
-
getCBDCAccountTransactionHistory
- Nome metodo originale:
getAccountTransactionHistory
- Questo metodo restituisce un array di dettagli della cronologia delle transazioni conto per un utente e un token specificati. Questo metodo può essere chiamato solo da un
Token Admin
oToken Auditor
del codice concatenato, unOrg Admin
oOrg Auditor
dell'organizzazione specificata, o ilAccountOwner
dell'account. /getCBDCAccountTransactionHistory?accountId=account_id value&peer={{peer}}
- Parametri:
accountId: string
– L'ID dell'account.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "transaction_id": "otransaction~4514aa229ebcc4d2fedcaa47c4301615e30c4a9bae45cf0256a5b80d75b3697a", "transacted_amount": 1000, "timestamp": "2025-08-25T13:20:50.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "APPROVE_MINT", "balance": 21000, "onhold_balance": 0 }, { "transaction_id": "otransaction~1982f73495060e0eef4d78282a91c41e27e8c95572739b0677a1e404a0d20aa9", "transacted_amount": 200, "timestamp": "2025-08-25T13:12:43.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "REQUEST_MINT", "balance": 20000, "onhold_balance": 0 }, { "transaction_id": "otransaction~fedd714cf1509f7517819d7cd4c0921d0b2f5d1ff6a25dcb08ab411defd6b5f3", "transacted_amount": 2000, "timestamp": "2025-08-21T05:23:25.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "REQUEST_MINT", "balance": 20000, "onhold_balance": 0 }, { "transaction_id": "otransaction~f33b47234f3ee0b636962c8c31c01d06523b789ca16b3b342d5080b71268bcc3", "transacted_amount": 1000, "timestamp": "2025-08-21T05:23:07.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "REQUEST_MINT", "balance": 20000, "onhold_balance": 0 }, { "transaction_id": "otransaction~cf934527149bc24f62a8ddeeea7f74a19a0f84d8f161535a771be49d2520d5b3", "transacted_amount": 10000, "timestamp": "2025-08-13T06:12:41.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "APPROVE_MINT", "balance": 20000, "onhold_balance": 0 }, { "transaction_id": "otransaction~f5c0e11ca61d9adc843658929e6de2a738ad586304f9e020f75bf4aac5e42a2c", "transacted_amount": 10000, "timestamp": "2025-08-13T06:12:04.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "REQUEST_MINT", "balance": 10000, "onhold_balance": 0 }, { "transaction_id": "otransaction~862aa9d9e877d3ea209b87299ab5b12c13ed5ce43d1cf1b934043c1dd02f58f6", "transacted_amount": 50000, "timestamp": "2025-08-12T21:04:22.000Z", "token_id": "USD", "category": "transfer", "transacted_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "transaction_type": "DEBIT", "balance": 10000, "onhold_balance": 0 }, { "transaction_id": "otransaction~8a74c6d87ca74a613aab9db5d40386f8d5b534f9800503af8ca27e8946d7616d", "transacted_amount": 40000, "timestamp": "2025-08-12T21:01:27.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "REJECT_MINT", "balance": 60000, "onhold_balance": 0 }, { "transaction_id": "otransaction~28ac66ba33f7ad0648448964b2b74525c9e3f0c9908c7a0484690b9baa56c2db", "transacted_amount": 30000, "timestamp": "2025-08-12T21:01:16.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "APPROVE_MINT", "balance": 60000, "onhold_balance": 0 }, { "transaction_id": "otransaction~7e32ad8f365ff59814e112f27602f30ab599fb9c1638784496c66a61a6277c22", "transacted_amount": 20000, "timestamp": "2025-08-12T21:01:05.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "APPROVE_MINT", "balance": 30000, "onhold_balance": 0 }, { "transaction_id": "otransaction~1477050bb9e55f4f471872b31fce0d2097f5d5e57d89a842070df5e36d7ab0da", "transacted_amount": 10000, "timestamp": "2025-08-12T21:01:03.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "APPROVE_MINT", "balance": 10000, "onhold_balance": 0 }, { "transaction_id": "otransaction~0e76c6931b7ee134e967e847d9730b867a0fd191d39697d83d36dd15745c02e3", "transacted_amount": 40000, "timestamp": "2025-08-12T21:00:20.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "REQUEST_MINT", "balance": 0, "onhold_balance": 0 }, { "transaction_id": "otransaction~07bbf9c190694371626da59ded5d87434d26f612891e13bb15bdd28f6086e760", "transacted_amount": 30000, "timestamp": "2025-08-12T21:00:01.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "REQUEST_MINT", "balance": 0, "onhold_balance": 0 }, { "transaction_id": "otransaction~8721175c6cbbce17b6c4bb6a444e475d07f52352dfd0d990679f342215153513", "transacted_amount": 20000, "timestamp": "2025-08-12T20:59:41.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "REQUEST_MINT", "balance": 0, "onhold_balance": 0 }, { "transaction_id": "otransaction~dc24c24d43a6525e807a39edcf8c6a2b6ccb81f0d755958f509509687eacee84", "transacted_amount": 10000, "timestamp": "2025-08-12T20:59:13.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "REQUEST_MINT", "balance": 0, "onhold_balance": 0 }, { "transaction_id": "otransaction~396e6ca5a11a9609632d0864026409d46a708fb95e3e21b39fa5f3fb78f90872", "transacted_amount": 0, "timestamp": "2025-08-12T20:43:20.000Z", "token_id": "", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transaction_type": "CREATE_ACCOUNT", "balance": 0, "onhold_balance": 0 } ], "encode": "JSON" } }
-
getCBDCAccountTransactionHistoryWithFilters
- Nome metodo originale:
getAccountTransactionHistoryWithFiltersFromRichHistDB
- Questo metodo restituisce i dettagli della cronologia delle transazioni del conto dal database della cronologia avanzata. Questo metodo può essere chiamato solo da un
Token Admin
oToken Auditor
del codice concatenato, unOrg Admin
oOrg Auditor
dell'organizzazione specificata, o ilAccountOwner
dell'account. /getCBDCAccountTransactionHistoryWithFilters?accountId=account_id value&customEndpoint=custom_endpoint value&bearerToken=bearer_token value&filters={"pageSize":20,"bookmark":"","startTime":"1900-01-01T00:00:00+00:00","endTime":"2100-01-01T00:00:00+00:00"}&peer={{peer}}
- Parametri:
accountId: string
– L'ID dell'account.customEndpoint
: endpoint del servizio RESTful del database della cronologia RTF da cui recuperare la cronologia delle transazioni.bearerToken
: token da utilizzare per chiamare l'endpoint RESTful per assicurarsi che la richiesta sia autorizzata.filters: JSON object
: parametro facoltativo. Se vuoto, vengono restituiti tutti i record. La proprietàpageSize
determina il numero di record da restituire. SepageSize
è 0, la dimensione di pagina predefinita è 20. La proprietàbookmark
determina l'indice iniziale dei record da restituire. Le proprietàstartTime
eendTime
devono essere specificate nel formato RFC-3339.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "transaction_id": "otransaction~3140569a4ecb3c3f141cc2468fe21276640b7fd79013d951d9104b79072d8f9c", "transacted_amount": 200, "timestamp": "2025-08-25T13:16:55.000Z", "token_id": "USD", "transacted_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3", "transacted_org_id": "Org1", "transacted_user_id": "fi1_org_officer_demo", "transacted_custom_account_id": "20200222221111", "to_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3", "to_org_id": "Org1", "to_user_id": "fi1_org_officer_demo", "to_custom_account_id": "20200222221111", "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_org_id": "CentralBank", "from_user_id": "cb_issuer_demo", "from_custom_account_id": "10109999001234", "transaction_type": "EXECUTEHOLD", "category": "transfer", "balance": 26800, "onhold_balance": 300 }, { "transaction_id": "otransaction~2b75b3e8531a651f07c2d048d8546ad70ac49c66f0b82ed7626c1739090842ce", "transacted_amount": 100, "timestamp": "2025-08-25T13:16:06.000Z", "token_id": "USD", "transacted_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "transacted_org_id": "CentralBank", "transacted_user_id": "cb_issuer_demo", "transacted_custom_account_id": "10109999001234", "to_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3", "to_org_id": "Org1", "to_user_id": "fi1_org_officer_demo", "to_custom_account_id": "20200222221111", "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_org_id": "CentralBank", "from_user_id": "cb_issuer_demo", "from_custom_account_id": "10109999001234", "transaction_type": "ONHOLD", "holding_id": "ohold~cbdc~USD~e26f11da", "category": "transfer", "balance": 26800, "onhold_balance": 500 }, { "transaction_id": "otransaction~9e7bf14cf96c5f90170da9455b1318687785e936192f60b7cbeb1c8bfabc41d2", "transacted_amount": 100, "timestamp": "2025-08-21T06:57:19.000Z", "token_id": "USD", "transacted_account": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98", "transacted_org_id": "CentralBank", "transacted_user_id": "cb_retirer_demo", "transacted_custom_account_id": "10109999006543", "to_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "to_org_id": "CentralBank", "to_user_id": "cb_issuer_demo", "to_custom_account_id": "10109999001234", "from_account": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98", "from_org_id": "CentralBank", "from_user_id": "cb_retirer_demo", "from_custom_account_id": "10109999006543", "transaction_type": "CREDIT", "category": "transfer", "balance": 26900, "onhold_balance": 400 }, { "transaction_id": "otransaction~b3901b4754920a9c75e36069dc55024ad505e4c127f334eedf65ef6703dc6b86", "transacted_amount": 200, "timestamp": "2025-08-21T05:39:25.000Z", "token_id": "USD", "transacted_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "transacted_org_id": "CentralBank", "transacted_user_id": "cb_issuer_demo", "transacted_custom_account_id": "10109999001234", "to_account": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709", "to_org_id": "org2", "to_user_id": "fi2_org_officer_demo", "to_custom_account_id": "30300617202404", "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_org_id": "CentralBank", "from_user_id": "cb_issuer_demo", "from_custom_account_id": "10109999001234", "transaction_type": "ONHOLD", "holding_id": "ohold~cbdc~USD~77b75873", "category": "issuance", "balance": 26800, "onhold_balance": 400 }, { "transaction_id": "otransaction~d55c9dfc9feacb353544b5d8b2ae694162ade3890bcaaf715503fd1d6a73cd1a", "transacted_amount": 200, "timestamp": "2025-08-21T05:39:01.000Z", "token_id": "USD", "transacted_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "transacted_org_id": "CentralBank", "transacted_user_id": "cb_issuer_demo", "transacted_custom_account_id": "10109999001234", "to_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3", "to_org_id": "Org1", "to_user_id": "fi1_org_officer_demo", "to_custom_account_id": "20200222221111", "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_org_id": "CentralBank", "from_user_id": "cb_issuer_demo", "from_custom_account_id": "10109999001234", "transaction_type": "ONHOLD", "holding_id": "ohold~cbdc~USD~81d7c4ac", "category": "transfer", "balance": 27000, "onhold_balance": 200 }, { "transaction_id": "otransaction~751eaedbe4311edd5d17cae53d283caf397d0cb09f18d57a5e3fe61266875ff9", "transacted_amount": 200, "timestamp": "2025-08-13T09:59:22.000Z", "token_id": "USD", "transacted_account": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709", "transacted_org_id": "org2", "transacted_user_id": "fi2_org_officer_demo", "transacted_custom_account_id": "30300617202404", "to_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "to_org_id": "CentralBank", "to_user_id": "cb_issuer_demo", "to_custom_account_id": "10109999001234", "from_account": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709", "from_org_id": "org2", "from_user_id": "fi2_org_officer_demo", "from_custom_account_id": "30300617202404", "transaction_type": "CREDIT", "category": "transfer", "balance": 27200, "onhold_balance": 0 }, { "transaction_id": "otransaction~70155a8f4e388cc9395dbd03bedaf5a878705f5ad02302c8e9163218a5c3875a", "transacted_amount": 1000, "timestamp": "2025-08-13T06:22:56.000Z", "token_id": "USD", "transacted_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3", "transacted_org_id": "Org1", "transacted_user_id": "fi1_org_officer_demo", "transacted_custom_account_id": "20200222221111", "to_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "to_org_id": "CentralBank", "to_user_id": "cb_issuer_demo", "to_custom_account_id": "10109999001234", "from_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3", "from_org_id": "Org1", "from_user_id": "fi1_org_officer_demo", "from_custom_account_id": "20200222221111", "transaction_type": "CREDIT", "category": "transfer", "balance": 27000, "onhold_balance": 0 }, { "transaction_id": "otransaction~e595f3f0cc03fa5f58a546b8abbfaf155592e492f850581db2b8fed9a529c9e2", "transacted_amount": 10000, "timestamp": "2025-08-12T21:09:25.000Z", "token_id": "USD", "transacted_account": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709", "transacted_org_id": "org2", "transacted_user_id": "fi2_org_officer_demo", "transacted_custom_account_id": "30300617202404", "to_account": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709", "to_org_id": "org2", "to_user_id": "fi2_org_officer_demo", "to_custom_account_id": "30300617202404", "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_org_id": "CentralBank", "from_user_id": "cb_issuer_demo", "from_custom_account_id": "10109999001234", "transaction_type": "EXECUTEHOLD", "category": "issuance", "balance": 26000, "onhold_balance": 0 }, { "transaction_id": "otransaction~da92402859d87ae3069722d8e39cb0da448e9a5f67468233ee9b1fe7a4ebeef8", "transacted_amount": 10000, "timestamp": "2025-08-12T21:09:17.000Z", "token_id": "USD", "transacted_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3", "transacted_org_id": "Org1", "transacted_user_id": "fi1_org_officer_demo", "transacted_custom_account_id": "20200222221111", "to_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3", "to_org_id": "Org1", "to_user_id": "fi1_org_officer_demo", "to_custom_account_id": "20200222221111", "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_org_id": "CentralBank", "from_user_id": "cb_issuer_demo", "from_custom_account_id": "10109999001234", "transaction_type": "EXECUTEHOLD", "category": "issuance", "balance": 26000, "onhold_balance": 10000 }, { "transaction_id": "otransaction~6915145aaf09fbf4d96456febddc2aa87b48c08ddd8ff17a6bab5d310f67bb36", "transacted_amount": 1000, "timestamp": "2025-08-12T21:07:11.000Z", "token_id": "USD", "transacted_account": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98", "transacted_org_id": "CentralBank", "transacted_user_id": "cb_retirer_demo", "transacted_custom_account_id": "10109999006543", "to_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "to_org_id": "CentralBank", "to_user_id": "cb_issuer_demo", "to_custom_account_id": "10109999001234", "from_account": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98", "from_org_id": "CentralBank", "from_user_id": "cb_retirer_demo", "from_custom_account_id": "10109999006543", "transaction_type": "CREDIT", "category": "transfer", "balance": 26000, "onhold_balance": 20000 }, { "transaction_id": "otransaction~244d7172d1dc90a142e1f22204c76614c7eea814b3d61f33016b786f1b347784", "transacted_amount": 10000, "timestamp": "2025-08-12T21:05:39.000Z", "token_id": "USD", "transacted_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "transacted_org_id": "CentralBank", "transacted_user_id": "cb_issuer_demo", "transacted_custom_account_id": "10109999001234", "to_account": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709", "to_org_id": "org2", "to_user_id": "fi2_org_officer_demo", "to_custom_account_id": "30300617202404", "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_org_id": "CentralBank", "from_user_id": "cb_issuer_demo", "from_custom_account_id": "10109999001234", "transaction_type": "ONHOLD", "holding_id": "ohold~cbdc~USD~ed815e20", "category": "issuance", "balance": 25000, "onhold_balance": 20000 }, { "transaction_id": "otransaction~c63ec37966264493bde6fa666527b9cca11695c15611c32e89af49a2246f13f6", "transacted_amount": 10000, "timestamp": "2025-08-12T21:05:20.000Z", "token_id": "USD", "transacted_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "transacted_org_id": "CentralBank", "transacted_user_id": "cb_issuer_demo", "transacted_custom_account_id": "10109999001234", "to_account": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3", "to_org_id": "Org1", "to_user_id": "fi1_org_officer_demo", "to_custom_account_id": "20200222221111", "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_org_id": "CentralBank", "from_user_id": "cb_issuer_demo", "from_custom_account_id": "10109999001234", "transaction_type": "ONHOLD", "holding_id": "ohold~cbdc~USD~12d87129", "category": "issuance", "balance": 35000, "onhold_balance": 10000 }, { "transaction_id": "otransaction~5112f576c94c2d23c342479bfa37e34612414b3258a64b43cf51b920f4ff5868", "transacted_amount": 5000, "timestamp": "2025-08-12T21:05:02.000Z", "token_id": "USD", "transacted_account": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98", "transacted_org_id": "CentralBank", "transacted_user_id": "cb_retirer_demo", "transacted_custom_account_id": "10109999006543", "to_account": "oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98", "to_org_id": "CentralBank", "to_user_id": "cb_retirer_demo", "to_custom_account_id": "10109999006543", "from_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_org_id": "CentralBank", "from_user_id": "cb_issuer_demo", "from_custom_account_id": "10109999001234", "transaction_type": "DEBIT", "category": "burn", "balance": 45000, "onhold_balance": 0 }, { "transaction_id": "otransaction~862aa9d9e877d3ea209b87299ab5b12c13ed5ce43d1cf1b934043c1dd02f58f6", "transacted_amount": 50000, "timestamp": "2025-08-12T21:04:22.000Z", "token_id": "USD", "transacted_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "transacted_org_id": "CentralBank", "transacted_user_id": "cb__creator_demo", "transacted_custom_account_id": "10105678004567", "to_account": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "to_org_id": "CentralBank", "to_user_id": "cb_issuer_demo", "to_custom_account_id": "10109999001234", "from_account": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "from_org_id": "CentralBank", "from_user_id": "cb__creator_demo", "from_custom_account_id": "10105678004567", "transaction_type": "CREDIT", "category": "transfer", "balance": 50000, "onhold_balance": 0 } ], "encode": "JSON" } }
-
getCBDCRetiredQuantity
- Nome metodo originale:
getBurnQuantity
- Questo metodo GET restituisce la quantità totale di token masterizzati per un'organizzazione specificata. Questo metodo può essere richiamato solo da
Token Admin
,Token Auditor
o da un utente con il ruolo di masterizzatore. /getCBDCRetiredQuantity?tokenId={{bc-token-id}}&peer={{peer}}
- Parametri:
tokenId: string
: l'ID del token.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "payload": { "burnt_quantity": 1200 }, "encode": "JSON" } }
-
getOnHoldIds
- Nome metodo originale:
getOnHoldIds
- Questo metodo GET restituisce un elenco di tutti gli ID di partecipazione per un conto specificato. Questo metodo può essere chiamato solo da un
Token Admin
oToken Auditor
del codice concatenato, unOrg Admin
oOrg Auditor
dell'organizzazione specificata, o ilAccountOwner
dell'account. /getOnHoldIds?accountId=account_id value&peer={{peer}}
- Parametri:
accountId: string
– L'ID dell'account.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "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
- Nome metodo originale:
getPendingIssuance
- Questo metodo recupera tutte le transazioni di emissione (trasferimento) in sospeso in cui il chiamante è assegnato come approvatore, inclusi i dettagli dell'organizzazione e gli ID utente dei conti coinvolti (mittente, destinatario e notaio). Questo metodo può essere chiamato solo da un
Token Admin
oToken Auditor
del codice concatenato, unOrg Admin
oOrg Auditor
o ilNotary
. /getPendingCBDCIssuance?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&peer={{peer}}
- Parametri:
tokenId: string
: l'ID del token.orgId: string
- L'ID MSP (Membership Service Provider) dell'utente nell'organizzazione corrente.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "asset_type": "ONHOLD", "category": "issuance", "from_account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_org_id": "CentralBank", "holding_id": "ohold~cbdc~USD~77b75873", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": "77b75873", "timetoexpiration": "0", "to_account_id": "oaccount~3954f54a8bc7acdd0c3d0960104240f60d56c26c8a179430267359cd80ce3709", "to_org_id": "org2", "token_id": "USD", "token_name": "cbdc", "quantity": 200 }, { "asset_type": "ONHOLD", "category": "transfer", "from_account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_org_id": "CentralBank", "holding_id": "ohold~cbdc~USD~e26f11da", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "notary_org_id": "CentralBank", "operation_id": "e26f11da", "timetoexpiration": "0", "to_account_id": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3", "to_org_id": "Org1", "token_id": "USD", "token_name": "cbdc", "quantity": 100 } ], "encode": "JSON" } }
-
getPendingCBDCRequest
- Nome metodo originale:
getPendingRequest
- Questo metodo recupera tutte le richieste in sospeso di un tipo specificato in cui il chiamante è assegnato come approvatore. Questo metodo può essere chiamato solo da un
Token Admin
oToken Auditor
del codice concatenato o daNotary
. /getPendingCBDCRequest?tokenId={{bc-token-id}}&requestType=request_type value&orgId={{bc-org-id}}&peer={{peer}}
- Parametri:
tokenId: string
: l'ID del token.requestType: string
: tipo di transazione. Ad esempio,mint
oburn
.orgId: string
- L'ID MSP (Membership Service Provider) dell'utente nell'organizzazione corrente.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "valueJson": { "assetType": "ohold", "holding_id": "ohold~cbdc~USD~89ce", "operation_id": "89ce", "token_name": "cbdc", "from_org_id": "CentralBank", "operation_type": "mint", "status": "pending", "from_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "to_account_id": "", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "token_id": "USD", "quantity": 2000, "time_to_expiration": "0", "description": "Minting 2000 tokens" } }, { "valueJson": { "assetType": "ohold", "holding_id": "ohold~cbdc~USD~cf73", "operation_id": "cf73", "token_name": "cbdc", "from_org_id": "CentralBank", "operation_type": "mint", "status": "pending", "from_account_id": "oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41", "to_account_id": "", "notary_account_id": "oaccount~9b136ef4a60230846a8c14761683851a386d306b79493bc4d00433020c96cfa7", "token_id": "USD", "quantity": 200, "time_to_expiration": "0", "description": "Minting 200" } } ], "encode": "JSON" } }
-
getTotalCBDCBalanceByCallerOrgId
- Nome metodo originale:
getTotalBalanceByCallerOrgId
- Questo metodo recupera il saldo totale dell'organizzazione del chiamante. Questo metodo può essere chiamato solo da un
Token Admin
,Token Auditor
,Org Admin
,Org Auditor
o da qualsiasi proprietario dell'account. /getTotalCBDCBalanceByCallerOrgId?peer={{peer}}
- Parametri:
peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "payload": { "totalBalance": 50500 }, "encode": "JSON" } }
-
getTotalCreatedCBDCTokens
- Nome metodo originale:
getTotalMintedTokens
- Questo metodo restituisce il numero totale di token coniati per un token specificato. Questo metodo può essere chiamato solo da
Token Admin
,Token Auditor
,Org Admin
oOrg Auditor
. - Query:
/getTotalCreatedCBDCTokens?tokenId={{bc-token-id}}&peer={{peer}}
- Parametri:
tokenId: string
: l'ID del token.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "payload": { "msg": "Total minted token for Token Id: USD is 71000 tokens.", "quantity": 71000 }, "encode": "JSON" } }
-
getTransactionWithBlockNumber
- Nome metodo originale:
getTransactionWithBlockNumber
- Questo metodo GET restituisce i dettagli della transazione per l'ID transazione specificato.
- Query:
/getTransactionWithBlockNumber?tokenId={{bc-token-id}}&transactionId=transaction_id value&peer={{peer}}
- Parametri:
tokenId: string
: l'ID del token.transactionId: string
: l'ID della transazione.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "blockNo": 340, "key": "otransaction~3140569a4ecb3c3f141cc2468fe21276640b7fd79013d951d9104b79072d8f9c", "metadata": null, "txnNo": 0, "value": null, "valueJson": { "assetType": "otransaction", "blockNo": 336, "txnNo": 1, "transaction_id": "otransaction~3140569a4ecb3c3f141cc2468fe21276640b7fd79013d951d9104b79072d8f9c", "token_id": "USD", "from_account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "from_account_balance": 26800, "from_account_onhold_balance": 300, "to_account_id": "oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3", "transaction_type": "EXECUTE_HOLD_SENDER", "amount": 200, "timestamp": "2025-08-25T13:16:55.000Z", "number_of_sub_transactions": 0, "holding_id": "ohold~cbdc~USD~81d7c4ac", "sub_transaction": "false", "category": "transfer", "global_transaction_id": "b54d4333-f4bb-4ca4-a7b7-cc75b659d912" } } ], "encode": "JSON" } }
-
getUserByCBDCAccountId
- Nome metodo originale:
getUserByAccountId
- Questo metodo restituisce i dettagli utente (
orgId
,userId
etokenId
) per un account specificato. Questo metodo può essere chiamato solo da unToken Admin
oToken Auditor
del codice concatenato, oppure da unOrg Admin
oOrg Auditor
dell'organizzazione specificata. - Query:
/getUserByCBDCAccountId?accountId=account_id value&peer={{peer}}
- Parametri:
accountId: string
– L'ID dell'account.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "payload": { "token_id": "USD", "org_id": "CentralBank", "user_id": "cb_admin_demo", "custom_account_id": "10101234000123" }, "encode": "JSON" } }
-
getUsersByRole
- Nome metodo originale:
getUsersByRole
- Questo metodo GET restituisce un elenco di tutti gli utenti per un ruolo e un token specificati. Questo metodo può essere chiamato solo da un
Token Admin
oToken Auditor
del codice concatenato. - Query:
/getUsersByRole?tokenId={{bc-token-id}}&role=role value (for example minter / burner / notary)&peer={{peer}}
- Parametri:
tokenId: string
: l'ID del token.role: string
: il nome del ruolo da cercare.peer: string
: il nome del nodo peer su cui eseguire la query.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "payload": { "users": [ { "token_id": "USD", "org_id": "CentralBank" } ] }, "encode": "JSON" } }
-
holdCBDCTokens
- Nome metodo originale:
holdTokens
- Questo metodo crea un blocco per conto del proprietario dei token con l'account
to_account_id
. Viene specificato un conto notarile, che è responsabile del completamento o del rilascio del blocco. Quando viene creato il blocco, il saldo del token specificato dal responsabile pagamento viene bloccato. Impossibile trasferire un saldo bloccato finché il blocco non viene completato o rilasciato. Per il chiamante di questo metodo deve essere già stato creato un account. - Payload:
{ "operationId": "operation_id value", "toAccountId": "to_account_id value", "notaryAccountId": "notary_account_id value", "quantity": 1, "timeToExpiration": "time_to_expiration value", "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
operationId: string
: ID univoco che identifica l'operazione di blocco. In genere questo ID viene passato dall'applicazione client.toAccountId: string
: l'ID del conto del destinatario.notaryAccountId: string
– L'ID account del notaio.quantity: number
: il numero di token da mettere in attesa.timeToExpiration
: l'ora di scadenza del blocco. Specificare 0 per un blocco permanente. In alternativa utilizzare il formato RFC-3339. Ad esempio, 2021-06-02T12:46:06Z.infoDetails: JSON
: la descrizione e la categoria indicate nell'esempio seguente.{ "category" : "category input", "description" : "description input" }
endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "4793f3907eefce2f9fca7ef107405b0f116efb3afbf83fa0e61fe763690c8235", "payload": { "msg": "AccountId oaccount~76687c724ddbc2d6e6664d9618b2bf1c2a9fe10f84887462447e4caba6aaaff3 is successfully holding 100 tokens" }, "encode": "JSON", "sourceURL": "org1-oabcs1-nrt.blockchain.ocp.example.com:20012", "blockNumber": 343 } }
-
init
- Nome metodo originale:
init
- Questo metodo viene richiamato quando viene distribuito il codice concatenato. Le informazioni utente vengono salvate come
Token Admin
del codice concatenato. - Payload:
{ "adminList": "[{\"org_id\":\"{{bc-org-id}}\",\"user_id\":\"{{bc-admin-user}}\"}]", "transientMapArgsFlag": true }
- Parametri:
adminList array
: array di informazioni{user_id, org_id}
che specifica la lista di amministratori di token. L'arrayadminList
è un parametro obbligatorio.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "fdb7dc89832c8045a333823b77fa24ae628178148dc93b3550040e070d7cd807", "payload": "", "encode": "UTF-8", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 263 } }
-
initializeCBDCToken
- Nome metodo originale:
initializeCBDCToken
- Questo metodo crea un token e inizializza le proprietà del token. L'asset e le relative proprietà vengono salvati nel database di stato. Questo metodo può essere chiamato solo da un
Token Admin
del codice concatenato. - Payload:
{ "tokenAsset": "{\"token_id\":\"{{bc-token-id}}\",\"token_desc\":\"USD dollar\",\"Currency_Name\":\"US currency\"}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
tokenAsset: <Token Class>
: l'asset token viene passato come parametro a questo metodo. Le proprietà dell'asset token sono descritte nel file del modello.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Restituisce:
- In caso di operazione riuscita, una rappresentazione JSON dell'asset token creato.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "524be506f53ddf27c42db2be2d7d7ed7f8746880c3bf7990605a4b50fe62a616", "payload": { "assetType": "otoken", "events": true, "token_id": "PHP", "token_name": "cbdc", "token_desc": "token_desc value", "token_standard": "ttf+", "token_type": "fungible", "token_unit": "fractional", "behaviors": [ "divisible", "mintable", "transferable", "burnable", "holdable", "roles" ], "roles": { "minter_role_name": "minter", "burner_role_name": "burner", "notary_role_name": "notary", "mint_approver_role_name": "notary", "burn_approver_role_name": "notary" }, "mintable": { "max_mint_quantity": 0, "mint_approval_required": true }, "burnable": { "burn_approval_required": true }, "divisible": { "decimal": 2 }, "Currency_Name": "Currency_Name value" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20011", "blockNumber": 344 } }
-
rejectCBDCCreation
- Nome metodo originale:
rejectMint
- Questo metodo può essere chiamato da un notaio minore per rifiutare una richiesta di conio.
- Payload:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
tokenId: string
– L'ID del token per rifiutare la stampa.operationId: string
: l'ID operazione univoco che rappresenta la richiesta mint.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "182b99bb2ed753994a8c638ab9b08c3a4e73ac8159a3173a2a1f56b651d2eeac", "payload": { "msg": "Successfully rejected mint request with Operation Id '89ce' to mint 2000 tokens of token id USD" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20011", "blockNumber": 345 } }
-
rejectCBDCRetirement
- Nome metodo originale:
rejectBurn
- Questo metodo può essere chiamato da un notaio per rifiutare una richiesta di masterizzazione.
- Payload:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
tokenId: string
: l'ID del token da rifiutare per la masterizzazione.operationId: string
: l'ID operazione univoco che rappresenta la richiesta di masterizzazione.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "af2cc8e43ecb4c5520d90a8d7955b5a47623a29b13eef47e31c16eb48cc0adec", "payload": { "msg": "Successfully rejected burn request with Operation Id '8d34' to burn 100 tokens of token id USD" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20011", "blockNumber": 346 } }
-
rejectHoldCBDCTokens
- Nome metodo originale:
releaseHoldTokens
- Questo metodo POST rilascia un blocco sui token. Il trasferimento non è stato completato e tutti i token bloccati sono di nuovo disponibili per il proprietario originale. Questo metodo può essere richiamato dall'ID
AccountOwner
con il ruolonotary
entro il limite di tempo specificato o dal responsabile pagamento, dal beneficiario o dal notaio dopo il limite di tempo specificato. - Payload:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
tokenId: string
: l'ID del token.operationId: string
: ID univoco che identifica l'operazione di blocco. In genere questo ID viene passato dall'applicazione client.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "c628fb7738222ed969295ccc8d21b4be95d96e3aada4f14570f7820a7051b5f7", "payload": { "msg": "Successfully released '200' tokens from Operation Id '77b75873' to Account Id: oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a (Org-Id: CentralBank, User-Id: cb_issuer_demo)." }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20009", "blockNumber": 347 } }
-
removeCBAdmin
- Nome metodo originale:
removeTokenAdmin
- Questo metodo POST rimuove un utente come
Token Admin
del codice concatenato. Questo metodo può essere chiamato solo da unToken Admin
del codice concatenato. Un amministratore non può rimuovere se stesso. - Payload:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
orgId: string
- L'ID MSP (Membership Service Provider) dell'utente nell'organizzazione corrente.userId: string
: il nome utente o l'ID e-mail dell'utente.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "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
- Nome metodo originale:
removeTokenAuditor
- Questo metodo POST rimuove un utente come
Token Auditor
del codice concatenato. Questo metodo può essere chiamato solo da unToken Admin
del codice concatenato. - Payload:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
orgId: string
- L'ID MSP (Membership Service Provider) dell'utente nell'organizzazione corrente.userId: string
: il nome utente o l'ID e-mail dell'utente.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "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
- Nome metodo originale:
removeOrgAdmin
- Questo metodo POST rimuove un utente come
Org Admin
del codice concatenato. Questo metodo può essere chiamato solo da unToken Admin
oOrg Admin
dell'organizzazione specificata. UnOrg Admin
non può rimuovere se stesso. - Payload:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
orgId: string
- L'ID MSP (Membership Service Provider) dell'utente nell'organizzazione corrente.userId: string
: il nome utente o l'ID e-mail dell'utente.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "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
- Nome metodo originale:
removeOrgAuditor
- Questo metodo POST rimuove un utente come
Org Auditor
del codice concatenato. Questo metodo può essere chiamato solo da unToken Admin
oOrg Admin
dell'organizzazione specificata. - Payload:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
orgId: string
- L'ID MSP (Membership Service Provider) dell'utente nell'organizzazione corrente.userId: string
: il nome utente o l'ID e-mail dell'utente.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "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
- Nome metodo originale:
removeRole
- Questo metodo rimuove un ruolo da un utente e da un token specificati. Questo metodo può essere chiamato solo da un
Token Admin
del codice concatenato o da unOrg Admin
dell'organizzazione specificata. - Payload:
{ "accountId": "account_id value", "role": "role value (for example minter / burner / notary)", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
accountId: string
– L'ID dell'account.role: string
: il nome del ruolo da rimuovere dall'utente specificato. I comportamentimintable
eburnable
corrispondono alle proprietàminter_role_name
eburner_role_name
del file di specifica. Analogamente, il ruolonotary
corrisponde alla proprietànotary_role_name
del file di specifica.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "d92538a8f9cf2d45a0c14307ce192c399230cbf4022cec5dd6ce560cca527bf3", "payload": { "msg": "Successfully removed role 'notary' from Account Id: oaccount~e8450f7a1f320658169315fb4148ad7cb4c47c31435420fd459665f41238221b" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010", "blockNumber": 72 } }
-
requestCBDCCreation
- Nome metodo originale:
requestMint
- Questo metodo può essere chiamato da un minter per inviare una richiesta al notaio minore per creare una quantità specificata di token.
- Payload:
{ "operationId": "operation_id value", "notaryAccountId": "notary_account_id value", "quantity": 1, "timeToExpiration": "time_to_expiration value", "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
operationId: string
: l'ID operazione univoco che rappresenta la richiesta mint.notaryAccountId: string
– L'ID account del notaio minore che elaborerà la richiesta.quantity: number
: la quantità di token da mint.timeToExpiration
– Il tempo dopo il quale la richiesta di conio scade e non è più valida.infoDetails: JSON
– Un oggetto che specifica la categoria (category
) e la descrizione (description
) della richiesta, come mostrato nell'esempio seguente.{ "category" : "category input", "description" : "description input" }
endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "1982f73495060e0eef4d78282a91c41e27e8c95572739b0677a1e404a0d20aa9", "payload": { "msg": "AccountId oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41 has successfully submitted request to mint 200 tokens" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20009", "blockNumber": 332 } }
-
requestCBDCRetirement
- Nome metodo originale:
requestBurn
- Questo metodo può essere chiamato da un bruciatore per inviare una richiesta al notaio per distruggere una determinata quantità di token.
- Payload:
{ "operationId": "operation_id value", "notaryAccountId": "notary_account_id value", "quantity": 1, "timeToExpiration": "time_to_expiration value", "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
operationId: string
: l'ID operazione univoco che rappresenta la richiesta di masterizzazione.notaryAccountId: string
– L'ID account del notaio che elaborerà la richiesta.quantity: number
: la quantità di token da bruciare.timeToExpiration
– Il tempo trascorso il quale la richiesta di masterizzazione scade e non è più valida.infoDetails: JSON
– Un oggetto che specifica la categoria (category
) e la descrizione (description
) della richiesta, come mostrato nell'esempio seguente.{ "category" : "category input", "description" : "description input" }
endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "3b1ba40490dea9bcc4df6ad22ffc7651fbbea5d1889e42a1841ee48d6ae653c6", "payload": { "msg": "AccountId oaccount~cea6080858337b1575d6a76ed0bd07a0eacd8871e3f2f7f793729a0e4b0e8e98 has successfully submitted request to burn 100 tokens" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20011", "blockNumber": 333 } }
-
setApplicationGroups
- Nome metodo originale:
setApplicationGroups
- Questo metodo POST viene utilizzato per impostare il parametro
application_groups
nei dettagli dell'account per i gruppi di applicazioni specificati. Questo metodo può essere chiamato solo da unToken Admin
del codice concatenato o da unOrg Admin
dell'organizzazione specificata. - Payload:
{ "accountId": "account_id value", "applicationGroups": "[\"application_groups value\"]", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
accountId: string
: l'ID account del token.applicationGroups: string[]
: lista di gruppi di applicazioni a cui appartiene l'ID utente che definiscono le associazioni dell'utente nell'applicazione CBDC.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "828fd2ece518fcf266868c840b3b1fc6b967c5c64d7591c42eb18c0c7850dc32", "payload": { "bapAccountVersion": 10, "assetType": "oaccount", "account_id": "oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a", "org_id": "CentralBank", "token_type": "fungible", "token_id": "USD", "token_name": "cbdc", "balance": "02c4601262fa7ece1ffc909811f829ad973d4133ca27c9c0fa82972d441400ad3e", "onhold_balance": "028954d23bfabee1a10d9f5a07793dec08ab0f93fd506079b0fa33f525d527595f", "onhold_burn_balance": "028954d23bfabee1a10d9f5a07793dec08ab0f93fd506079b0fa33f525d527595f", "application_groups": [ "SYSTEM_RETIRERS" ] }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010", "blockNumber": 348 } }
-
setMaxDailyAmount
- Nome metodo originale:
setMaxDailyAmount
- Questo metodo POST viene utilizzato per impostare il parametro
maxDailyAmount
nei dettagli del conto per l'importo specificato. Questo metodo può essere chiamato solo da unToken Admin
del codice concatenato o da unOrg Admin
dell'organizzazione specificata. - Payload:
{ "accountId": "account_id value", "maxDailyAmount": "max_daily_amount value", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
accountId: string
: l'ID account del token.maxDailyAmount: number
: valore massimo dell'importo giornaliero per il conto specificato, che definisce l'importo massimo che può essere eseguito quotidianamente.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "d6a8c26602c2a9cef5d6d563dbc50044af6380c96f7295e2c8e1bbf576cef36f", "payload": { "msg": "Successfully set max daily amount for account id oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a to 1000000" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010", "blockNumber": 351 } }
-
setMaxDailyTransactionCount
- Nome metodo originale:
setMaxDailyTransactionCount
- Questo metodo POST viene utilizzato per impostare il parametro
maxDailyTransactions
nei dettagli del conto per l'importo specificato. Questo metodo può essere chiamato solo da unToken Admin
del codice concatenato o da unOrg Admin
dell'organizzazione specificata. - Payload:
{ "accountId": "account_id value", "maxDailyTransactions": "max_daily_transactions value", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
accountId: string
: l'ID account del token.maxDailyTransactions: number
: valore massimo dell'importo giornaliero per il conto specificato, che definisce il numero massimo di transazioni consentite al giorno.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "c819da688bbe9cd4ef6fae79af014c66438b5f9d17f771d3ffc5878288097614", "payload": { "msg": "Successfully set max daily transactions for account id oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a to 100000" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010", "blockNumber": 350 } }
-
suspendCBDCAccount
- Nome metodo originale:
suspendAccount
- Questo metodo sospende un account token fungibile. Restituisce un errore se non viene trovato un valore
accountStatus
nel libro contabile. Questo metodo può essere chiamato solo da unToken Admin
del codice concatenato o da unOrg Admin
dell'organizzazione specificata. - Payload:
{ "accountId": "account_id value", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
accountId: string
: l'ID account del token.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "1fa66e75ba2ab9376944a8b4e362d5fe54e167f8ada989bd9653ea54f7557aea", "payload": { "assetType": "oaccountStatus", "status_id": "oaccountStatus~d0b8ba4d154d19fd7e61e7793795a5a5b65e2266102aafdd6d01cec1a3336c71", "account_id": "oaccount~c44ffac4c46718e9744cb0aae2016d26a87a5bef5e2d1c0d1abc7d8782f0ba61", "status": "suspended" }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20011", "blockNumber": 342 } }
-
transferCBDCTokens
- Nome metodo originale:
transferTokens
- Questo metodo trasferisce i token dal chiamante a un account specificato. Il chiamante del metodo deve avere un account. La quantità deve essere compresa nei valori decimali specificati dal parametro
decimal
del comportamentodivisible
nel file di specifica. - Payload:
{ "toAccountId": "to_account_id value", "quantity": 1, "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri:
toAccountId: string
: l'ID del conto del destinatario.quantity: number
: il numero di token da trasferire.infoDetails: JSON
– Un oggetto che specifica la categoria (category
) e la descrizione (description
) della richiesta, come mostrato nell'esempio seguente.{ "category" : "category input", "description" : "description input" }
endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "txid": "62eb436be7c29fc2ed9cae221e874d9a31b163fa10374e7da09bf5e09a96c3ff", "payload": { "msg": "Successfully transferred 10000 tokens from account id: oaccount~da6e14466a0ba9b48ebc18fa672addb92dffc371bf953c3229a95b2ff2d9cd41 to account id: oaccount~68d67712f500e9dac8c314c19744003a993250271d960e9b0d25267bb18dfe9a." }, "encode": "JSON", "sourceURL": "centralbank-oabcs1-nrt.blockchain.ocp.example.com:20010", "blockNumber": 352 } }
Il pacchetto API wrapper include anche le API approveHoldCBDCTokensInterOrg
e createCBDCAccount
, che combinano le API del codice concatenato e le API della console Oracle Blockchain Platform in un unico endpoint per la creazione dell'account.
-
approveHoldCBDCTokensInterOrg
- Questo metodo trasferisce i token in modo sicuro tra le organizzazioni. Internamente, questo metodo utilizza l'API di commit a due fasi in Oracle Blockchain Platform.
- Payload:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "quantity": 1, "senderEndorsers": ["Sender Endorsers values"], "receiverEndorsers": ["Receiver Endorsers values"], "transientMapArgsFlag": true }
- Parametri payload:
tokenId: string
: l'ID del token CBDC da trasferire. L'ID token deve esistere nel libro contabile.operationId: string
: l'ID operazione univoco della richiesta di trasferimento (hold) da approvare.quantity: number
: il numero di token da trasferire.senderEndorsers: string[]
: un array di pari livello nell'organizzazione mittente (ad esempio,["peer0.senderorg", "peer1.senderorg"]
) che deve approvare la transazione.receiverEndorsers: string[]
: un array di pari livello nell'organizzazione ricevente (ad esempio,["peer0.receiverorg", "peer1.receiverorg"
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
{ "returnCode": "Success", "error": "", "result": { "transactions": [ { "channel": "buildtest", "chaincode": "WCBDCConfAug13", "txstatus": "Committed", "prepare": { "txid": "3140569a4ecb3c3f141cc2468fe21276640b7fd79013d951d9104b79072d8f9c", "blockNumber": 335 }, "commit": { "txid": "9cfa020acc13c1de911e8a53eae799f47c1947d88a608753edb4b97fe45d00cc", "blockNumber": 336 }, "rollback": {} }, { "channel": "buildtest", "chaincode": "WCBDCConfAug13", "txstatus": "Committed", "prepare": { "txid": "32137cd7e16c560f4d96d0f8999f6a267c1e95be2f5b11ef0541e574a6cd7275", "blockNumber": 335 }, "commit": { "txid": "ac55bd7648680ff6b795e4a99026d7c538f68167683e1e622e55778a2930614d", "blockNumber": 336 }, "rollback": {} } ], "lrc": {}, "globalStatus": "Success", "globalTxid": "b54d4333-f4bb-4ca4-a7b7-cc75b659d912", "txStartTime": "2025-08-25T13:16:55.825578503Z" } }
-
createCBDCAccount
-
L'API
createCBDCAccount
completa le seguenti operazioni in sequenza.- Crea un ID di registrazione per l'utente in Oracle Blockchain Platform. L'ID iscrizione creato è uguale all'ID utente, con alcune limitazioni. L'ID può contenere solo caratteri alfanumerici, trattini (-) e segni di sottolineatura (_). Se l'ID utente contiene altri caratteri speciali, questi vengono sostituiti da un carattere di sottolineatura (_). Ad esempio, se l'ID utente è adam.fripp@example.com, l'ID iscrizione creato è adam_fripp_example_com. Se l'iscrizione esiste già per l'ID utente specificato, non viene creata un'altra iscrizione.
- Crea un conto nel libro contabile con i dettagli forniti nel payload.
- Associa il nuovo account al token specificato nel payload.
- Assegna all'utente il ruolo specificato nel payload.
Per garantire la coerenza e per evitare dati incompleti, se uno dei passi successivi non riesce, l'ID iscrizione creato nel primo passo viene eliminato.
- Payload:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "applicationGroups": "[\"applicationGroups value\"]", "customAccountId": "custom_account_id value", "tokenId": "{{bc-token-id}}", "role": "role value (for example minter / burner / notary / tokenAdmin / tokenAuditor / orgAdmin / orgAuditor/ No)", "dailyLimits": "{\"max_daily_amount\":1000, \"max_daily_transactions\":100}", "endorsers": {{endorsers}}, "transientMapArgsFlag": true }
- Parametri payload:
orgId
- L'ID MSP (Membership Service Provider) dell'utente per cui creare l'account. L'ID deve iniziare con un carattere alfanumerico e può includere lettere, numeri e caratteri speciali come caratteri di sottolineatura (_), punti (.), simboli at (@) e trattini (-).userId
: il nome utente o l'ID e-mail dell'utente. L'ID deve iniziare con un carattere alfanumerico e può includere lettere, numeri e caratteri speciali come caratteri di sottolineatura (_), punti (.), simboli at (@) e trattini (-).applicationGroups
: l'applicazione raggruppa l'account. Ad esempio,System_Admins
.customAccountId
: ID casuale univoco per gli account che utilizzano codice concatenato in modalità riservata.tokenId
: l'ID del token associato all'account. L'ID deve iniziare con un carattere alfanumerico e può includere lettere, numeri e i caratteri speciali di sottolineatura (_) e trattino (-). La lunghezza non può superare i 16 caratteri.role
: il ruolo deve essere uno dei seguenti valori:minter
,burner
,notary
,tokenAdmin
,tokenAuditor
,orgAdmin
oorgAuditor
.dailyLimits
: due campi numerici che definiscono i limiti delle transazioni giornaliere:max_daily_amount
emax_daily_transactions
.endorsers: string[]
: un array di peer (ad esempio,peer1
,peer2
) che deve approvare la transazione.transientMapArgsFlag
: valore booleano. Se true, gli argomenti vengono inviati tramite una mappa transitoria per la riservatezza. Se false, gli argomenti vengono inviati tramite il payload standard.
- Esempio di valore restituito:
"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" } }