프로젝트

일반

사용자정보

DepositReward » 이력 » 버전 9

이름없음, 2021/06/10 06:16

1 9 이름없음
h1. DepositReward
2 1 이름없음
3
* 리워드를 예치합니다
4 2 이름없음
5 7 이름없음
<pre><code class="java">
6
depositReward(
7
param: RewardDepositRequest
8
): RewardListResponse
9
</code></pre>
10
11 8 이름없음
---
12
13 5 이름없음
*RewardDepositRequest (param)*
14 2 이름없음
15 3 이름없음
|_. field |_. type |_. description |_. note |
16 2 이름없음
| did | String |   |   |
17
| dueTo | String |   |   |
18 6 이름없음
| command | String |   | 값: deposit |
19 1 이름없음
| amount | Int! |   |   |
20 2 이름없음
| input | [String] |   |   |
21
22
*RewardDepositResponse*
23
24 3 이름없음
|_. field |_. type |_. description |_. note |
25 6 이름없음
| command | String |   | 값: deposit |
26 2 이름없음
| rewards | [Reward] |   |   |
27
28 1 이름없음
*Reward*
29
30 3 이름없음
|_. field |_. type |_. description |_. note |
31 1 이름없음
| amount | Int! |   |   |
32
| nounce | Int! |   |   |
33
| owner | String |   |   |
34
| spent | Boolean! |   |   |
35
| tokenId | String |   |   |
36
37
---
38
39 2 이름없음
*Reqest Example*
40
41
<pre><code class="java">
42 3 이름없음
mutation {
43
    depositReward(param: {
44
        did: "ReKxejmhGsKyvmEaZtTu6T" 
45
        dueTo: "proposal=activate:orPxmv15e2oSPufT3Tm6SdSoVmgWQedrn8nPRqRUTCDsFC63pXu66nazMP2M7FFJnvFzqs5xMqySWrsGhjSrhHSC3D45w3zxZpjpvn9KFrguLq28Z" 
46
        amount: 100
47
        input: [
48
            "Gjk8x4CWuN9XcZeW3ivXNDxsoKET48kvejohHLeuDXs6CU3y5noJF3BUh21MxLZfSDRWJjWNUhiQpzGy5QMBMzxaMXvo4YXZvumUYHbN6MoKsutUBvDK" 
49
        ]
50
        command: "deposit" 
51
    }) {
52
        command
53
        rewards {
54
            owner
55
            spent
56
            amount
57
            nonce
58
            tokenId
59
        }
60
    }
61 2 이름없음
}
62
</code></pre>
63
64
*Response Example*
65
66
<pre><code class="java">
67
 {
68
     "data": {
69
         "depositReward": {
70
             "command": "deposit",
71
             "rewards": [{
72
                 "owner": "did:snplab:bluecheeseRewardMinter",
73
                 "amount": 100,
74
                 "tokenId": "Gjk8x4CWuN9XcZeW3ivXNE15kRu3qpcdtEbScUHWZTkotgHRCec9CWix4S3pe7Za37uqTHR3AJKroEyZzRVAwwwXcCgYLrdbzfo1tRARiVcTbGBoHn3b",
75
                 "spent": false,
76
                 "nonce": 0
77
             }]
78
         }
79
     }
80
 }
81
</code></pre>
82 4 이름없음
83
---
84
85
*필드 관련하여 자세한 내용은 아래 URL 참고*
86
87
* "UNO.Cranberry Benefit ChainCode":https://snplab.synology.me/confluence/display/CBU/Benefit+Chaincode
클립보드 이미지 추가 (최대 크기: 97.7 MB)