프로젝트

일반

사용자정보

ClaimReward » 이력 » 버전 2

이름없음, 2021/06/03 07:32

1 1 이름없음
h2. ClaimReward
2
3
* 리워드를 요청합니다
4 2 이름없음
5
*RewardRequest(param)*
6
7
|_. field |_. type |_. description |_. note |
8
| did | String |   |   |
9
| command | String | 요청에 대한 Command 종류 |   |
10
| dueTo | String |   |   |
11
12
*RewardResponse*
13
14
|_. field |_. type |_. description |_. note |
15
| amount | Int! |   |   |
16
| command | String |   |   |
17
| nonce | Int! |   |   |
18
| owner | String |   |   |
19
| spent | Boolean! |   |   |
20
| tokenId | String |   |   |
21
22
---
23
24
*Request Example*
25
26
<pre><code class="java">
27
 Querymutation {
28
	claimReward(param: {
29
		did: "KyXsH8RypaGBXuYbmUczZ7"
30
		dueTo: "ticket=claim:orPxmv15e2oSPuvTht3fYmkdE2BWAU78DX2axDwRGVby9vSsDLkc2ojQeibK6SHdckDNrNFbhTHzdA5qA9c94kLSV6JeibENNgCvzPXboVKr4MZaS"
31
		command: "claim"
32
	}) {
33
		amount
34
		command
35
		nonce
36
		owner
37
		spent
38
		tokenId
39
	}
40
}
41
</code></pre>
42
43
*Response Example*
44
45
<pre><code class="java">
46
{
47
    "data": {
48
        "claimReward": {
49
            "owner": "KyXsH8RypaGBXuYbmUczZ7",
50
            "amount": 2,
51
            "tokenId": "Gjk8x4CWuN9XcZeW3ivXNETeFgSFCDr2V7sAtRJMJqRdJjMbugx2PgvhxTaMnryvqkr1kWEbtLg1dydf84mxXyxKt5JDQ5yJZ7Qkkvm2SwcMnNqroBHS",
52
            "spent": false,
53
            "nonce": 0,
54
            "command": "claim"
55
        }
56
    }
57
}
58
</code></pre>
클립보드 이미지 추가 (최대 크기: 97.7 MB)