[CI Skip] 0.31.71
This commit is contained in:
@@ -414,7 +414,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/1635638/packages/rpc-provider/src/http/index.ts#L41" target="_blank">http/index.ts:41</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/http/index.ts#L41" target="_blank">http/index.ts:41</a></em></p>
|
||||
<p><strong>Parameters:</strong></p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -440,7 +440,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/1635638/packages/rpc-provider/src/http/index.ts#L58" target="_blank">http/index.ts:58</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/http/index.ts#L58" target="_blank">http/index.ts:58</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>
|
||||
@@ -448,7 +448,7 @@ true if connected</p>
|
||||
<p><a id="on"></a></p>
|
||||
<h2 id="on">on</h2>
|
||||
<p>▸ <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/1635638/packages/rpc-provider/src/http/index.ts#L66" target="_blank">http/index.ts:66</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/http/index.ts#L66" target="_blank">http/index.ts:66</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 'on' emitters. WebSockets should be used instead.</p>
|
||||
<p><strong>Parameters:</strong></p>
|
||||
@@ -475,7 +475,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>): <code>Promise</code><<code>any</code>></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/http/index.ts#L73" target="_blank">http/index.ts:73</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/http/index.ts#L73" target="_blank">http/index.ts:73</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>
|
||||
@@ -501,7 +501,7 @@ true if connected</p>
|
||||
<p><a id="subscribe"></a></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><code>ProviderInterface$Callback</code></em>): <code>Promise</code><<code>number</code>></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/http/index.ts#L95" target="_blank">http/index.ts:95</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/http/index.ts#L95" target="_blank">http/index.ts:95</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>
|
||||
@@ -535,7 +535,7 @@ true if connected</p>
|
||||
<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/1635638/packages/rpc-provider/src/http/index.ts#L104" target="_blank">http/index.ts:104</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/http/index.ts#L104" target="_blank">http/index.ts:104</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>
|
||||
@@ -605,7 +605,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","insert-logo-link","mermaid-gb3","-highlight","sunlight-highlighter"],"root":"docs","styles":{"website":"styles/website.css"},"pluginsConfig":{"insert-logo-link":{"src":"/api/logo.png","url":"https://polkadot.js.org"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"mermaid-gb3":{},"include-codeblock":{"check":false,"edit":false,"lang":"","fixlang":false,"template":"default","theme":"chrome","unindent":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"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},"sunlight-highlighter":{"theme":"gitbook","lineNumbers":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-19T15:03:19.575Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-19T15:04:29.681Z"},"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","insert-logo-link","mermaid-gb3","-highlight","sunlight-highlighter"],"root":"docs","styles":{"website":"styles/website.css"},"pluginsConfig":{"insert-logo-link":{"src":"/api/logo.png","url":"https://polkadot.js.org"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"mermaid-gb3":{},"include-codeblock":{"check":false,"edit":false,"lang":"","fixlang":false,"template":"default","theme":"chrome","unindent":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"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},"sunlight-highlighter":{"theme":"gitbook","lineNumbers":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-19T15:26:12.733Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-19T15:27:23.601Z"},"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:41](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/http/index.ts#L41)*
|
||||
*Defined in [http/index.ts:41](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/http/index.ts#L41)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -53,7 +53,7 @@ ___
|
||||
|
||||
▸ **isConnected**(): `boolean`
|
||||
|
||||
*Defined in [http/index.ts:58](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/http/index.ts#L58)*
|
||||
*Defined in [http/index.ts:58](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/http/index.ts#L58)*
|
||||
|
||||
*__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:66](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/http/index.ts#L66)*
|
||||
*Defined in [http/index.ts:66](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/http/index.ts#L66)*
|
||||
|
||||
*__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:73](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/http/index.ts#L73)*
|
||||
*Defined in [http/index.ts:73](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/http/index.ts#L73)*
|
||||
|
||||
*__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:95](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/http/index.ts#L95)*
|
||||
*Defined in [http/index.ts:95](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/http/index.ts#L95)*
|
||||
|
||||
*__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:104](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/http/index.ts#L104)*
|
||||
*Defined in [http/index.ts:104](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/http/index.ts#L104)*
|
||||
|
||||
*__summary__*: Subscriptions are not supported with the HttpProvider, see [WsProvider](_ws_index_.wsprovider.md).
|
||||
|
||||
|
||||
@@ -414,7 +414,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/1635638/packages/rpc-provider/src/ws/index.ts#L76" target="_blank">ws/index.ts:76</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/ws/index.ts#L76" target="_blank">ws/index.ts:76</a></em></p>
|
||||
<p><strong>Parameters:</strong></p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -446,7 +446,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/1635638/packages/rpc-provider/src/ws/index.ts#L106" target="_blank">ws/index.ts:106</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/ws/index.ts#L106" target="_blank">ws/index.ts:106</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>
|
||||
@@ -454,7 +454,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/1635638/packages/rpc-provider/src/ws/index.ts#L123" target="_blank">ws/index.ts:123</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/ws/index.ts#L123" target="_blank">ws/index.ts:123</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>
|
||||
@@ -462,7 +462,7 @@ true if connected</p>
|
||||
<p><a id="on"></a></p>
|
||||
<h2 id="on">on</h2>
|
||||
<p>▸ <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/1635638/packages/rpc-provider/src/ws/index.ts#L132" target="_blank">ws/index.ts:132</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/ws/index.ts#L132" target="_blank">ws/index.ts:132</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>
|
||||
@@ -491,7 +491,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/1635638/packages/rpc-provider/src/ws/index.ts#L139" target="_blank">ws/index.ts:139</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/ws/index.ts#L139" target="_blank">ws/index.ts:139</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>
|
||||
@@ -521,7 +521,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><code>ProviderInterface$Callback</code></em>): <code>Promise</code><<code>number</code>></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/ws/index.ts#L195" target="_blank">ws/index.ts:195</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/ws/index.ts#L195" target="_blank">ws/index.ts:195</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>
|
||||
@@ -572,7 +572,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/1635638/packages/rpc-provider/src/ws/index.ts#L204" target="_blank">ws/index.ts:204</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/ws/index.ts#L204" target="_blank">ws/index.ts:204</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>
|
||||
@@ -642,7 +642,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","level":"2.1","depth":1,"path":"METHODS_RPC.md","ref":"METHODS_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","insert-logo-link","mermaid-gb3","-highlight","sunlight-highlighter"],"root":"docs","styles":{"website":"styles/website.css"},"pluginsConfig":{"insert-logo-link":{"src":"/api/logo.png","url":"https://polkadot.js.org"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"mermaid-gb3":{},"include-codeblock":{"check":false,"edit":false,"lang":"","fixlang":false,"template":"default","theme":"chrome","unindent":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"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},"sunlight-highlighter":{"theme":"gitbook","lineNumbers":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-19T15:03:19.643Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-19T15:04:29.681Z"},"basePath":"../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"WsProvider","level":"1.3.2","depth":2,"next":{"title":"RPC","level":"2.1","depth":1,"path":"METHODS_RPC.md","ref":"METHODS_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","insert-logo-link","mermaid-gb3","-highlight","sunlight-highlighter"],"root":"docs","styles":{"website":"styles/website.css"},"pluginsConfig":{"insert-logo-link":{"src":"/api/logo.png","url":"https://polkadot.js.org"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"mermaid-gb3":{},"include-codeblock":{"check":false,"edit":false,"lang":"","fixlang":false,"template":"default","theme":"chrome","unindent":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"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},"sunlight-highlighter":{"theme":"gitbook","lineNumbers":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-19T15:26:12.805Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-19T15:27:23.601Z"},"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:76](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/ws/index.ts#L76)*
|
||||
*Defined in [ws/index.ts:76](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/ws/index.ts#L76)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -54,7 +54,7 @@ ___
|
||||
|
||||
▸ **connect**(): `void`
|
||||
|
||||
*Defined in [ws/index.ts:106](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/ws/index.ts#L106)*
|
||||
*Defined in [ws/index.ts:106](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/ws/index.ts#L106)*
|
||||
|
||||
*__summary__*: Manually connect
|
||||
|
||||
@@ -69,7 +69,7 @@ ___
|
||||
|
||||
▸ **isConnected**(): `boolean`
|
||||
|
||||
*Defined in [ws/index.ts:123](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/ws/index.ts#L123)*
|
||||
*Defined in [ws/index.ts:123](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/ws/index.ts#L123)*
|
||||
|
||||
*__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:132](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/ws/index.ts#L132)*
|
||||
*Defined in [ws/index.ts:132](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/ws/index.ts#L132)*
|
||||
|
||||
*__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:139](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/ws/index.ts#L139)*
|
||||
*Defined in [ws/index.ts:139](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/ws/index.ts#L139)*
|
||||
|
||||
*__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:195](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/ws/index.ts#L195)*
|
||||
*Defined in [ws/index.ts:195](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/ws/index.ts#L195)*
|
||||
|
||||
*__name__*: subscribe
|
||||
|
||||
@@ -161,7 +161,7 @@ ___
|
||||
|
||||
▸ **unsubscribe**(type: *`string`*, method: *`string`*, id: *`number`*): `Promise`<`boolean`>
|
||||
|
||||
*Defined in [ws/index.ts:204](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/ws/index.ts#L204)*
|
||||
*Defined in [ws/index.ts:204](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/ws/index.ts#L204)*
|
||||
|
||||
*__summary__*: Allows unsubscribing to subscriptions made with [subscribe](_ws_index_.wsprovider.md#subscribe).
|
||||
|
||||
|
||||
@@ -462,7 +462,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","insert-logo-link","mermaid-gb3","-highlight","sunlight-highlighter"],"root":"docs","styles":{"website":"styles/website.css"},"pluginsConfig":{"insert-logo-link":{"src":"/api/logo.png","url":"https://polkadot.js.org"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"mermaid-gb3":{},"include-codeblock":{"check":false,"edit":false,"lang":"","fixlang":false,"template":"default","theme":"chrome","unindent":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"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},"sunlight-highlighter":{"theme":"gitbook","lineNumbers":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-19T15:03:19.431Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-19T15:04:29.681Z"},"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","insert-logo-link","mermaid-gb3","-highlight","sunlight-highlighter"],"root":"docs","styles":{"website":"styles/website.css"},"pluginsConfig":{"insert-logo-link":{"src":"/api/logo.png","url":"https://polkadot.js.org"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"mermaid-gb3":{},"include-codeblock":{"check":false,"edit":false,"lang":"","fixlang":false,"template":"default","theme":"chrome","unindent":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"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},"sunlight-highlighter":{"theme":"gitbook","lineNumbers":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-19T15:26:12.569Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-19T15:27:23.601Z"},"basePath":"..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **decodeResponse**(self: *`RpcCoderState`*, response: *`JsonRpcResponse`*): `any`
|
||||
|
||||
*Defined in [coder/json/decodeResponse.ts:20](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/coder/json/decodeResponse.ts#L20)*
|
||||
*Defined in [coder/json/decodeResponse.ts:20](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/coder/json/decodeResponse.ts#L20)*
|
||||
|
||||
**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/1635638/packages/rpc-provider/src/coder/json/encodeJson.ts#L9)*
|
||||
*Defined in [coder/json/encodeJson.ts:9](https://github.com/polkadot-js/api/blob/ed8c2e3/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/1635638/packages/rpc-provider/src/coder/json/encodeObject.ts#L8)*
|
||||
*Defined in [coder/json/encodeObject.ts:8](https://github.com/polkadot-js/api/blob/ed8c2e3/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/1635638/packages/rpc-provider/src/coder/json/index.ts#L12)*
|
||||
*Defined in [coder/json/index.ts:12](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/coder/json/index.ts#L12)*
|
||||
|
||||
**Returns:** `RpcCoder`
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **mockProvider**(): `ProviderInterface`
|
||||
|
||||
*Defined in [mock/index.ts:18](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/mock/index.ts#L18)*
|
||||
*Defined in [mock/index.ts:18](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/mock/index.ts#L18)*
|
||||
|
||||
A mock provider mainly used for testing.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **mocks**(__namedParameters: *`object`*): `void`
|
||||
|
||||
*Defined in [mock/mocks.ts:62](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/mock/mocks.ts#L62)*
|
||||
*Defined in [mock/mocks.ts:62](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/mock/mocks.ts#L62)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -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/1635638/packages/rpc-provider/src/mock/on.ts#L8)*
|
||||
*Defined in [mock/on.ts:8](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/mock/on.ts#L8)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -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/1635638/packages/rpc-provider/src/mock/send.ts#L7)*
|
||||
*Defined in [mock/send.ts:7](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/mock/send.ts#L7)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **state**(): `MockState`
|
||||
|
||||
*Defined in [mock/state.ts:37](https://github.com/polkadot-js/api/blob/1635638/packages/rpc-provider/src/mock/state.ts#L37)*
|
||||
*Defined in [mock/state.ts:37](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/mock/state.ts#L37)*
|
||||
|
||||
**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/1635638/packages/rpc-provider/src/mock/subscribe.ts#L7)*
|
||||
*Defined in [mock/subscribe.ts:7](https://github.com/polkadot-js/api/blob/ed8c2e3/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/1635638/packages/rpc-provider/src/mock/unsubscribe.ts#L7)*
|
||||
*Defined in [mock/unsubscribe.ts:7](https://github.com/polkadot-js/api/blob/ed8c2e3/packages/rpc-provider/src/mock/unsubscribe.ts#L7)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user