MintReward » 이력 » 버전 1
이름없음, 2024/01/17 12:18
1 | 1 | 이름없음 | h1. MintReward |
---|---|---|---|
2 | |||
3 | * snplab이 b2b 기업에게 reward를 제공합니다. |
||
4 | |||
5 | <pre><code class="java"> |
||
6 | mintReward( |
||
7 | param: RewardMintRequest |
||
8 | ): RewardResponse |
||
9 | </code></pre> |
||
10 | |||
11 | --- |
||
12 | |||
13 | *RewardMintRequest (param)* |
||
14 | |||
15 | |_. field |_. type |_. description |_. note | |
||
16 | | did | String | | | |
||
17 | | command | String | | | |
||
18 | | duration | String | | | |
||
19 | | dueTo | String | | | |
||
20 | | recipient | String | | | |
||
21 | | amount | Int! | | | |
||
22 | |||
23 | *RewardResponse* |
||
24 | |||
25 | |_. field |_. type |_. description |_. note | |
||
26 | | amount | Int! | | | |
||
27 | | command | String | | | |
||
28 | | nonce | Int! | | | |
||
29 | | owner | String | | | |
||
30 | | spent | String | | | |
||
31 | | tokenId | String | | | |
||
32 | |||
33 | --- |
||
34 | |||
35 | *Request Example* |
||
36 | |||
37 | <pre><code class="java"> |
||
38 | Querymutation { |
||
39 | 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 | } |
||
55 | </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 | } |
||
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 | } |
||
91 | } |
||
92 | </code></pre> |
||
93 | |||
94 | --- |
||
95 | |||
96 | *필드 관련하여 자세한 내용은 아래 URL 참고* |
||
97 | |||
98 | * "UNO.Cranberry Benefit ChainCode":https://snplab.synology.me/confluence/display/CBU/Benefit+Chaincode |