[CI Skip] 0.31.117

This commit is contained in:
Travis CI
2018-11-14 13:49:01 +00:00
parent 19aed57c98
commit ca2f69d086
170 changed files with 4253 additions and 4253 deletions
@@ -12,11 +12,11 @@
▸ **decodeResponse**(response: *`JsonRpcResponse`*): `any`
*Defined in [coder/index.ts:12](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/coder/index.ts#L12)*
*Defined in [coder/index.ts:12](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/coder/index.ts#L12)*
**Parameters:**
| Param | Type |
| Name | Type |
| ------ | ------ |
| response | `JsonRpcResponse` |
@@ -29,11 +29,11 @@ ___
▸ **encodeJson**(method: *`string`*, params: * `any` &#124; `Array`<`any`>*): `string`
*Defined in [coder/index.ts:33](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/coder/index.ts#L33)*
*Defined in [coder/index.ts:33](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/coder/index.ts#L33)*
**Parameters:**
| Param | Type |
| Name | Type |
| ------ | ------ |
| method | `string` |
| params | `any` &#124; `Array`<`any`>|
@@ -47,11 +47,11 @@ ___
▸ **encodeObject**(method: *`string`*, params: * `any` &#124; `Array`<`any`>*): `JsonRpcRequest`
*Defined in [coder/index.ts:39](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/coder/index.ts#L39)*
*Defined in [coder/index.ts:39](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/coder/index.ts#L39)*
**Parameters:**
| Param | Type |
| Name | Type |
| ------ | ------ |
| method | `string` |
| params | `any` &#124; `Array`<`any`>|
@@ -65,7 +65,7 @@ ___
▸ **getId**(): `number`
*Defined in [coder/index.ts:48](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/coder/index.ts#L48)*
*Defined in [coder/index.ts:48](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/coder/index.ts#L48)*
**Returns:** `number`
@@ -414,12 +414,12 @@
<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/d097a7a/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/19aed57/packages/rpc-provider/src/http/index.ts#L40" target="_blank">http/index.ts:40</a></em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Name</th>
<th>Type</th>
<th>Default value</th>
<th>Description</th>
@@ -440,7 +440,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/d097a7a/packages/rpc-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/19aed57/packages/rpc-provider/src/http/index.ts#L56" target="_blank">http/index.ts:56</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,14 +448,14 @@ 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/d097a7a/packages/rpc-provider/src/http/index.ts#L64" target="_blank">http/index.ts:64</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/http/index.ts#L64" target="_blank">http/index.ts:64</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>
<table>
<thead>
<tr>
<th>Param</th>
<th>Name</th>
<th>Type</th>
</tr>
</thead>
@@ -475,13 +475,13 @@ 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/d097a7a/packages/rpc-provider/src/http/index.ts#L71" target="_blank">http/index.ts:71</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/http/index.ts#L71" target="_blank">http/index.ts:71</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>
<thead>
<tr>
<th>Param</th>
<th>Name</th>
<th>Type</th>
</tr>
</thead>
@@ -501,13 +501,13 @@ 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/d097a7a/packages/rpc-provider/src/http/index.ts#L93" target="_blank">http/index.ts:93</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/http/index.ts#L93" target="_blank">http/index.ts:93</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>
<thead>
<tr>
<th>Param</th>
<th>Name</th>
<th>Type</th>
</tr>
</thead>
@@ -535,13 +535,13 @@ 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/d097a7a/packages/rpc-provider/src/http/index.ts#L102" target="_blank">http/index.ts:102</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/http/index.ts#L102" target="_blank">http/index.ts:102</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>
<thead>
<tr>
<th>Param</th>
<th>Name</th>
<th>Type</th>
</tr>
</thead>
@@ -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-11-14T11:38:31.314Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T11:39:34.127Z"},"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-11-14T13:47:49.014Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T13:48:53.926Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>
@@ -34,11 +34,11 @@ const api = new Api(provider);
⊕ **new HttpProvider**(endpoint?: *`string`*): [HttpProvider](_http_index_.httpprovider.md)
*Defined in [http/index.ts:40](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/http/index.ts#L40)*
*Defined in [http/index.ts:40](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/http/index.ts#L40)*
**Parameters:**
| Param | Type | Default value | Description |
| Name | Type | Default value | Description |
| ------ | ------ | ------ | ------ |
| `Default value` endpoint | `string` | defaults.HTTP_URL | The endpoint url starting with http:// |
@@ -54,7 +54,7 @@ ___
▸ **isConnected**(): `boolean`
*Defined in [http/index.ts:56](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/http/index.ts#L56)*
*Defined in [http/index.ts:56](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/http/index.ts#L56)*
*__summary__*: Whether the node is connected or not.
@@ -68,7 +68,7 @@ ___
▸ **on**(type: *`ProviderInterface$Emitted`*, sub: *`ProviderInterface$EmitCb`*): `void`
*Defined in [http/index.ts:64](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/http/index.ts#L64)*
*Defined in [http/index.ts:64](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/http/index.ts#L64)*
*__summary__*: Events are not supported with the HttpProvider, see [WsProvider](_ws_index_.wsprovider.md).
@@ -76,7 +76,7 @@ ___
**Parameters:**
| Param | Type |
| Name | Type |
| ------ | ------ |
| type | `ProviderInterface$Emitted` |
| sub | `ProviderInterface$EmitCb` |
@@ -90,13 +90,13 @@ ___
▸ **send**(method: *`string`*, params: *`Array`<`any`>*): `Promise`<`any`>
*Defined in [http/index.ts:71](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/http/index.ts#L71)*
*Defined in [http/index.ts:71](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/http/index.ts#L71)*
*__summary__*: Send HTTP POST Request with Body to configured HTTP Endpoint.
**Parameters:**
| Param | Type |
| Name | Type |
| ------ | ------ |
| method | `string` |
| params | `Array`<`any`> |
@@ -110,13 +110,13 @@ ___
▸ **subscribe**(types: *`string`*, method: *`string`*, params: *`Array`<`any`>*, cb: *`ProviderInterface$Callback`*): `Promise`<`number`>
*Defined in [http/index.ts:93](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/http/index.ts#L93)*
*Defined in [http/index.ts:93](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/http/index.ts#L93)*
*__summary__*: Subscriptions are not supported with the HttpProvider, see [WsProvider](_ws_index_.wsprovider.md).
**Parameters:**
| Param | Type |
| Name | Type |
| ------ | ------ |
| types | `string` |
| method | `string` |
@@ -132,13 +132,13 @@ ___
▸ **unsubscribe**(type: *`string`*, method: *`string`*, id: *`number`*): `Promise`<`boolean`>
*Defined in [http/index.ts:102](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/http/index.ts#L102)*
*Defined in [http/index.ts:102](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/http/index.ts#L102)*
*__summary__*: Subscriptions are not supported with the HttpProvider, see [WsProvider](_ws_index_.wsprovider.md).
**Parameters:**
| Param | Type |
| Name | Type |
| ------ | ------ |
| type | `string` |
| method | `string` |
+12 -12
View File
@@ -19,7 +19,7 @@ A mock provider mainly used for testing.
⊕ **new Mock**(): [Mock](_mock_index_.mock.md)
*Defined in [mock/index.ts:64](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/mock/index.ts#L64)*
*Defined in [mock/index.ts:64](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/mock/index.ts#L64)*
**Returns:** [Mock](_mock_index_.mock.md)
@@ -33,7 +33,7 @@ ___
**● isUpdating**: *`boolean`* = true
*Defined in [mock/index.ts:42](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/mock/index.ts#L42)*
*Defined in [mock/index.ts:42](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/mock/index.ts#L42)*
___
<a id="subscriptions"></a>
@@ -49,7 +49,7 @@ ___
return subs;
}, ({} as MockState$Subscriptions))
*Defined in [mock/index.ts:53](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/mock/index.ts#L53)*
*Defined in [mock/index.ts:53](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/mock/index.ts#L53)*
___
@@ -61,7 +61,7 @@ ___
▸ **isConnected**(): `boolean`
*Defined in [mock/index.ts:70](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/mock/index.ts#L70)*
*Defined in [mock/index.ts:70](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/mock/index.ts#L70)*
**Returns:** `boolean`
@@ -72,11 +72,11 @@ ___
▸ **on**(type: *`ProviderInterface$Emitted`*, sub: *`ProviderInterface$EmitCb`*): `void`
*Defined in [mock/index.ts:74](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/mock/index.ts#L74)*
*Defined in [mock/index.ts:74](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/mock/index.ts#L74)*
**Parameters:**
| Param | Type |
| Name | Type |
| ------ | ------ |
| type | `ProviderInterface$Emitted` |
| sub | `ProviderInterface$EmitCb` |
@@ -90,11 +90,11 @@ ___
▸ **send**(method: *`string`*, params: *`Array`<`any`>*): `Promise`<`any`>
*Defined in [mock/index.ts:78](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/mock/index.ts#L78)*
*Defined in [mock/index.ts:78](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/mock/index.ts#L78)*
**Parameters:**
| Param | Type |
| Name | Type |
| ------ | ------ |
| method | `string` |
| params | `Array`<`any`> |
@@ -108,11 +108,11 @@ ___
▸ **subscribe**(type: *`string`*, method: *`string`*, ...params: *`Array`<`any`>*): `Promise`<`number`>
*Defined in [mock/index.ts:86](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/mock/index.ts#L86)*
*Defined in [mock/index.ts:86](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/mock/index.ts#L86)*
**Parameters:**
| Param | Type |
| Name | Type |
| ------ | ------ |
| type | `string` |
| method | `string` |
@@ -127,11 +127,11 @@ ___
▸ **unsubscribe**(type: *`string`*, method: *`string`*, id: *`number`*): `Promise`<`boolean`>
*Defined in [mock/index.ts:106](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/mock/index.ts#L106)*
*Defined in [mock/index.ts:106](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/mock/index.ts#L106)*
**Parameters:**
| Param | Type |
| Name | Type |
| ------ | ------ |
| type | `string` |
| method | `string` |
@@ -414,12 +414,12 @@
<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/d097a7a/packages/rpc-provider/src/ws/index.ts#L75" target="_blank">ws/index.ts:75</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/ws/index.ts#L75" target="_blank">ws/index.ts:75</a></em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Name</th>
<th>Type</th>
<th>Default value</th>
<th>Description</th>
@@ -446,7 +446,7 @@
<p><a id="connect"></a></p>
<h2 id="connect">connect</h2>
<p>&#x25B8; <strong>connect</strong>(): <code>void</code></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/ws/index.ts#L103" target="_blank">ws/index.ts:103</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/ws/index.ts#L103" target="_blank">ws/index.ts:103</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>&#x25B8; <strong>isConnected</strong>(): <code>boolean</code></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/ws/index.ts#L120" target="_blank">ws/index.ts:120</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/ws/index.ts#L120" target="_blank">ws/index.ts:120</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,13 +462,13 @@ 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/d097a7a/packages/rpc-provider/src/ws/index.ts#L129" target="_blank">ws/index.ts:129</a></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/ws/index.ts#L129" target="_blank">ws/index.ts:129</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>
<thead>
<tr>
<th>Param</th>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
@@ -491,13 +491,13 @@ true if connected</p>
<p><a id="send"></a></p>
<h2 id="send">send</h2>
<p>&#x25B8; <strong>send</strong>(method: <em><code>string</code></em>, params: <em><code>Array</code>&lt;<code>any</code>&gt;</em>, subscription?: <em><code>SubscriptionHandler</code></em>): <code>Promise</code>&lt;<code>any</code>&gt;</p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/d097a7a/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/19aed57/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>
<thead>
<tr>
<th>Param</th>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
@@ -525,7 +525,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/d097a7a/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/19aed57/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>
@@ -542,7 +542,7 @@ true if connected</p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
@@ -576,13 +576,13 @@ 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/d097a7a/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/19aed57/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>
<thead>
<tr>
<th>Param</th>
<th>Name</th>
<th>Type</th>
</tr>
</thead>
@@ -646,7 +646,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-11-14T11:38:31.402Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T11:39:34.127Z"},"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-11-14T13:47:49.106Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T13:48:53.926Z"},"basePath":"../..","book":{"language":""}});
});
</script>
</div>
@@ -34,11 +34,11 @@ const api = new Api(provider);
⊕ **new WsProvider**(endpoint?: *`string`*, autoConnect?: *`boolean`*): [WsProvider](_ws_index_.wsprovider.md)
*Defined in [ws/index.ts:75](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/ws/index.ts#L75)*
*Defined in [ws/index.ts:75](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/ws/index.ts#L75)*
**Parameters:**
| Param | Type | Default value | Description |
| Name | Type | Default value | Description |
| ------ | ------ | ------ | ------ |
| `Default value` endpoint | `string` | defaults.WS_URL | The endpoint url. Usually \`ws://ip:9944\` or \`wss://ip:9944\` |
| `Default value` autoConnect | `boolean` | true | Whether to connect automatically or not. |
@@ -55,7 +55,7 @@ ___
▸ **connect**(): `void`
*Defined in [ws/index.ts:103](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/ws/index.ts#L103)*
*Defined in [ws/index.ts:103](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/ws/index.ts#L103)*
*__summary__*: Manually connect
@@ -70,7 +70,7 @@ ___
▸ **isConnected**(): `boolean`
*Defined in [ws/index.ts:120](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/ws/index.ts#L120)*
*Defined in [ws/index.ts:120](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/ws/index.ts#L120)*
*__summary__*: Whether the node is connected or not.
@@ -84,13 +84,13 @@ ___
▸ **on**(type: *`ProviderInterface$Emitted`*, sub: *`ProviderInterface$EmitCb`*): `void`
*Defined in [ws/index.ts:129](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/ws/index.ts#L129)*
*Defined in [ws/index.ts:129](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/ws/index.ts#L129)*
*__summary__*: Listens on events after having subscribed using the [subscribe](_ws_index_.wsprovider.md#subscribe) function.
**Parameters:**
| Param | Type | Description |
| Name | Type | Description |
| ------ | ------ | ------ |
| type | `ProviderInterface$Emitted` | Event |
| sub | `ProviderInterface$EmitCb` | Callback |
@@ -104,13 +104,13 @@ ___
▸ **send**(method: *`string`*, params: *`Array`<`any`>*, subscription?: *`SubscriptionHandler`*): `Promise`<`any`>
*Defined in [ws/index.ts:139](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/ws/index.ts#L139)*
*Defined in [ws/index.ts:139](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/ws/index.ts#L139)*
*__summary__*: Send JSON data using WebSockets to configured HTTP Endpoint or queue.
**Parameters:**
| Param | Type | Description |
| Name | Type | Description |
| ------ | ------ | ------ |
| method | `string` | The RPC methods to execute |
| params | `Array`<`any`> | Encoded paramaters as appliucable for the method |
@@ -125,7 +125,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/d097a7a/packages/rpc-provider/src/ws/index.ts#L195)*
*Defined in [ws/index.ts:195](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/ws/index.ts#L195)*
*__name__*: subscribe
@@ -146,7 +146,7 @@ rpc.state.subscribeStorage([[storage.balances.freeBalance, <Address>]], (_, valu
**Parameters:**
| Param | Type | Description |
| Name | Type | Description |
| ------ | ------ | ------ |
| type | `string` | Subscription type |
| method | `string` | Subscription method |
@@ -163,13 +163,13 @@ ___
▸ **unsubscribe**(type: *`string`*, method: *`string`*, id: *`number`*): `Promise`<`boolean`>
*Defined in [ws/index.ts:204](https://github.com/polkadot-js/api/blob/d097a7a/packages/rpc-provider/src/ws/index.ts#L204)*
*Defined in [ws/index.ts:204](https://github.com/polkadot-js/api/blob/19aed57/packages/rpc-provider/src/ws/index.ts#L204)*
*__summary__*: Allows unsubscribing to subscriptions made with [subscribe](_ws_index_.wsprovider.md#subscribe).
**Parameters:**
| Param | Type |
| Name | Type |
| ------ | ------ |
| type | `string` |
| method | `string` |