프로젝트

일반

사용자정보

MintReward » 이력 » 버전 9

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

1 1 이름없음
h2. MintReward
2
3 7 이름없음
* snplab이 b2b 기업에게 reward를 제공합니다.
4 2 이름없음
5 8 이름없음
<pre><code class="java">
6
mintReward(
7
param: RewardMintRequest
8
): RewardResponse
9
</code></pre>
10
11 6 이름없음
*RewardMintRequest (param)*
12 2 이름없음
13 3 이름없음
|_. field |_. type |_. description |_. note |
14 2 이름없음
| did | String |   |   |
15
| command | String |   |   |
16
| duration | String |   |   |
17
| dueTo | String |   |   |
18 1 이름없음
| recipient | String |   |   |
19 2 이름없음
| amount | Int! |   |   |
20
21
*RewardResponse*
22
23 3 이름없음
|_. field |_. type |_. description |_. note |
24 2 이름없음
| amount | Int! |   |   |
25
| command | String |   |   |
26 1 이름없음
| nonce | Int! |   |   |
27
| owner | String |   |   |
28 2 이름없음
| spent | String |   |   |
29
| tokenId | String |   |   |
30
31
---
32
33
*Request Example*
34
35
<pre><code class="java">
36 3 이름없음
Querymutation {
37 4 이름없음
    mintReward(param: {
38
        did: "NfoPEFaG1adkCpijR85L66" 
39
        dueTo: "mint=grant:ReKxejmhGsKyvmEaZtTu6T" 
40
        recipient: "ReKxejmhGsKyvmEaZtTu6T" 
41
        amount: 100
42
        duration: "__INFINITE__" 
43
        command: "mint" 
44
    }) {
45
        command
46
        owner
47
        spent
48
        amount
49
        nonce
50
        tokenId
51
    }
52 2 이름없음
}
53 1 이름없음
</code></pre>
54
55
*Response Example*
56
57
<pre><code class="java">
58
{
59
    "data": {
60
        "mintReward": {
61
            "owner": "ReKxejmhGsKyvmEaZtTu6T",
62
            "amount": 100,
63
            "tokenId": "Gjk8x4CWuN9XcZeW3ivXNDxsoKET48kvejohHLeuDXs6CU3y5noJF3BUh21MxLZfSDRWJjWNUhiQpzGy5QMBMzxaMXvo4YXZvumUYHbN6MoKsutUBvDK",
64
            "spent": false,
65
            "nonce": 0,
66
            "command": "mint" 
67
        }
68 4 이름없음
    }
69
}
70
</code></pre>
71
72
<pre><code class="java">
73
mutation {
74
    mintReward(param: {
75
        did: "NfoPEFaG1adkCpijR85L66" 
76
        dueTo: "mint=grant:ReKxejmhGsKyvmEaZtTu6T" 
77
        recipient: "ReKxejmhGsKyvmEaZtTu6T" 
78
        amount: 100
79
        duration: "__INFINITE__" 
80
        command: "mint" 
81
    }) {
82
        command
83
        owner
84
        spent
85
        amount
86
        nonce
87
        tokenId
88 2 이름없음
    }
89
}
90
</code></pre>
91 5 이름없음
92
---
93
94
*필드 관련하여 자세한 내용은 아래 URL 참고*
95
96
* "UNO.Cranberry Benefit ChainCode":https://snplab.synology.me/confluence/display/CBU/Benefit+Chaincode
클립보드 이미지 추가 (최대 크기: 97.7 MB)