Fungible Token Framework 래퍼 API 패키지
Oracle Blockchain Platform Digital Assets Edition에는 예금 토큰 시나리오와 관련된 작업을 지원하도록 REST API를 확장하는 래퍼 API 패키지가 포함되어 있습니다.
래퍼 API 패키지는 API 게이트웨이 서비스 및 OCI 함수를 사용하여 예금 토큰 애플리케이션용으로 특별히 설계된 API 경로를 배치합니다. 대체 가능한 토큰 프레임워크 래퍼 API 패키지는 Oracle Blockchain Platform 콘솔에서 다운로드할 수 있으며 다음 구성요소를 포함합니다.
DepositTokenWrapperAPI.zip
- 배치에 필요한 Terraform 스크립트를 포함하는 래퍼 API 패키지가 포함된 아카이브 파일입니다. 이 파일을 OCI(Oracle Cloud Infrastructure)의 리소스 관리자 스택에 배치하여 래퍼 API에 필요한 Oracle 리소스를 생성합니다.DepositToken_WrapperAPI.postman_collection.json
- 배치된 래퍼 API를 테스트할 수 있는 Postman 모음입니다. 컬렉션에는 래퍼 API 패키지에 정의된 API에 해당하는 끝점 및 페이로드가 포함된 미리 구성된 요청이 포함됩니다.
래퍼 API
-
activateAccount
- 원래 메소드 이름:
activateAccount
- 이 POST 메소드는 토큰 계정을 활성화합니다. 이 메소드는 지정된 조직의
Token Admin
또는Org Admin
에 의해서만 호출될 수 있습니다. 계정 상태 기능 이전에 생성된 계정의 경우 이 메소드를 호출하여 계정 상태를 활성으로 확인해야 합니다. - 페이로드:
{ "tokenId": "{{bc-token-id}}", "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}} }
- 매개변수:
tokenId: string
– 토큰의 ID입니다.orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.endorsers: string[]
– 트랜잭션을 보증해야 하는 피어의 배열(예:peer1
,peer2
)입니다.
- 반환값:
- 성공 시 지정된 토큰 계정에 대한 계정 상태 객체의 JSON 표현입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "db0738d4a44f6d9c80b24fce7c518c07023f7be19edaa69b272eaf7886b4b925", "payload": { "assetType": "oaccountStatus", "status_id": "oaccountStatus~d5814d96d8517ac31727d60aace0519c58a425892ab0d378fcfb0a35771f65ae", "account_id": "oaccount~802bf8da5579c6103b2dddaa6c4385df8e722d639a18029e0e93d7a5d6f826d6", "status": "active" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 194 } }
-
addTokenAdmin
- 원래 메소드 이름:
addTokenAdmin
- 이 POST 메소드는 사용자를 체인 코드의
Token Admin
로 추가합니다. 이 메소드는 체인 코드의Token Admin
만 호출할 수 있습니다. - 페이로드:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- 매개변수:
orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환값:
- 성공 시 체인 코드의
Token Admin
로 추가된 사용자의 세부정보를 포함하는 메시지입니다.
- 성공 시 체인 코드의
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "bd7416689b1acdace3c557faebbc0ad9a51671c10278ba6909350a6fe4b08eed", "payload": { "msg": "User (Org_Id: CB, User_Id: cb) is already Token Admin." }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 193 } }
-
addTokenAuditor
- 이 POST 메소드는 사용자를 체인 코드의
Token Auditor
로 추가합니다. 이 메소드는 체인 코드의Token Admin
만 호출할 수 있습니다. - 페이로드:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- 매개변수:
orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환값:
- 성공 시 체인 코드의
Token Auditor
로 추가된 사용자의 세부정보를 포함하는 메시지입니다.
- 성공 시 체인 코드의
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "cd81f6c4c9e7c18ece357dbf5c139ef66ef2d6566be3b14de5f6d0a3fd4bb2f0", "payload": { "msg": "Successfully added Token Auditor (Org_Id: CB, User_Id: cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 196 } }
-
addOrgAdmin
- 원래 메소드 이름:
addOrgAdmin
- 이 POST 메소드는 사용자를 체인 코드의
Token Admin
로 추가합니다. 이 메소드는 체인 코드의Token Admin
또는 지정된 조직의Org Admin
에 의해서만 호출될 수 있습니다. - 페이로드:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- 매개변수:
orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환값:
- 성공 시 체인 코드의
Org Admin
로 추가된 사용자의 세부정보를 포함하는 메시지입니다.
- 성공 시 체인 코드의
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "96a84dffcb9156f7271dfb414e8c43b540595044cf9145f5fd56e9873797fc4a", "payload": { "msg": "Successfully added Org Admin (Org_Id: CB, User_Id: cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 197 } }
-
addOrgAuditor
- 이 POST 메소드는 사용자를 체인 코드의
Org Auditor
로 추가합니다. 이 메소드는 체인 코드의Token Admin
또는 지정된 조직의Org Admin
에 의해서만 호출될 수 있습니다. - 페이로드:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- 매개변수:
orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환값:
- 성공 시 체인 코드의
Org Auditor
로 추가된 사용자의 세부정보를 포함하는 메시지입니다.
- 성공 시 체인 코드의
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "44bbad35a1478cb714e32f7cfd551897868a203520aab9cea5771d3aadc1cf03", "payload": { "msg": "Successfully added Org Auditor (Org_Id: CB, User_Id: cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 198 } }
-
addRole
- 원래 메소드 이름:
addRole
- 이 메소드는 지정된 사용자 및 토큰에 롤을 추가합니다.
- 페이로드:
{ "tokenId": "{{bc-token-id}}", "role": "role value (for example minter / burner / notary)", "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}} }
- 매개변수:
tokenId: string
– 토큰의 ID입니다.role: string
– 지정된 사용자에게 추가할 역할의 이름입니다.orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.endorsers: string[]
– 트랜잭션을 보증해야 하는 피어의 배열(예:peer1
,peer2
)입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "29ea766dee8e6d273eba3c40a9fea75a1aa85dc3c280d40695f6224c5c52d93c", "payload": { "msg": "Successfully added role 'notary' to Account Id: oaccount~2eb5f8a9bc561f8f41a4ea3be9511958cc6684ef14f2337ca396efc301b627d8 (Org-Id: CB, User-Id: manager_user_cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 201 } }
-
approveMint
- 원래 메소드 이름:
approveMint
- Notaries는 이 POST 메서드를 호출하여 민트 요청을 승인할 수 있습니다.
- 페이로드:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "sameOrgEndorser": true }
- 매개변수:
tokenId: string
– 토큰의 ID입니다.operationId: string
– 승인할 민트 요청의 고유 작업 ID입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환 값 예:
{ "returnCode": "Success", "error": "", "result": { "txid": "a4537ef34a955b023b7c205b9abf06a6c79e4fdd761fb24f41b8eb34126b66c0", "payload": { "msg": "Successfully minted 10 tokens to Account Id: oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0 (Org-Id: CB, User-Id: creator_user_cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 204 } }
-
executeHoldTokens
- 원래 메소드 이름:
executeHoldTokens
- Notaries는 이 메소드를 호출하여 토큰 보류를 승인합니다. 토큰 소유자가 이전에 보류한 토큰 수량이 이제 수신자에게 이전됩니다.
quantity
값이 실제 보류 값보다 작으면 토큰 소유자가 나머지 금액을 다시 사용할 수 있습니다. 토큰 모델의behaviors
섹션에roles
동작이 지정되고notary_role_name
값이 설정된 경우 호출자 계정에 공증 롤이 있어야 합니다. 그렇지 않으면 계정이 있는 호출자가 공증으로 작동할 수 있습니다. - 페이로드:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "quantity": 1, "endorsers": {{endorsers}} }
- 매개변수:
tokenId: string
– 토큰의 ID입니다.operationId: string
– 승인할 민트 요청의 고유 작업 ID입니다.quantity: number
– 전송할 보유 토큰 수입니다.endorsers: string[]
– 트랜잭션을 보증해야 하는 피어의 배열(예:peer1
,peer2
)입니다.
- 반환 값 예:
{ "returnCode": "Success", "error": "", "result": { "txid": "c1149aaa486abc4931d9024c18dfcb230bb321723d1160b0bf981c0011c4856a", "payload": { "msg": "Account Id: oaccount~51e676d7182a02ea7418ef58a6d54ecfe3858ef40b4ffb3d859b320da3921594 (Org-Id: CB, User-Id: issuer_user_cb) is successfully executed '10' tokens from Operation Id '8e3145'." }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 213 } }
-
associateTokenToAccount
- 원래 메소드 이름:
associateTokenToAccount
- 이 POST 메소드는 지정된 계정 ID를 지정된 토큰에 연관시킵니다.
Token Admin
또는Org Admin
에서 호출할 수 있습니다. - 페이로드:
{ "accountId": "account_id value", "tokenId": "{{bc-token-id}}", "endorsers": {{endorsers}} }
- 매개변수:
accountId: string
– 계정의 ID입니다.tokenId: string
– 토큰의 ID입니다.endorsers: string[]
– 트랜잭션을 보증해야 하는 피어의 배열(예:peer1
,peer2
)입니다.
- 반환 값 예:
{ "returnCode": "Success", "error": "", "result": { "txid": "efc7381fb6fc6174a40e83ff5f09d2bbf7f6f490365e3bbf19d5502c2cfec474", "payload": { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~1c6aa60e220b8fc70caf4cea1ed723ddb193a00321e5e0004def062816b77090", "user_id": "cb12", "org_id": "CB", "token_type": "fungible", "token_id": "USD", "token_name": "cbdc", "balance": 0, "onhold_balance": 0, "onhold_burn_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 100, "daily_transactions": 0, "current_date": "2024-12-11T00:00:00.000Z" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 216 } }
-
createAccount
- 원래 메소드 이름:
createAccount
- 이 방법은 지정된 사용자 및 토큰에 대한 계정을 만듭니다. 언제든 토큰이 있는 사용자에 대해 계정을 만들어야 합니다. 계정 ID는 자산 유형과 토큰 ID를 연결한 다음 조직 ID와 사용자 ID를 연결하여 SHA-256 해시를 생성함으로써 구성됩니다. 이 메소드는 체인 코드의
Token Admin
또는 지정된 조직의Org Admin
에 의해서만 호출될 수 있습니다. - 페이로드:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "tokenType": "fungible", "dailyLimits": "{\"max_daily_amount\":10000,\"max_daily_transactions\":100}", "endorsers": {{endorsers}} }
- 매개변수:
orgId
– 계정을 만들 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다. ID는 영숫자로 시작해야 하며 문자, 숫자 및 밑줄(_), 마침표(.), at 기호(@), 하이픈(-)과 같은 특수 문자를 포함할 수 있습니다.userId
– 사용자의 사용자 이름 또는 전자 메일 ID입니다. ID는 영숫자로 시작해야 하며 문자, 숫자 및 밑줄(_), 마침표(.), at 기호(@), 하이픈(-)과 같은 특수 문자를 포함할 수 있습니다.tokenType: TokenType
– 토큰의 유형으로,fungible
여야 합니다.daily_limits: DailyLimits
– 다음 유형의 JSON 객체입니다.
예제에서{ "max_daily_amount": 100000 "max_daily_transactions": 10000 }
max_daily_amount
값은 매일 트랜잭션할 수 있는 최대 토큰 양이고max_daily_transactions
값은 매일 완료할 수 있는 최대 트랜잭션 수입니다.endorsers: string[]
– 트랜잭션을 보증해야 하는 피어의 배열(예:peer1
,peer2
)입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "453821c7ffd477987ef8ccbd836b893969531ab768098cd4a99e3b89cd38a391", "payload": { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~28ac774001f374064029d51af4fb67e26ea1ea9ef62828b7a72dbf3beb8efd8d", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "", "token_name": "", "balance": 0, "onhold_balance": 0, "onhold_burn_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 100, "daily_transactions": 0, "current_date": "2024-12-09T00:00:00.000Z" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 188 } }
-
getAccount
- 원래 메소드 이름:
getAccount
- 이 메소드는 지정된 사용자에 대한 계정 세부정보를 반환합니다. 이 메소드는 체인 코드의
Token Admin
또는 계정의Account Owner
에 의해서만 호출될 수 있습니다. - 질의:
/getAccount?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
- 매개변수:
tokenId: string
– 토큰의 ID입니다.orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": { "bapAccountVersion": 0, "assetType": "oaccount", "status": "active", "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "USD", "token_name": "cbdc", "balance": 0, "onhold_balance": 0, "onhold_burn_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 1000, "daily_transactions": 0, "current_date": "2024-11-20T00:00:00.000Z" }, "encode": "JSON" } }
-
getAccountBalance
- 원래 메소드 이름:
getAccountBalance
- 이 GET 메소드는 지정된 계정 및 토큰에 대한 현재 잔액을 반환합니다. 이 메소드는 계정의
Token Admin
또는AccountOwner
에 의해서만 호출될 수 있습니다. /getAccountBalance?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
- 매개변수:
tokenId: string
– 토큰의 ID입니다.orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": { "msg": "Current Balance is: 100", "user_balance": 100 }, "encode": "JSON" } }
-
getAccountsByUser
- 원래 메소드 이름:
getAccountsByUser
- 이 메소드는 지정된 사용자에 대한 모든 계정 목록을 반환합니다. 이 메소드는 체인 코드의
Token Admin
또는 계정의Account Owner
에 의해서만 호출될 수 있습니다. - 질의:
/getAccountsByUser?orgId={{bc-org-id}}&userId={{bc-user-id}}
- 매개변수:
orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.
- 반환 값 예:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~8db15b42910eeec401e1bf22c69dfdd11c820ecc26539ea03a3426fa25cb8c28", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "", "token_name": "", "balance": 0, "onhold_balance": 0, "onhold_burn_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 1000, "daily_transactions": 0, "current_date": "2024-11-20T00:00:00.000Z" }, { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "USD", "token_name": "cbdc", "balance": 0, "onhold_balance": 0, "onhold_burn_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 1000, "daily_transactions": 0, "current_date": "2024-11-20T00:00:00.000Z" }, { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~28ac774001f374064029d51af4fb67e26ea1ea9ef62828b7a72dbf3beb8efd8d", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "", "token_name": "", "balance": 0, "onhold_balance": 0, "onhold_burn_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 100, "daily_transactions": 0, "current_date": "2024-12-09T00:00:00.000Z" } ], "encode": "JSON" } }
-
getAccountTransactionHistory
- 원래 메소드 이름:
getAccountTransactionHistory
- 이 GET 메소드는 계정 트랜잭션 내역을 반환합니다. 이 메소드는 체인 코드의
Token Admin
또는 계정 소유자가 호출할 수 있습니다. /getAccountTransactionHistory?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
- 매개변수:
tokenId: string
– 토큰의 ID입니다.orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.
- 반환 값 예:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "transaction_id": "otransaction~64c5a4830949eae1424600f3d4a438c6f603a7c3ea31a68e374b899803999e22", "transacted_amount": 10, "timestamp": "2024-12-11T13:37:28.000Z", "balance": 550, "onhold_balance": 10, "token_id": "USD", "category": "category value", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "REJECT_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" }, { "transaction_id": "otransaction~a4537ef34a955b023b7c205b9abf06a6c79e4fdd761fb24f41b8eb34126b66c0", "transacted_amount": 10, "timestamp": "2024-12-11T13:36:32.000Z", "balance": 550, "onhold_balance": 10, "token_id": "USD", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "APPROVE_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" }, { "transaction_id": "otransaction~6237a759422bd9fb112742e8cd7e6450df5a74a32236d9b1005571afed8904a4", "transacted_amount": 10, "timestamp": "2024-12-11T13:36:18.000Z", "balance": 540, "onhold_balance": 10, "token_id": "USD", "category": "category value", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "REQUEST_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" }, { "transaction_id": "otransaction~06b35071415d74aa1a7c18449149c937d886cae76a832c44cf8d98e84586e76e", "transacted_amount": 10, "timestamp": "2024-12-11T13:35:46.000Z", "balance": 540, "onhold_balance": 10, "token_id": "USD", "category": "category value", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "REQUEST_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" } ], "encode": "JSON" } }
-
getAccountTransactionHistoryWithFiltersFromRichHistDB
- 원래 메소드 이름:
getAccountTransactionHistoryWithFiltersFromRichHistDB
- 이 방법은 서식 있는 기록 데이터베이스에서 계정 트랜잭션 기록 세부정보를 반환합니다. 이 메소드는 계정의
Token Admin
또는AccountOwner
에 의해서만 호출될 수 있습니다. 이 방법을 사용하려면 Oracle Database View Definitions for Wholesale CBDC에 설명된 대로 ORDS(Oracle REST Data Services) 및 OAuth가 활성화된 상태로 Oracle Autonomous Database를 실행해야 합니다. /getAccountTransactionHistoryWithFiltersFromRichHistDB?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}&customEndpoint=custom_endpoint value&bearerToken=bearer_token value&filters={"pageSize":20,"bookmark":"","startTime":"2022-01-16T15:16:36+00:00","endTime":"2022-01-17T15:16:36+00:00"}
- 매개변수:
tokenId: string
– 토큰의 ID입니다.orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.customEndpoint
– 트랜잭션 내역을 인출할 리치 내역 데이터베이스의 RESTful 서비스 끝점입니다.bearerToken
– 요청에 권한이 부여되었는지 확인하기 위해 RESTful 끝점을 호출하는 데 사용할 토큰입니다.filters: string
– 선택적 매개변수입니다. 비어 있으면 모든 레코드가 반환됩니다.PageSize
속성은 반환할 레코드 수를 결정합니다.PageSize
가 0이면 기본 페이지 크기는 20입니다.Bookmark
속성은 반환할 레코드의 시작 인덱스를 결정합니다.StartTime
및EndTime
속성은 RFC-3339 형식으로 지정해야 합니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "transaction_id": "otransaction~64c5a4830949eae1424600f3d4a438c6f603a7c3ea31a68e374b899803999e22", "transacted_amount": 10, "timestamp": "2024-12-11T13:37:28.000Z", "balance": 550, "onhold_balance": 10, "token_id": "USD", "category": "category value", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "REJECT_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" }, { "transaction_id": "otransaction~a4537ef34a955b023b7c205b9abf06a6c79e4fdd761fb24f41b8eb34126b66c0", "transacted_amount": 10, "timestamp": "2024-12-11T13:36:32.000Z", "balance": 550, "onhold_balance": 10, "token_id": "USD", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "APPROVE_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" }, { "transaction_id": "otransaction~6237a759422bd9fb112742e8cd7e6450df5a74a32236d9b1005571afed8904a4", "transacted_amount": 10, "timestamp": "2024-12-11T13:36:18.000Z", "balance": 540, "onhold_balance": 10, "token_id": "USD", "category": "category value", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "REQUEST_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" }, { "transaction_id": "otransaction~06b35071415d74aa1a7c18449149c937d886cae76a832c44cf8d98e84586e76e", "transacted_amount": 10, "timestamp": "2024-12-11T13:35:46.000Z", "balance": 540, "onhold_balance": 10, "token_id": "USD", "category": "category value", "description": "description value", "transacted_account": "oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0", "transaction_type": "REQUEST_MINT", "transacted_org_id": "CB", "transacted_user_id'": "creator_user_cb" } ], "encode": "JSON" } }
-
getNetTokens
- 원래 메소드 이름:
getNetTokens
- 이 GET 메소드는 지정된 토큰에 대해 시스템에서 사용 가능한 총 순 토큰 수를 반환합니다. 순 토큰 합계는 토큰이 레코딩된 후 남은 토큰 수입니다. 이 메소드는 체인 코드의
Token Admin
또는 지정된 조직의Org Admin
에 의해서만 호출될 수 있습니다. /getNetCBDCTokens?tokenId={{bc-token-id}}
- 매개변수:
tokenId: string
– 토큰의 ID입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": { "msg": "Net supply of token for Token Id: USD is 878 tokens.", "quantity": 878 }, "encode": "JSON" } }
-
getOnHoldIds
- 원래 메소드 이름:
getOnHoldIds
- 이 GET 메소드는 지정된 사용자 및 토큰에 대한 모든 보유 ID 목록을 반환합니다. 이 메소드는 계정의
Token Admin
,Org Admin
또는AccountOwner
에 의해서만 호출될 수 있습니다. /getOnHoldIds?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
- 매개변수:
tokenId: string
– 토큰의 ID입니다.orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": { "msg": "Holding Ids are: ohold~cbdc~USD~8e3147,ohold~cbdc~USD~8e315", "holding_ids": [ "ohold~cbdc~USD~8e3147", "ohold~cbdc~USD~8e315" ] }, "encode": "JSON" } }
-
getTotalMintedTokens
- 원래 메소드 이름:
getTotalMintedTokens
- 이 GET 메소드는 지정된 토큰에 대한 총 조율된 토큰 수를 반환합니다. 이 메소드는
Token Admin
또는Org Admin
에서만 호출할 수 있습니다. - 질의:
/getTotalMintedTokens?tokenId={{bc-token-id}}
- 매개변수:
tokenId: string
– 토큰의 ID입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": { "msg": "Total minted token for Token Id: USD is 910 tokens.", "quantity": 910 }, "encode": "JSON" } }
-
getUserByAccountId
- 원래 메소드 이름:
getUserByAccountId
- 이 GET 메소드는 지정된 계정에 대한 사용자 세부정보를 반환합니다. 이 메소드는
Token Admin
,Token Auditor
또는Org Auditor
에 의해 호출될 수 있습니다. - 질의:
/getUserByAccountId?accountId=account_id value
- 매개변수:
accountId: string
– 계정의 ID입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": { "token_id": "USD", "user_id": "admin_user_cb", "org_id": "CB" }, "encode": "JSON" } }
-
getUsersByRole
- 원래 메소드 이름:
getUsersByRole
- 이 메소드는 지정된 롤 및 토큰에 대한 모든 사용자 목록을 반환합니다. 이 메소드는
Token Admin
에 의해서만 호출할 수 있습니다. /getUsersByRole?tokenId={{bc-token-id}}&role=role value (for example minter / burner / notary)
- 매개변수:
tokenId: string
– 토큰의 ID입니다.role: string
– 검색할 역할의 이름입니다.
- 반환 값 예:
{ "returnCode": "Success", "error": "", "result": { "payload": { "users": [ { "token_id": "USD", "user_id": "creator_user_cb", "org_id": "CB" }, { "token_id": "USD", "user_id": "cb4", "org_id": "CB" } ] }, "encode": "JSON" } }
-
holdTokens
- 원래 메소드 이름:
holdTokens
- 이 방법은
to_account_id
계정을 사용하여 토큰 소유자를 대신하여 보류를 생성합니다. 공증 계정이 지정되어 보류를 완료하거나 해제합니다. 보류가 생성되면 지급인의 지정된 토큰 잔액이 보류됩니다. 보류가 완료 또는 해제될 때까지 보류 잔액을 이전할 수 없습니다. 이 메소드의 호출자는 이미 생성된 계정을 가지고 있어야 합니다. - 페이로드:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "toOrgId": "to_org_id value", "toUserId": "to_user_id value", "notaryOrgId": "notary_org_id value", "notaryUserId": "notary_user_id value", "quantity": 1, "timeToExpiration": "time_to_expiration value", "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}", "endorsers": {{endorsers}} }
- 매개변수:
tokenId: string
– 토큰의 ID입니다.operationId: string
– 보류 작업을 식별하는 고유 ID입니다. 일반적으로 이 ID는 클라이언트 응용 프로그램에 의해 전달됩니다.toOrgId: string
– 현재 조직에 있는 수신자의 멤버쉽 서비스 제공자(MSP) ID입니다.toUserId: string
– 수신자의 사용자 이름 또는 전자 메일 ID입니다.notaryOrgId: string
– 현재 조직에 있는 공증인의 멤버쉽 서비스 제공자(MSP) ID입니다.notaryUserId: string
– 공증인의 사용자 이름 또는 전자 메일 ID입니다.quantity: number
– 보류할 토큰 수입니다.timeToExpiration
– 보류가 만료되는 시간입니다. 영구 보류에 대해 0을 지정합니다. 그렇지 않은 경우 RFC-3339 형식을 사용합니다. 2021-06-02T12:46:06Z을 입력합니다.infoDetails: JSON
– 다음 예에 표시된 설명 및 범주입니다.{ "category" : "category input", "description" : "description input" }
endorsers: string[]
– 트랜잭션을 보증해야 하는 피어의 배열(예:peer1
,peer2
)입니다.
- 반환 값 예:
{ "returnCode": "Success", "error": "", "result": { "txid": "e575d339299bb98afe83207e749cd07654f209673c84c6973738b6094da33062", "payload": { "msg": "AccountId oaccount~51e676d7182a02ea7418ef58a6d54ecfe3858ef40b4ffb3d859b320da3921594 (Org-Id: CB , User-Id: issuer_user_cb) is successfully holding 10 tokens" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 211 } }
-
init
- 원래 메소드 이름:
init
- 이 메소드는 체인 코드가 배치될 때 호출됩니다. 사용자 정보는 체인코드의
Token Admin
로 저장됩니다. - 페이로드:
{ "adminList": "[{\"org_id\":\"{{bc-org-id}}\",\"user_id\":\"{{bc-admin-user}}\"}]" }
- 매개변수:
adminList array
– 토큰 관리자 목록을 지정하는{user_id, org_id}
정보의 배열입니다.adminList
배열은 필수 매개변수입니다.
- 반환 값 예:
{ "returnCode": "Success", "error": "", "result": { "txid": "fdb7dc89832c8045a333823b77fa24ae628178148dc93b3550040e070d7cd807", "payload": "", "encode": "UTF-8", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 263 } }
-
initializeDepositToken
- 원래 메소드 이름:
initializeDepositToken
- 이 메소드는 토큰을 생성하고 토큰 속성을 초기화합니다. 자산 및 해당 속성이 상태 데이터베이스에 저장됩니다. 이 메소드는 체인 코드의
Token Admin
에 의해서만 호출될 수 있습니다. - 페이로드:
{ "tokenAsset": "{\"token_id\":\"{{bc-token-id}}\",\"token_desc\":\"token_desc value\"}", "sameOrgEndorser": true }
- 매개변수:
tokenAsset: <Token Class>
– 토큰 자산이 이 메소드에 매개변수로 전달됩니다. 토큰 자산의 속성은 모델 파일에서 설명됩니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환값:
- 성공 시 생성된 토큰 자산의 JSON 표현입니다.
- 반환 값 예:
{ "returnCode": "Success", "error": "", "result": { "txid": "aa7a4f4cc214e1a041a5a6fb7ca7530f08256559e538c9f9582e6fd12c9e65c8", "payload": { "assetType": "otoken", "events": false, "token_id": "t1", "token_name": "cbdc", "token_desc": "token_desc value", "token_standard": "ttf+", "token_type": "fungible", "token_unit": "fractional", "behaviors": [ "divisible", "mintable", "transferable", "burnable", "holdable", "roles" ], "roles": { "minter_role_name": "minter", "burner_role_name": "burner", "notary_role_name": "notary", "mint_approver_role_name": "notary", "burn_approver_role_name": "notary" }, "mintable": { "max_mint_quantity": 1000, "mint_approval_required": true }, "burnable": { "burn_approval_required": true }, "divisible": { "decimal": 2 }, "token_to_currency_ratio": 999 }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 267 } }
-
getAccountHistory
- 원래 메소드 이름:
getAccountHistory
- 이 GET 메소드는 지정된 사용자 및 토큰에 대한 계정 내역 세부정보를 반환합니다.
- 질의:
/getAccountHistory?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
- 매개변수:
tokenId: string
– 토큰의 ID입니다.orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "trxId":"2gsdh17fff222467e5667be042e33ce18e804b3e065cca15de306f837e416d7c3e", "timeStamp":1629718288, "value":{ "assetType":"oaccount", "account_id":"oaccount~digicur~b4f45440aa2a7942db64443d047027e9d714d62cba5c3d546d64f368642f622f", "user_id":"user1", "org_id":"Org1MSP", "token_id":"digiCurr101", "token_name":"digicur", "balance":100, "onhold_balance":0, "bapAccountVersion": 1 }, { "trxId":"9fd07fff222467e5667be042e33ce18e804b3e065cca15de306f837e416d7c3e", "timeStamp":1629718288, "value":{ "assetType":"oaccount", "account_id":"oaccount~digicur~b4f45440aa2a7942db64443d047027e9d714d62cba5c3d546d64f368642f622f", "user_id":"user1", "org_id":"Org1MSP", "token_id":"digiCurr101", "token_name":"digicur", "balance":0, "onhold_balance":0, "bapAccountVersion": 0 } } ], "encode": "JSON" } }
-
rejectMint
- 원래 메소드 이름:
rejectMint
- 공증인은 이 메서드를 호출하여 민팅 요청을 거부할 수 있습니다.
- 페이로드:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "sameOrgEndorser": true }
- 매개변수:
token_id: string
– 민팅을 거부할 토큰의 ID입니다.operation_id: string
– 민트 요청을 나타내는 고유한 작업 ID입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "64c5a4830949eae1424600f3d4a438c6f603a7c3ea31a68e374b899803999e22", "payload": { "msg": "Successfully rejected mint request with Operation Id 'op1234' to mint 10 tokens of token id USD" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 205 } }
-
releaseHoldTokens
- 원래 메소드 이름:
releaseHoldTokens
- 이 POST 메소드는 토큰 보류를 해제합니다. 이전이 완료되지 않고 원래 소유자가 보유한 모든 토큰을 다시 사용할 수 있습니다.
- 페이로드:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "endorsers": {{endorsers}} }
- 매개변수:
token_id: string
– 토큰의 ID입니다.operation_id: string
– 보류 작업을 식별하는 고유 ID입니다. 일반적으로 이 ID는 클라이언트 응용 프로그램에 의해 전달됩니다.endorsers: string[]
– 트랜잭션을 보증해야 하는 피어의 배열(예:peer1
,peer2
)입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "f04ba8895d52bc636d843f88476002bc99d01480c36be87c8fa259cd47a29380", "payload": { "msg": "Successfully released '10' tokens from Operation Id '8e3144' to Account Id: oaccount~51e676d7182a02ea7418ef58a6d54ecfe3858ef40b4ffb3d859b320da3921594 (Org-Id: CB, User-Id: issuer_user_cb)." }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 214 } }
-
removeTokenAdmin
- 원래 메소드 이름:
removeTokenAdmin
- 이 POST 메소드는 사용자를 체인 코드의
Token Admin
로 제거합니다. 이 메소드는 체인 코드의Token Admin
만 호출할 수 있습니다. 관리자는 자신을 제거할 수 없습니다. - 페이로드:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- 매개변수:
org_id: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.user_id: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "6a3b9b568d04b5beb29830f91efe4e8c6310b6cf36940cecfb4ab690fbfde739", "payload": { "msg": "Successfully removed Token Admin (Org_Id: CB, User_Id: cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 218 } }
-
removeTokenAuditor
- 원래 메소드 이름:
removeTokenAuditor
- 이 POST 메소드는 사용자를 체인 코드의
Token Auditor
로 제거합니다. 이 메소드는 체인 코드의Token Admin
만 호출할 수 있습니다. - 페이로드:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- 매개변수:
org_id: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.user_id: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "a886a6040fbc76374a3c78c89ab0ffc9f7b8391cc5239b169bf3b878cf40c67b", "payload": { "msg": "Successfully removed Token Auditor (Org_Id: CB, User_Id: cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 219 } }
-
removeOrgAdmin
- 원래 메소드 이름:
removeOrgAdmin
- 이 POST 메소드는 사용자를 체인 코드의
Org Admin
로 제거합니다. 이 메소드는 지정된 조직의Token Admin
또는Org Admin
에 의해서만 호출될 수 있습니다. - 페이로드:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- 매개변수:
org_id: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.user_id: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "e2a634f6093f89b1984e20ff86a513fabb7c3ade7cc9e27d9734b4aaf6c88597", "payload": { "msg": "Successfully removed Org Admin (Org_Id: CB, User_Id: cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 220 } }
-
removeOrgAuditor
- 원래 메소드 이름:
removeOrgAuditor
- 이 POST 메소드는 사용자를 체인 코드의
Org Auditor
로 제거합니다. 이 메소드는 지정된 조직의Token Admin
또는Org Admin
에 의해서만 호출될 수 있습니다. - 페이로드:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- 매개변수:
org_id: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.user_id: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "c3bc720461004a53b37c68d4bb264858b88d980bc093a0a3ebb62a32974fb306", "payload": { "msg": "Successfully removed Org Auditor (Org_Id: CB, User_Id: cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 221 } }
-
removeRole
- 원래 메소드 이름:
removeRole
- 이 메소드는 지정된 사용자로부터 롤을 제거합니다. 이 메소드는 체인 코드의
Token Admin
또는 지정된 조직의Org Admin
에 의해서만 호출될 수 있습니다. - 페이로드:
{ "tokenId": "{{bc-token-id}}", "role": "role value (for example minter / burner / notary)", "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}} }
- 매개변수:
tokenId: string
– 토큰의 ID입니다.role: string
– 지정된 사용자로부터 제거할 역할의 이름입니다.mintable
및burnable
동작은 사양 파일의minter_role_name
및burner_role_name
등록 정보에 해당합니다.orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.endorsers: string[]
– 트랜잭션을 보증해야 하는 피어의 배열(예:peer1
,peer2
)입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "274f0d0a2c4c3929817fb85b2e857519695c3c238ccf9903b084b87e9be7ee12", "payload": { "msg": "Successfully removed role 'notary' from Account Id: oaccount~2eb5f8a9bc561f8f41a4ea3be9511958cc6684ef14f2337ca396efc301b627d8 (Org-Id: CB, User-Id: manager_user_cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 200 } }
-
requestMint
- 원래 메소드 이름:
requestMint
- 이 메서드는 지정된 양의 토큰을 만들기 위해 공증인에게 요청을 보내기 위해 광부가 호출할 수 있습니다.
- 페이로드:
{ "tokenId": "{{bc-token-id}}", "operationId": "operation_id value", "notaryOrgId": "notary_org_id value", "notaryUserId": "notary_user_id value", "quantity": 1, "timeToExpiration": "time_to_expiration value", "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}", "sameOrgEndorser": true }
- 매개변수:
tokenId: string
– 민트할 토큰의 ID입니다.operationId: string
– 민트 요청을 나타내는 고유한 작업 ID입니다.notaryOrgId: string
– 요청을 처리할 MSP(멤버쉽 서비스 공급자) ID입니다.notaryUserId: string
– 요청을 처리할 광부 공증인의 사용자 이름 또는 전자 메일 ID입니다.quantity: number
– 민트할 토큰의 양입니다.timeToExpiration
– 민팅 요청이 만료되고 더 이상 유효하지 않은 시간입니다.infoDetails: JSON
– 다음 예와 같이 요청의 범주(category
) 및 설명(description
)을 지정하는 객체입니다.{ "category" : "category input", "description" : "description input" }
sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "06b35071415d74aa1a7c18449149c937d886cae76a832c44cf8d98e84586e76e", "payload": { "msg": "AccountId oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0 (Org-Id: CB , User-Id: creator_user_cb) has successfully submitted request to mint 10 tokens" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 202 } }
-
burnTokens
- 원래 메소드 이름:
burnTokens
- 이 POST 메소드는 트랜잭션 호출자 계정에서 토큰을 비활성화하거나 레코딩합니다. 이 메소드의 호출자는 계정 및 버너 롤을 가져야 합니다. 수량은 사양 파일에서
divisible
동작의decimal
매개변수로 지정된 십진수 값 내에 있어야 합니다. 이 방법은 버너 역할을 가진 계정의AccountOwner
에 의해 호출될 수 있습니다. - 페이로드:
{ "tokenId": "{{bc-token-id}}", "quantity": 1, "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}", "sameOrgEndorser": true }
- 매개변수:
tokenId: string
– 토큰의 ID입니다.quantity
– 레코딩할 토큰 수입니다.infoDetails: JSON
– 다음 예와 같이 요청의 범주(category
) 및 설명(description
)을 지정하는 객체입니다.{ "category" : "category input", "description" : "description input" }
sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환값:
- 성공 시 레코딩된 토큰 수량 및 계정 ID가 포함된 성공 메시지입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "aff0b2dbb163ec8076747525db81fbe8f678ac88a277c5f234337f0747eb1a8d", "payload": { "msg": "Successfully burned 10 tokens from account id: oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0 (Org-Id: CB, User-Id: creator_user_cb)" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 96 } }
-
setMaxDailyAmount
- 원래 메소드 이름:
setMaxDailyAmount
- 이 POST 메소드는 지정된 금액에 대한 계정 세부정보에서
maxDailyAmount
매개변수를 설정하는 데 사용됩니다. 이 메소드는 체인 코드의Token Admin
또는 지정된 조직의Org Admin
에 의해서만 호출될 수 있습니다. - 페이로드:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "tokenId": "{{bc-token-id}}", "maxDailyAmount": 1, "endorsers": {{endorsers}} }
- 매개변수:
orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.tokenId: string
– 토큰의 ID입니다.maxDailyAmount: number
– 지정된 계정에 대한 최대 일별 금액 값으로, 매일 거래할 수 있는 최대 금액을 정의합니다.endorsers: string[]
– 트랜잭션을 보증해야 하는 피어의 배열(예:peer1
,peer2
)입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "28682e0564e4721b6c1a8ec106f8c5c98319e9439959dbb9f83d8e6f111d9975", "payload": { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "USD", "token_name": "cbdc", "balance": 0, "onhold_balance": 0, "onhold_burn_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 1000, "daily_transactions": 0, "current_date": "2024-11-20T00:00:00.000Z" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 222 } }
-
setMaxDailyTransactionCount
- 원래 메소드 이름:
setMaxDailyTransactionCount
- 이 POST 메소드는 지정된 금액에 대한 계정 세부정보에서
maxDailyTransactions
매개변수를 설정하는 데 사용됩니다. 이 메소드는 체인 코드의Token Admin
또는 지정된 조직의Org Admin
에 의해서만 호출될 수 있습니다. - 페이로드:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "tokenId": "{{bc-token-id}}", "maxDailyTransactions": 1, "endorsers": {{endorsers}} }
- 매개변수:
orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.tokenId: string
– 토큰의 ID입니다.maxDailyTransactions: number
– 지정된 계정에 대한 최대 일별 금액 값으로, 일별 허용되는 최대 트랜잭션 수를 정의합니다.endorsers: string[]
– 트랜잭션을 보증해야 하는 피어의 배열(예:peer1
,peer2
)입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "8b6fb01de697562ee098110054f05d4a314933bd11ef471991cb43e25b68bad9", "payload": { "bapAccountVersion": 0, "assetType": "oaccount", "account_id": "oaccount~cdc6fa5e64bc29f700f99da69f980d8cbb768c7e1a11dd17274e75651f6afafe", "user_id": "admin_user_cb", "org_id": "CB", "token_type": "fungible", "token_id": "USD", "token_name": "cbdc", "balance": 0, "onhold_balance": 0, "onhold_burn_balance": 0, "max_daily_amount": 10000, "daily_amount": 0, "max_daily_transactions": 1000, "daily_transactions": 0, "current_date": "2024-11-20T00:00:00.000Z" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20010", "blockNumber": 223 } }
-
suspendAccount
- 원래 메소드 이름:
suspendAccount
- 이 메소드는 대체 가능한 토큰 계정을 일시 중지합니다. 원장에서
accountStatus
값을 찾을 수 없는 경우 오류가 발생합니다. 이 메소드는 체인 코드의Token Admin
또는 지정된 조직의Org Admin
에 의해서만 호출될 수 있습니다. - 페이로드:
{ "tokenId": "{{bc-token-id}}", "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "endorsers": {{endorsers}} }
- 매개변수:
tokenId: string
– 토큰의 ID입니다.orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.endorsers: string[]
– 트랜잭션을 보증해야 하는 피어의 배열(예:peer1
,peer2
)입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "e21d91d98091df77f90105d84074c0b802b01fc97a6b1304247774397fed1294", "payload": { "assetType": "oaccountStatus", "status_id": "oaccountStatus~d5814d96d8517ac31727d60aace0519c58a425892ab0d378fcfb0a35771f65ae", "account_id": "oaccount~802bf8da5579c6103b2dddaa6c4385df8e722d639a18029e0e93d7a5d6f826d6", "status": "suspended" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 195 } }
-
transferTokens
- 원래 메소드 이름:
transferTokens
- 이 메소드는 호출자의 토큰을 지정된 계정으로 이전합니다. 메소드의 호출자는 계정을 가져야 합니다. 수량은 사양 파일에서
divisible
동작의decimal
매개변수로 지정된 십진수 값 내에 있어야 합니다. - 페이로드:
{ "tokenId": "{{bc-token-id}}", "toOrgId": "to_org_id value", "toUserId": "to_user_id value", "quantity": 1, "infoDetails": "{\"category\":\"category value\",\"description\":\"description value\"}", "endorsers": {{endorsers}} }
- 매개변수:
tokenId: string
– 토큰의 ID입니다.toOrgId: string
– 현재 조직에서 수령인(수취인)의 멤버쉽 서비스 제공자(MSP) ID입니다.toUserId: string
– 수신자의 사용자 이름 또는 전자 메일 ID입니다.quantity: number
– 전송할 토큰 수입니다.infoDetails: JSON
– 다음 예와 같이 요청의 범주(category
) 및 설명(description
)을 지정하는 객체입니다.{ "category" : "category input", "description" : "description input" }
endorsers: string[]
– 트랜잭션을 보증해야 하는 피어의 배열(예:peer1
,peer2
)입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "d613b2494b965811b2fa2106152b7085f2d6d7d43e949b10b8668722d3636fe7", "payload": { "msg": "Successfully transferred 10 tokens from account id: oaccount~9d9806fa92aa0c4fdb34eaffac6e830181b5d47e64fbce752195e83024125ca0 (Org-Id: CB, User-Id: creator_user_cb) to account id: oaccount~51e676d7182a02ea7418ef58a6d54ecfe3858ef40b4ffb3d859b320da3921594 (Org-Id: CB, User-Id: issuer_user_cb). Only 999 number of transactions and 1990 amount transfer left for today: 12/11/2024" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 224 } }
-
initializeExchangePoolUser
- 원래 메소드 이름:
initializeExchangePoolUser
- 이 방법은 일회성 작업인 교환 풀 사용자를 초기화합니다. 이 메소드는
Token Admin
에서만 호출할 수 있습니다. - 페이로드:
{ "orgId": "{{bc-org-id}}", "userId": "{{bc-user-id}}", "sameOrgEndorser": true }
- 매개변수:
orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "e21d91d98091df77f90105d84074c0b802b01fc97a6b1304247774397fed1294", "payload": { "assetType": "oconversion", "convertor_id": "bcb1f3b1442c625d3ce205660c5e717c5858a1fe1e12c325df799a851ceaa09b", "org_id": "Org1MSP", "user_id": "exchangepooluser" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 196 } }
-
createExchangePoolAccounts
- 원래 메소드 이름:
createExchangePoolAccounts
- 이 메소드는 제공된 토큰 ID 배열에 대한 교환 풀 토큰 계정을 생성합니다. 이 메소드는 체인 코드의
Token Admin
만 호출할 수 있습니다. - 페이로드:
{ "tokenIds": "[{{bc-token-id}}]", "sameOrgEndorser": true }
- 매개변수:
token_ids: string []
– 토큰 ID의 배열입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "e21d91d98091df77f90105d84074c0b802b01fc97a6b1304247774397fed1294", "payload": [ { "account_id": "oaccount~cc9d84f6d4a5976532493ef5200c9603e138adc35166ffd5fd1aad9c1647f034", "token_id": "USD", "status": "created" }, { "account_id": "oaccount~3d4933111ec8bd6cc1ebb43f2b2c390deb929cfa534f9c6ada8e63bac04a13c0", "token_id": "INR", "status": "created" } ], "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 197 } }
-
addConversionRate
- 원래 메소드 이름:
addConversionRate
- 이 메소드는 토큰 쌍에 대한 변환율을 추가합니다. 토큰 변환율은 소수점 최대 8자리까지 지정할 수 있습니다. 이 메소드는 체인 코드의
Token Admin
만 호출할 수 있습니다. - 페이로드:
{ "fromTokenId": "from_token_id value", "toTokenId": "to_token_id value", "tokenConversionRate": 10, "sameOrgEndorser": true }
- 매개변수:
fromTokenId: string
– 변환할 토큰의 ID입니다.toTokenId: string
– 변환할 토큰의 ID입니다.tokenConversionRate: number
–fromTokenId
토큰을toTokenId
토큰으로 변환하는 비율입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "e21d91d98091df77f90105d84074c0b802b01fc97a6b1304247774397fed1294", "payload": { "assetType": "oconversionRate", "conversion_rate_id": "oconversionRate~91c7eeb0614e7a50b1d5ecad559fcbc80b94034648bf405c9491dacf8d57873b", "from_token_id": "USD", "to_token_id": "INR", "conversion_rate": 10 }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 189 } }
-
updateConversionRate
- 원래 메소드 이름:
updateConversionRate
- 이 방법은 한 쌍의 토큰에 대한 현재 환율을 업데이트합니다. 토큰 변환율은 소수점 최대 8자리까지 지정할 수 있습니다. 이 메소드는 체인 코드의
Token Admin
만 호출할 수 있습니다. - 페이로드:
{ "fromTokenId": "from_token_id value", "toTokenId": "to_token_id value", "tokenConversionRate": 20, "sameOrgEndorser": true }
- 매개변수:
fromTokenId: string
– 변환할 토큰의 ID입니다.toTokenId: string
– 변환할 토큰의 ID입니다.tokenConversionRate: number
–fromTokenId
토큰을toTokenId
토큰으로 변환하는 비율입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "e21d91d98091df77f90105d84074c0b802b01fc97a6b1304247774397fed1294", "payload": { "assetType": "oconversionRate", "conversion_rate_id": "oconversionRate~91c7eeb0614e7a50b1d5ecad559fcbc80b94034648bf405c9491dacf8d57873b", "from_token_id": "USD", "to_token_id": "INR", "conversion_rate": 20 }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 208 } }
-
mintWithFundingExchangePool
- 원래 메소드 이름:
mintWithFundingExchangePool
- 이 메소드는 지정된 토큰 ID 및 수량을 기준으로 호출자 계정의 토큰을 축소합니다. 그런 다음 조폐된 수량의 토큰 백분율이 교환 풀 토큰 계정으로 전송됩니다.
{ "tokenId": "{{bc-token-id}}", "tokenQuantity": 100, "percentageTokenToExchangePool": 20, "sameOrgEndorser": true }
- 매개변수:
tokenId: string
– 민트할 토큰의 ID입니다.tokenQuantity: number
– 민트할 총 토큰 수입니다.percentageTokenToExchangePool: number
– 교환 풀 토큰 계정으로 전송할 조율된 토큰의 백분율입니다.sameOrgEndorser: boolean
– 트랜잭션 보증이 요청자와 동일한 조직에 속해야 하는지 여부를 나타내는 부울 값입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "e21d91d98091df77f90105d84074c0b802b01fc97a6b1304247774397fed1294", "payload": { "msg": "Successfully minted 100 tokens to Account Id: oaccount~abc74791148b761352b98df58035601b6f5480448ac2b4a3a7eb54bdbebf48eb (Org-Id: Org1MSP, User-Id: admin) and Successfully transfered 20 tokens to exchange pool Account with Account Id: oaccount~cc9d84f6d4a5976532493ef5200c9603e138adc35166ffd5fd1aad9c1647f034 (Org-Id: Org1MSP, User-Id: exchangepooluser) " }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 209 } }
-
tokenConversion
- 원래 메소드 이름:
tokenConversion
- 이 메소드는 호출자 계정의 토큰을
to_token_id
,to_org_id
및to_user_id
값으로 지정된 계정으로 변환합니다. 이 메소드는 체인 코드의Token Admin
및 토큰 계정 소유자가 호출할 수 있습니다. Exchange Pool 사용자는 이 메서드를 호출할 수 없습니다. { "fromTokenId": "from_token_id value", "toTokenId": "to_token_id value", "toOrgId": "to_org_id value", "toUserId": "to_user_id value", "tokenQuantity": 5, "endorsers": {{endorsers}} }
- 매개변수:
fromTokenId: string
– 변환할 토큰의 ID입니다.toTokenId: string
– 변환할 토큰의 ID입니다.toOrgId: string
– 토큰을 수신할 현재 조직에 있는 사용자의 멤버쉽 서비스 제공자(MSP) ID입니다.toUserId: string
– 토큰을 수신할 사용자의 사용자 이름 또는 전자 메일 ID입니다.tokenQuantity: number
– 전송할 총 토큰 수입니다.endorsers: string[]
– 트랜잭션을 보증해야 하는 피어의 배열(예:peer1
,peer2
)입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "txid": "e21d91d98091df77f90105d84074c0b802b01fc97a6b1304247774397fed1294", "payload": { "msg": "Succesfully converted 5 of tokens with tokenId: [USD] from AccountId: oaccount~abc74791148b761352b98df58035601b6f5480448ac2b4a3a7eb54bdbebf48eb (Org-Id: Org1MSP, User-Id: admin) to 100 of tokens with tokenId: [INR] to AccountId: oaccount~25e2e66718b6dbb59aea9c32acebec60e09d912b2578d4933d377ae5d0628f1e (Org-Id: Org1MSP, User-Id: user) as per the conversion rate of 20" }, "encode": "JSON", "sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009", "blockNumber": 213 } }
-
getConversionRate
- 원래 메소드 이름:
getConversionRate
- 이 GET 메서드는 한 쌍의 토큰에 대한 현재 변환율을 가져옵니다. 이 메소드는
Token Admin
,Token Auditor
,Org Admin
또는Org Auditor
에 의해 호출될 수 있습니다. - 질의:
/getConversionRate?fromTokenId=from_token_id value&toTokenId=to_token_id value
- 매개변수:
fromTokenId: string
– 변환할 토큰의 ID입니다.toTokenId: string
– 변환할 토큰의 ID입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": { "assetType": "oconversionRate", "conversion_rate_id": "oconversionRate~91c7eeb0614e7a50b1d5ecad559fcbc80b94034648bf405c9491dacf8d57873b", "from_token_id": "USD", "to_token_id": "INR", "conversion_rate": 20 }, "encode": "JSON" } }
-
getConversionHistory
- 원래 메소드 이름:
getConversionRate
- 이 GET 메소드는 지정된 토큰 계정에 대한 토큰 변환 내역을 반환합니다. 이 메소드는
Token Admin
,Token Auditor
,Org Admin
,Org Auditor
또는 토큰 계정 소유자가 호출할 수 있습니다. - 질의:
/getConversionHistory?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
- 매개변수:
tokenId: string
– 토큰의 ID입니다.orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "transaction_id": "otransaction~34edd19e03ec8bbbc77bc3372081410a824a5c10f9aa522b3a6390d7e8cb11cf", "from_account_id": "oaccount~abc74791148b761352b98df58035601b6f5480448ac2b4a3a7eb54bdbebf48eb", "to_account_id": "oaccount~25e2e66718b6dbb59aea9c32acebec60e09d912b2578d4933d377ae5d0628f1e", "transacted_amount": 5, "converted_amount": 100, "conversion_rate": "20", "from_token_id": "USD", "to_token_id": "INR", "balance": 75, "onhold_balance": 0, "timestamp": "2022-11-30T11:03:20.000Z", "transaction_type": "TOKEN_CONVERSION_DEBIT" } ], "encode": "JSON" } }
-
getConversionRateHistory
- 원래 메소드 이름:
getConversionRate
- 이 메소드는 토큰 쌍에 대한 토큰 변환율 내역을 반환합니다. 이 메소드는
Token Admin
,Token Auditor
,Org Admin
,Org Auditor
및 모든 토큰 계정 소유자가 호출할 수 있습니다. /getConversionRateHistory?fromTokenId=from_token_id value&toTokenId=to_token_id value
- 매개변수:
fromTokenId: string
– 변환율을 계산하기 위해 변환할 토큰의 ID입니다.toTokenId: string
– 변환율을 계산하기 위해 변환할 토큰의 ID입니다.
- 반환값:
- 성공 시 환율 기록 세부정보가 있는 JSON 객체입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": [ { "trxId": "0b1ba7bc2620e1438b6580365e5c0ab852247ccfa5a3eb2157d3baca02c0e521", "timeStamp": "2022-11-30T10:23:38.000Z", "value": { "assetType": "oconversionRate", "conversion_rate_id": "oconversionRate~91c7eeb0614e7a50b1d5ecad559fcbc80b94034648bf405c9491dacf8d57873b", "from_token_id": "USD", "to_token_id": "INR", "conversion_rate": 20 } }, { "trxId": "36fc40ddb3d8308ee7e156af700da131d78d941fe390fc57985b7589e7035d5c", "timeStamp": "2022-11-30T10:13:18.000Z", "value": { "assetType": "oconversionRate", "conversion_rate_id": "oconversionRate~91c7eeb0614e7a50b1d5ecad559fcbc80b94034648bf405c9491dacf8d57873b", "from_token_id": "USD", "to_token_id": "INR", "conversion_rate": 10 } } ], "encode": "JSON" } }
-
getExchangePoolUser
- 원래 메소드 이름:
getExchangePoolUser
- 이 GET 메소드는 Exchange Pool 사용자에 대한 조직 ID 및 사용자 ID 값을 반환합니다. 이 메소드는 체인 코드의
Token Admin
또는Token Auditor
만 호출할 수 있습니다. - 질의:
/getExchangePoolUser
- 매개변수:
- 없음
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": { "assetType": "oconversion", "convertor_id": "bcb1f3b1442c625d3ce205660c5e717c5858a1fe1e12c325df799a851ceaa09b", "org_id": "Org1MSP", "user_id": "exchangepooluser" }, "encode": "JSON" } }
-
getAccountOnHoldBalance
- 원래 메소드 이름:
getAccountOnHoldBalance
- 이 GET 메소드는 지정된 계정 및 토큰에 대한 현재 보류 중 잔액을 반환합니다. 이 메소드는
Token Admin
,Token Auditor
,Org Admin
,Org Auditor
또는 계정의AccountOwner
로만 호출할 수 있습니다. - 질의:
/getAccountOnHoldBalance?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
- 매개변수:
tokenId: string
– 토큰의 ID입니다.orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": { "msg":"Total Holding Balance is: 0","holding_balance":0 }, "encode": "JSON" } }
-
getAccountStatus
- 원래 메소드 이름:
getAccountStatus
- 이 GET 메소드는 토큰 계정의 현재 상태를 검색합니다. 이 메소드는
Token Admin
,Token Auditor
,Org Admin
,Org Auditor
또는 토큰 계정 소유자가 호출할 수 있습니다. - 질의:
/getAccountStatus?tokenId={{bc-token-id}}&orgId={{bc-org-id}}&userId={{bc-user-id}}
- 매개변수:
tokenId: string
– 토큰의 ID입니다.orgId: string
– 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.userId: string
– 사용자의 사용자 이름 또는 전자 메일 ID입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": { "assetType": "oaccountStatus", "status_id": "oaccountStatus~5a0b0d8b1c6433af9fedfe0d9e6580e7cf6b6bb62a0de6267aaf79f79d5e96d7", "account_id": "oaccount~1c568151c4acbcd1bd265c766c677145760a61c47fc8a3ba681a4cfbe287f9c1", "status": "active" }, "encode": "JSON" } }
-
getAccountsByRole
- 원래 메소드 이름:
getAccountsByRole
- 이 메소드는 지정된 롤에 대한 모든 계정 ID 목록을 반환합니다. 이 메소드는 체인 코드의
Token Admin
만 호출할 수 있습니다. - 질의:
/getAccountsByRole?tokenId={{bc-token-id}}&role=role value (for example minter / burner / notary)
- 매개변수:
tokenId: string
– 토큰의 ID입니다.role: string
– 검색할 역할의 이름입니다.
- 반환 값 예제:
{ "returnCode": "Success", "error": "", "result": { "payload": { "accounts":["oaccount~digicur~b4f45440aa2a7942db64443d047027e9d714d62cba5c3d546d64f368642f622f"] }, "encode": "JSON" } }