프로젝트

일반

사용자정보

DepositReward » 이력 » 버전 6

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

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