프로젝트

일반

사용자정보

MintReward » 이력 » 개정판 9

개정판 8 (이름없음, 2021/06/10 05:27) → 개정판 9/11 (이름없음, 2021/06/10 05:29)

h2. MintReward 

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

 h2. 요청 필드 

 <pre><code class="java"> 
 mintReward( 
 param: RewardMintRequest 
 ): RewardResponse 
 </code></pre> 

 *RewardMintRequest (param)* 

 |_. 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> 

 --- 

 *필드 관련하여 자세한 내용은 아래 URL 참고* 

 * "UNO.Cranberry Benefit ChainCode":https://snplab.synology.me/confluence/display/CBU/Benefit+Chaincode
클립보드 이미지 추가 (최대 크기: 97.7 MB)