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