[CI Skip] 0.31.18

This commit is contained in:
Travis CI
2018-10-12 10:37:48 +00:00
parent a47485c9bf
commit eb5fbad5aa
173 changed files with 2599 additions and 2145 deletions
@@ -385,7 +385,7 @@
<p><a id="constructor"></a></p>
<h2 id="constructor">constructor</h2>
<p>&#x2295; <strong>new HttpProvider</strong>(endpoint?: <em><code>string</code></em>): <a href="_http_index_.httpprovider.html">HttpProvider</a></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/http/index.ts#L42" target="_blank">http/index.ts:42</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/http/index.ts#L42" target="_blank">http/index.ts:42</a></em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
@@ -411,7 +411,7 @@
<p><a id="isconnected"></a></p>
<h2 id="isconnected">isConnected</h2>
<p>&#x25B8; <strong>isConnected</strong>(): <code>boolean</code></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/http/index.ts#L59" target="_blank">http/index.ts:59</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/http/index.ts#L59" target="_blank">http/index.ts:59</a></em></p>
<p><em><strong>summary</strong></em>: Whether the node is connected or not.</p>
<p><strong>Returns:</strong> <code>boolean</code>
true if connected</p>
@@ -419,7 +419,7 @@ true if connected</p>
<p><a id="on"></a></p>
<h2 id="on">on</h2>
<p>&#x25B8; <strong>on</strong>(type: <em><code>ProviderInterface$Emitted</code></em>, sub: <em><code>ProviderInterface$EmitCb</code></em>): <code>void</code></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/http/index.ts#L67" target="_blank">http/index.ts:67</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/http/index.ts#L67" target="_blank">http/index.ts:67</a></em></p>
<p><em><strong>summary</strong></em>: Events are not supported with the HttpProvider, see <a href="_ws_index_.wsprovider.html">WsProvider</a>.</p>
<p><em><strong>description</strong></em>: HTTP Provider does not have &apos;on&apos; emitters. WebSockets should be used instead.</p>
<p><strong>Parameters:</strong></p>
@@ -446,7 +446,7 @@ true if connected</p>
<p><a id="send"></a></p>
<h2 id="send">send</h2>
<p>&#x25B8; <strong>send</strong>(method: <em><code>string</code></em>, params: <em><code>Array</code>&lt;<code>any</code>&gt;</em>): <code>Promise</code>&lt;<code>any</code>&gt;</p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/http/index.ts#L74" target="_blank">http/index.ts:74</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/http/index.ts#L74" target="_blank">http/index.ts:74</a></em></p>
<p><em><strong>summary</strong></em>: Send HTTP POST Request with Body to configured HTTP Endpoint.</p>
<p><strong>Parameters:</strong></p>
<table>
@@ -472,7 +472,7 @@ true if connected</p>
<p><a id="subscribe"></a></p>
<h2 id="subscribe">subscribe</h2>
<p>&#x25B8; <strong>subscribe</strong>(types: <em><code>string</code></em>, method: <em><code>string</code></em>, params: <em><code>Array</code>&lt;<code>any</code>&gt;</em>, cb: <em><code>ProviderInterface$Callback</code></em>): <code>Promise</code>&lt;<code>number</code>&gt;</p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/http/index.ts#L96" target="_blank">http/index.ts:96</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/http/index.ts#L96" target="_blank">http/index.ts:96</a></em></p>
<p><em><strong>summary</strong></em>: Subscriptions are not supported with the HttpProvider, see <a href="_ws_index_.wsprovider.html">WsProvider</a>.</p>
<p><strong>Parameters:</strong></p>
<table>
@@ -506,7 +506,7 @@ true if connected</p>
<p><a id="unsubscribe"></a></p>
<h2 id="unsubscribe">unsubscribe</h2>
<p>&#x25B8; <strong>unsubscribe</strong>(type: <em><code>string</code></em>, method: <em><code>string</code></em>, id: <em><code>number</code></em>): <code>Promise</code>&lt;<code>boolean</code>&gt;</p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/http/index.ts#L105" target="_blank">http/index.ts:105</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/http/index.ts#L105" target="_blank">http/index.ts:105</a></em></p>
<p><em><strong>summary</strong></em>: Subscriptions are not supported with the HttpProvider, see <a href="_ws_index_.wsprovider.html">WsProvider</a>.</p>
<p><strong>Parameters:</strong></p>
<table>
@@ -576,7 +576,7 @@ true if connected</p>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"HttpProvider","level":"1.3.1","depth":2,"next":{"title":"WsProvider","level":"1.3.2","depth":2,"path":"rpc-provider/classes/_ws_index_.wsprovider.md","ref":"rpc-provider/classes/_ws_index_.wsprovider.md","articles":[]},"previous":{"title":"rpc-provider","level":"1.3","depth":1,"path":"rpc-provider/README.md","ref":"rpc-provider/README.md","articles":[{"title":"HttpProvider","level":"1.3.1","depth":2,"path":"rpc-provider/classes/_http_index_.httpprovider.md","ref":"rpc-provider/classes/_http_index_.httpprovider.md","articles":[]},{"title":"WsProvider","level":"1.3.2","depth":2,"path":"rpc-provider/classes/_ws_index_.wsprovider.md","ref":"rpc-provider/classes/_ws_index_.wsprovider.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":"rpc-provider/classes/_http_index_.httpprovider.md","mtime":"2018-10-12T09:23:15.063Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-12T09:24:25.564Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"HttpProvider","level":"1.3.1","depth":2,"next":{"title":"WsProvider","level":"1.3.2","depth":2,"path":"rpc-provider/classes/_ws_index_.wsprovider.md","ref":"rpc-provider/classes/_ws_index_.wsprovider.md","articles":[]},"previous":{"title":"rpc-provider","level":"1.3","depth":1,"path":"rpc-provider/README.md","ref":"rpc-provider/README.md","articles":[{"title":"HttpProvider","level":"1.3.1","depth":2,"path":"rpc-provider/classes/_http_index_.httpprovider.md","ref":"rpc-provider/classes/_http_index_.httpprovider.md","articles":[]},{"title":"WsProvider","level":"1.3.2","depth":2,"path":"rpc-provider/classes/_ws_index_.wsprovider.md","ref":"rpc-provider/classes/_ws_index_.wsprovider.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":"rpc-provider/classes/_http_index_.httpprovider.md","mtime":"2018-10-12T10:36:32.203Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-12T10:37:41.280Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>
@@ -33,7 +33,7 @@ const api = new Api(provider);
⊕ **new HttpProvider**(endpoint?: *`string`*): [HttpProvider](_http_index_.httpprovider.md)
*Defined in [http/index.ts:42](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/http/index.ts#L42)*
*Defined in [http/index.ts:42](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/http/index.ts#L42)*
**Parameters:**
@@ -53,7 +53,7 @@ ___
▸ **isConnected**(): `boolean`
*Defined in [http/index.ts:59](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/http/index.ts#L59)*
*Defined in [http/index.ts:59](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/http/index.ts#L59)*
*__summary__*: Whether the node is connected or not.
@@ -67,7 +67,7 @@ ___
▸ **on**(type: *`ProviderInterface$Emitted`*, sub: *`ProviderInterface$EmitCb`*): `void`
*Defined in [http/index.ts:67](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/http/index.ts#L67)*
*Defined in [http/index.ts:67](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/http/index.ts#L67)*
*__summary__*: Events are not supported with the HttpProvider, see [WsProvider](_ws_index_.wsprovider.md).
@@ -89,7 +89,7 @@ ___
▸ **send**(method: *`string`*, params: *`Array`<`any`>*): `Promise`<`any`>
*Defined in [http/index.ts:74](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/http/index.ts#L74)*
*Defined in [http/index.ts:74](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/http/index.ts#L74)*
*__summary__*: Send HTTP POST Request with Body to configured HTTP Endpoint.
@@ -109,7 +109,7 @@ ___
▸ **subscribe**(types: *`string`*, method: *`string`*, params: *`Array`<`any`>*, cb: *`ProviderInterface$Callback`*): `Promise`<`number`>
*Defined in [http/index.ts:96](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/http/index.ts#L96)*
*Defined in [http/index.ts:96](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/http/index.ts#L96)*
*__summary__*: Subscriptions are not supported with the HttpProvider, see [WsProvider](_ws_index_.wsprovider.md).
@@ -131,7 +131,7 @@ ___
▸ **unsubscribe**(type: *`string`*, method: *`string`*, id: *`number`*): `Promise`<`boolean`>
*Defined in [http/index.ts:105](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/http/index.ts#L105)*
*Defined in [http/index.ts:105](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/http/index.ts#L105)*
*__summary__*: Subscriptions are not supported with the HttpProvider, see [WsProvider](_ws_index_.wsprovider.md).
@@ -385,7 +385,7 @@
<p><a id="constructor"></a></p>
<h2 id="constructor">constructor</h2>
<p>&#x2295; <strong>new WsProvider</strong>(endpoint?: <em><code>string</code></em>, autoConnect?: <em><code>boolean</code></em>): <a href="_ws_index_.wsprovider.html">WsProvider</a></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/ws/index.ts#L79" target="_blank">ws/index.ts:79</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/ws/index.ts#L79" target="_blank">ws/index.ts:79</a></em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
@@ -417,7 +417,7 @@
<p><a id="connect"></a></p>
<h2 id="connect">connect</h2>
<p>&#x25B8; <strong>connect</strong>(): <code>void</code></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/ws/index.ts#L109" target="_blank">ws/index.ts:109</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/ws/index.ts#L109" target="_blank">ws/index.ts:109</a></em></p>
<p><em><strong>summary</strong></em>: Manually connect</p>
<p><em><strong>description</strong></em>: The <a href="_ws_index_.wsprovider.html">WsProvider</a> connects automatically by default, however if you decided otherwise, you may connect manually using this method.</p>
<p><strong>Returns:</strong> <code>void</code></p>
@@ -425,7 +425,7 @@
<p><a id="isconnected"></a></p>
<h2 id="isconnected">isConnected</h2>
<p>&#x25B8; <strong>isConnected</strong>(): <code>boolean</code></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/ws/index.ts#L126" target="_blank">ws/index.ts:126</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/ws/index.ts#L126" target="_blank">ws/index.ts:126</a></em></p>
<p><em><strong>summary</strong></em>: Whether the node is connected or not.</p>
<p><strong>Returns:</strong> <code>boolean</code>
true if connected</p>
@@ -433,7 +433,7 @@ true if connected</p>
<p><a id="on"></a></p>
<h2 id="on">on</h2>
<p>&#x25B8; <strong>on</strong>(type: <em><code>ProviderInterface$Emitted</code></em>, sub: <em><code>ProviderInterface$EmitCb</code></em>): <code>void</code></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/ws/index.ts#L135" target="_blank">ws/index.ts:135</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/ws/index.ts#L135" target="_blank">ws/index.ts:135</a></em></p>
<p><em><strong>summary</strong></em>: Listens on events after having subscribed using the <a href="_ws_index_.wsprovider.html#subscribe">subscribe</a> function.</p>
<p><strong>Parameters:</strong></p>
<table>
@@ -462,7 +462,7 @@ true if connected</p>
<p><a id="send"></a></p>
<h2 id="send">send</h2>
<p>&#x25B8; <strong>send</strong>(method: <em><code>string</code></em>, params: <em><code>Array</code>&lt;<code>any</code>&gt;</em>, subscription?: <em><code>SubscriptionHandler</code></em>): <code>Promise</code>&lt;<code>any</code>&gt;</p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/ws/index.ts#L142" target="_blank">ws/index.ts:142</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/ws/index.ts#L142" target="_blank">ws/index.ts:142</a></em></p>
<p><em><strong>summary</strong></em>: Send JSON data using WebSockets to configured HTTP Endpoint or queue.</p>
<p><strong>Parameters:</strong></p>
<table>
@@ -492,7 +492,7 @@ true if connected</p>
<p><a id="subscribe"></a></p>
<h2 id="subscribe">subscribe</h2>
<p>&#x25B8; <strong>subscribe</strong>(type: <em><code>string</code></em>, method: <em><code>string</code></em>, params: <em><code>Array</code>&lt;<code>any</code>&gt;</em>, callback: <em><code>ProviderInterface$Callback</code></em>): <code>Promise</code>&lt;<code>number</code>&gt;</p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/ws/index.ts#L198" target="_blank">ws/index.ts:198</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/ws/index.ts#L198" target="_blank">ws/index.ts:198</a></em></p>
<p><em><strong>name</strong></em>: subscribe</p>
<p><em><strong>summary</strong></em>: Allows subscribing to a specific event.</p>
<p><em><strong>example</strong></em>: </p>
@@ -543,7 +543,7 @@ Promise resolving to the dd of the subscription you can use with [[unsubscribe]]
<p><a id="unsubscribe"></a></p>
<h2 id="unsubscribe">unsubscribe</h2>
<p>&#x25B8; <strong>unsubscribe</strong>(type: <em><code>string</code></em>, method: <em><code>string</code></em>, id: <em><code>number</code></em>): <code>Promise</code>&lt;<code>boolean</code>&gt;</p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/ws/index.ts#L207" target="_blank">ws/index.ts:207</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/ws/index.ts#L207" target="_blank">ws/index.ts:207</a></em></p>
<p><em><strong>summary</strong></em>: Allows unsubscribing to subscriptions made with <a href="_ws_index_.wsprovider.html#subscribe">subscribe</a>.</p>
<p><strong>Parameters:</strong></p>
<table>
@@ -613,7 +613,7 @@ Promise resolving to the dd of the subscription you can use with [[unsubscribe]]
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"WsProvider","level":"1.3.2","depth":2,"next":{"title":"ApiPromise","level":"2.1","depth":1,"path":"examples/promise/README.md","ref":"examples/promise/README.md","articles":[{"title":"Simple connect","level":"2.1.1","depth":2,"path":"examples/promise/01_simple_connect/README.md","ref":"examples/promise/01_simple_connect/README.md","articles":[]},{"title":"Listen to blocks","level":"2.1.2","depth":2,"path":"examples/promise/02_listen_to_blocks/README.md","ref":"examples/promise/02_listen_to_blocks/README.md","articles":[]},{"title":"Listen to balance change","level":"2.1.3","depth":2,"path":"examples/deprecated-rpc/03_listen_to_balance_change/README.md","ref":"examples/deprecated-rpc/03_listen_to_balance_change/README.md","articles":[]},{"title":"Generate Accounts","level":"2.1.4","depth":2,"path":"examples/deprecated-rpc/04_generate_account/README.md","ref":"examples/deprecated-rpc/04_generate_account/README.md","articles":[]},{"title":"Read Storage","level":"2.1.5","depth":2,"path":"examples/deprecated-rpc/05_read_storage/README.md","ref":"examples/deprecated-rpc/05_read_storage/README.md","articles":[]},{"title":"Craft Extrinsic","level":"2.1.6","depth":2,"path":"examples/deprecated-rpc/06_craft_extrinsic/README.md","ref":"examples/deprecated-rpc/06_craft_extrinsic/README.md","articles":[]},{"title":"Transfer DOTs","level":"2.1.7","depth":2,"path":"examples/deprecated-rpc/07_transfer_dots/README.md","ref":"examples/deprecated-rpc/07_transfer_dots/README.md","articles":[]}]},"previous":{"title":"HttpProvider","level":"1.3.1","depth":2,"path":"rpc-provider/classes/_http_index_.httpprovider.md","ref":"rpc-provider/classes/_http_index_.httpprovider.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":"rpc-provider/classes/_ws_index_.wsprovider.md","mtime":"2018-10-12T09:23:15.135Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-12T09:24:25.564Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"WsProvider","level":"1.3.2","depth":2,"next":{"title":"ApiPromise","level":"2.1","depth":1,"path":"examples/promise/README.md","ref":"examples/promise/README.md","articles":[{"title":"Simple connect","level":"2.1.1","depth":2,"path":"examples/promise/01_simple_connect/README.md","ref":"examples/promise/01_simple_connect/README.md","articles":[]},{"title":"Listen to blocks","level":"2.1.2","depth":2,"path":"examples/promise/02_listen_to_blocks/README.md","ref":"examples/promise/02_listen_to_blocks/README.md","articles":[]},{"title":"Listen to balance change","level":"2.1.3","depth":2,"path":"examples/deprecated-rpc/03_listen_to_balance_change/README.md","ref":"examples/deprecated-rpc/03_listen_to_balance_change/README.md","articles":[]},{"title":"Generate Accounts","level":"2.1.4","depth":2,"path":"examples/deprecated-rpc/04_generate_account/README.md","ref":"examples/deprecated-rpc/04_generate_account/README.md","articles":[]},{"title":"Read Storage","level":"2.1.5","depth":2,"path":"examples/deprecated-rpc/05_read_storage/README.md","ref":"examples/deprecated-rpc/05_read_storage/README.md","articles":[]},{"title":"Craft Extrinsic","level":"2.1.6","depth":2,"path":"examples/deprecated-rpc/06_craft_extrinsic/README.md","ref":"examples/deprecated-rpc/06_craft_extrinsic/README.md","articles":[]},{"title":"Transfer DOTs","level":"2.1.7","depth":2,"path":"examples/deprecated-rpc/07_transfer_dots/README.md","ref":"examples/deprecated-rpc/07_transfer_dots/README.md","articles":[]}]},"previous":{"title":"HttpProvider","level":"1.3.1","depth":2,"path":"rpc-provider/classes/_http_index_.httpprovider.md","ref":"rpc-provider/classes/_http_index_.httpprovider.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":"rpc-provider/classes/_ws_index_.wsprovider.md","mtime":"2018-10-12T10:36:32.267Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-12T10:37:41.280Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>
@@ -33,7 +33,7 @@ const api = new Api(provider);
⊕ **new WsProvider**(endpoint?: *`string`*, autoConnect?: *`boolean`*): [WsProvider](_ws_index_.wsprovider.md)
*Defined in [ws/index.ts:79](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/ws/index.ts#L79)*
*Defined in [ws/index.ts:79](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/ws/index.ts#L79)*
**Parameters:**
@@ -54,7 +54,7 @@ ___
▸ **connect**(): `void`
*Defined in [ws/index.ts:109](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/ws/index.ts#L109)*
*Defined in [ws/index.ts:109](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/ws/index.ts#L109)*
*__summary__*: Manually connect
@@ -69,7 +69,7 @@ ___
▸ **isConnected**(): `boolean`
*Defined in [ws/index.ts:126](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/ws/index.ts#L126)*
*Defined in [ws/index.ts:126](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/ws/index.ts#L126)*
*__summary__*: Whether the node is connected or not.
@@ -83,7 +83,7 @@ ___
▸ **on**(type: *`ProviderInterface$Emitted`*, sub: *`ProviderInterface$EmitCb`*): `void`
*Defined in [ws/index.ts:135](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/ws/index.ts#L135)*
*Defined in [ws/index.ts:135](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/ws/index.ts#L135)*
*__summary__*: Listens on events after having subscribed using the [subscribe](_ws_index_.wsprovider.md#subscribe) function.
@@ -103,7 +103,7 @@ ___
▸ **send**(method: *`string`*, params: *`Array`<`any`>*, subscription?: *`SubscriptionHandler`*): `Promise`<`any`>
*Defined in [ws/index.ts:142](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/ws/index.ts#L142)*
*Defined in [ws/index.ts:142](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/ws/index.ts#L142)*
*__summary__*: Send JSON data using WebSockets to configured HTTP Endpoint or queue.
@@ -124,7 +124,7 @@ ___
▸ **subscribe**(type: *`string`*, method: *`string`*, params: *`Array`<`any`>*, callback: *`ProviderInterface$Callback`*): `Promise`<`number`>
*Defined in [ws/index.ts:198](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/ws/index.ts#L198)*
*Defined in [ws/index.ts:198](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/ws/index.ts#L198)*
*__name__*: subscribe
@@ -161,7 +161,7 @@ ___
▸ **unsubscribe**(type: *`string`*, method: *`string`*, id: *`number`*): `Promise`<`boolean`>
*Defined in [ws/index.ts:207](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/ws/index.ts#L207)*
*Defined in [ws/index.ts:207](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/ws/index.ts#L207)*
*__summary__*: Allows unsubscribing to subscriptions made with [subscribe](_ws_index_.wsprovider.md#subscribe).
+1 -1
View File
@@ -433,7 +433,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"rpc-provider","level":"1.3","depth":1,"next":{"title":"HttpProvider","level":"1.3.1","depth":2,"path":"rpc-provider/classes/_http_index_.httpprovider.md","ref":"rpc-provider/classes/_http_index_.httpprovider.md","articles":[]},"previous":{"title":"ApiRx","level":"1.2.2","depth":2,"path":"api/classes/_rx_index_.apirx.md","ref":"api/classes/_rx_index_.apirx.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":"rpc-provider/README.md","mtime":"2018-10-12T09:23:14.899Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-12T09:24:25.564Z"},"basePath":"..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"rpc-provider","level":"1.3","depth":1,"next":{"title":"HttpProvider","level":"1.3.1","depth":2,"path":"rpc-provider/classes/_http_index_.httpprovider.md","ref":"rpc-provider/classes/_http_index_.httpprovider.md","articles":[]},"previous":{"title":"ApiRx","level":"1.2.2","depth":2,"path":"api/classes/_rx_index_.apirx.md","ref":"api/classes/_rx_index_.apirx.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":"rpc-provider/README.md","mtime":"2018-10-12T10:36:32.055Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-12T10:37:41.280Z"},"basePath":"..","book":{"language":""}});
});
</script>
</div>
@@ -8,7 +8,7 @@
▸ **decodeResponse**(self: *`RpcCoderState`*, response: *`JsonRpcResponse`*): `any`
*Defined in [coder/json/decodeResponse.ts:22](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/coder/json/decodeResponse.ts#L22)*
*Defined in [coder/json/decodeResponse.ts:22](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/coder/json/decodeResponse.ts#L22)*
**Parameters:**
@@ -8,7 +8,7 @@
▸ **encodeJson**(self: *`RpcCoderState`*, method: *`string`*, params: *`Array`<`any`>*): `string`
*Defined in [coder/json/encodeJson.ts:9](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/coder/json/encodeJson.ts#L9)*
*Defined in [coder/json/encodeJson.ts:9](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/coder/json/encodeJson.ts#L9)*
**Parameters:**
@@ -8,7 +8,7 @@
▸ **encodeObject**(self: *`RpcCoderState`*, method: *`string`*, params: *`Array`<`any`>*): `JsonRpcRequest`
*Defined in [coder/json/encodeObject.ts:8](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/coder/json/encodeObject.ts#L8)*
*Defined in [coder/json/encodeObject.ts:8](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/coder/json/encodeObject.ts#L8)*
**Parameters:**
@@ -8,7 +8,7 @@
▸ **rpcCoder**(): `RpcCoder`
*Defined in [coder/json/index.ts:12](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/coder/json/index.ts#L12)*
*Defined in [coder/json/index.ts:12](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/coder/json/index.ts#L12)*
**Returns:** `RpcCoder`
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **mockProvider**(): `ProviderInterface`
*Defined in [mock/index.ts:18](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/mock/index.ts#L18)*
*Defined in [mock/index.ts:18](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/mock/index.ts#L18)*
A mock provider mainly used for testing.
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **mocks**(__namedParameters: *`object`*): `void`
*Defined in [mock/mocks.ts:63](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/mock/mocks.ts#L63)*
*Defined in [mock/mocks.ts:63](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/mock/mocks.ts#L63)*
**Parameters:**
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **on**(self: *`MockState`*, type: *`ProviderInterface$Emitted`*, sub: *`ProviderInterface$EmitCb`*): `void`
*Defined in [mock/on.ts:8](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/mock/on.ts#L8)*
*Defined in [mock/on.ts:8](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/mock/on.ts#L8)*
**Parameters:**
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **send**(__namedParameters: *`object`*, method: *`string`*, params: *`Array`<`any`>*): `Promise`<`any`>
*Defined in [mock/send.ts:7](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/mock/send.ts#L7)*
*Defined in [mock/send.ts:7](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/mock/send.ts#L7)*
**Parameters:**
+1 -1
View File
@@ -8,7 +8,7 @@
▸ **state**(): `MockState`
*Defined in [mock/state.ts:38](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/mock/state.ts#L38)*
*Defined in [mock/state.ts:38](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/mock/state.ts#L38)*
**Returns:** `MockState`
@@ -8,7 +8,7 @@
▸ **subscribe**(self: *`MockState`*, type: *`string`*, method: *`string`*, params: *`Array`<`any`>*): `Promise`<`number`>
*Defined in [mock/subscribe.ts:7](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/mock/subscribe.ts#L7)*
*Defined in [mock/subscribe.ts:7](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/mock/subscribe.ts#L7)*
**Parameters:**
@@ -8,7 +8,7 @@
▸ **unsubscribe**(self: *`MockState`*, type: *`string`*, name: *`string`*, id: *`number`*): `Promise`<`boolean`>
*Defined in [mock/unsubscribe.ts:7](https://github.com/polkadot-js/api/blob/8fafedc/packages/rpc-provider/src/mock/unsubscribe.ts#L7)*
*Defined in [mock/unsubscribe.ts:7](https://github.com/polkadot-js/api/blob/a47485c/packages/rpc-provider/src/mock/unsubscribe.ts#L7)*
**Parameters:**