[CI Skip] 0.31.12

This commit is contained in:
Travis CI
2018-10-11 16:52:22 +00:00
parent e103e98f16
commit 83f63e5adf
181 changed files with 2141 additions and 4407 deletions
@@ -449,7 +449,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/a4fc2c5/packages/rpc-provider/src/http/index.ts#L40" target="_blank">http/index.ts:40</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/http/index.ts#L40" target="_blank">http/index.ts:40</a></em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
@@ -473,7 +473,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/a4fc2c5/packages/rpc-provider/src/http/index.ts#L57" target="_blank">http/index.ts:57</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/http/index.ts#L57" target="_blank">http/index.ts:57</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>
@@ -481,7 +481,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/a4fc2c5/packages/rpc-provider/src/http/index.ts#L65" target="_blank">http/index.ts:65</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/http/index.ts#L65" target="_blank">http/index.ts:65</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>
@@ -508,7 +508,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/a4fc2c5/packages/rpc-provider/src/http/index.ts#L72" target="_blank">http/index.ts:72</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/http/index.ts#L72" target="_blank">http/index.ts:72</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>
@@ -534,7 +534,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/a4fc2c5/packages/rpc-provider/src/http/index.ts#L94" target="_blank">http/index.ts:94</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/http/index.ts#L94" target="_blank">http/index.ts:94</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>
@@ -568,7 +568,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/a4fc2c5/packages/rpc-provider/src/http/index.ts#L103" target="_blank">http/index.ts:103</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/http/index.ts#L103" target="_blank">http/index.ts:103</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>
@@ -638,7 +638,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-11T13:30:26.643Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-11T13:31:41.446Z"},"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-11T16:51:08.021Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-11T16:52:14.838Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>
@@ -33,7 +33,7 @@ const api = new Rpc(provider);
⊕ **new HttpProvider**(endpoint: *`string`*): [HttpProvider](_http_index_.httpprovider.md)
*Defined in [http/index.ts:40](https://github.com/polkadot-js/api/blob/a4fc2c5/packages/rpc-provider/src/http/index.ts#L40)*
*Defined in [http/index.ts:40](https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/http/index.ts#L40)*
**Parameters:**
@@ -53,7 +53,7 @@ ___
▸ **isConnected**(): `boolean`
*Defined in [http/index.ts:57](https://github.com/polkadot-js/api/blob/a4fc2c5/packages/rpc-provider/src/http/index.ts#L57)*
*Defined in [http/index.ts:57](https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/http/index.ts#L57)*
*__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:65](https://github.com/polkadot-js/api/blob/a4fc2c5/packages/rpc-provider/src/http/index.ts#L65)*
*Defined in [http/index.ts:65](https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/http/index.ts#L65)*
*__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:72](https://github.com/polkadot-js/api/blob/a4fc2c5/packages/rpc-provider/src/http/index.ts#L72)*
*Defined in [http/index.ts:72](https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/http/index.ts#L72)*
*__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:94](https://github.com/polkadot-js/api/blob/a4fc2c5/packages/rpc-provider/src/http/index.ts#L94)*
*Defined in [http/index.ts:94](https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/http/index.ts#L94)*
*__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:103](https://github.com/polkadot-js/api/blob/a4fc2c5/packages/rpc-provider/src/http/index.ts#L103)*
*Defined in [http/index.ts:103](https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/http/index.ts#L103)*
*__summary__*: Subscriptions are not supported with the HttpProvider, see [WsProvider](_ws_index_.wsprovider.md).
@@ -439,11 +439,8 @@
<span class="sunlight-reservedWord">const</span>&#xA0;<span class="sunlight-ident">api</span>&#xA0;<span class="sunlight-operator">=</span>&#xA0;<span class="sunlight-keyword">new</span>&#xA0;<span class="sunlight-ident">Rpc</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">provider</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
</span></pre></div></div></code></pre>
<p><em><strong>see</strong></em>: <a href="_http_index_.httpprovider.html">HttpProvider</a></p>
<h1 id="type-parameters">Type parameters</h1>
<h4 id="eventtypes----string--symbol">EventTypes : <code>string</code> | <code>symbol</code></h4>
<h1 id="hierarchy">Hierarchy</h1>
<p> <code>EventEmitter</code></p>
<p><strong>&#x21B3; WsProvider</strong></p>
<p><strong>WsProvider</strong></p>
<h1 id="implements">Implements</h1>
<ul>
<li><code>WSProviderInterface</code></li>
@@ -452,7 +449,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/a4fc2c5/packages/rpc-provider/src/ws/index.ts#L73" target="_blank">ws/index.ts:73</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/ws/index.ts#L74" target="_blank">ws/index.ts:74</a></em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
@@ -480,181 +477,27 @@
</table>
<p><strong>Returns:</strong> <a href="_ws_index_.wsprovider.html">WsProvider</a></p>
<hr>
<h1 id="properties">Properties</h1>
<p><a id="prefixed"></a></p>
<h2 id="static-prefixed"><code>&lt;Static&gt;</code> prefixed</h2>
<p><strong>&#x25CF; prefixed</strong>: <em> <code>string</code> | <code>boolean</code>
</em></p>
<p><em>Inherited from EventEmitter.prefixed</em></p>
<p><em>Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:6</em></p>
<hr>
<h1 id="methods">Methods</h1>
<p><a id="addlistener"></a></p>
<h2 id="addlistener">addListener</h2>
<p>&#x25B8; <strong>addListener</strong>(event: <em><code>EventTypes</code></em>, fn: <em><code>ListenerFn</code></em>, context?: <em><code>any</code></em>): <code>this</code></p>
<p><em>Inherited from EventEmitter.addListener</em></p>
<p><em>Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:33</em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>event</td>
<td><code>EventTypes</code></td>
</tr>
<tr>
<td>fn</td>
<td><code>ListenerFn</code></td>
</tr>
<tr>
<td><code>Optional</code> context</td>
<td><code>any</code></td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <code>this</code></p>
<hr>
<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/a4fc2c5/packages/rpc-provider/src/ws/index.ts#L104" target="_blank">ws/index.ts:104</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/ws/index.ts#L104" target="_blank">ws/index.ts:104</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>
<hr>
<p><a id="emit"></a></p>
<h2 id="emit">emit</h2>
<p>&#x25B8; <strong>emit</strong>(event: <em><code>EventTypes</code></em>, ...args: <em><code>Array</code>&lt;<code>any</code>&gt;</em>): <code>boolean</code></p>
<p><em>Inherited from EventEmitter.emit</em></p>
<p><em>Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:27</em></p>
<p>Calls each of the listeners registered for a given event.</p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>event</td>
<td><code>EventTypes</code></td>
</tr>
<tr>
<td><code>Rest</code> args</td>
<td><code>Array</code>&lt;<code>any</code>&gt;</td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <code>boolean</code></p>
<hr>
<p><a id="eventnames"></a></p>
<h2 id="eventnames">eventNames</h2>
<p>&#x25B8; <strong>eventNames</strong>(): <code>Array</code>&lt;<code>EventTypes</code>&gt;</p>
<p><em>Inherited from EventEmitter.eventNames</em></p>
<p><em>Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:12</em></p>
<p>Return an array listing the events for which the emitter has registered listeners.</p>
<p><strong>Returns:</strong> <code>Array</code>&lt;<code>EventTypes</code>&gt;</p>
<hr>
<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/a4fc2c5/packages/rpc-provider/src/ws/index.ts#L121" target="_blank">ws/index.ts:121</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/ws/index.ts#L121" target="_blank">ws/index.ts:121</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>
<hr>
<p><a id="listenercount"></a></p>
<h2 id="listenercount">listenerCount</h2>
<p>&#x25B8; <strong>listenerCount</strong>(event: <em><code>EventTypes</code></em>): <code>number</code></p>
<p><em>Inherited from EventEmitter.listenerCount</em></p>
<p><em>Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:22</em></p>
<p>Return the number of listeners listening to a given event.</p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>event</td>
<td><code>EventTypes</code></td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <code>number</code></p>
<hr>
<p><a id="listeners"></a></p>
<h2 id="listeners">listeners</h2>
<p>&#x25B8; <strong>listeners</strong>(event: <em><code>EventTypes</code></em>): <code>Array</code>&lt;<code>ListenerFn</code>&gt;</p>
<p><em>Inherited from EventEmitter.listeners</em></p>
<p><em>Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:17</em></p>
<p>Return the listeners registered for a given event.</p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>event</td>
<td><code>EventTypes</code></td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <code>Array</code>&lt;<code>ListenerFn</code>&gt;</p>
<hr>
<p><a id="off"></a></p>
<h2 id="off">off</h2>
<p>&#x25B8; <strong>off</strong>(event: <em><code>EventTypes</code></em>, fn?: <em><a href="../interfaces/_ws_index_.wsprovider.eventemitter.listenerfn.md">ListenerFn</a></em>, context?: <em><code>any</code></em>, once?: <em> <code>undefined</code> | <code>false</code> | <code>true</code></em>): <code>this</code></p>
<p><em>Inherited from EventEmitter.off</em></p>
<p><em>Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:44</em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>event</td>
<td><code>EventTypes</code></td>
</tr>
<tr>
<td><code>Optional</code> fn</td>
<td><a href="../interfaces/_ws_index_.wsprovider.eventemitter.listenerfn.md">ListenerFn</a></td>
</tr>
<tr>
<td><code>Optional</code> context</td>
<td><code>any</code></td>
</tr>
<tr>
<td><code>Optional</code> once</td>
<td><code>undefined</code> | <code>false</code> | <code>true</code></td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <code>this</code></p>
<hr>
<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>this</code></p>
<p><em>Overrides EventEmitter.on</em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/a4fc2c5/packages/rpc-provider/src/ws/index.ts#L131" target="_blank">ws/index.ts:131</a></em></p>
<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/e103e98/packages/rpc-provider/src/ws/index.ts#L130" target="_blank">ws/index.ts:130</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>
@@ -678,102 +521,12 @@ true if connected</p>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <code>this</code>
[description]</p>
<hr>
<p><a id="once"></a></p>
<h2 id="once">once</h2>
<p>&#x25B8; <strong>once</strong>(event: <em><code>EventTypes</code></em>, fn: <em><code>ListenerFn</code></em>, context?: <em><code>any</code></em>): <code>this</code></p>
<p><em>Inherited from EventEmitter.once</em></p>
<p><em>Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:38</em></p>
<p>Add a one-time listener for a given event.</p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>event</td>
<td><code>EventTypes</code></td>
</tr>
<tr>
<td>fn</td>
<td><code>ListenerFn</code></td>
</tr>
<tr>
<td><code>Optional</code> context</td>
<td><code>any</code></td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <code>this</code></p>
<hr>
<p><a id="removealllisteners"></a></p>
<h2 id="removealllisteners">removeAllListeners</h2>
<p>&#x25B8; <strong>removeAllListeners</strong>(event?: <em><a href="">EventTypes</a></em>): <code>this</code></p>
<p><em>Inherited from EventEmitter.removeAllListeners</em></p>
<p><em>Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:49</em></p>
<p>Remove all listeners, or those of the specified event.</p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Optional</code> event</td>
<td><a href="">EventTypes</a></td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <code>this</code></p>
<hr>
<p><a id="removelistener"></a></p>
<h2 id="removelistener">removeListener</h2>
<p>&#x25B8; <strong>removeListener</strong>(event: <em><code>EventTypes</code></em>, fn?: <em><a href="../interfaces/_ws_index_.wsprovider.eventemitter.listenerfn.md">ListenerFn</a></em>, context?: <em><code>any</code></em>, once?: <em> <code>undefined</code> | <code>false</code> | <code>true</code></em>): <code>this</code></p>
<p><em>Inherited from EventEmitter.removeListener</em></p>
<p><em>Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:43</em></p>
<p>Remove the listeners of a given event.</p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>event</td>
<td><code>EventTypes</code></td>
</tr>
<tr>
<td><code>Optional</code> fn</td>
<td><a href="../interfaces/_ws_index_.wsprovider.eventemitter.listenerfn.md">ListenerFn</a></td>
</tr>
<tr>
<td><code>Optional</code> context</td>
<td><code>any</code></td>
</tr>
<tr>
<td><code>Optional</code> once</td>
<td><code>undefined</code> | <code>false</code> | <code>true</code></td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <code>this</code></p>
<p><strong>Returns:</strong> <code>void</code></p>
<hr>
<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/a4fc2c5/packages/rpc-provider/src/ws/index.ts#L138" target="_blank">ws/index.ts:138</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/ws/index.ts#L137" target="_blank">ws/index.ts:137</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>
@@ -803,7 +556,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/a4fc2c5/packages/rpc-provider/src/ws/index.ts#L194" target="_blank">ws/index.ts:194</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/ws/index.ts#L193" target="_blank">ws/index.ts:193</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>
@@ -854,7 +607,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/a4fc2c5/packages/rpc-provider/src/ws/index.ts#L203" target="_blank">ws/index.ts:203</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/ws/index.ts#L202" target="_blank">ws/index.ts:202</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>
@@ -924,7 +677,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":"rpc-core","level":"1.4","depth":1,"path":"rpc-core/README.md","ref":"rpc-core/README.md","articles":[{"title":"Rpc","level":"1.4.1","depth":2,"path":"rpc-core/classes/_index_.rpc.md","ref":"rpc-core/classes/_index_.rpc.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-11T13:30:26.759Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-11T13:31:41.446Z"},"basePath":"../..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"WsProvider","level":"1.3.2","depth":2,"next":{"title":"rpc-core","level":"1.4","depth":1,"path":"rpc-core/README.md","ref":"rpc-core/README.md","articles":[{"title":"Rpc","level":"1.4.1","depth":2,"path":"rpc-core/classes/_index_.rpc.md","ref":"rpc-core/classes/_index_.rpc.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-11T16:51:08.089Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-11T16:52:14.838Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>
@@ -17,14 +17,9 @@ const api = new Rpc(provider);
*__see__*: [HttpProvider](_http_index_.httpprovider.md)
# Type parameters
#### EventTypes : `string` &#124; `symbol`
# Hierarchy
`EventEmitter`
**↳ WsProvider**
**WsProvider**
# Implements
@@ -38,7 +33,7 @@ const api = new Rpc(provider);
⊕ **new WsProvider**(endpoint: *`string`*, autoConnect?: *`boolean`*): [WsProvider](_ws_index_.wsprovider.md)
*Defined in [ws/index.ts:73](https://github.com/polkadot-js/api/blob/a4fc2c5/packages/rpc-provider/src/ws/index.ts#L73)*
*Defined in [ws/index.ts:74](https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/ws/index.ts#L74)*
**Parameters:**
@@ -51,51 +46,15 @@ const api = new Rpc(provider);
___
# Properties
<a id="prefixed"></a>
## `<Static>` prefixed
**● prefixed**: * `string` &#124; `boolean`
*
*Inherited from EventEmitter.prefixed*
*Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:6*
___
# Methods
<a id="addlistener"></a>
## addListener
▸ **addListener**(event: *`EventTypes`*, fn: *`ListenerFn`*, context?: *`any`*): `this`
*Inherited from EventEmitter.addListener*
*Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:33*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `EventTypes` |
| fn | `ListenerFn` |
| `Optional` context | `any` |
**Returns:** `this`
___
<a id="connect"></a>
## connect
▸ **connect**(): `void`
*Defined in [ws/index.ts:104](https://github.com/polkadot-js/api/blob/a4fc2c5/packages/rpc-provider/src/ws/index.ts#L104)*
*Defined in [ws/index.ts:104](https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/ws/index.ts#L104)*
*__summary__*: Manually connect
@@ -103,43 +62,6 @@ ___
**Returns:** `void`
___
<a id="emit"></a>
## emit
▸ **emit**(event: *`EventTypes`*, ...args: *`Array`<`any`>*): `boolean`
*Inherited from EventEmitter.emit*
*Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:27*
Calls each of the listeners registered for a given event.
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `EventTypes` |
| `Rest` args | `Array`<`any`> |
**Returns:** `boolean`
___
<a id="eventnames"></a>
## eventNames
▸ **eventNames**(): `Array`<`EventTypes`>
*Inherited from EventEmitter.eventNames*
*Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:12*
Return an array listing the events for which the emitter has registered listeners.
**Returns:** `Array`<`EventTypes`>
___
<a id="isconnected"></a>
@@ -147,87 +69,21 @@ ___
▸ **isConnected**(): `boolean`
*Defined in [ws/index.ts:121](https://github.com/polkadot-js/api/blob/a4fc2c5/packages/rpc-provider/src/ws/index.ts#L121)*
*Defined in [ws/index.ts:121](https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/ws/index.ts#L121)*
*__summary__*: Whether the node is connected or not.
**Returns:** `boolean`
true if connected
___
<a id="listenercount"></a>
## listenerCount
▸ **listenerCount**(event: *`EventTypes`*): `number`
*Inherited from EventEmitter.listenerCount*
*Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:22*
Return the number of listeners listening to a given event.
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `EventTypes` |
**Returns:** `number`
___
<a id="listeners"></a>
## listeners
▸ **listeners**(event: *`EventTypes`*): `Array`<`ListenerFn`>
*Inherited from EventEmitter.listeners*
*Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:17*
Return the listeners registered for a given event.
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `EventTypes` |
**Returns:** `Array`<`ListenerFn`>
___
<a id="off"></a>
## off
▸ **off**(event: *`EventTypes`*, fn?: *[ListenerFn](../interfaces/_ws_index_.wsprovider.eventemitter.listenerfn.md)*, context?: *`any`*, once?: * `undefined` &#124; `false` &#124; `true`*): `this`
*Inherited from EventEmitter.off*
*Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:44*
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `EventTypes` |
| `Optional` fn | [ListenerFn](../interfaces/_ws_index_.wsprovider.eventemitter.listenerfn.md) |
| `Optional` context | `any` |
| `Optional` once | `undefined` &#124; `false` &#124; `true`|
**Returns:** `this`
___
<a id="on"></a>
## on
▸ **on**(type: *`ProviderInterface$Emitted`*, sub: *`ProviderInterface$EmitCb`*): `this`
▸ **on**(type: *`ProviderInterface$Emitted`*, sub: *`ProviderInterface$EmitCb`*): `void`
*Overrides EventEmitter.on*
*Defined in [ws/index.ts:131](https://github.com/polkadot-js/api/blob/a4fc2c5/packages/rpc-provider/src/ws/index.ts#L131)*
*Defined in [ws/index.ts:130](https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/ws/index.ts#L130)*
*__summary__*: Listens on events after having subscribed using the [subscribe](_ws_index_.wsprovider.md#subscribe) function.
@@ -238,76 +94,7 @@ ___
| type | `ProviderInterface$Emitted` | Event |
| sub | `ProviderInterface$EmitCb` | Callback |
**Returns:** `this`
[description]
___
<a id="once"></a>
## once
▸ **once**(event: *`EventTypes`*, fn: *`ListenerFn`*, context?: *`any`*): `this`
*Inherited from EventEmitter.once*
*Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:38*
Add a one-time listener for a given event.
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `EventTypes` |
| fn | `ListenerFn` |
| `Optional` context | `any` |
**Returns:** `this`
___
<a id="removealllisteners"></a>
## removeAllListeners
▸ **removeAllListeners**(event?: *[EventTypes]()*): `this`
*Inherited from EventEmitter.removeAllListeners*
*Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:49*
Remove all listeners, or those of the specified event.
**Parameters:**
| Param | Type |
| ------ | ------ |
| `Optional` event | [EventTypes]() |
**Returns:** `this`
___
<a id="removelistener"></a>
## removeListener
▸ **removeListener**(event: *`EventTypes`*, fn?: *[ListenerFn](../interfaces/_ws_index_.wsprovider.eventemitter.listenerfn.md)*, context?: *`any`*, once?: * `undefined` &#124; `false` &#124; `true`*): `this`
*Inherited from EventEmitter.removeListener*
*Defined in /home/travis/build/polkadot-js/api/node_modules/eventemitter3/index.d.ts:43*
Remove the listeners of a given event.
**Parameters:**
| Param | Type |
| ------ | ------ |
| event | `EventTypes` |
| `Optional` fn | [ListenerFn](../interfaces/_ws_index_.wsprovider.eventemitter.listenerfn.md) |
| `Optional` context | `any` |
| `Optional` once | `undefined` &#124; `false` &#124; `true`|
**Returns:** `this`
**Returns:** `void`
___
<a id="send"></a>
@@ -316,7 +103,7 @@ ___
▸ **send**(method: *`string`*, params: *`Array`<`any`>*, subscription?: *`SubscriptionHandler`*): `Promise`<`any`>
*Defined in [ws/index.ts:138](https://github.com/polkadot-js/api/blob/a4fc2c5/packages/rpc-provider/src/ws/index.ts#L138)*
*Defined in [ws/index.ts:137](https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/ws/index.ts#L137)*
*__summary__*: Send JSON data using WebSockets to configured HTTP Endpoint or queue.
@@ -337,7 +124,7 @@ ___
▸ **subscribe**(type: *`string`*, method: *`string`*, params: *`Array`<`any`>*, callback: *`ProviderInterface$Callback`*): `Promise`<`number`>
*Defined in [ws/index.ts:194](https://github.com/polkadot-js/api/blob/a4fc2c5/packages/rpc-provider/src/ws/index.ts#L194)*
*Defined in [ws/index.ts:193](https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/ws/index.ts#L193)*
*__name__*: subscribe
@@ -374,7 +161,7 @@ ___
▸ **unsubscribe**(type: *`string`*, method: *`string`*, id: *`number`*): `Promise`<`boolean`>
*Defined in [ws/index.ts:203](https://github.com/polkadot-js/api/blob/a4fc2c5/packages/rpc-provider/src/ws/index.ts#L203)*
*Defined in [ws/index.ts:202](https://github.com/polkadot-js/api/blob/e103e98/packages/rpc-provider/src/ws/index.ts#L202)*
*__summary__*: Allows unsubscribing to subscriptions made with [subscribe](_ws_index_.wsprovider.md#subscribe).