프로젝트

일반

사용자정보

DepositReward » 이력 » 버전 7

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

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