693 lines
25 KiB
HTML
693 lines
25 KiB
HTML
|
|
<!DOCTYPE HTML>
|
|
<html lang="" >
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
|
<title>WsProvider · Polkadot API Book</title>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="description" content="">
|
|
<meta name="generator" content="GitBook 3.2.3">
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../gitbook/style.css">
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-insert-logo-link/plugin.css">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.css">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-sunlight-highlighter/sunlight.css">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../styles/website.css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<meta name="HandheldFriendly" content="true"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
|
|
<link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
|
|
|
|
|
|
<link rel="next" href="../../METHODS_RPC.html" />
|
|
|
|
|
|
<link rel="prev" href="_http_index_.httpprovider.html" />
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<div class="book">
|
|
<div class="book-summary">
|
|
|
|
|
|
<div id="book-search-input" role="search">
|
|
<input type="text" placeholder="Type to search" />
|
|
</div>
|
|
|
|
|
|
<nav role="navigation">
|
|
|
|
|
|
|
|
<ul class="summary">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="header">Packages</li>
|
|
|
|
|
|
|
|
<li class="chapter " data-level="1.1" data-path="../../">
|
|
|
|
<a href="../../">
|
|
|
|
|
|
Introduction
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.2" data-path="../../api/">
|
|
|
|
<a href="../../api/">
|
|
|
|
|
|
api
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<ul class="articles">
|
|
|
|
|
|
<li class="chapter " data-level="1.2.1" data-path="../../api/classes/_promise_index_.apipromise.html">
|
|
|
|
<a href="../../api/classes/_promise_index_.apipromise.html">
|
|
|
|
|
|
ApiPromise
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.2.2" data-path="../../api/classes/_rx_index_.apirx.html">
|
|
|
|
<a href="../../api/classes/_rx_index_.apirx.html">
|
|
|
|
|
|
ApiRx
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.3" data-path="../">
|
|
|
|
<a href="../">
|
|
|
|
|
|
rpc-provider
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<ul class="articles">
|
|
|
|
|
|
<li class="chapter " data-level="1.3.1" data-path="_http_index_.httpprovider.html">
|
|
|
|
<a href="_http_index_.httpprovider.html">
|
|
|
|
|
|
HttpProvider
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter active" data-level="1.3.2" data-path="_ws_index_.wsprovider.html">
|
|
|
|
<a href="_ws_index_.wsprovider.html">
|
|
|
|
|
|
WsProvider
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="header">Interfaces</li>
|
|
|
|
|
|
|
|
<li class="chapter " data-level="2.1" data-path="../../METHODS_RPC.html">
|
|
|
|
<a href="../../METHODS_RPC.html">
|
|
|
|
|
|
RPC
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="2.2" data-path="../../METHODS_STORAGE.html">
|
|
|
|
<a href="../../METHODS_STORAGE.html">
|
|
|
|
|
|
Chain state (runtime)
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="2.3" data-path="../../METHODS_EXTRINSICS.html">
|
|
|
|
<a href="../../METHODS_EXTRINSICS.html">
|
|
|
|
|
|
Extrinsics (runtime)
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="2.4" data-path="../../METHODS_EVENTS.html">
|
|
|
|
<a href="../../METHODS_EVENTS.html">
|
|
|
|
|
|
Events (runtime)
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="header">Examples</li>
|
|
|
|
|
|
|
|
<li class="chapter " data-level="3.1" data-path="../../examples/promise/">
|
|
|
|
<a href="../../examples/promise/">
|
|
|
|
|
|
ApiPromise
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<ul class="articles">
|
|
|
|
|
|
<li class="chapter " data-level="3.1.1" data-path="../../examples/promise/01_simple_connect/">
|
|
|
|
<a href="../../examples/promise/01_simple_connect/">
|
|
|
|
|
|
Simple connect
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="3.1.2" data-path="../../examples/promise/02_listen_to_blocks/">
|
|
|
|
<a href="../../examples/promise/02_listen_to_blocks/">
|
|
|
|
|
|
Listen to blocks
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="3.1.3" data-path="../../examples/promise/03_listen_to_balance_change/">
|
|
|
|
<a href="../../examples/promise/03_listen_to_balance_change/">
|
|
|
|
|
|
Listen to balance change
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="3.1.4" data-path="../../examples/promise/05_read_storage/">
|
|
|
|
<a href="../../examples/promise/05_read_storage/">
|
|
|
|
|
|
Read chain state
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="3.1.5" data-path="../../examples/promise/07_transfer_dots/">
|
|
|
|
<a href="../../examples/promise/07_transfer_dots/">
|
|
|
|
|
|
Make a transfer
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="divider"></li>
|
|
|
|
<li>
|
|
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
|
|
Published with GitBook
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="book-body">
|
|
|
|
<div class="body-inner">
|
|
|
|
|
|
|
|
<div class="book-header" role="navigation">
|
|
|
|
|
|
<!-- Title -->
|
|
<h1>
|
|
<i class="fa fa-circle-o-notch fa-spin"></i>
|
|
<a href="../.." >WsProvider</a>
|
|
</h1>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="page-wrapper" tabindex="-1" role="main">
|
|
<div class="page-inner">
|
|
|
|
<div id="book-search-results">
|
|
<div class="search-noresults">
|
|
|
|
<section class="normal markdown-section">
|
|
|
|
<h1 id="polkadotrpc-providerws">@polkadot/rpc-provider/ws</h1>
|
|
<p><em><strong>name</strong></em>: WsProvider</p>
|
|
<p><em><strong>description</strong></em>: The WebSocket Provider allows sending requests using WebSocket to a WebSocket RPC server TCP port. Unlike the <a href="_http_index_.httpprovider.html">HttpProvider</a>, it does support subscriptions and allows listening to events such as new blocks or balance changes.</p>
|
|
<p><em><strong>example</strong></em>: </p>
|
|
<pre><code class="lang-javascript"><div class="sunlight-container sunlight-theme-gitbook"><div class="sunlight-code-container"><pre class="sunlight-highlight-javascript sunlight-highlighted"><span class="sunlight-javascript"><span class="sunlight-reservedWord">import</span> <span class="sunlight-ident">Api</span> <span class="sunlight-ident">from</span> <span class="sunlight-string">'@polkadot/api/promise'</span><span class="sunlight-punctuation">;</span>
|
|
<span class="sunlight-reservedWord">import</span> <span class="sunlight-ident">WsProvider</span> <span class="sunlight-ident">from</span> <span class="sunlight-string">'@polkadot/rpc-provider/ws'</span><span class="sunlight-punctuation">;</span>
|
|
|
|
<span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">provider</span> <span class="sunlight-operator">=</span> <span class="sunlight-keyword">new</span> <span class="sunlight-ident">WsProvider</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'ws://127.0.0.1:9944'</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
|
<span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">api</span> <span class="sunlight-operator">=</span> <span class="sunlight-keyword">new</span> <span class="sunlight-ident">Api</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">provider</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
|
</span></pre></div></div></code></pre>
|
|
<p><em><strong>see</strong></em>: <a href="_http_index_.httpprovider.html">HttpProvider</a></p>
|
|
<h1 id="hierarchy">Hierarchy</h1>
|
|
<p><strong>WsProvider</strong></p>
|
|
<h1 id="implements">Implements</h1>
|
|
<ul>
|
|
<li><code>WSProviderInterface</code></li>
|
|
</ul>
|
|
<h1 id="constructors">Constructors</h1>
|
|
<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/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>
|
|
<tr>
|
|
<th>Param</th>
|
|
<th>Type</th>
|
|
<th>Default value</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>Default value</code> endpoint</td>
|
|
<td><code>string</code></td>
|
|
<td>defaults.WS_URL</td>
|
|
<td>The endpoint url. Usually `ws://ip:9944` or `wss://ip:9944`</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>Default value</code> autoConnect</td>
|
|
<td><code>boolean</code></td>
|
|
<td>true</td>
|
|
<td>Whether to connect automatically or not.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p><strong>Returns:</strong> <a href="_ws_index_.wsprovider.html">WsProvider</a></p>
|
|
<hr>
|
|
<h1 id="methods">Methods</h1>
|
|
<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/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>
|
|
<hr>
|
|
<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/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>
|
|
<hr>
|
|
<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/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>
|
|
<thead>
|
|
<tr>
|
|
<th>Param</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>type</td>
|
|
<td><code>ProviderInterface$Emitted</code></td>
|
|
<td>Event</td>
|
|
</tr>
|
|
<tr>
|
|
<td>sub</td>
|
|
<td><code>ProviderInterface$EmitCb</code></td>
|
|
<td>Callback</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p><strong>Returns:</strong> <code>void</code></p>
|
|
<hr>
|
|
<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/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>
|
|
<thead>
|
|
<tr>
|
|
<th>Param</th>
|
|
<th>Type</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>method</td>
|
|
<td><code>string</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td>params</td>
|
|
<td><code>Array</code><<code>any</code>></td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>Optional</code> subscription</td>
|
|
<td><code>SubscriptionHandler</code></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p><strong>Returns:</strong> <code>Promise</code><<code>any</code>></p>
|
|
<hr>
|
|
<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/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>
|
|
<pre><code class="lang-javascript"><div class="sunlight-container sunlight-theme-gitbook"><div class="sunlight-code-container"><pre class="sunlight-highlight-javascript sunlight-highlighted"><span class="sunlight-javascript"><span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">provider</span> <span class="sunlight-operator">=</span> <span class="sunlight-keyword">new</span> <span class="sunlight-ident">WsProvider</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'ws://127.0.0.1:9944'</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
|
<span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">rpc</span> <span class="sunlight-operator">=</span> <span class="sunlight-keyword">new</span> <span class="sunlight-ident">Rpc</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">provider</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
|
|
|
<span class="sunlight-ident">rpc</span><span class="sunlight-operator">.</span><span class="sunlight-ident">state</span><span class="sunlight-operator">.</span><span class="sunlight-ident">subscribeStorage</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">[</span><span class="sunlight-punctuation">[</span><span class="sunlight-ident">storage</span><span class="sunlight-operator">.</span><span class="sunlight-ident">balances</span><span class="sunlight-operator">.</span><span class="sunlight-ident">freeBalance</span><span class="sunlight-punctuation">,</span> <span class="sunlight-operator"><</span><span class="sunlight-ident">Address</span><span class="sunlight-operator">></span><span class="sunlight-punctuation">]</span><span class="sunlight-punctuation">]</span><span class="sunlight-punctuation">,</span> <span class="sunlight-punctuation">(</span><span class="sunlight-ident">_</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">values</span><span class="sunlight-punctuation">)</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span> <span class="sunlight-punctuation">{</span>
|
|
  <span class="sunlight-ident">console</span><span class="sunlight-operator">.</span><span class="sunlight-ident">log</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">values</span><span class="sunlight-punctuation">)</span>
|
|
<span class="sunlight-punctuation">}</span><span class="sunlight-punctuation">)</span><span class="sunlight-operator">.</span><span class="sunlight-ident">then</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">subscriptionId</span><span class="sunlight-punctuation">)</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span> <span class="sunlight-punctuation">{</span>
|
|
  <span class="sunlight-ident">console</span><span class="sunlight-operator">.</span><span class="sunlight-ident">log</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'balance changes subscription id: '</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">subscriptionId</span><span class="sunlight-punctuation">)</span>
|
|
<span class="sunlight-punctuation">}</span><span class="sunlight-punctuation">)</span>
|
|
</span></pre></div></div></code></pre>
|
|
<p><strong>Parameters:</strong></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Param</th>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>type</td>
|
|
<td><code>string</code></td>
|
|
<td>Subscription type</td>
|
|
</tr>
|
|
<tr>
|
|
<td>method</td>
|
|
<td><code>string</code></td>
|
|
<td>Subscription method</td>
|
|
</tr>
|
|
<tr>
|
|
<td>params</td>
|
|
<td><code>Array</code><<code>any</code>></td>
|
|
<td>Parameters</td>
|
|
</tr>
|
|
<tr>
|
|
<td>callback</td>
|
|
<td><code>ProviderInterface$Callback</code></td>
|
|
<td>Callback</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p><strong>Returns:</strong> <code>Promise</code><<code>number</code>>
|
|
Promise resolving to the dd of the subscription you can use with [[unsubscribe]].</p>
|
|
<hr>
|
|
<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/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>
|
|
<thead>
|
|
<tr>
|
|
<th>Param</th>
|
|
<th>Type</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>type</td>
|
|
<td><code>string</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td>method</td>
|
|
<td><code>string</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td>id</td>
|
|
<td><code>number</code></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p><strong>Returns:</strong> <code>Promise</code><<code>boolean</code>></p>
|
|
<hr>
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
<div class="search-results">
|
|
<div class="has-results">
|
|
|
|
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
|
<ul class="search-results-list"></ul>
|
|
|
|
</div>
|
|
<div class="no-results">
|
|
|
|
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<a href="_http_index_.httpprovider.html" class="navigation navigation-prev " aria-label="Previous page: HttpProvider">
|
|
<i class="fa fa-angle-left"></i>
|
|
</a>
|
|
|
|
|
|
<a href="../../METHODS_RPC.html" class="navigation navigation-next " aria-label="Next page: RPC">
|
|
<i class="fa fa-angle-right"></i>
|
|
</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<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:26:12.805Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-19T15:27:23.601Z"},"basePath":"../..","book":{"language":""}});
|
|
});
|
|
</script>
|
|
</div>
|
|
|
|
|
|
|
|
<script src="../../gitbook/gitbook.js"></script>
|
|
<script src="../../gitbook/theme.js"></script>
|
|
|
|
|
|
<script src="../../gitbook/gitbook-plugin-insert-logo-link/plugin.js"></script>
|
|
|
|
|
|
|
|
<script src="../../gitbook/gitbook-plugin-mermaid-gb3/book/plugin.js"></script>
|
|
|
|
|
|
|
|
<script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
|
|
|
|
|
|
|
|
<script src="../../gitbook/gitbook-plugin-search/search.js"></script>
|
|
|
|
|
|
|
|
<script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
|
|
|
|
|
|
|
<script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
|
|
|
|
|
|
|
<script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
|
|
|
|
|
|
|
|
<script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
|
|
|
|
|
|
|
<script src="../../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.min.js"></script>
|
|
|
|
</body>
|
|
</html>
|
|
|