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