Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Commit

Permalink
Merge pull request #51 from quorumcontrol/release/0.2.0
Browse files Browse the repository at this point in the history
bump version to 0.2.0
  • Loading branch information
brandonwestcott authored Apr 29, 2019
2 parents 1be669d + eba11f1 commit 56b6f52
Show file tree
Hide file tree
Showing 10 changed files with 18,364 additions and 12,102 deletions.
29,964 changes: 17,904 additions & 12,060 deletions docs/ast/source/tupelo.js.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
248 changes: 247 additions & 1 deletion docs/class/lib/tupelo.js~TupeloClient.html
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,35 @@ <h1 data-ice="name">TupeloClient</h1>



<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>



<span class="code" data-ice="name"><span><a href="class/lib/tupelo.js~TupeloClient.html#instance-method-receiveToken">receiveToken</a></span></span><span class="code" data-ice="signature">(chainId: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, keyAddr: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, tokenPayload: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>): <span>*</span></span>
</p>
</div>
<div>


<div data-ice="description"><p>Receive a send token payload from another chain tree.</p>
</div>
</div>
</td>
<td>


</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>



<span class="override" data-ice="override"></span>
</td>
<td>
Expand Down Expand Up @@ -654,6 +683,35 @@ <h1 data-ice="name">TupeloClient</h1>



<span class="override" data-ice="override"></span>
</td>
<td>
<div>
<p>



<span class="code" data-ice="name"><span><a href="class/lib/tupelo.js~TupeloClient.html#instance-method-sendToken">sendToken</a></span></span><span class="code" data-ice="signature">(chainId: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, keyAddr: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, tokenName: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, destinationChainId: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, amount: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>): <span>*</span></span>
</p>
</div>
<div>


<div data-ice="description"><p>Send an amount of minted tokens to another chain tree.</p>
</div>
</div>
</td>
<td>


</td>
</tr>
<tr data-ice="target">
<td>
<span class="access" data-ice="access">public</span>



<span class="override" data-ice="override"></span>
</td>
<td>
Expand Down Expand Up @@ -1577,7 +1635,7 @@ <h3 data-ice="anchor" id="instance-method-playTransactions">
<span class="right-info">


<span data-ice="source"><span><a href="file/lib/tupelo.js.html#lineNumber425">source</a></span></span>
<span data-ice="source"><span><a href="file/lib/tupelo.js.html#lineNumber465">source</a></span></span>
</span>
</h3>

Expand Down Expand Up @@ -1651,6 +1709,93 @@ <h4>Return:</h4>



</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-method-receiveToken">
<span class="access" data-ice="access">public</span>





<span class="code" data-ice="name">receiveToken</span><span class="code" data-ice="signature">(chainId: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, keyAddr: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, tokenPayload: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>): <span>*</span></span>
<span class="right-info">


<span data-ice="source"><span><a href="file/lib/tupelo.js.html#lineNumber445">source</a></span></span>
</span>
</h3>




<div data-ice="description"><p>Receive a send token payload from another chain tree.</p>
</div>



<div data-ice="properties"><div data-ice="properties">
<h4 data-ice="title">Params:</h4>
<table class="params">
<thead>
<tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
</thead>
<tbody>

<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">chainId</td>
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>The ID of the sending chain tree.</p>
</td>
</tr>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">keyAddr</td>
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>Address of a key that currently owns the chain tree.</p>
</td>
</tr>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">tokenPayload</td>
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>The base64-encoded token send payload.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>

<div class="return-params" data-ice="returnParams">
<h4>Return:</h4>
<table>
<tbody>
<tr>
<td class="return-type code" data-ice="returnType"><span>*</span></td>

</tr>
</tbody>
</table>
<div data-ice="returnProperties">
</div>
</div>















</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-method-register">
Expand Down Expand Up @@ -1962,6 +2107,107 @@ <h4>Return:</h4>



</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-method-sendToken">
<span class="access" data-ice="access">public</span>





<span class="code" data-ice="name">sendToken</span><span class="code" data-ice="signature">(chainId: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, keyAddr: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, tokenName: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, destinationChainId: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span>, amount: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span>): <span>*</span></span>
<span class="right-info">


<span data-ice="source"><span><a href="file/lib/tupelo.js.html#lineNumber425">source</a></span></span>
</span>
</h3>




<div data-ice="description"><p>Send an amount of minted tokens to another chain tree.</p>
</div>



<div data-ice="properties"><div data-ice="properties">
<h4 data-ice="title">Params:</h4>
<table class="params">
<thead>
<tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
</thead>
<tbody>

<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">chainId</td>
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>The ID of the sending chain tree.</p>
</td>
</tr>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">keyAddr</td>
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>Address of a key that currently owns the chain tree.</p>
</td>
</tr>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">tokenName</td>
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>Name of the token type.</p>
</td>
</tr>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">destinationChainId</td>
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>The ID of the recipient chain tree.</p>
</td>
</tr>
<tr data-ice="property" data-depth="0">
<td data-ice="name" class="code" data-depth="0">amount</td>
<td data-ice="type" class="code"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></span></td>
<td data-ice="appendix"></td>
<td data-ice="description"><p>Number of tokens to send.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>

<div class="return-params" data-ice="returnParams">
<h4>Return:</h4>
<table>
<tbody>
<tr>
<td class="return-type code" data-ice="returnType"><span>*</span></td>

</tr>
</tbody>
</table>
<div data-ice="returnProperties">
</div>
</div>















</div>
<div class="detail" data-ice="detail">
<h3 data-ice="anchor" id="instance-method-setData">
Expand Down
10 changes: 5 additions & 5 deletions docs/coverage.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"coverage": "78.12%",
"expectCount": 32,
"actualCount": 25,
"coverage": "79.41%",
"expectCount": 34,
"actualCount": 27,
"files": {
"lib/tupelo.js": {
"expectCount": 32,
"actualCount": 25,
"expectCount": 34,
"actualCount": 27,
"undocumentLines": [
6,
8,
Expand Down
40 changes: 40 additions & 0 deletions docs/file/lib/tupelo.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,46 @@
* @typedef {Object} MintTokenResponse
* @property {string} tip - The chain tree tip after the transaction.
*/

/**
* Send an amount of minted tokens to another chain tree.
*
* @param {string} chainId - The ID of the sending chain tree.
* @param {string} keyAddr - Address of a key that currently owns the chain tree.
* @param {string} tokenName - Name of the token type.
* @param {string} destinationChainId - The ID of the recipient chain tree.
* @param {number} amount - Number of tokens to send.
*/
sendToken(chainId, keyAddr, tokenName, destinationChainId, amount) {
return promiseAroundRpcCallback((clbk) =&gt; {
this.rpc.sendToken({
creds: this.walletCreds,
chainId: chainId,
keyAddr: keyAddr,
tokenName: tokenName,
destinationChainId: destinationChainId,
amount: amount,
}, clbk);
});
}

/**
* Receive a send token payload from another chain tree.
*
* @param {string} chainId - The ID of the sending chain tree.
* @param {string} keyAddr - Address of a key that currently owns the chain tree.
* @param {string} tokenPayload - The base64-encoded token send payload.
*/
receiveToken(chainId, keyAddr, tokenPayload) {
return promiseAroundRpcCallback((clbk) =&gt; {
this.rpc.receiveToken({
creds: this.walletCreds,
chainId: chainId,
keyAddr: keyAddr,
tokenPayload: tokenPayload,
}, clbk);
});
}

/**
* Apply a sequence of transactions to a chain tree
Expand Down
Loading

0 comments on commit 56b6f52

Please sign in to comment.