[CI Skip] 0.31.26

This commit is contained in:
Travis CI
2018-10-12 19:20:20 +00:00
parent 4748e8c87f
commit 543c2af377
185 changed files with 5574 additions and 2283 deletions
+69 -14
View File
@@ -205,11 +205,57 @@
<li class="header">Node Interfaces</li>
<li class="chapter " data-level="2.1" data-path="../METHODS_RPC.html">
<a href="../METHODS_RPC.html">
RPC
</a>
</li>
<li class="chapter " data-level="2.2" data-path="../METHODS_STORAGE.html">
<a href="../METHODS_STORAGE.html">
Storage chain state (runtime)
</a>
</li>
<li class="chapter " data-level="2.3" data-path="../METHODS_EXTRINSICS.html">
<a href="../METHODS_EXTRINSICS.html">
Extrinsics (runtime)
</a>
</li>
<li class="header">Examples</li>
<li class="chapter " data-level="2.1" data-path="../examples/promise/">
<li class="chapter " data-level="3.1" data-path="../examples/promise/">
<a href="../examples/promise/">
@@ -223,7 +269,7 @@
<ul class="articles">
<li class="chapter " data-level="2.1.1" data-path="../examples/promise/01_simple_connect/">
<li class="chapter " data-level="3.1.1" data-path="../examples/promise/01_simple_connect/">
<a href="../examples/promise/01_simple_connect/">
@@ -236,7 +282,7 @@
</li>
<li class="chapter " data-level="2.1.2" data-path="../examples/promise/02_listen_to_blocks/">
<li class="chapter " data-level="3.1.2" data-path="../examples/promise/02_listen_to_blocks/">
<a href="../examples/promise/02_listen_to_blocks/">
@@ -249,7 +295,7 @@
</li>
<li class="chapter " data-level="2.1.3" data-path="../examples/promise/03_listen_to_balance_change/">
<li class="chapter " data-level="3.1.3" data-path="../examples/promise/03_listen_to_balance_change/">
<a href="../examples/promise/03_listen_to_balance_change/">
@@ -262,7 +308,7 @@
</li>
<li class="chapter " data-level="2.1.4" data-path="../examples/promise/05_read_storage/">
<li class="chapter " data-level="3.1.4" data-path="../examples/promise/05_read_storage/">
<a href="../examples/promise/05_read_storage/">
@@ -275,7 +321,7 @@
</li>
<li class="chapter " data-level="2.1.5" data-path="../examples/promise/07_transfer_dots/">
<li class="chapter " data-level="3.1.5" data-path="../examples/promise/07_transfer_dots/">
<a href="../examples/promise/07_transfer_dots/">
@@ -342,20 +388,29 @@
<p>The Polkadot-JS API provides easy-to-use wrappers around JSONRPC calls that flow from an application to a node. It handles all the encoding and decoding or parameters, provides access to RPC functions and allows for the query of chain state and the submission of transactions.</p>
<p>The API wrappers provide a standard interface for use -</p>
<ul>
<li>A static <code>.create(&lt;optional WsProvider&gt;)</code> that returns an API istance when connected, decorated and ready-to use</li>
<li>A static <code>.create(&lt;optional WsProvider&gt;)</code> that returns an API instance when connected, decorated and ready-to use</li>
<li>The above is just a wrapper for <code>new Api(&lt;optional WsProvider&gt;)</code>, exposing the <code>isReady</code> getter</li>
<li><code>api.rpc.&lt;section&gt;.&lt;method&gt;</code> provides access to actual RPC calls, be it for queries, submission or retrieving chain information</li>
<li><code>api.query.&lt;section&gt;.&lt;method&gt;</code> provides access to chain state queries. These are dynamically populated based on what the runtime provides</li>
<li><code>api.tx.&lt;section&gt;.&lt;method&gt;</code> provides the ability to create transaction, like chain state, this list is populated from a runtime query</li>
<li><code>api.rpc.&lt;section&gt;.&lt;method&gt;</code> provides access to actual RPC calls, be it for queries, submission or retrieving chain information<ul>
<li><a href="../METHODS_RPC.html">RPC (node interface)</a></li>
</ul>
</li>
<li><code>api.query.&lt;section&gt;.&lt;method&gt;</code> provides access to chain state queries. These are dynamically populated based on what the runtime provides<ul>
<li><a href="../METHODS_STORAGE.html">Storage chain state (runtime node interface)</a></li>
</ul>
</li>
<li><code>api.tx.&lt;section&gt;.&lt;method&gt;</code> provides the ability to create a transaction, like chain state, this list is populated from a runtime query<ul>
<li><a href="../METHODS_EXTRINSICS.html">Extrinsics (runtime node interface)</a></li>
</ul>
</li>
</ul>
<h2 id="api-selection">API Selection</h2>
<p>There are two flavours of the API provided, one allowing a standard interface via JavaScript Promises and the second provides an Observable wrapper using <a href="https://github.com/ReactiveX/rxjs" target="_blank">RxJS</a>. Depending on your use-case and familiarity, you can choose either (or even both) for your application.</p>
<ul>
<li><a href="classes/_promise_index_.apipromise.html">ApiPromise</a> All interface calls returns Promises, including the static <code>.create(...)</code>. Additionally any subscription method use <code>(value) =&gt; {}</code> callbacks, returning the value as the subscription is updated.</li>
<li><a href="classes/_rx_index_.apirx.html">ApiRx</a> All interface calls return RxJS Observables, including the static <code>.create(...)</code>. In the same fashion and subscription-based methods return long-running Observables that update with the latest values.</li>
<li><a href="classes/_promise_index_.apipromise.html">ApiPromise</a> All interface calls returns Promises, including the static <code>.create(...)</code>. Additionally any subscription method uses <code>(value) =&gt; {}</code> callbacks, returning the value as the subscription is updated.</li>
<li><a href="classes/_rx_index_.apirx.html">ApiRx</a> All interface calls return RxJS Observables, including the static <code>.create(...)</code>. In the same fashion subscription-based methods return long-running Observables that update with the latest values.</li>
</ul>
<h2 id="dynamic-by-default">Dynamic by default</h2>
<p>Subtrate (on which Polkadot is built) used on-chain on-chain WASM runtimes, allowing for upgradability. Each runtime defining the actual chain extrinsics (submitted transactions and block intrinsics) as well as available entries in the chain state. Due to this, the API endpoints for queries and transactions are dynamically populated from the running chain.</p>
<p>Substrate (upon which Polkadot is built) uses on-chain WASM runtimes, allowing for upgradability. Each runtime defining the actual chain extrinsics (submitted transactions and block intrinsics) as well as available entries in the chain state. Due to this, the API endpoints for queries and transactions are dynamically populated from the running chain.</p>
<p>Due to this dynamic nature, this API departs from traditional APIs which only has fixed endpoints, driving use by what is available by the runtime. As a start, this generic nature has a learning curve, although the provided documentation, examples and linked documentation tries to make that experience as seamless as possible.</p>
<h2 id="installation--import">Installation &amp; import</h2>
<p>Installation -</p>
@@ -431,7 +486,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"api","level":"1.2","depth":1,"next":{"title":"ApiPromise","level":"1.2.1","depth":2,"path":"api/classes/_promise_index_.apipromise.md","ref":"api/classes/_promise_index_.apipromise.md","articles":[]},"previous":{"title":"Introduction","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["include-codeblock","mermaid-gb3","-highlight","sunlight-highlighter"],"root":"docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"sunlight-highlighter":{"theme":"gitbook","lineNumbers":false},"include-codeblock":{"check":false,"edit":false,"lang":"","fixlang":false,"template":"default","theme":"chrome","unindent":false},"mermaid-gb3":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Polkadot API Book","gitbook":">=2.4.0"},"file":{"path":"api/README.md","mtime":"2018-10-12T16:03:12.062Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-12T16:04:46.181Z"},"basePath":"..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"api","level":"1.2","depth":1,"next":{"title":"ApiPromise","level":"1.2.1","depth":2,"path":"api/classes/_promise_index_.apipromise.md","ref":"api/classes/_promise_index_.apipromise.md","articles":[]},"previous":{"title":"Introduction","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["include-codeblock","mermaid-gb3","-highlight","sunlight-highlighter"],"root":"docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"sunlight-highlighter":{"theme":"gitbook","lineNumbers":false},"include-codeblock":{"check":false,"edit":false,"lang":"","fixlang":false,"template":"default","theme":"chrome","unindent":false},"mermaid-gb3":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Polkadot API Book","gitbook":">=2.4.0"},"file":{"path":"api/README.md","mtime":"2018-10-12T19:18:25.802Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-12T19:20:11.375Z"},"basePath":"..","book":{"language":""}});
});
</script>
</div>