프로젝트

일반

사용자정보

MintReward » 이력 » 개정판 4

개정판 3 (이름없음, 2021/06/03 07:23) → 개정판 4/11 (이름없음, 2021/06/04 01:35)

h2. MintReward 

 * snplab이 b2b 기업에게 reward를 제공합니다 

 *RewardMintRequest* 

 |_. field |_. type |_. description |_. note | 
 | did | String |   |   | 
 | command | String |   |   | 
 | duration | String |   |   | 
 | dueTo | String |   |   | 
 | recipient | String |   |   | 
 | amount | Int! |   |   | 

 *RewardResponse* 

 |_. field |_. type |_. description |_. note | 
 | amount | Int! |   |   | 
 | command | String |   |   | 
 | nonce | Int! |   |   | 
 | owner | String |   |   | 
 | spent | String |   |   | 
 | tokenId | String |   |   | 

 --- 

 *Request Example* 

 <pre><code class="java"> 
 Querymutation { 
     
	 mintReward(param: { 
         
		 did: "NfoPEFaG1adkCpijR85L66"  
         
		 dueTo: "mint=grant:ReKxejmhGsKyvmEaZtTu6T"  
         
		 recipient: "ReKxejmhGsKyvmEaZtTu6T"  
         
		 amount: 100 
         
		 duration: "__INFINITE__"  
         
		 command: "mint"  
     
	 }) { 
         
		 command 
         
		 owner 
         
		 spent 
         
		 amount 
         
		 nonce 
         
		 tokenId 
     
	 } 
 } 
 </code></pre> 

 *Response Example* 

 <pre><code class="java"> 
 { 
     "data": { 
         "mintReward": { 
             "owner": "ReKxejmhGsKyvmEaZtTu6T", 
             "amount": 100, 
             "tokenId": "Gjk8x4CWuN9XcZeW3ivXNDxsoKET48kvejohHLeuDXs6CU3y5noJF3BUh21MxLZfSDRWJjWNUhiQpzGy5QMBMzxaMXvo4YXZvumUYHbN6MoKsutUBvDK", 
             "spent": false, 
             "nonce": 0, 
             "command": "mint"  
         } 
     } 
 } 
 </code></pre> 

 <pre><code class="java"> 
 mutation { 
     mintReward(param: { 
         did: "NfoPEFaG1adkCpijR85L66"  
         dueTo: "mint=grant:ReKxejmhGsKyvmEaZtTu6T"  
         recipient: "ReKxejmhGsKyvmEaZtTu6T"  
         amount: 100 
         duration: "__INFINITE__"  
         command: "mint"  
     }) { 
         command 
         owner 
         spent 
         amount 
         nonce 
         tokenId 
     } 
 } 
 </code></pre>
클립보드 이미지 추가 (최대 크기: 97.7 MB)