프로젝트

일반

사용자정보

ClaimReward » 이력 » 버전 6

이름없음, 2021/06/10 05:31

1 1 이름없음
h2. ClaimReward
2
3
* 리워드를 요청합니다
4 2 이름없음
5 6 이름없음
<pre><code class="java">
6
claimReward(
7
param: RewardRequest
8
): RewardResponse
9
</code></pre>
10
11 2 이름없음
*RewardRequest(param)*
12
13
|_. field |_. type |_. description |_. note |
14
| did | String |   |   |
15 5 이름없음
| command | String | 요청에 대한 Command 종류 | 값: claim |
16 2 이름없음
| dueTo | String |   |   |
17
18
*RewardResponse*
19
20
|_. field |_. type |_. description |_. note |
21
| amount | Int! |   |   |
22 5 이름없음
| command | String |   | 값: claim |
23 2 이름없음
| nonce | Int! |   |   |
24
| owner | String |   |   |
25
| spent | Boolean! |   |   |
26
| tokenId | String |   |   |
27
28
---
29
30
*Request Example*
31
32
<pre><code class="java">
33 3 이름없음
mutation {
34
    claimReward(param: {
35
        did: "KyXsH8RypaGBXuYbmUczZ7" 
36
        dueTo: "ticket=claim:orPxmv15e2oSPuvTht3fYmkdE2BWAU78DX2axDwRGVby9vSsDLkc2ojQeibK6SHdckDNrNFbhTHzdA5qA9c94kLSV6JeibENNgCvzPXboVKr4MZaS" 
37
        command: "claim" 
38
    }) {
39
        amount
40
        command
41
        nonce
42
        owner
43
        spent
44
        tokenId
45
    }
46 2 이름없음
}
47
</code></pre>
48
49
*Response Example*
50
51
<pre><code class="java">
52
{
53
    "data": {
54
        "claimReward": {
55
            "owner": "KyXsH8RypaGBXuYbmUczZ7",
56
            "amount": 2,
57
            "tokenId": "Gjk8x4CWuN9XcZeW3ivXNETeFgSFCDr2V7sAtRJMJqRdJjMbugx2PgvhxTaMnryvqkr1kWEbtLg1dydf84mxXyxKt5JDQ5yJZ7Qkkvm2SwcMnNqroBHS",
58
            "spent": false,
59
            "nonce": 0,
60 3 이름없음
            "command": "claim" 
61 2 이름없음
        }
62
    }
63
}
64
</code></pre>
65 4 이름없음
66
---
67
68
*필드 관련하여 자세한 내용은 아래 URL 참고*
69
70
* "UNO.Cranberry Benefit ChainCode":https://snplab.synology.me/confluence/display/CBU/Benefit+Chaincode
클립보드 이미지 추가 (최대 크기: 97.7 MB)