-
registerOrg
- 원래 메소드 이름:
registerOrg
- 이 POST 메소드는 시스템에 조직을 등록합니다. 이 메소드는 토큰 관리자만 호출할 수 있습니다.
- 페이로드:
{
"orgId": "{{bc-org-id}}",
"orgName": "org_name value",
"endorsers": {{endorsers}}
}
- 매개변수:
orgId: string – 현재 조직에 있는 사용자의 멤버쉽 서비스 공급자(MSP) ID입니다.
orgName: string – (선택 사항) 조직의 이름입니다.
endorsers: string[] – 트랜잭션을 보증해야 하는 피어의 배열(예: peer1, peer2)입니다.
- 반환 값 예제:
{
"assetType": "oorgregistry",
"org_registry_id": "orgregistry",
"registered_orgs": [
{
"org_id": "Org1MSP",
"org_name": "Organisation name"
}
]
}
-
getAllRegisteredOrgs
- 원래 메소드 이름:
getAllRegisteredOrgs
- 이 GET 방법은 등록된 모든 조직의 세부정보를 검색합니다. 이 메소드는 토큰 관리자만 호출할 수 있습니다.
- 질의:
/getAllRegisteredOrgs
- 매개변수:
- 반환 값 예제:
[
{
"org_id": "Org1MSP",
"org_name": "Organisation name"
}
]
-
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 값이 실제 보류 값보다 작은 경우 나머지 금액은 토큰 소유자가 다시 사용할 수 있습니다. roles 동작이 토큰 모델의 behaviors 섹션에 지정되고 notary_role_name 값이 설정된 경우 호출자 계정에 공증 역할이 있어야 합니다. 그렇지 않으면 계정이 있는 호출자가 공증으로 작동할 수 있습니다.
- 페이로드:
{
"tokenId": "{{bc-token-id}}",
"operationId": "operation_id value",
"quantity": 1,
"endorsers": {{endorsers}}
}
- 매개변수:
tokenId: string – 토큰 ID입니다.
operationId: string – 승인할 민트 요청의 고유한 작업 ID입니다.
quantity: number – 전송할 보류된 토큰 수입니다.
endorsers: string[] – 트랜잭션을 보증해야 하는 피어의 배열(예: peer1, peer2)입니다.
- 반환 값 예제:
{
"returnCode": "Success",
"error": "",
"result": {
"txid": "c1149aaa486abc4931d9024c18dfcb230bb321723d1160b0bf981c0011c4856a",
"payload": {
"msg": "Account Id: oaccount~51e676d7182a02ea7418ef58a6d54ecfe3858ef40b4ffb3d859b320da3921594 (Org-Id: CB, User-Id: issuer_user_cb) is successfully executed '10' tokens from Operation Id '8e3145'."
},
"encode": "JSON",
"sourceURL": "cb-oabcs1-bom.blockchain.ocp.example.com:20009",
"blockNumber": 213
}
}
-
associateTokenToAccount
- 원래 메소드 이름:
associateTokenToAccount
- 이 POST 메소드는 지정된 계정 ID를 지정된 토큰에 연관시킵니다.
Token Admin 또는 Org Admin에서 호출할 수 있습니다.
- 페이로드:
{
"accountId": "account_id value",
"tokenId": "{{bc-token-id}}",
"endorsers": {{endorsers}}
}
- 매개변수:
accountId: string – 계정의 ID입니다.
tokenId: string – 토큰 ID입니다.
endorsers: string[] – 트랜잭션을 보증해야 하는 피어의 배열(예: peer1, peer2)입니다.
- 반환 값 예제:
{
"returnCode": "Success",
"error": "",
"result": {
"txid": "efc7381fb6fc6174a40e83ff5f09d2bbf7f6f490365e3bbf19d5502c2cfec474",
"payload": {
"bapAccountVersion": 0,
"assetType": "oaccount",
"account_id": "oaccount~1c6aa60e220b8fc70caf4cea1ed723ddb193a00321e5e0004def062816b77090",
"user_id": "cb12",
"org_id": "CB",
"token_type": "fungible",
"token_id": "USD",
"token_name": "cbdc",
"balance": 0,
"onhold_balance": 0,
"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}}
}
- 매개변수:
- 반환 값 예제:
{
"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}}
}
- 매개변수:
- 반환 값 예제:
{
"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
}
}
-
rejectMint
- 원래 메소드 이름:
rejectMint
- 이 메서드는 minting 요청을 거부하는 공증인이 호출할 수 있습니다.
- 페이로드:
{
"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
}
- 매개변수:
- 반환 값 예제:
{
"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
}
- 매개변수:
- 반환값:
- 성공 시 레코딩된 토큰 수와 계정 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}}
}
- 매개변수:
- 반환 값 예제:
{
"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 및 임의의 토큰 계정 소유자가 호출할 수 있습니다. 교환 풀 사용자는 이 메소드를 호출할 수 없습니다.
{
"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"
}
}
-
getExchangePoolUser
- 원래 메소드 이름:
getExchangePoolUser
- 이 GET 메소드는 교환 풀 사용자에 대한 조직 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"
}
}