[CI Skip] 0.30.11
This commit is contained in:
@@ -383,7 +383,7 @@
|
||||
<p><a id="constructor"></a></p>
|
||||
<h2 id="constructor">constructor</h2>
|
||||
<p>⊕ <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/48e57f9/packages/api-provider/src/http/index.ts#L35" target="_blank">http/index.ts:35</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/http/index.ts#L35" target="_blank">http/index.ts:35</a></em></p>
|
||||
<p><strong>Parameters:</strong></p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -406,7 +406,7 @@
|
||||
<h2 id="isconnected">isConnected</h2>
|
||||
<p>▸ <strong>isConnected</strong>(): <code>boolean</code></p>
|
||||
<p><em>Implementation of <a href="../interfaces/_types_d_.providerinterface.md">ProviderInterface</a>.<a href="../interfaces/_types_d_.providerinterface.md#isconnected">isConnected</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/http/index.ts#L49" target="_blank">http/index.ts:49</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/http/index.ts#L49" target="_blank">http/index.ts:49</a></em></p>
|
||||
<p>Whether the node is connected or not.</p>
|
||||
<p><strong>Returns:</strong> <code>boolean</code>
|
||||
true if connected</p>
|
||||
@@ -415,7 +415,7 @@ true if connected</p>
|
||||
<h2 id="on">on</h2>
|
||||
<p>▸ <strong>on</strong>(type: <em><a href="../modules/_types_d_.md#providerinterface_emitted">ProviderInterface$Emitted</a></em>, sub: <em><a href="../modules/_types_d_.md#providerinterface_emitcb">ProviderInterface$EmitCb</a></em>): <code>void</code></p>
|
||||
<p><em>Implementation of <a href="../interfaces/_types_d_.providerinterface.md">ProviderInterface</a>.<a href="../interfaces/_types_d_.providerinterface.md#on">on</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/http/index.ts#L56" target="_blank">http/index.ts:56</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/http/index.ts#L56" target="_blank">http/index.ts:56</a></em></p>
|
||||
<p>Events are not supported with the HttpProvider, see <a href="_ws_index_.wsprovider.html">WsProvider</a>.</p>
|
||||
<p><strong>Parameters:</strong></p>
|
||||
<table>
|
||||
@@ -442,7 +442,7 @@ true if connected</p>
|
||||
<h2 id="send">send</h2>
|
||||
<p>▸ <strong>send</strong>(method: <em><code>string</code></em>, params: <em><code>Array</code><<code>any</code>></em>): <code>Promise</code><<code>any</code>></p>
|
||||
<p><em>Implementation of <a href="../interfaces/_types_d_.providerinterface.md">ProviderInterface</a>.<a href="../interfaces/_types_d_.providerinterface.md#send">send</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/http/index.ts#L60" target="_blank">http/index.ts:60</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/http/index.ts#L60" target="_blank">http/index.ts:60</a></em></p>
|
||||
<p><strong>Parameters:</strong></p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -468,7 +468,7 @@ true if connected</p>
|
||||
<h2 id="subscribe">subscribe</h2>
|
||||
<p>▸ <strong>subscribe</strong>(types: <em><code>string</code></em>, method: <em><code>string</code></em>, params: <em><code>Array</code><<code>any</code>></em>, cb: <em><a href="../modules/_types_d_.md#providerinterface_callback">ProviderInterface$Callback</a></em>): <code>Promise</code><<code>number</code>></p>
|
||||
<p><em>Implementation of <a href="../interfaces/_types_d_.providerinterface.md">ProviderInterface</a>.<a href="../interfaces/_types_d_.providerinterface.md#subscribe">subscribe</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/http/index.ts#L82" target="_blank">http/index.ts:82</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/http/index.ts#L82" target="_blank">http/index.ts:82</a></em></p>
|
||||
<p>Subscriptions are not supported with the HttpProvider, see <a href="_ws_index_.wsprovider.html">WsProvider</a>.</p>
|
||||
<p><strong>Parameters:</strong></p>
|
||||
<table>
|
||||
@@ -503,7 +503,7 @@ true if connected</p>
|
||||
<h2 id="unsubscribe">unsubscribe</h2>
|
||||
<p>▸ <strong>unsubscribe</strong>(type: <em><code>string</code></em>, method: <em><code>string</code></em>, id: <em><code>number</code></em>): <code>Promise</code><<code>boolean</code>></p>
|
||||
<p><em>Implementation of <a href="../interfaces/_types_d_.providerinterface.md">ProviderInterface</a>.<a href="../interfaces/_types_d_.providerinterface.md#unsubscribe">unsubscribe</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/http/index.ts#L91" target="_blank">http/index.ts:91</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/http/index.ts#L91" target="_blank">http/index.ts:91</a></em></p>
|
||||
<p>Subscriptions are not supported with the HttpProvider, see <a href="_ws_index_.wsprovider.html">WsProvider</a>.</p>
|
||||
<p><strong>Parameters:</strong></p>
|
||||
<table>
|
||||
@@ -573,7 +573,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":"api-provider/classes/_ws_index_.wsprovider.md","ref":"api-provider/classes/_ws_index_.wsprovider.md","articles":[]},"previous":{"title":"api-provider","level":"1.3","depth":1,"path":"api-provider/README.md","ref":"api-provider/README.md","articles":[{"title":"HttpProvider","level":"1.3.1","depth":2,"path":"api-provider/classes/_http_index_.httpprovider.md","ref":"api-provider/classes/_http_index_.httpprovider.md","articles":[]},{"title":"WsProvider","level":"1.3.2","depth":2,"path":"api-provider/classes/_ws_index_.wsprovider.md","ref":"api-provider/classes/_ws_index_.wsprovider.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["include-codeblock"],"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":{"include-codeblock":{"check":false,"edit":false,"lang":"","fixlang":false,"template":"default","theme":"chrome","unindent":false},"highlight":{},"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-provider/classes/_http_index_.httpprovider.md","mtime":"2018-10-02T09:33:42.502Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-02T09:34:30.873Z"},"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":"api-provider/classes/_ws_index_.wsprovider.md","ref":"api-provider/classes/_ws_index_.wsprovider.md","articles":[]},"previous":{"title":"api-provider","level":"1.3","depth":1,"path":"api-provider/README.md","ref":"api-provider/README.md","articles":[{"title":"HttpProvider","level":"1.3.1","depth":2,"path":"api-provider/classes/_http_index_.httpprovider.md","ref":"api-provider/classes/_http_index_.httpprovider.md","articles":[]},{"title":"WsProvider","level":"1.3.2","depth":2,"path":"api-provider/classes/_ws_index_.wsprovider.md","ref":"api-provider/classes/_ws_index_.wsprovider.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["include-codeblock"],"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":{"include-codeblock":{"check":false,"edit":false,"lang":"","fixlang":false,"template":"default","theme":"chrome","unindent":false},"highlight":{},"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-provider/classes/_http_index_.httpprovider.md","mtime":"2018-10-02T11:12:32.708Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-02T11:13:17.125Z"},"basePath":"../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@ const provider = new WsProvider('[http://127.0.0.1:9933')](http://127.0.0.1:9933
|
||||
|
||||
⊕ **new HttpProvider**(endpoint: *`string`*): [HttpProvider](_http_index_.httpprovider.md)
|
||||
|
||||
*Defined in [http/index.ts:35](https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/http/index.ts#L35)*
|
||||
*Defined in [http/index.ts:35](https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/http/index.ts#L35)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -45,7 +45,7 @@ ___
|
||||
|
||||
*Implementation of [ProviderInterface](../interfaces/_types_d_.providerinterface.md).[isConnected](../interfaces/_types_d_.providerinterface.md#isconnected)*
|
||||
|
||||
*Defined in [http/index.ts:49](https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/http/index.ts#L49)*
|
||||
*Defined in [http/index.ts:49](https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/http/index.ts#L49)*
|
||||
|
||||
Whether the node is connected or not.
|
||||
|
||||
@@ -61,7 +61,7 @@ ___
|
||||
|
||||
*Implementation of [ProviderInterface](../interfaces/_types_d_.providerinterface.md).[on](../interfaces/_types_d_.providerinterface.md#on)*
|
||||
|
||||
*Defined in [http/index.ts:56](https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/http/index.ts#L56)*
|
||||
*Defined in [http/index.ts:56](https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/http/index.ts#L56)*
|
||||
|
||||
Events are not supported with the HttpProvider, see [WsProvider](_ws_index_.wsprovider.md).
|
||||
|
||||
@@ -83,7 +83,7 @@ ___
|
||||
|
||||
*Implementation of [ProviderInterface](../interfaces/_types_d_.providerinterface.md).[send](../interfaces/_types_d_.providerinterface.md#send)*
|
||||
|
||||
*Defined in [http/index.ts:60](https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/http/index.ts#L60)*
|
||||
*Defined in [http/index.ts:60](https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/http/index.ts#L60)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -103,7 +103,7 @@ ___
|
||||
|
||||
*Implementation of [ProviderInterface](../interfaces/_types_d_.providerinterface.md).[subscribe](../interfaces/_types_d_.providerinterface.md#subscribe)*
|
||||
|
||||
*Defined in [http/index.ts:82](https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/http/index.ts#L82)*
|
||||
*Defined in [http/index.ts:82](https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/http/index.ts#L82)*
|
||||
|
||||
Subscriptions are not supported with the HttpProvider, see [WsProvider](_ws_index_.wsprovider.md).
|
||||
|
||||
@@ -127,7 +127,7 @@ ___
|
||||
|
||||
*Implementation of [ProviderInterface](../interfaces/_types_d_.providerinterface.md).[unsubscribe](../interfaces/_types_d_.providerinterface.md#unsubscribe)*
|
||||
|
||||
*Defined in [http/index.ts:91](https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/http/index.ts#L91)*
|
||||
*Defined in [http/index.ts:91](https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/http/index.ts#L91)*
|
||||
|
||||
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>⊕ <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/48e57f9/packages/api-provider/src/ws/index.ts#L67" target="_blank">ws/index.ts:67</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/ws/index.ts#L67" target="_blank">ws/index.ts:67</a></em></p>
|
||||
<p><strong>Parameters:</strong></p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -455,7 +455,7 @@
|
||||
<p><a id="connect"></a></p>
|
||||
<h2 id="connect">connect</h2>
|
||||
<p>▸ <strong>connect</strong>(): <code>void</code></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/ws/index.ts#L97" target="_blank">ws/index.ts:97</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/ws/index.ts#L97" target="_blank">ws/index.ts:97</a></em></p>
|
||||
<p>The <a href="_ws_index_.wsprovider.html">WsProvider</a> connects automatically by default. if you decided otherwise, you may connect manually using this method.</p>
|
||||
<p><strong>Returns:</strong> <code>void</code></p>
|
||||
<hr>
|
||||
@@ -497,7 +497,7 @@
|
||||
<p><a id="isconnected"></a></p>
|
||||
<h2 id="isconnected">isConnected</h2>
|
||||
<p>▸ <strong>isConnected</strong>(): <code>boolean</code></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/ws/index.ts#L114" target="_blank">ws/index.ts:114</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/ws/index.ts#L114" target="_blank">ws/index.ts:114</a></em></p>
|
||||
<p>Whether the node is connected or not.</p>
|
||||
<p><strong>Returns:</strong> <code>boolean</code>
|
||||
true if connected</p>
|
||||
@@ -586,7 +586,7 @@ true if connected</p>
|
||||
<h2 id="on">on</h2>
|
||||
<p>▸ <strong>on</strong>(type: <em><a href="../modules/_types_d_.md#providerinterface_emitted">ProviderInterface$Emitted</a></em>, sub: <em><a href="../modules/_types_d_.md#providerinterface_emitcb">ProviderInterface$EmitCb</a></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/48e57f9/packages/api-provider/src/ws/index.ts#L124" target="_blank">ws/index.ts:124</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/ws/index.ts#L124" target="_blank">ws/index.ts:124</a></em></p>
|
||||
<p>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>
|
||||
@@ -705,7 +705,7 @@ true if connected</p>
|
||||
<p><a id="send"></a></p>
|
||||
<h2 id="send">send</h2>
|
||||
<p>▸ <strong>send</strong>(method: <em><code>string</code></em>, params: <em><code>Array</code><<code>any</code>></em>, subscription?: <em><code>SubscriptionHandler</code></em>): <code>Promise</code><<code>any</code>></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/ws/index.ts#L128" target="_blank">ws/index.ts:128</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/ws/index.ts#L128" target="_blank">ws/index.ts:128</a></em></p>
|
||||
<p><strong>Parameters:</strong></p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -734,7 +734,7 @@ true if connected</p>
|
||||
<p><a id="subscribe"></a></p>
|
||||
<h2 id="subscribe">subscribe</h2>
|
||||
<p>▸ <strong>subscribe</strong>(type: <em><code>string</code></em>, method: <em><code>string</code></em>, params: <em><code>Array</code><<code>any</code>></em>, callback: <em><a href="../modules/_types_d_.md#providerinterface_callback">ProviderInterface$Callback</a></em>): <code>Promise</code><<code>number</code>></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/ws/index.ts#L179" target="_blank">ws/index.ts:179</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/ws/index.ts#L179" target="_blank">ws/index.ts:179</a></em></p>
|
||||
<p>Allows subscribing to a specific event.
|
||||
<em><strong>example</strong></em>: const provider = new WsProvider('ws://127.0.0.1:9944'); const api = createApi(provider);</p>
|
||||
<p>api.state.storage([[storage.balances.freeBalance,</p>
|
||||
@@ -777,7 +777,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>▸ <strong>unsubscribe</strong>(type: <em><code>string</code></em>, method: <em><code>string</code></em>, id: <em><code>number</code></em>): <code>Promise</code><<code>boolean</code>></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/ws/index.ts#L188" target="_blank">ws/index.ts:188</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/ws/index.ts#L188" target="_blank">ws/index.ts:188</a></em></p>
|
||||
<p>Allows unsubscribing to subscriptions made with <a href="_ws_index_.wsprovider.html#subscribe">subscribe</a>.</p>
|
||||
<p><strong>Parameters:</strong></p>
|
||||
<table>
|
||||
@@ -847,7 +847,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":"api-rx","level":"1.4","depth":1,"path":"api-rx/README.md","ref":"api-rx/README.md","articles":[{"title":"ApiRx","level":"1.4.1","depth":2,"path":"api-rx/classes/_index_.rxapi.md","ref":"api-rx/classes/_index_.rxapi.md","articles":[]}]},"previous":{"title":"HttpProvider","level":"1.3.1","depth":2,"path":"api-provider/classes/_http_index_.httpprovider.md","ref":"api-provider/classes/_http_index_.httpprovider.md","articles":[]},"dir":"ltr"},"config":{"plugins":["include-codeblock"],"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":{"include-codeblock":{"check":false,"edit":false,"lang":"","fixlang":false,"template":"default","theme":"chrome","unindent":false},"highlight":{},"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-provider/classes/_ws_index_.wsprovider.md","mtime":"2018-10-02T09:33:42.610Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-02T09:34:30.873Z"},"basePath":"../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"WsProvider","level":"1.3.2","depth":2,"next":{"title":"api-rx","level":"1.4","depth":1,"path":"api-rx/README.md","ref":"api-rx/README.md","articles":[{"title":"ApiRx","level":"1.4.1","depth":2,"path":"api-rx/classes/_index_.rxapi.md","ref":"api-rx/classes/_index_.rxapi.md","articles":[]}]},"previous":{"title":"HttpProvider","level":"1.3.1","depth":2,"path":"api-provider/classes/_http_index_.httpprovider.md","ref":"api-provider/classes/_http_index_.httpprovider.md","articles":[]},"dir":"ltr"},"config":{"plugins":["include-codeblock"],"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":{"include-codeblock":{"check":false,"edit":false,"lang":"","fixlang":false,"template":"default","theme":"chrome","unindent":false},"highlight":{},"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-provider/classes/_ws_index_.wsprovider.md","mtime":"2018-10-02T11:12:32.788Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-02T11:13:17.125Z"},"basePath":"../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -26,7 +26,7 @@ The WebSocket Provider allows sending requests using WebSocket. Unlike the [Http
|
||||
|
||||
⊕ **new WsProvider**(endpoint: *`string`*, autoConnect?: *`boolean`*): [WsProvider](_ws_index_.wsprovider.md)
|
||||
|
||||
*Defined in [ws/index.ts:67](https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/ws/index.ts#L67)*
|
||||
*Defined in [ws/index.ts:67](https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/ws/index.ts#L67)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -83,7 +83,7 @@ ___
|
||||
|
||||
▸ **connect**(): `void`
|
||||
|
||||
*Defined in [ws/index.ts:97](https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/ws/index.ts#L97)*
|
||||
*Defined in [ws/index.ts:97](https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/ws/index.ts#L97)*
|
||||
|
||||
The [WsProvider](_ws_index_.wsprovider.md) connects automatically by default. if you decided otherwise, you may connect manually using this method.
|
||||
|
||||
@@ -133,7 +133,7 @@ ___
|
||||
|
||||
▸ **isConnected**(): `boolean`
|
||||
|
||||
*Defined in [ws/index.ts:114](https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/ws/index.ts#L114)*
|
||||
*Defined in [ws/index.ts:114](https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/ws/index.ts#L114)*
|
||||
|
||||
Whether the node is connected or not.
|
||||
|
||||
@@ -213,7 +213,7 @@ ___
|
||||
|
||||
*Overrides EventEmitter.on*
|
||||
|
||||
*Defined in [ws/index.ts:124](https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/ws/index.ts#L124)*
|
||||
*Defined in [ws/index.ts:124](https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/ws/index.ts#L124)*
|
||||
|
||||
Listens on events after having subscribed using the [subscribe](_ws_index_.wsprovider.md#subscribe) function.
|
||||
|
||||
@@ -302,7 +302,7 @@ ___
|
||||
|
||||
▸ **send**(method: *`string`*, params: *`Array`<`any`>*, subscription?: *`SubscriptionHandler`*): `Promise`<`any`>
|
||||
|
||||
*Defined in [ws/index.ts:128](https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/ws/index.ts#L128)*
|
||||
*Defined in [ws/index.ts:128](https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/ws/index.ts#L128)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -321,7 +321,7 @@ ___
|
||||
|
||||
▸ **subscribe**(type: *`string`*, method: *`string`*, params: *`Array`<`any`>*, callback: *[ProviderInterface$Callback](../modules/_types_d_.md#providerinterface_callback)*): `Promise`<`number`>
|
||||
|
||||
*Defined in [ws/index.ts:179](https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/ws/index.ts#L179)*
|
||||
*Defined in [ws/index.ts:179](https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/ws/index.ts#L179)*
|
||||
|
||||
Allows subscribing to a specific event.
|
||||
*__example__*: const provider = new WsProvider('ws://127.0.0.1:9944'); const api = createApi(provider);
|
||||
@@ -349,7 +349,7 @@ ___
|
||||
|
||||
▸ **unsubscribe**(type: *`string`*, method: *`string`*, id: *`number`*): `Promise`<`boolean`>
|
||||
|
||||
*Defined in [ws/index.ts:188](https://github.com/polkadot-js/api/blob/48e57f9/packages/api-provider/src/ws/index.ts#L188)*
|
||||
*Defined in [ws/index.ts:188](https://github.com/polkadot-js/api/blob/c7cd9cd/packages/api-provider/src/ws/index.ts#L188)*
|
||||
|
||||
Allows unsubscribing to subscriptions made with [subscribe](_ws_index_.wsprovider.md#subscribe).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user