[CI Skip] 0.40.17
This commit is contained in:
+156
-7
@@ -326,7 +326,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="examples/promise/05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="examples/promise/04_unsubscribe/">
|
||||
|
||||
<a href="examples/promise/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="examples/promise/05_read_storage/">
|
||||
|
||||
<a href="examples/promise/05_read_storage/">
|
||||
|
||||
@@ -339,9 +352,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="examples/promise/07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="examples/promise/06_make_transfer/">
|
||||
|
||||
<a href="examples/promise/07_transfer_dots/">
|
||||
<a href="examples/promise/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -352,7 +365,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="examples/promise/08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="examples/promise/08_system_events/">
|
||||
|
||||
<a href="examples/promise/08_system_events/">
|
||||
|
||||
@@ -365,7 +378,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="examples/promise/09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="examples/promise/09_transfer_events/">
|
||||
|
||||
<a href="examples/promise/09_transfer_events/">
|
||||
|
||||
@@ -378,7 +391,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="examples/promise/10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="examples/promise/10_upgrade_chain/">
|
||||
|
||||
<a href="examples/promise/10_upgrade_chain/">
|
||||
|
||||
@@ -389,6 +402,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="examples/rx/">
|
||||
|
||||
<a href="examples/rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="examples/rx/01_simple_connect/">
|
||||
|
||||
<a href="examples/rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="examples/rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="examples/rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="examples/rx/04_unsubscribe/">
|
||||
|
||||
<a href="examples/rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="examples/rx/05_read_storage/">
|
||||
|
||||
<a href="examples/rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="examples/rx/06_make_transfer/">
|
||||
|
||||
<a href="examples/rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="examples/rx/08_system_events/">
|
||||
|
||||
<a href="examples/rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="examples/rx/09_transfer_events/">
|
||||
|
||||
<a href="examples/rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="examples/rx/10_upgrade_chain/">
|
||||
|
||||
<a href="examples/rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2019,7 +2168,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"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":"GLOSSARY.md","mtime":"2019-01-17T16:15:44.317Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":".","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"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":"GLOSSARY.md","mtime":"2019-01-22T22:13:44.148Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
+156
-7
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="examples/promise/05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="examples/promise/04_unsubscribe/">
|
||||
|
||||
<a href="examples/promise/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="examples/promise/05_read_storage/">
|
||||
|
||||
<a href="examples/promise/05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="examples/promise/07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="examples/promise/06_make_transfer/">
|
||||
|
||||
<a href="examples/promise/07_transfer_dots/">
|
||||
<a href="examples/promise/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="examples/promise/08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="examples/promise/08_system_events/">
|
||||
|
||||
<a href="examples/promise/08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="examples/promise/09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="examples/promise/09_transfer_events/">
|
||||
|
||||
<a href="examples/promise/09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="examples/promise/10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="examples/promise/10_upgrade_chain/">
|
||||
|
||||
<a href="examples/promise/10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="examples/rx/">
|
||||
|
||||
<a href="examples/rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="examples/rx/01_simple_connect/">
|
||||
|
||||
<a href="examples/rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="examples/rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="examples/rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="examples/rx/04_unsubscribe/">
|
||||
|
||||
<a href="examples/rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="examples/rx/05_read_storage/">
|
||||
|
||||
<a href="examples/rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="examples/rx/06_make_transfer/">
|
||||
|
||||
<a href="examples/rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="examples/rx/08_system_events/">
|
||||
|
||||
<a href="examples/rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="examples/rx/09_transfer_events/">
|
||||
|
||||
<a href="examples/rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="examples/rx/10_upgrade_chain/">
|
||||
|
||||
<a href="examples/rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2228,7 +2377,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Events (runtime)","level":"2.4","depth":1,"next":{"title":"ApiPromise","level":"3.1","depth":1,"path":"examples/promise/README.md","ref":"examples/promise/README.md","articles":[{"title":"Simple connect","level":"3.1.1","depth":2,"path":"examples/promise/01_simple_connect/README.md","ref":"examples/promise/01_simple_connect/README.md","articles":[]},{"title":"Listen to blocks","level":"3.1.2","depth":2,"path":"examples/promise/02_listen_to_blocks/README.md","ref":"examples/promise/02_listen_to_blocks/README.md","articles":[]},{"title":"Listen to balance change","level":"3.1.3","depth":2,"path":"examples/promise/03_listen_to_balance_change/README.md","ref":"examples/promise/03_listen_to_balance_change/README.md","articles":[]},{"title":"Read chain state","level":"3.1.4","depth":2,"path":"examples/promise/05_read_storage/README.md","ref":"examples/promise/05_read_storage/README.md","articles":[]},{"title":"Make a transfer","level":"3.1.5","depth":2,"path":"examples/promise/07_transfer_dots/README.md","ref":"examples/promise/07_transfer_dots/README.md","articles":[]},{"title":"Display system events","level":"3.1.6","depth":2,"path":"examples/promise/08_system_events/README.md","ref":"examples/promise/08_system_events/README.md","articles":[]},{"title":"Transaction with events","level":"3.1.7","depth":2,"path":"examples/promise/09_transfer_events/README.md","ref":"examples/promise/09_transfer_events/README.md","articles":[]},{"title":"Upgrade via sudo","level":"3.1.8","depth":2,"path":"examples/promise/10_upgrade_chain/README.md","ref":"examples/promise/10_upgrade_chain/README.md","articles":[]}]},"previous":{"title":"Extrinsics (runtime)","level":"2.3","depth":1,"path":"METHODS_EXTRINSICS.md","ref":"METHODS_EXTRINSICS.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":"METHODS_EVENTS.md","mtime":"2019-01-17T16:18:18.353Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":".","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Events (runtime)","level":"2.4","depth":1,"next":{"title":"ApiPromise","level":"3.1","depth":1,"path":"examples/promise/README.md","ref":"examples/promise/README.md","articles":[{"title":"Simple connect","level":"3.1.1","depth":2,"path":"examples/promise/01_simple_connect/README.md","ref":"examples/promise/01_simple_connect/README.md","articles":[]},{"title":"Listen to blocks","level":"3.1.2","depth":2,"path":"examples/promise/02_listen_to_blocks/README.md","ref":"examples/promise/02_listen_to_blocks/README.md","articles":[]},{"title":"Listen to balance change","level":"3.1.3","depth":2,"path":"examples/promise/03_listen_to_balance_change/README.md","ref":"examples/promise/03_listen_to_balance_change/README.md","articles":[]},{"title":"Unsubscribe from listening","level":"3.1.4","depth":2,"path":"examples/promise/04_unsubscribe/README.md","ref":"examples/promise/04_unsubscribe/README.md","articles":[]},{"title":"Read chain state","level":"3.1.5","depth":2,"path":"examples/promise/05_read_storage/README.md","ref":"examples/promise/05_read_storage/README.md","articles":[]},{"title":"Make a transfer","level":"3.1.6","depth":2,"path":"examples/promise/06_make_transfer/README.md","ref":"examples/promise/06_make_transfer/README.md","articles":[]},{"title":"Display system events","level":"3.1.7","depth":2,"path":"examples/promise/08_system_events/README.md","ref":"examples/promise/08_system_events/README.md","articles":[]},{"title":"Transaction with events","level":"3.1.8","depth":2,"path":"examples/promise/09_transfer_events/README.md","ref":"examples/promise/09_transfer_events/README.md","articles":[]},{"title":"Upgrade via sudo","level":"3.1.9","depth":2,"path":"examples/promise/10_upgrade_chain/README.md","ref":"examples/promise/10_upgrade_chain/README.md","articles":[]}]},"previous":{"title":"Extrinsics (runtime)","level":"2.3","depth":1,"path":"METHODS_EXTRINSICS.md","ref":"METHODS_EXTRINSICS.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":"METHODS_EVENTS.md","mtime":"2019-01-22T22:16:16.747Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="examples/promise/05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="examples/promise/04_unsubscribe/">
|
||||
|
||||
<a href="examples/promise/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="examples/promise/05_read_storage/">
|
||||
|
||||
<a href="examples/promise/05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="examples/promise/07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="examples/promise/06_make_transfer/">
|
||||
|
||||
<a href="examples/promise/07_transfer_dots/">
|
||||
<a href="examples/promise/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="examples/promise/08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="examples/promise/08_system_events/">
|
||||
|
||||
<a href="examples/promise/08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="examples/promise/09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="examples/promise/09_transfer_events/">
|
||||
|
||||
<a href="examples/promise/09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="examples/promise/10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="examples/promise/10_upgrade_chain/">
|
||||
|
||||
<a href="examples/promise/10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="examples/rx/">
|
||||
|
||||
<a href="examples/rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="examples/rx/01_simple_connect/">
|
||||
|
||||
<a href="examples/rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="examples/rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="examples/rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="examples/rx/04_unsubscribe/">
|
||||
|
||||
<a href="examples/rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="examples/rx/05_read_storage/">
|
||||
|
||||
<a href="examples/rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="examples/rx/06_make_transfer/">
|
||||
|
||||
<a href="examples/rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="examples/rx/08_system_events/">
|
||||
|
||||
<a href="examples/rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="examples/rx/09_transfer_events/">
|
||||
|
||||
<a href="examples/rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="examples/rx/10_upgrade_chain/">
|
||||
|
||||
<a href="examples/rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2294,7 +2443,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Extrinsics (runtime)","level":"2.3","depth":1,"next":{"title":"Events (runtime)","level":"2.4","depth":1,"path":"METHODS_EVENTS.md","ref":"METHODS_EVENTS.md","articles":[]},"previous":{"title":"Chain state (runtime)","level":"2.2","depth":1,"path":"METHODS_STORAGE.md","ref":"METHODS_STORAGE.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":"METHODS_EXTRINSICS.md","mtime":"2019-01-17T16:18:18.353Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":".","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Extrinsics (runtime)","level":"2.3","depth":1,"next":{"title":"Events (runtime)","level":"2.4","depth":1,"path":"METHODS_EVENTS.md","ref":"METHODS_EVENTS.md","articles":[]},"previous":{"title":"Chain state (runtime)","level":"2.2","depth":1,"path":"METHODS_STORAGE.md","ref":"METHODS_STORAGE.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":"METHODS_EXTRINSICS.md","mtime":"2019-01-22T22:16:16.747Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
+156
-7
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="examples/promise/05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="examples/promise/04_unsubscribe/">
|
||||
|
||||
<a href="examples/promise/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="examples/promise/05_read_storage/">
|
||||
|
||||
<a href="examples/promise/05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="examples/promise/07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="examples/promise/06_make_transfer/">
|
||||
|
||||
<a href="examples/promise/07_transfer_dots/">
|
||||
<a href="examples/promise/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="examples/promise/08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="examples/promise/08_system_events/">
|
||||
|
||||
<a href="examples/promise/08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="examples/promise/09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="examples/promise/09_transfer_events/">
|
||||
|
||||
<a href="examples/promise/09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="examples/promise/10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="examples/promise/10_upgrade_chain/">
|
||||
|
||||
<a href="examples/promise/10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="examples/rx/">
|
||||
|
||||
<a href="examples/rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="examples/rx/01_simple_connect/">
|
||||
|
||||
<a href="examples/rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="examples/rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="examples/rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="examples/rx/04_unsubscribe/">
|
||||
|
||||
<a href="examples/rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="examples/rx/05_read_storage/">
|
||||
|
||||
<a href="examples/rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="examples/rx/06_make_transfer/">
|
||||
|
||||
<a href="examples/rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="examples/rx/08_system_events/">
|
||||
|
||||
<a href="examples/rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="examples/rx/09_transfer_events/">
|
||||
|
||||
<a href="examples/rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="examples/rx/10_upgrade_chain/">
|
||||
|
||||
<a href="examples/rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2153,7 +2302,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"RPC","level":"2.1","depth":1,"next":{"title":"Chain state (runtime)","level":"2.2","depth":1,"path":"METHODS_STORAGE.md","ref":"METHODS_STORAGE.md","articles":[]},"previous":{"title":"types (codec implementation)","level":"1.4","depth":1,"path":"types/README.md","ref":"types/README.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":"METHODS_RPC.md","mtime":"2019-01-17T16:18:18.353Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":".","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"RPC","level":"2.1","depth":1,"next":{"title":"Chain state (runtime)","level":"2.2","depth":1,"path":"METHODS_STORAGE.md","ref":"METHODS_STORAGE.md","articles":[]},"previous":{"title":"types (codec implementation)","level":"1.4","depth":1,"path":"types/README.md","ref":"types/README.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":"METHODS_RPC.md","mtime":"2019-01-22T22:16:16.747Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
+156
-7
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="examples/promise/05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="examples/promise/04_unsubscribe/">
|
||||
|
||||
<a href="examples/promise/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="examples/promise/05_read_storage/">
|
||||
|
||||
<a href="examples/promise/05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="examples/promise/07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="examples/promise/06_make_transfer/">
|
||||
|
||||
<a href="examples/promise/07_transfer_dots/">
|
||||
<a href="examples/promise/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="examples/promise/08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="examples/promise/08_system_events/">
|
||||
|
||||
<a href="examples/promise/08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="examples/promise/09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="examples/promise/09_transfer_events/">
|
||||
|
||||
<a href="examples/promise/09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="examples/promise/10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="examples/promise/10_upgrade_chain/">
|
||||
|
||||
<a href="examples/promise/10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="examples/rx/">
|
||||
|
||||
<a href="examples/rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="examples/rx/01_simple_connect/">
|
||||
|
||||
<a href="examples/rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="examples/rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="examples/rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="examples/rx/04_unsubscribe/">
|
||||
|
||||
<a href="examples/rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="examples/rx/05_read_storage/">
|
||||
|
||||
<a href="examples/rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="examples/rx/06_make_transfer/">
|
||||
|
||||
<a href="examples/rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="examples/rx/08_system_events/">
|
||||
|
||||
<a href="examples/rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="examples/rx/09_transfer_events/">
|
||||
|
||||
<a href="examples/rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="examples/rx/10_upgrade_chain/">
|
||||
|
||||
<a href="examples/rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2521,7 +2670,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Chain state (runtime)","level":"2.2","depth":1,"next":{"title":"Extrinsics (runtime)","level":"2.3","depth":1,"path":"METHODS_EXTRINSICS.md","ref":"METHODS_EXTRINSICS.md","articles":[]},"previous":{"title":"RPC","level":"2.1","depth":1,"path":"METHODS_RPC.md","ref":"METHODS_RPC.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":"METHODS_STORAGE.md","mtime":"2019-01-17T16:18:18.357Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":".","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Chain state (runtime)","level":"2.2","depth":1,"next":{"title":"Extrinsics (runtime)","level":"2.3","depth":1,"path":"METHODS_EXTRINSICS.md","ref":"METHODS_EXTRINSICS.md","articles":[]},"previous":{"title":"RPC","level":"2.1","depth":1,"path":"METHODS_RPC.md","ref":"METHODS_RPC.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":"METHODS_STORAGE.md","mtime":"2019-01-22T22:16:16.751Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
* ["balances/votingBalancesNominatorsFor"](modules/_balances_votingbalancesnominatorsfor_.md)
|
||||
* ["chain/bestNumber"](modules/_chain_bestnumber_.md)
|
||||
* ["chain/bestNumberFinalised"](modules/_chain_bestnumberfinalised_.md)
|
||||
* ["chain/getHeader"](modules/_chain_getheader_.md)
|
||||
* ["chain/index"](modules/_chain_index_.md)
|
||||
* ["chain/subscribeNewHead"](modules/_chain_subscribenewhead_.md)
|
||||
* ["democracy/index"](modules/_democracy_index_.md)
|
||||
* ["democracy/referendumInfos"](modules/_democracy_referenduminfos_.md)
|
||||
* ["democracy/referendumVotesFor"](modules/_democracy_referendumvotesfor_.md)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
**● accounts**: *`ReturnTypes`<["accounts/index"](../modules/_accounts_index_.md)>*
|
||||
|
||||
*Defined in [index.ts:27](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/index.ts#L27)*
|
||||
*Defined in [index.ts:27](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/index.ts#L27)*
|
||||
|
||||
___
|
||||
<a id="balances"></a>
|
||||
@@ -21,7 +21,7 @@ ___
|
||||
|
||||
**● balances**: *`ReturnTypes`<["balances/index"](../modules/_balances_index_.md)>*
|
||||
|
||||
*Defined in [index.ts:28](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/index.ts#L28)*
|
||||
*Defined in [index.ts:28](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/index.ts#L28)*
|
||||
|
||||
___
|
||||
<a id="chain"></a>
|
||||
@@ -30,7 +30,7 @@ ___
|
||||
|
||||
**● chain**: *`ReturnTypes`<["chain/index"](../modules/_chain_index_.md)>*
|
||||
|
||||
*Defined in [index.ts:29](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/index.ts#L29)*
|
||||
*Defined in [index.ts:29](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/index.ts#L29)*
|
||||
|
||||
___
|
||||
<a id="democracy"></a>
|
||||
@@ -39,7 +39,7 @@ ___
|
||||
|
||||
**● democracy**: *`ReturnTypes`<["democracy/index"](../modules/_democracy_index_.md)>*
|
||||
|
||||
*Defined in [index.ts:30](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/index.ts#L30)*
|
||||
*Defined in [index.ts:30](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/index.ts#L30)*
|
||||
|
||||
___
|
||||
<a id="session"></a>
|
||||
@@ -48,7 +48,7 @@ ___
|
||||
|
||||
**● session**: *`ReturnTypes`<["session/index"](../modules/_session_index_.md)>*
|
||||
|
||||
*Defined in [index.ts:31](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/index.ts#L31)*
|
||||
*Defined in [index.ts:31](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/index.ts#L31)*
|
||||
|
||||
___
|
||||
<a id="staking"></a>
|
||||
@@ -57,7 +57,7 @@ ___
|
||||
|
||||
**● staking**: *`ReturnTypes`<["staking/index"](../modules/_staking_index_.md)>*
|
||||
|
||||
*Defined in [index.ts:32](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/index.ts#L32)*
|
||||
*Defined in [index.ts:32](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/index.ts#L32)*
|
||||
|
||||
___
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
**Ƭ AccountIdAndIndex**: *[`undefined` | `AccountId`, `undefined` | `AccountIndex`]*
|
||||
|
||||
*Defined in [accounts/idAndIndex.ts:15](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/accounts/idAndIndex.ts#L15)*
|
||||
*Defined in [accounts/idAndIndex.ts:15](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/accounts/idAndIndex.ts#L15)*
|
||||
|
||||
___
|
||||
|
||||
@@ -20,7 +20,7 @@ ___
|
||||
|
||||
▸ **idAndIndex**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [accounts/idAndIndex.ts:17](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/accounts/idAndIndex.ts#L17)*
|
||||
*Defined in [accounts/idAndIndex.ts:17](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/accounts/idAndIndex.ts#L17)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **idToIndex**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [accounts/idToIndex.ts:13](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/accounts/idToIndex.ts#L13)*
|
||||
*Defined in [accounts/idToIndex.ts:13](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/accounts/idToIndex.ts#L13)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
**Ƭ AccountIndexes**: *`object`*
|
||||
|
||||
*Defined in [accounts/indexes.ts:13](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/accounts/indexes.ts#L13)*
|
||||
*Defined in [accounts/indexes.ts:13](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/accounts/indexes.ts#L13)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
@@ -24,7 +24,7 @@ ___
|
||||
|
||||
▸ **indexes**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [accounts/indexes.ts:15](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/accounts/indexes.ts#L15)*
|
||||
*Defined in [accounts/indexes.ts:15](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/accounts/indexes.ts#L15)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **indexToId**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [accounts/indexToId.ts:14](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/accounts/indexToId.ts#L14)*
|
||||
*Defined in [accounts/indexToId.ts:14](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/accounts/indexToId.ts#L14)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **fees**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [balances/fees.ts:13](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/balances/fees.ts#L13)*
|
||||
*Defined in [balances/fees.ts:13](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/balances/fees.ts#L13)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **validatingBalance**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [balances/validatingBalance.ts:16](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/balances/validatingBalance.ts#L16)*
|
||||
*Defined in [balances/validatingBalance.ts:16](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/balances/validatingBalance.ts#L16)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **validatingBalances**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [balances/validatingBalances.ts:14](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/balances/validatingBalances.ts#L14)*
|
||||
*Defined in [balances/validatingBalances.ts:14](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/balances/validatingBalances.ts#L14)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **votingBalance**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [balances/votingBalance.ts:16](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/balances/votingBalance.ts#L16)*
|
||||
*Defined in [balances/votingBalance.ts:16](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/balances/votingBalance.ts#L16)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **votingBalances**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [balances/votingBalances.ts:13](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/balances/votingBalances.ts#L13)*
|
||||
*Defined in [balances/votingBalances.ts:13](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/balances/votingBalances.ts#L13)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **votingBalancesNominatorsFor**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [balances/votingBalancesNominatorsFor.ts:15](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/balances/votingBalancesNominatorsFor.ts#L15)*
|
||||
*Defined in [balances/votingBalancesNominatorsFor.ts:15](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/balances/votingBalancesNominatorsFor.ts#L15)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **bestNumber**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [chain/bestNumber.ts:15](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/chain/bestNumber.ts#L15)*
|
||||
*Defined in [chain/bestNumber.ts:15](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/chain/bestNumber.ts#L15)*
|
||||
|
||||
Get the latest block number.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **bestNumberFinalised**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [chain/bestNumberFinalised.ts:15](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/chain/bestNumberFinalised.ts#L15)*
|
||||
*Defined in [chain/bestNumberFinalised.ts:15](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/chain/bestNumberFinalised.ts#L15)*
|
||||
|
||||
Get the latest finalised block number.
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
# Functions
|
||||
|
||||
<a id="getheader"></a>
|
||||
|
||||
## getHeader
|
||||
|
||||
▸ **getHeader**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [chain/getHeader.ts:17](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/chain/getHeader.ts#L17)*
|
||||
|
||||
Get the a specific block header and extend it with the author
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Name | Type |
|
||||
| ------ | ------ |
|
||||
| api | `ApiInterface$Rx` |
|
||||
|
||||
**Returns:** `(Anonymous function)`
|
||||
|
||||
___
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
|
||||
# Type aliases
|
||||
|
||||
<a id="headerandvalidators"></a>
|
||||
|
||||
## HeaderAndValidators
|
||||
|
||||
**Ƭ HeaderAndValidators**: *[`Header`, `Array`<`AccountId`>]*
|
||||
|
||||
*Defined in [chain/subscribeNewHead.ts:13](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/chain/subscribeNewHead.ts#L13)*
|
||||
|
||||
___
|
||||
|
||||
# Functions
|
||||
|
||||
<a id="subscribenewhead"></a>
|
||||
|
||||
## subscribeNewHead
|
||||
|
||||
▸ **subscribeNewHead**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [chain/subscribeNewHead.ts:18](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/chain/subscribeNewHead.ts#L18)*
|
||||
|
||||
Subscribe to block headers and extend it with the author
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Name | Type |
|
||||
| ------ | ------ |
|
||||
| api | `ApiInterface$Rx` |
|
||||
|
||||
**Returns:** `(Anonymous function)`
|
||||
|
||||
___
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **referendumInfos**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [democracy/referendumInfos.ts:13](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/democracy/referendumInfos.ts#L13)*
|
||||
*Defined in [democracy/referendumInfos.ts:13](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/democracy/referendumInfos.ts#L13)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **referendums**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [democracy/referendums.ts:13](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/democracy/referendums.ts#L13)*
|
||||
*Defined in [democracy/referendums.ts:13](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/democracy/referendums.ts#L13)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **referendumVotesFor**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [democracy/referendumVotesFor.ts:17](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/democracy/referendumVotesFor.ts#L17)*
|
||||
*Defined in [democracy/referendumVotesFor.ts:17](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/democracy/referendumVotesFor.ts#L17)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **votes**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [democracy/votes.ts:12](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/democracy/votes.ts#L12)*
|
||||
*Defined in [democracy/votes.ts:12](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/democracy/votes.ts#L12)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
▸ **decorateDerive**(api: *`ApiInterface$Rx`*): [Derive](../interfaces/_index_.derive.md)
|
||||
|
||||
*Defined in [index.ts:35](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/index.ts#L35)*
|
||||
*Defined in [index.ts:35](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/index.ts#L35)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **eraLength**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [session/eraLength.ts:13](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/session/eraLength.ts#L13)*
|
||||
*Defined in [session/eraLength.ts:13](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/session/eraLength.ts#L13)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **eraProgress**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [session/eraProgress.ts:14](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/session/eraProgress.ts#L14)*
|
||||
*Defined in [session/eraProgress.ts:14](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/session/eraProgress.ts#L14)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **sessionProgress**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [session/sessionProgress.ts:14](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/session/sessionProgress.ts#L14)*
|
||||
*Defined in [session/sessionProgress.ts:14](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/session/sessionProgress.ts#L14)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **intentionsBalances**(api: *`ApiInterface$Rx`*): `(Anonymous function)`
|
||||
|
||||
*Defined in [staking/intentionsBalances.ts:18](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/staking/intentionsBalances.ts#L18)*
|
||||
*Defined in [staking/intentionsBalances.ts:18](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/staking/intentionsBalances.ts#L18)*
|
||||
|
||||
Get the balances for all intentions and their nominators
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
**Ƭ DerivedBalances**: *`object`*
|
||||
|
||||
*Defined in [types.ts:8](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/types.ts#L8)*
|
||||
*Defined in [types.ts:8](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/types.ts#L8)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
@@ -19,7 +19,7 @@ ___
|
||||
|
||||
**Ƭ DerivedBalancesMap**: *`object`*
|
||||
|
||||
*Defined in [types.ts:26](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/types.ts#L26)*
|
||||
*Defined in [types.ts:26](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/types.ts#L26)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
@@ -32,7 +32,7 @@ ___
|
||||
|
||||
**Ƭ DerivedFees**: *`object`*
|
||||
|
||||
*Defined in [types.ts:18](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/types.ts#L18)*
|
||||
*Defined in [types.ts:18](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/types.ts#L18)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
@@ -43,7 +43,7 @@ ___
|
||||
|
||||
**Ƭ DerivedReferendumVote**: *`object`*
|
||||
|
||||
*Defined in [types.ts:30](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/types.ts#L30)*
|
||||
*Defined in [types.ts:30](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/types.ts#L30)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **cache**(fn: *`Function`*, map?: *`WeakMap`<`object`, `any`>*): `(Anonymous function)`
|
||||
|
||||
*Defined in [util/cache.ts:23](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api-derive/src/util/cache.ts#L23)*
|
||||
*Defined in [util/cache.ts:23](https://github.com/polkadot-js/api/blob/9373e5d/packages/api-derive/src/util/cache.ts#L23)*
|
||||
|
||||
Create memoization for a 2-currified function.
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
⊕ **new ApiBase**(provider?: *[ApiOptions](../interfaces/_types_.apioptions.md) | `ProviderInterface`*): [ApiBase](_base_.apibase.md)
|
||||
|
||||
*Defined in [Base.ts:68](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L68)*
|
||||
*Defined in [Base.ts:68](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L68)*
|
||||
|
||||
*__description__*: Create an instance of the class
|
||||
|
||||
@@ -60,7 +60,7 @@ ___
|
||||
|
||||
getderive(): [Derive](../interfaces/_types_.derive.md)<`OnCall`>
|
||||
|
||||
*Defined in [Base.ts:155](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L155)*
|
||||
*Defined in [Base.ts:155](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L155)*
|
||||
|
||||
*__description__*: Derived results that are injected into the API, allowing for combinations of various query results.
|
||||
|
||||
@@ -81,7 +81,7 @@ ___
|
||||
|
||||
getgenesisHash(): `Hash`
|
||||
|
||||
*Defined in [Base.ts:112](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L112)*
|
||||
*Defined in [Base.ts:112](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L112)*
|
||||
|
||||
*__description__*: Contains the genesis Hash of the attached chain. Apart from being useful to determine the actual chain, it can also be used to sign immortal transactions.
|
||||
|
||||
@@ -94,7 +94,7 @@ ___
|
||||
|
||||
gethasSubscriptions(): `boolean`
|
||||
|
||||
*Defined in [Base.ts:121](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L121)*
|
||||
*Defined in [Base.ts:121](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L121)*
|
||||
|
||||
*__description__*: `true` when subscriptions are supported
|
||||
|
||||
@@ -107,7 +107,7 @@ ___
|
||||
|
||||
getquery(): [QueryableStorage](../interfaces/_types_.queryablestorage.md)<`OnCall`>
|
||||
|
||||
*Defined in [Base.ts:175](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L175)*
|
||||
*Defined in [Base.ts:175](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L175)*
|
||||
|
||||
*__description__*: Contains all the chain state modules and their subsequent methods in the API. These are attached dynamically from the runtime metadata.
|
||||
|
||||
@@ -130,7 +130,7 @@ ___
|
||||
|
||||
getrpc(): [DecoratedRpc](../interfaces/_types_.decoratedrpc.md)<`OnCall`>
|
||||
|
||||
*Defined in [Base.ts:195](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L195)*
|
||||
*Defined in [Base.ts:195](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L195)*
|
||||
|
||||
*__description__*: Contains all the raw rpc sections and their subsequent methods in the API as defined by the jsonrpc interface definitions. Unlike the dynamic `api.query` and `api.tx` sections, these methods are fixed (although extensible with node upgrades) and not determined by the runtime.
|
||||
|
||||
@@ -153,7 +153,7 @@ ___
|
||||
|
||||
getruntimeMetadata(): `Metadata`
|
||||
|
||||
*Defined in [Base.ts:128](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L128)*
|
||||
*Defined in [Base.ts:128](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L128)*
|
||||
|
||||
*__description__*: Yields the current attached runtime metadata. Generally this is only used to construct extrinsics & storage, but is useful for current runtime inspection.
|
||||
|
||||
@@ -166,7 +166,7 @@ ___
|
||||
|
||||
getruntimeVersion(): `RuntimeVersion`
|
||||
|
||||
*Defined in [Base.ts:137](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L137)*
|
||||
*Defined in [Base.ts:137](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L137)*
|
||||
|
||||
*__description__*: Contains the version information for the current runtime.
|
||||
|
||||
@@ -179,7 +179,7 @@ ___
|
||||
|
||||
gettx(): [SubmittableExtrinsics](../interfaces/_types_.submittableextrinsics.md)<`OnCall`>
|
||||
|
||||
*Defined in [Base.ts:214](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L214)*
|
||||
*Defined in [Base.ts:214](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L214)*
|
||||
|
||||
*__description__*: Contains all the extrinsic modules and their subsequent methods in the API. It allows for the construction of transactions and the submission thereof. These are attached dynamically from the runtime metadata.
|
||||
|
||||
@@ -206,7 +206,7 @@ ___
|
||||
|
||||
▸ **on**(type: *[ApiInterface$Events](../modules/_types_.md#apiinterface_events)*, handler: *`function`*): `this`
|
||||
|
||||
*Defined in [Base.ts:239](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L239)*
|
||||
*Defined in [Base.ts:239](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L239)*
|
||||
|
||||
*__description__*: Attach an eventemitter handler to listen to a specific event
|
||||
|
||||
@@ -238,7 +238,7 @@ ___
|
||||
|
||||
▸ **once**(type: *[ApiInterface$Events](../modules/_types_.md#apiinterface_events)*, handler: *`function`*): `this`
|
||||
|
||||
*Defined in [Base.ts:264](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L264)*
|
||||
*Defined in [Base.ts:264](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L264)*
|
||||
|
||||
*__description__*: Attach an one-time eventemitter handler to listen to a specific event
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
⊕ **new Combinator**(fns: *`Array`<[CombinatorFunction](../modules/_promise_combinator_.md#combinatorfunction) | [[CombinatorFunction](../modules/_promise_combinator_.md#combinatorfunction), `Array`]>*, callback: *[CombinatorCallback](../modules/_promise_combinator_.md#combinatorcallback)*): [Combinator](_promise_combinator_.combinator.md)
|
||||
|
||||
*Defined in [promise/Combinator.ts:21](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/Combinator.ts#L21)*
|
||||
*Defined in [promise/Combinator.ts:21](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/Combinator.ts#L21)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -33,7 +33,7 @@ ___
|
||||
|
||||
▸ **unsubscribe**(): `void`
|
||||
|
||||
*Defined in [promise/Combinator.ts:67](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/Combinator.ts#L67)*
|
||||
*Defined in [promise/Combinator.ts:67](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/Combinator.ts#L67)*
|
||||
|
||||
**Returns:** `void`
|
||||
|
||||
|
||||
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="../../examples/promise/05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="../../examples/promise/04_unsubscribe/">
|
||||
|
||||
<a href="../../examples/promise/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../../examples/promise/05_read_storage/">
|
||||
|
||||
<a href="../../examples/promise/05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../../examples/promise/07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="../../examples/promise/06_make_transfer/">
|
||||
|
||||
<a href="../../examples/promise/07_transfer_dots/">
|
||||
<a href="../../examples/promise/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="../../examples/promise/08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="../../examples/promise/08_system_events/">
|
||||
|
||||
<a href="../../examples/promise/08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="../../examples/promise/09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="../../examples/promise/09_transfer_events/">
|
||||
|
||||
<a href="../../examples/promise/09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="../../examples/promise/10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="../../examples/promise/10_upgrade_chain/">
|
||||
|
||||
<a href="../../examples/promise/10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="../../examples/rx/">
|
||||
|
||||
<a href="../../examples/rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="../../examples/rx/01_simple_connect/">
|
||||
|
||||
<a href="../../examples/rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="../../examples/rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="../../examples/rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="../../examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="../../examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="../../examples/rx/04_unsubscribe/">
|
||||
|
||||
<a href="../../examples/rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="../../examples/rx/05_read_storage/">
|
||||
|
||||
<a href="../../examples/rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="../../examples/rx/06_make_transfer/">
|
||||
|
||||
<a href="../../examples/rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="../../examples/rx/08_system_events/">
|
||||
|
||||
<a href="../../examples/rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="../../examples/rx/09_transfer_events/">
|
||||
|
||||
<a href="../../examples/rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="../../examples/rx/10_upgrade_chain/">
|
||||
|
||||
<a href="../../examples/rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2062,7 +2211,7 @@
|
||||
<h2 id="constructor">constructor</h2>
|
||||
<p>⊕ <strong>new ApiPromise</strong>(options?: <em><a href="../interfaces/_types_.apioptions.md">ApiOptions</a> | <code>ProviderInterface</code></em>): <a href="_promise_index_.apipromise.html">ApiPromise</a></p>
|
||||
<p><em>Overrides <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#constructor">constructor</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/index.ts#L129" target="_blank">promise/index.ts:129</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/index.ts#L129" target="_blank">promise/index.ts:129</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Creates an instance of the ApiPromise class</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>
|
||||
@@ -2098,7 +2247,7 @@
|
||||
<h2 id="derive">derive</h2>
|
||||
<p>getderive(): <a href="../interfaces/_types_.derive.md">Derive</a><<a href="">OnCall</a>></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#derive">derive</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L155" target="_blank">Base.ts:155</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L155" target="_blank">Base.ts:155</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Derived results that are injected into the API, allowing for combinations of various query results.</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-ident">api</span><span class="sunlight-operator">.</span><span class="sunlight-ident">derive</span><span class="sunlight-operator">.</span><span class="sunlight-ident">chain</span><span class="sunlight-operator">.</span><span class="sunlight-ident">bestNumber</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">number</span><span class="sunlight-punctuation">)</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span> <span class="sunlight-punctuation">{</span>
|
||||
@@ -2111,7 +2260,7 @@
|
||||
<h2 id="genesishash">genesisHash</h2>
|
||||
<p>getgenesisHash(): <code>Hash</code></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#genesishash">genesisHash</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L112" target="_blank">Base.ts:112</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L112" target="_blank">Base.ts:112</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Contains the genesis Hash of the attached chain. Apart from being useful to determine the actual chain, it can also be used to sign immortal transactions.</p>
|
||||
<p><strong>Returns:</strong> <code>Hash</code></p>
|
||||
<hr>
|
||||
@@ -2119,14 +2268,14 @@
|
||||
<h2 id="hassubscriptions">hasSubscriptions</h2>
|
||||
<p>gethasSubscriptions(): <code>boolean</code></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#hassubscriptions">hasSubscriptions</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L121" target="_blank">Base.ts:121</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L121" target="_blank">Base.ts:121</a></em></p>
|
||||
<p><em><strong>description</strong></em>: <code>true</code> when subscriptions are supported</p>
|
||||
<p><strong>Returns:</strong> <code>boolean</code></p>
|
||||
<hr>
|
||||
<p><a id="isready"></a></p>
|
||||
<h2 id="isready">isReady</h2>
|
||||
<p>getisReady(): <code>Promise</code><<a href="_promise_index_.apipromise.html">ApiPromise</a>></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/index.ts#L164" target="_blank">promise/index.ts:164</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/index.ts#L164" target="_blank">promise/index.ts:164</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Promise that returns the first time we are connected and loaded</p>
|
||||
<p><strong>Returns:</strong> <code>Promise</code><<a href="_promise_index_.apipromise.html">ApiPromise</a>></p>
|
||||
<hr>
|
||||
@@ -2134,7 +2283,7 @@
|
||||
<h2 id="query">query</h2>
|
||||
<p>getquery(): <a href="../interfaces/_types_.queryablestorage.md">QueryableStorage</a><<a href="">OnCall</a>></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#query">query</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L175" target="_blank">Base.ts:175</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L175" target="_blank">Base.ts:175</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Contains all the chain state modules and their subsequent methods in the API. These are attached dynamically from the runtime metadata.</p>
|
||||
<p>All calls inside the namespace, is denoted by <code>section</code>.<code>method</code> and may take an optional query parameter. As an example, <code>api.query.timestamp.now()</code> (current block timestamp) does not take parameters, while <code>api.query.system.accountNonce(<accountId>)</code> (retrieving the associated nonce for an account), takes the <code>AccountId</code> as a parameter.</p>
|
||||
<p><em><strong>example</strong></em>: </p>
|
||||
@@ -2148,7 +2297,7 @@
|
||||
<h2 id="rpc">rpc</h2>
|
||||
<p>getrpc(): <a href="../interfaces/_types_.decoratedrpc.md">DecoratedRpc</a><<a href="">OnCall</a>></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#rpc">rpc</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L195" target="_blank">Base.ts:195</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L195" target="_blank">Base.ts:195</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Contains all the raw rpc sections and their subsequent methods in the API as defined by the jsonrpc interface definitions. Unlike the dynamic <code>api.query</code> and <code>api.tx</code> sections, these methods are fixed (although extensible with node upgrades) and not determined by the runtime.</p>
|
||||
<p>RPC endpoints available here allow for the query of chain, node and system information, in addition to providing interfaces for the raw queries of state (usine known keys) and the submission of transactions.</p>
|
||||
<p><em><strong>example</strong></em>: </p>
|
||||
@@ -2162,7 +2311,7 @@
|
||||
<h2 id="runtimemetadata">runtimeMetadata</h2>
|
||||
<p>getruntimeMetadata(): <code>Metadata</code></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#runtimemetadata">runtimeMetadata</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L128" target="_blank">Base.ts:128</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L128" target="_blank">Base.ts:128</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Yields the current attached runtime metadata. Generally this is only used to construct extrinsics & storage, but is useful for current runtime inspection.</p>
|
||||
<p><strong>Returns:</strong> <code>Metadata</code></p>
|
||||
<hr>
|
||||
@@ -2170,7 +2319,7 @@
|
||||
<h2 id="runtimeversion">runtimeVersion</h2>
|
||||
<p>getruntimeVersion(): <code>RuntimeVersion</code></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#runtimeversion">runtimeVersion</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L137" target="_blank">Base.ts:137</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L137" target="_blank">Base.ts:137</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Contains the version information for the current runtime.</p>
|
||||
<p><strong>Returns:</strong> <code>RuntimeVersion</code></p>
|
||||
<hr>
|
||||
@@ -2178,7 +2327,7 @@
|
||||
<h2 id="tx">tx</h2>
|
||||
<p>gettx(): <a href="../interfaces/_types_.submittableextrinsics.md">SubmittableExtrinsics</a><<a href="">OnCall</a>></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#tx">tx</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L214" target="_blank">Base.ts:214</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L214" target="_blank">Base.ts:214</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Contains all the extrinsic modules and their subsequent methods in the API. It allows for the construction of transactions and the submission thereof. These are attached dynamically from the runtime metadata.</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-ident">api</span><span class="sunlight-operator">.</span><span class="sunlight-ident">tx</span><span class="sunlight-operator">.</span><span class="sunlight-ident">balances</span>
|
||||
@@ -2194,7 +2343,7 @@
|
||||
<p><a id="combinelatest"></a></p>
|
||||
<h2 id="combinelatest">combineLatest</h2>
|
||||
<p>▸ <strong>combineLatest</strong>(fns: <em><code>Array</code><<a href="../modules/_promise_combinator_.md#combinatorfunction">CombinatorFunction</a> | [<a href="../modules/_promise_combinator_.md#combinatorfunction">CombinatorFunction</a>, <code>Array</code>]></em>, callback: <em><a href="../modules/_promise_combinator_.md#combinatorcallback">CombinatorCallback</a></em>): <a href="../modules/_promise_types_.md#promisesubscription">PromiseSubscription</a></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/index.ts#L188" target="_blank">promise/index.ts:188</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/index.ts#L188" target="_blank">promise/index.ts:188</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Creates a combinator that can be used to combine the latest results from multiple subscriptions</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">address</span> <span class="sunlight-operator">=</span> <span class="sunlight-string">'5DTestUPts3kjeXSTMyerHihn1uwMfLj8vU8sqF7qYrFacT7'</span><span class="sunlight-punctuation">;</span>
|
||||
@@ -2237,7 +2386,7 @@
|
||||
<h2 id="on">on</h2>
|
||||
<p>▸ <strong>on</strong>(type: <em><a href="../modules/_types_.md#apiinterface_events">ApiInterface$Events</a></em>, handler: <em><code>function</code></em>): <code>this</code></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#on">on</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L239" target="_blank">Base.ts:239</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L239" target="_blank">Base.ts:239</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Attach an eventemitter handler to listen 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-ident">api</span><span class="sunlight-operator">.</span><span class="sunlight-ident">on</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'connected'</span><span class="sunlight-punctuation">,</span> <span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span> <span class="sunlight-punctuation">{</span>
|
||||
@@ -2276,7 +2425,7 @@
|
||||
<h2 id="once">once</h2>
|
||||
<p>▸ <strong>once</strong>(type: <em><a href="../modules/_types_.md#apiinterface_events">ApiInterface$Events</a></em>, handler: <em><code>function</code></em>): <code>this</code></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#once">once</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L264" target="_blank">Base.ts:264</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L264" target="_blank">Base.ts:264</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Attach an one-time eventemitter handler to listen 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-ident">api</span><span class="sunlight-operator">.</span><span class="sunlight-ident">once</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'connected'</span><span class="sunlight-punctuation">,</span> <span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span> <span class="sunlight-punctuation">{</span>
|
||||
@@ -2314,7 +2463,7 @@
|
||||
<p><a id="create"></a></p>
|
||||
<h2 id="static-create"><code><Static></code> create</h2>
|
||||
<p>▸ <strong>create</strong>(options?: <em><a href="../interfaces/_types_.apioptions.md">ApiOptions</a> | <code>ProviderInterface</code></em>): <code>Promise</code><<a href="_promise_index_.apipromise.html">ApiPromise</a>></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/index.ts#L127" target="_blank">promise/index.ts:127</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/index.ts#L127" target="_blank">promise/index.ts:127</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Creates an ApiPromise instance using the supplied provider. Returns an Promise containing the actual Api instance.</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>
|
||||
@@ -2390,7 +2539,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"ApiPromise","level":"1.2.1","depth":2,"next":{"title":"ApiRx","level":"1.2.2","depth":2,"path":"api/classes/_rx_index_.apirx.md","ref":"api/classes/_rx_index_.apirx.md","articles":[]},"previous":{"title":"api","level":"1.2","depth":1,"path":"api/README.md","ref":"api/README.md","articles":[{"title":"ApiPromise","level":"1.2.1","depth":2,"path":"api/classes/_promise_index_.apipromise.md","ref":"api/classes/_promise_index_.apipromise.md","articles":[]},{"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":"api/classes/_promise_index_.apipromise.md","mtime":"2019-01-17T16:18:25.931Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":"../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"ApiPromise","level":"1.2.1","depth":2,"next":{"title":"ApiRx","level":"1.2.2","depth":2,"path":"api/classes/_rx_index_.apirx.md","ref":"api/classes/_rx_index_.apirx.md","articles":[]},"previous":{"title":"api","level":"1.2","depth":1,"path":"api/README.md","ref":"api/README.md","articles":[{"title":"ApiPromise","level":"1.2.1","depth":2,"path":"api/classes/_promise_index_.apipromise.md","ref":"api/classes/_promise_index_.apipromise.md","articles":[]},{"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":"api/classes/_promise_index_.apipromise.md","mtime":"2019-01-22T22:16:24.149Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":"../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -106,7 +106,7 @@ ApiPromise.create().then((api) => {
|
||||
|
||||
*Overrides [ApiBase](_base_.apibase.md).[constructor](_base_.apibase.md#constructor)*
|
||||
|
||||
*Defined in [promise/index.ts:129](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/index.ts#L129)*
|
||||
*Defined in [promise/index.ts:129](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/index.ts#L129)*
|
||||
|
||||
*__description__*: Creates an instance of the ApiPromise class
|
||||
|
||||
@@ -142,7 +142,7 @@ getderive(): [Derive](../interfaces/_types_.derive.md)<[OnCall]()>
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[derive](_base_.apibase.md#derive)*
|
||||
|
||||
*Defined in [Base.ts:155](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L155)*
|
||||
*Defined in [Base.ts:155](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L155)*
|
||||
|
||||
*__description__*: Derived results that are injected into the API, allowing for combinations of various query results.
|
||||
|
||||
@@ -165,7 +165,7 @@ getgenesisHash(): `Hash`
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[genesisHash](_base_.apibase.md#genesishash)*
|
||||
|
||||
*Defined in [Base.ts:112](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L112)*
|
||||
*Defined in [Base.ts:112](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L112)*
|
||||
|
||||
*__description__*: Contains the genesis Hash of the attached chain. Apart from being useful to determine the actual chain, it can also be used to sign immortal transactions.
|
||||
|
||||
@@ -180,7 +180,7 @@ gethasSubscriptions(): `boolean`
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[hasSubscriptions](_base_.apibase.md#hassubscriptions)*
|
||||
|
||||
*Defined in [Base.ts:121](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L121)*
|
||||
*Defined in [Base.ts:121](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L121)*
|
||||
|
||||
*__description__*: `true` when subscriptions are supported
|
||||
|
||||
@@ -193,7 +193,7 @@ ___
|
||||
|
||||
getisReady(): `Promise`<[ApiPromise](_promise_index_.apipromise.md)>
|
||||
|
||||
*Defined in [promise/index.ts:164](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/index.ts#L164)*
|
||||
*Defined in [promise/index.ts:164](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/index.ts#L164)*
|
||||
|
||||
*__description__*: Promise that returns the first time we are connected and loaded
|
||||
|
||||
@@ -208,7 +208,7 @@ getquery(): [QueryableStorage](../interfaces/_types_.queryablestorage.md)<[OnCal
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[query](_base_.apibase.md#query)*
|
||||
|
||||
*Defined in [Base.ts:175](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L175)*
|
||||
*Defined in [Base.ts:175](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L175)*
|
||||
|
||||
*__description__*: Contains all the chain state modules and their subsequent methods in the API. These are attached dynamically from the runtime metadata.
|
||||
|
||||
@@ -233,7 +233,7 @@ getrpc(): [DecoratedRpc](../interfaces/_types_.decoratedrpc.md)<[OnCall]()>
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[rpc](_base_.apibase.md#rpc)*
|
||||
|
||||
*Defined in [Base.ts:195](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L195)*
|
||||
*Defined in [Base.ts:195](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L195)*
|
||||
|
||||
*__description__*: Contains all the raw rpc sections and their subsequent methods in the API as defined by the jsonrpc interface definitions. Unlike the dynamic `api.query` and `api.tx` sections, these methods are fixed (although extensible with node upgrades) and not determined by the runtime.
|
||||
|
||||
@@ -258,7 +258,7 @@ getruntimeMetadata(): `Metadata`
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[runtimeMetadata](_base_.apibase.md#runtimemetadata)*
|
||||
|
||||
*Defined in [Base.ts:128](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L128)*
|
||||
*Defined in [Base.ts:128](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L128)*
|
||||
|
||||
*__description__*: Yields the current attached runtime metadata. Generally this is only used to construct extrinsics & storage, but is useful for current runtime inspection.
|
||||
|
||||
@@ -273,7 +273,7 @@ getruntimeVersion(): `RuntimeVersion`
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[runtimeVersion](_base_.apibase.md#runtimeversion)*
|
||||
|
||||
*Defined in [Base.ts:137](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L137)*
|
||||
*Defined in [Base.ts:137](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L137)*
|
||||
|
||||
*__description__*: Contains the version information for the current runtime.
|
||||
|
||||
@@ -288,7 +288,7 @@ gettx(): [SubmittableExtrinsics](../interfaces/_types_.submittableextrinsics.md)
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[tx](_base_.apibase.md#tx)*
|
||||
|
||||
*Defined in [Base.ts:214](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L214)*
|
||||
*Defined in [Base.ts:214](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L214)*
|
||||
|
||||
*__description__*: Contains all the extrinsic modules and their subsequent methods in the API. It allows for the construction of transactions and the submission thereof. These are attached dynamically from the runtime metadata.
|
||||
|
||||
@@ -315,7 +315,7 @@ ___
|
||||
|
||||
▸ **combineLatest**(fns: *`Array`<[CombinatorFunction](../modules/_promise_combinator_.md#combinatorfunction) | [[CombinatorFunction](../modules/_promise_combinator_.md#combinatorfunction), `Array`]>*, callback: *[CombinatorCallback](../modules/_promise_combinator_.md#combinatorcallback)*): [PromiseSubscription](../modules/_promise_types_.md#promisesubscription)
|
||||
|
||||
*Defined in [promise/index.ts:188](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/index.ts#L188)*
|
||||
*Defined in [promise/index.ts:188](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/index.ts#L188)*
|
||||
|
||||
*__description__*: Creates a combinator that can be used to combine the latest results from multiple subscriptions
|
||||
|
||||
@@ -352,7 +352,7 @@ ___
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[on](_base_.apibase.md#on)*
|
||||
|
||||
*Defined in [Base.ts:239](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L239)*
|
||||
*Defined in [Base.ts:239](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L239)*
|
||||
|
||||
*__description__*: Attach an eventemitter handler to listen to a specific event
|
||||
|
||||
@@ -386,7 +386,7 @@ ___
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[once](_base_.apibase.md#once)*
|
||||
|
||||
*Defined in [Base.ts:264](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L264)*
|
||||
*Defined in [Base.ts:264](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L264)*
|
||||
|
||||
*__description__*: Attach an one-time eventemitter handler to listen to a specific event
|
||||
|
||||
@@ -418,7 +418,7 @@ ___
|
||||
|
||||
▸ **create**(options?: *[ApiOptions](../interfaces/_types_.apioptions.md) | `ProviderInterface`*): `Promise`<[ApiPromise](_promise_index_.apipromise.md)>
|
||||
|
||||
*Defined in [promise/index.ts:127](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/index.ts#L127)*
|
||||
*Defined in [promise/index.ts:127](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/index.ts#L127)*
|
||||
|
||||
*__description__*: Creates an ApiPromise instance using the supplied provider. Returns an Promise containing the actual Api instance.
|
||||
|
||||
|
||||
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="../../examples/promise/05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="../../examples/promise/04_unsubscribe/">
|
||||
|
||||
<a href="../../examples/promise/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../../examples/promise/05_read_storage/">
|
||||
|
||||
<a href="../../examples/promise/05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../../examples/promise/07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="../../examples/promise/06_make_transfer/">
|
||||
|
||||
<a href="../../examples/promise/07_transfer_dots/">
|
||||
<a href="../../examples/promise/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="../../examples/promise/08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="../../examples/promise/08_system_events/">
|
||||
|
||||
<a href="../../examples/promise/08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="../../examples/promise/09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="../../examples/promise/09_transfer_events/">
|
||||
|
||||
<a href="../../examples/promise/09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="../../examples/promise/10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="../../examples/promise/10_upgrade_chain/">
|
||||
|
||||
<a href="../../examples/promise/10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="../../examples/rx/">
|
||||
|
||||
<a href="../../examples/rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="../../examples/rx/01_simple_connect/">
|
||||
|
||||
<a href="../../examples/rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="../../examples/rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="../../examples/rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="../../examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="../../examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="../../examples/rx/04_unsubscribe/">
|
||||
|
||||
<a href="../../examples/rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="../../examples/rx/05_read_storage/">
|
||||
|
||||
<a href="../../examples/rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="../../examples/rx/06_make_transfer/">
|
||||
|
||||
<a href="../../examples/rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="../../examples/rx/08_system_events/">
|
||||
|
||||
<a href="../../examples/rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="../../examples/rx/09_transfer_events/">
|
||||
|
||||
<a href="../../examples/rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="../../examples/rx/10_upgrade_chain/">
|
||||
|
||||
<a href="../../examples/rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2073,7 +2222,7 @@
|
||||
<h2 id="constructor">constructor</h2>
|
||||
<p>⊕ <strong>new ApiRx</strong>(provider?: <em><a href="../interfaces/_types_.apioptions.md">ApiOptions</a> | <code>ProviderInterface</code></em>): <a href="_rx_index_.apirx.html">ApiRx</a></p>
|
||||
<p><em>Overrides <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#constructor">constructor</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/rx/index.ts#L134" target="_blank">rx/index.ts:134</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/rx/index.ts#L134" target="_blank">rx/index.ts:134</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Create an instance of the ApiRx class</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/rx'</span><span class="sunlight-punctuation">;</span>
|
||||
@@ -2107,7 +2256,7 @@
|
||||
<h2 id="derive">derive</h2>
|
||||
<p>getderive(): <a href="../interfaces/_types_.derive.md">Derive</a><<a href="">OnCall</a>></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#derive">derive</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L155" target="_blank">Base.ts:155</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L155" target="_blank">Base.ts:155</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Derived results that are injected into the API, allowing for combinations of various query results.</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-ident">api</span><span class="sunlight-operator">.</span><span class="sunlight-ident">derive</span><span class="sunlight-operator">.</span><span class="sunlight-ident">chain</span><span class="sunlight-operator">.</span><span class="sunlight-ident">bestNumber</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">number</span><span class="sunlight-punctuation">)</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span> <span class="sunlight-punctuation">{</span>
|
||||
@@ -2120,7 +2269,7 @@
|
||||
<h2 id="genesishash">genesisHash</h2>
|
||||
<p>getgenesisHash(): <code>Hash</code></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#genesishash">genesisHash</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L112" target="_blank">Base.ts:112</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L112" target="_blank">Base.ts:112</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Contains the genesis Hash of the attached chain. Apart from being useful to determine the actual chain, it can also be used to sign immortal transactions.</p>
|
||||
<p><strong>Returns:</strong> <code>Hash</code></p>
|
||||
<hr>
|
||||
@@ -2128,21 +2277,21 @@
|
||||
<h2 id="hassubscriptions">hasSubscriptions</h2>
|
||||
<p>gethasSubscriptions(): <code>boolean</code></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#hassubscriptions">hasSubscriptions</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L121" target="_blank">Base.ts:121</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L121" target="_blank">Base.ts:121</a></em></p>
|
||||
<p><em><strong>description</strong></em>: <code>true</code> when subscriptions are supported</p>
|
||||
<p><strong>Returns:</strong> <code>boolean</code></p>
|
||||
<hr>
|
||||
<p><a id="isconnected"></a></p>
|
||||
<h2 id="isconnected">isConnected</h2>
|
||||
<p>getisConnected(): <code>Observable</code><<code>boolean</code>></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/rx/index.ts#L170" target="_blank">rx/index.ts:170</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/rx/index.ts#L170" target="_blank">rx/index.ts:170</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Observable that carries the connected state for the provider. Results in a boolean flag that is true/false based on the connectivity.</p>
|
||||
<p><strong>Returns:</strong> <code>Observable</code><<code>boolean</code>></p>
|
||||
<hr>
|
||||
<p><a id="isready"></a></p>
|
||||
<h2 id="isready">isReady</h2>
|
||||
<p>getisReady(): <code>Observable</code><<a href="_rx_index_.apirx.html">ApiRx</a>></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/rx/index.ts#L177" target="_blank">rx/index.ts:177</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/rx/index.ts#L177" target="_blank">rx/index.ts:177</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Observable that returns the first time we are connected and loaded</p>
|
||||
<p><strong>Returns:</strong> <code>Observable</code><<a href="_rx_index_.apirx.html">ApiRx</a>></p>
|
||||
<hr>
|
||||
@@ -2150,7 +2299,7 @@
|
||||
<h2 id="query">query</h2>
|
||||
<p>getquery(): <a href="../interfaces/_types_.queryablestorage.md">QueryableStorage</a><<a href="">OnCall</a>></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#query">query</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L175" target="_blank">Base.ts:175</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L175" target="_blank">Base.ts:175</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Contains all the chain state modules and their subsequent methods in the API. These are attached dynamically from the runtime metadata.</p>
|
||||
<p>All calls inside the namespace, is denoted by <code>section</code>.<code>method</code> and may take an optional query parameter. As an example, <code>api.query.timestamp.now()</code> (current block timestamp) does not take parameters, while <code>api.query.system.accountNonce(<accountId>)</code> (retrieving the associated nonce for an account), takes the <code>AccountId</code> as a parameter.</p>
|
||||
<p><em><strong>example</strong></em>: </p>
|
||||
@@ -2164,7 +2313,7 @@
|
||||
<h2 id="rpc">rpc</h2>
|
||||
<p>getrpc(): <a href="../interfaces/_types_.decoratedrpc.md">DecoratedRpc</a><<a href="">OnCall</a>></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#rpc">rpc</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L195" target="_blank">Base.ts:195</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L195" target="_blank">Base.ts:195</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Contains all the raw rpc sections and their subsequent methods in the API as defined by the jsonrpc interface definitions. Unlike the dynamic <code>api.query</code> and <code>api.tx</code> sections, these methods are fixed (although extensible with node upgrades) and not determined by the runtime.</p>
|
||||
<p>RPC endpoints available here allow for the query of chain, node and system information, in addition to providing interfaces for the raw queries of state (usine known keys) and the submission of transactions.</p>
|
||||
<p><em><strong>example</strong></em>: </p>
|
||||
@@ -2178,7 +2327,7 @@
|
||||
<h2 id="runtimemetadata">runtimeMetadata</h2>
|
||||
<p>getruntimeMetadata(): <code>Metadata</code></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#runtimemetadata">runtimeMetadata</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L128" target="_blank">Base.ts:128</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L128" target="_blank">Base.ts:128</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Yields the current attached runtime metadata. Generally this is only used to construct extrinsics & storage, but is useful for current runtime inspection.</p>
|
||||
<p><strong>Returns:</strong> <code>Metadata</code></p>
|
||||
<hr>
|
||||
@@ -2186,7 +2335,7 @@
|
||||
<h2 id="runtimeversion">runtimeVersion</h2>
|
||||
<p>getruntimeVersion(): <code>RuntimeVersion</code></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#runtimeversion">runtimeVersion</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L137" target="_blank">Base.ts:137</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L137" target="_blank">Base.ts:137</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Contains the version information for the current runtime.</p>
|
||||
<p><strong>Returns:</strong> <code>RuntimeVersion</code></p>
|
||||
<hr>
|
||||
@@ -2194,7 +2343,7 @@
|
||||
<h2 id="tx">tx</h2>
|
||||
<p>gettx(): <a href="../interfaces/_types_.submittableextrinsics.md">SubmittableExtrinsics</a><<a href="">OnCall</a>></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#tx">tx</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L214" target="_blank">Base.ts:214</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L214" target="_blank">Base.ts:214</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Contains all the extrinsic modules and their subsequent methods in the API. It allows for the construction of transactions and the submission thereof. These are attached dynamically from the runtime metadata.</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-ident">api</span><span class="sunlight-operator">.</span><span class="sunlight-ident">tx</span><span class="sunlight-operator">.</span><span class="sunlight-ident">balances</span>
|
||||
@@ -2211,7 +2360,7 @@
|
||||
<h2 id="on">on</h2>
|
||||
<p>▸ <strong>on</strong>(type: <em><a href="../modules/_types_.md#apiinterface_events">ApiInterface$Events</a></em>, handler: <em><code>function</code></em>): <code>this</code></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#on">on</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L239" target="_blank">Base.ts:239</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L239" target="_blank">Base.ts:239</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Attach an eventemitter handler to listen 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-ident">api</span><span class="sunlight-operator">.</span><span class="sunlight-ident">on</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'connected'</span><span class="sunlight-punctuation">,</span> <span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span> <span class="sunlight-punctuation">{</span>
|
||||
@@ -2250,7 +2399,7 @@
|
||||
<h2 id="once">once</h2>
|
||||
<p>▸ <strong>once</strong>(type: <em><a href="../modules/_types_.md#apiinterface_events">ApiInterface$Events</a></em>, handler: <em><code>function</code></em>): <code>this</code></p>
|
||||
<p><em>Inherited from <a href="_base_.apibase.md">ApiBase</a>.<a href="_base_.apibase.md#once">once</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L264" target="_blank">Base.ts:264</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L264" target="_blank">Base.ts:264</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Attach an one-time eventemitter handler to listen 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-ident">api</span><span class="sunlight-operator">.</span><span class="sunlight-ident">once</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'connected'</span><span class="sunlight-punctuation">,</span> <span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span> <span class="sunlight-punctuation">{</span>
|
||||
@@ -2288,7 +2437,7 @@
|
||||
<p><a id="create"></a></p>
|
||||
<h2 id="static-create"><code><Static></code> create</h2>
|
||||
<p>▸ <strong>create</strong>(options?: <em><a href="../interfaces/_types_.apioptions.md">ApiOptions</a> | <code>ProviderInterface</code></em>): <code>Observable</code><<a href="_rx_index_.apirx.html">ApiRx</a>></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/rx/index.ts#L132" target="_blank">rx/index.ts:132</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/rx/index.ts#L132" target="_blank">rx/index.ts:132</a></em></p>
|
||||
<p><em><strong>description</strong></em>: Creates an ApiRx instance using the supplied provider. Returns an Observable containing the actual Api instance.</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/rx'</span><span class="sunlight-punctuation">;</span>
|
||||
@@ -2362,7 +2511,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"ApiRx","level":"1.2.2","depth":2,"next":{"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":[]}]},"previous":{"title":"ApiPromise","level":"1.2.1","depth":2,"path":"api/classes/_promise_index_.apipromise.md","ref":"api/classes/_promise_index_.apipromise.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":"api/classes/_rx_index_.apirx.md","mtime":"2019-01-17T16:18:26.115Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":"../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"ApiRx","level":"1.2.2","depth":2,"next":{"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":[]}]},"previous":{"title":"ApiPromise","level":"1.2.1","depth":2,"path":"api/classes/_promise_index_.apipromise.md","ref":"api/classes/_promise_index_.apipromise.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":"api/classes/_rx_index_.apirx.md","mtime":"2019-01-22T22:16:24.321Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":"../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
@polkadot/api/rx
|
||||
================
|
||||
|
||||
@@ -28,12 +30,12 @@ api.rpc.chain.subscribeNewHead().subscribe((header) => {
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
Subscribing to chain state -
|
||||
|
||||
```javascript
|
||||
import { combineLatest, switchMap } from 'rxjs';
|
||||
import { combineLatest } from 'rxjs';
|
||||
import { ApiRx } from '@polkadot/api';
|
||||
import { WsProvider } from '@polkadot/rpc-provider';
|
||||
|
||||
@@ -52,7 +54,6 @@ new ApiRx(provider)
|
||||
api.query.timestamp.blockPeriod(),
|
||||
api.query.timestamp.now()
|
||||
])
|
||||
)
|
||||
)
|
||||
.subscribe(([blockPeriod, timestamp]) => {
|
||||
const elapsed = last
|
||||
@@ -64,18 +65,13 @@ new ApiRx(provider)
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
Submitting a transaction -
|
||||
|
||||
```javascript
|
||||
import { first, switchMap } from 'rxjs/operators';
|
||||
import ApiRx from '@polkadot/api/rx';
|
||||
|
||||
// import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie)
|
||||
import testingPairs from '@polkadot/keyring/testingPairs';
|
||||
const keyring = testingPairs();
|
||||
|
||||
// get api via Promise
|
||||
const api = await ApiRx.create().toPromise();
|
||||
|
||||
@@ -83,23 +79,20 @@ const api = await ApiRx.create().toPromise();
|
||||
api.query.system
|
||||
.accountNonce(keyring.alice.address())
|
||||
.pipe(
|
||||
first(),
|
||||
// pipe nonce into transfer
|
||||
switchMap((nonce) =>
|
||||
api.tx.balances
|
||||
// create transfer
|
||||
.transfer(keyring.bob.address(), 12345)
|
||||
// sign the transcation
|
||||
.sign(keyring.alice, nonce)
|
||||
// send the transaction
|
||||
.send()
|
||||
)
|
||||
// pipe nonce into transfer
|
||||
switchMap((nonce) =>
|
||||
api.tx.balances
|
||||
// create transfer
|
||||
.transfer(keyring.bob.address(), 12345)
|
||||
// sign the transcation
|
||||
.sign(keyring.alice, nonce)
|
||||
// send the transaction
|
||||
.send()
|
||||
)
|
||||
)
|
||||
// subscribe to overall result
|
||||
.subscribe(({ status, type }) => {
|
||||
if (type === 'Finalised') {
|
||||
console.log('Completed at block hash', status.asFinalised.toHex());
|
||||
}
|
||||
.subscribe((hash) => {
|
||||
console.log(`submitted with hash ${hash}`);
|
||||
});
|
||||
```
|
||||
|
||||
@@ -124,24 +117,20 @@ api.query.system
|
||||
|
||||
*Overrides [ApiBase](_base_.apibase.md).[constructor](_base_.apibase.md#constructor)*
|
||||
|
||||
*Defined in [rx/index.ts:134](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/rx/index.ts#L134)*
|
||||
*Defined in [rx/index.ts:134](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/rx/index.ts#L134)*
|
||||
|
||||
*__description__*: Create an instance of the ApiRx class
|
||||
|
||||
*__example__*:
|
||||
|
||||
```javascript
|
||||
import { switchMap } from 'rxjs/operators';
|
||||
import Api from '@polkadot/api/rx';
|
||||
|
||||
new Api().isReady
|
||||
.pipe(
|
||||
switchMap((api) =>
|
||||
api.rpc.chain.subscribeNewHead()
|
||||
))
|
||||
.subscribe((header) => {
|
||||
new Api().isReady.subscribe((api) => {
|
||||
api.rpc.subscribeNewHead().subscribe((header) => {
|
||||
console.log(`new block #${header.blockNumber.toNumber()}`);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
**Parameters:**
|
||||
@@ -164,7 +153,7 @@ getderive(): [Derive](../interfaces/_types_.derive.md)<[OnCall]()>
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[derive](_base_.apibase.md#derive)*
|
||||
|
||||
*Defined in [Base.ts:155](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L155)*
|
||||
*Defined in [Base.ts:155](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L155)*
|
||||
|
||||
*__description__*: Derived results that are injected into the API, allowing for combinations of various query results.
|
||||
|
||||
@@ -187,7 +176,7 @@ getgenesisHash(): `Hash`
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[genesisHash](_base_.apibase.md#genesishash)*
|
||||
|
||||
*Defined in [Base.ts:112](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L112)*
|
||||
*Defined in [Base.ts:112](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L112)*
|
||||
|
||||
*__description__*: Contains the genesis Hash of the attached chain. Apart from being useful to determine the actual chain, it can also be used to sign immortal transactions.
|
||||
|
||||
@@ -202,7 +191,7 @@ gethasSubscriptions(): `boolean`
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[hasSubscriptions](_base_.apibase.md#hassubscriptions)*
|
||||
|
||||
*Defined in [Base.ts:121](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L121)*
|
||||
*Defined in [Base.ts:121](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L121)*
|
||||
|
||||
*__description__*: `true` when subscriptions are supported
|
||||
|
||||
@@ -215,7 +204,7 @@ ___
|
||||
|
||||
getisConnected(): `Observable`<`boolean`>
|
||||
|
||||
*Defined in [rx/index.ts:170](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/rx/index.ts#L170)*
|
||||
*Defined in [rx/index.ts:170](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/rx/index.ts#L170)*
|
||||
|
||||
*__description__*: Observable that carries the connected state for the provider. Results in a boolean flag that is true/false based on the connectivity.
|
||||
|
||||
@@ -228,7 +217,7 @@ ___
|
||||
|
||||
getisReady(): `Observable`<[ApiRx](_rx_index_.apirx.md)>
|
||||
|
||||
*Defined in [rx/index.ts:177](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/rx/index.ts#L177)*
|
||||
*Defined in [rx/index.ts:177](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/rx/index.ts#L177)*
|
||||
|
||||
*__description__*: Observable that returns the first time we are connected and loaded
|
||||
|
||||
@@ -243,7 +232,7 @@ getquery(): [QueryableStorage](../interfaces/_types_.queryablestorage.md)<[OnCal
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[query](_base_.apibase.md#query)*
|
||||
|
||||
*Defined in [Base.ts:175](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L175)*
|
||||
*Defined in [Base.ts:175](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L175)*
|
||||
|
||||
*__description__*: Contains all the chain state modules and their subsequent methods in the API. These are attached dynamically from the runtime metadata.
|
||||
|
||||
@@ -268,7 +257,7 @@ getrpc(): [DecoratedRpc](../interfaces/_types_.decoratedrpc.md)<[OnCall]()>
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[rpc](_base_.apibase.md#rpc)*
|
||||
|
||||
*Defined in [Base.ts:195](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L195)*
|
||||
*Defined in [Base.ts:195](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L195)*
|
||||
|
||||
*__description__*: Contains all the raw rpc sections and their subsequent methods in the API as defined by the jsonrpc interface definitions. Unlike the dynamic `api.query` and `api.tx` sections, these methods are fixed (although extensible with node upgrades) and not determined by the runtime.
|
||||
|
||||
@@ -293,7 +282,7 @@ getruntimeMetadata(): `Metadata`
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[runtimeMetadata](_base_.apibase.md#runtimemetadata)*
|
||||
|
||||
*Defined in [Base.ts:128](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L128)*
|
||||
*Defined in [Base.ts:128](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L128)*
|
||||
|
||||
*__description__*: Yields the current attached runtime metadata. Generally this is only used to construct extrinsics & storage, but is useful for current runtime inspection.
|
||||
|
||||
@@ -308,7 +297,7 @@ getruntimeVersion(): `RuntimeVersion`
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[runtimeVersion](_base_.apibase.md#runtimeversion)*
|
||||
|
||||
*Defined in [Base.ts:137](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L137)*
|
||||
*Defined in [Base.ts:137](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L137)*
|
||||
|
||||
*__description__*: Contains the version information for the current runtime.
|
||||
|
||||
@@ -323,7 +312,7 @@ gettx(): [SubmittableExtrinsics](../interfaces/_types_.submittableextrinsics.md)
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[tx](_base_.apibase.md#tx)*
|
||||
|
||||
*Defined in [Base.ts:214](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L214)*
|
||||
*Defined in [Base.ts:214](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L214)*
|
||||
|
||||
*__description__*: Contains all the extrinsic modules and their subsequent methods in the API. It allows for the construction of transactions and the submission thereof. These are attached dynamically from the runtime metadata.
|
||||
|
||||
@@ -333,8 +322,8 @@ gettx(): [SubmittableExtrinsics](../interfaces/_types_.submittableextrinsics.md)
|
||||
api.tx.balances
|
||||
.transfer(<recipientId>, <balance>)
|
||||
.sign(<keyPair>, <accountNonce>, <blockHash (optional)>)
|
||||
.send(({status}) => {
|
||||
console.log('tx status', status.asFinalised.toHex());
|
||||
.send((status) => {
|
||||
console.log('tx status', status);
|
||||
});
|
||||
```
|
||||
|
||||
@@ -352,7 +341,7 @@ ___
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[on](_base_.apibase.md#on)*
|
||||
|
||||
*Defined in [Base.ts:239](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L239)*
|
||||
*Defined in [Base.ts:239](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L239)*
|
||||
|
||||
*__description__*: Attach an eventemitter handler to listen to a specific event
|
||||
|
||||
@@ -386,7 +375,7 @@ ___
|
||||
|
||||
*Inherited from [ApiBase](_base_.apibase.md).[once](_base_.apibase.md#once)*
|
||||
|
||||
*Defined in [Base.ts:264](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L264)*
|
||||
*Defined in [Base.ts:264](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L264)*
|
||||
|
||||
*__description__*: Attach an one-time eventemitter handler to listen to a specific event
|
||||
|
||||
@@ -418,24 +407,20 @@ ___
|
||||
|
||||
▸ **create**(options?: *[ApiOptions](../interfaces/_types_.apioptions.md) | `ProviderInterface`*): `Observable`<[ApiRx](_rx_index_.apirx.md)>
|
||||
|
||||
*Defined in [rx/index.ts:132](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/rx/index.ts#L132)*
|
||||
*Defined in [rx/index.ts:132](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/rx/index.ts#L132)*
|
||||
|
||||
*__description__*: Creates an ApiRx instance using the supplied provider. Returns an Observable containing the actual Api instance.
|
||||
|
||||
*__example__*:
|
||||
|
||||
```javascript
|
||||
const { switchMap } = require('rxjs/operators');
|
||||
import Api from '@polkadot/api/rx';
|
||||
|
||||
Api.create()
|
||||
.pipe(
|
||||
switchMap((api) =>
|
||||
api.query.timestamp.now()
|
||||
))
|
||||
.subscribe((timestamp) => {
|
||||
Api.create().subscribe((api) => {
|
||||
api.query.timestamp.now.subscribe((timestamp) => {
|
||||
console.log(`lastest block timestamp ${timestamp}`);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
**Parameters:**
|
||||
@@ -447,3 +432,4 @@ Api.create()
|
||||
**Returns:** `Observable`<[ApiRx](_rx_index_.apirx.md)>
|
||||
|
||||
___
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
*Overrides Extrinsic.__constructor*
|
||||
|
||||
*Defined in [SubmittableExtrinsic.ts:17](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/SubmittableExtrinsic.ts#L17)*
|
||||
*Defined in [SubmittableExtrinsic.ts:17](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/SubmittableExtrinsic.ts#L17)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -75,7 +75,7 @@ getType(): `E`
|
||||
|
||||
*Inherited from Struct.Type*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/codec/Struct.ts:142](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/codec/Struct.ts#L142)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/codec/Struct.ts:142](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/codec/Struct.ts#L142)*
|
||||
|
||||
*__description__*: Returns the Type description to sthe structure
|
||||
|
||||
@@ -90,7 +90,7 @@ getargs(): `Array`<`Codec`>
|
||||
|
||||
*Inherited from Extrinsic.args*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:76](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L76)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:76](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L76)*
|
||||
|
||||
*__description__*: The arguments passed to for the call, exposes args so it is compatible with \[\[Method\]\]
|
||||
|
||||
@@ -105,7 +105,7 @@ getcallIndex(): `Uint8Array`
|
||||
|
||||
*Inherited from Extrinsic.callIndex*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:83](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L83)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:83](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L83)*
|
||||
|
||||
*__description__*: The actual `[sectionIndex, methodIndex]` as used in the Method
|
||||
|
||||
@@ -120,7 +120,7 @@ getdata(): `Uint8Array`
|
||||
|
||||
*Inherited from Extrinsic.data*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:90](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L90)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:90](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L90)*
|
||||
|
||||
*__description__*: The actual data for the Method
|
||||
|
||||
@@ -137,7 +137,7 @@ getencodedLength(): `number`
|
||||
|
||||
*Overrides Struct.encodedLength*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:97](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L97)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:97](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L97)*
|
||||
|
||||
*__description__*: The length of the value when encoded as a Uint8Array
|
||||
|
||||
@@ -152,7 +152,7 @@ gethash(): `Hash`
|
||||
|
||||
*Inherited from Extrinsic.hash*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:106](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L106)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:106](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L106)*
|
||||
|
||||
*__description__*: Convernience function, encodes the extrinsic and returns the actual hash
|
||||
|
||||
@@ -167,7 +167,7 @@ getisSigned(): `boolean`
|
||||
|
||||
*Inherited from Extrinsic.isSigned*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:115](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L115)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:115](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L115)*
|
||||
|
||||
*__description__*: `true` id the extrinsic is signed
|
||||
|
||||
@@ -182,7 +182,7 @@ getlength(): `number`
|
||||
|
||||
*Inherited from Extrinsic.length*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:122](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L122)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:122](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L122)*
|
||||
|
||||
*__description__*: The length of the encoded value
|
||||
|
||||
@@ -197,7 +197,7 @@ getmeta(): `FunctionMetadata`
|
||||
|
||||
*Inherited from Extrinsic.meta*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:129](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L129)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:129](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L129)*
|
||||
|
||||
*__description__*: The \[\[FunctionMetadata\]\] that describes the extrinsic
|
||||
|
||||
@@ -212,7 +212,7 @@ getmethod(): `Method`
|
||||
|
||||
*Inherited from Extrinsic.method*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:136](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L136)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:136](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L136)*
|
||||
|
||||
*__description__*: The \[\[Method\]\] this extrinsic wraps
|
||||
|
||||
@@ -227,7 +227,7 @@ getsignature(): `ExtrinsicSignature`
|
||||
|
||||
*Inherited from Extrinsic.signature*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:143](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L143)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:143](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L143)*
|
||||
|
||||
*__description__*: The \[\[ExtrinsicSignature\]\]
|
||||
|
||||
@@ -260,7 +260,7 @@ ___
|
||||
|
||||
*Inherited from Extrinsic.addSignature*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:150](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L150)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:150](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L150)*
|
||||
|
||||
*__description__*: Add an \[\[ExtrinsicSignature\]\] to the extrinsic (already generated)
|
||||
|
||||
@@ -353,7 +353,7 @@ ___
|
||||
|
||||
*Overrides Map.get*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/codec/Struct.ts:159](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/codec/Struct.ts#L159)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/codec/Struct.ts:159](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/codec/Struct.ts#L159)*
|
||||
|
||||
*__description__*: Returns a specific names entry in the structure
|
||||
|
||||
@@ -374,7 +374,7 @@ ___
|
||||
|
||||
*Inherited from Struct.getAtIndex*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/codec/Struct.ts:166](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/codec/Struct.ts#L166)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/codec/Struct.ts:166](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/codec/Struct.ts#L166)*
|
||||
|
||||
*__description__*: Returns the values of a member at a specific index (Rather use get(name) for performance)
|
||||
|
||||
@@ -427,7 +427,7 @@ ___
|
||||
|
||||
▸ **send**(statusCb?: *`undefined` | `function`*): `Observable`<[SubmittableSendResult](../modules/_types_.md#submittablesendresult)>
|
||||
|
||||
*Defined in [SubmittableExtrinsic.ts:54](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/SubmittableExtrinsic.ts#L54)*
|
||||
*Defined in [SubmittableExtrinsic.ts:56](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/SubmittableExtrinsic.ts#L56)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -466,7 +466,7 @@ ___
|
||||
|
||||
*Overrides Extrinsic.sign*
|
||||
|
||||
*Defined in [SubmittableExtrinsic.ts:63](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/SubmittableExtrinsic.ts#L63)*
|
||||
*Defined in [SubmittableExtrinsic.ts:66](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/SubmittableExtrinsic.ts#L66)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -485,7 +485,7 @@ ___
|
||||
|
||||
▸ **signAndSend**(signerPair: *`KeyringPair`*, statusCb?: *`undefined` | `function`*): `Observable`<[SubmittableSendResult](../modules/_types_.md#submittablesendresult)>
|
||||
|
||||
*Defined in [SubmittableExtrinsic.ts:69](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/SubmittableExtrinsic.ts#L69)*
|
||||
*Defined in [SubmittableExtrinsic.ts:72](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/SubmittableExtrinsic.ts#L72)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -505,7 +505,7 @@ ___
|
||||
|
||||
*Inherited from Struct.toArray*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/codec/Struct.ts:173](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/codec/Struct.ts#L173)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/codec/Struct.ts:173](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/codec/Struct.ts#L173)*
|
||||
|
||||
*__description__*: Converts the Object to an standard JavaScript Array
|
||||
|
||||
@@ -522,7 +522,7 @@ ___
|
||||
|
||||
*Overrides Struct.toHex*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:168](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L168)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:168](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L168)*
|
||||
|
||||
*__description__*: Returns a hex string representation of the value
|
||||
|
||||
@@ -539,7 +539,7 @@ ___
|
||||
|
||||
*Overrides Struct.toJSON*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:175](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L175)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:175](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L175)*
|
||||
|
||||
*__description__*: Converts the Object to JSON, typically used for RPC transfers
|
||||
|
||||
@@ -554,7 +554,7 @@ ___
|
||||
|
||||
*Inherited from Struct.toString*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/codec/Struct.ts:201](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/codec/Struct.ts#L201)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/codec/Struct.ts:201](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/codec/Struct.ts#L201)*
|
||||
|
||||
*__description__*: Returns the string representation of the value
|
||||
|
||||
@@ -571,7 +571,7 @@ ___
|
||||
|
||||
*Overrides Struct.toU8a*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:183](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L183)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:183](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L183)*
|
||||
|
||||
*__description__*: Encodes the value as a Uint8Array as per the parity-codec specifications
|
||||
|
||||
@@ -607,7 +607,7 @@ ___
|
||||
|
||||
*Inherited from Extrinsic.decodeExtrinsic*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:44](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Extrinsic.ts#L44)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Extrinsic.ts:44](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Extrinsic.ts#L44)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -626,7 +626,7 @@ ___
|
||||
|
||||
*Inherited from Struct.with*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/codec/Struct.ts:122](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/codec/Struct.ts#L122)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/codec/Struct.ts:122](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/codec/Struct.ts#L122)*
|
||||
|
||||
**Type parameters:**
|
||||
|
||||
|
||||
+156
-7
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="../examples/promise/05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="../examples/promise/04_unsubscribe/">
|
||||
|
||||
<a href="../examples/promise/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../examples/promise/05_read_storage/">
|
||||
|
||||
<a href="../examples/promise/05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../examples/promise/07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="../examples/promise/06_make_transfer/">
|
||||
|
||||
<a href="../examples/promise/07_transfer_dots/">
|
||||
<a href="../examples/promise/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="../examples/promise/08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="../examples/promise/08_system_events/">
|
||||
|
||||
<a href="../examples/promise/08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="../examples/promise/09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="../examples/promise/09_transfer_events/">
|
||||
|
||||
<a href="../examples/promise/09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="../examples/promise/10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="../examples/promise/10_upgrade_chain/">
|
||||
|
||||
<a href="../examples/promise/10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="../examples/rx/">
|
||||
|
||||
<a href="../examples/rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="../examples/rx/01_simple_connect/">
|
||||
|
||||
<a href="../examples/rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="../examples/rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="../examples/rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="../examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="../examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="../examples/rx/04_unsubscribe/">
|
||||
|
||||
<a href="../examples/rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="../examples/rx/05_read_storage/">
|
||||
|
||||
<a href="../examples/rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="../examples/rx/06_make_transfer/">
|
||||
|
||||
<a href="../examples/rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="../examples/rx/08_system_events/">
|
||||
|
||||
<a href="../examples/rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="../examples/rx/09_transfer_events/">
|
||||
|
||||
<a href="../examples/rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="../examples/rx/10_upgrade_chain/">
|
||||
|
||||
<a href="../examples/rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2088,7 +2237,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"api","level":"1.2","depth":1,"next":{"title":"ApiPromise","level":"1.2.1","depth":2,"path":"api/classes/_promise_index_.apipromise.md","ref":"api/classes/_promise_index_.apipromise.md","articles":[]},"previous":{"title":"Introduction","level":"1.1","depth":1,"path":"README.md","ref":"README.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":"api/README.md","mtime":"2019-01-17T16:18:25.459Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":"..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"api","level":"1.2","depth":1,"next":{"title":"ApiPromise","level":"1.2.1","depth":2,"path":"api/classes/_promise_index_.apipromise.md","ref":"api/classes/_promise_index_.apipromise.md","articles":[]},"previous":{"title":"Introduction","level":"1.1","depth":1,"path":"README.md","ref":"README.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":"api/README.md","mtime":"2019-01-22T22:16:23.701Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":"..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[constructor](../classes/_base_.apibase.md#constructor)*
|
||||
|
||||
*Defined in [Base.ts:68](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L68)*
|
||||
*Defined in [Base.ts:68](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L68)*
|
||||
|
||||
*__description__*: Create an instance of the class
|
||||
|
||||
@@ -58,7 +58,7 @@ ___
|
||||
|
||||
**● isReady**: *`Promise`<[ApiPromiseInterface](_promise_types_.apipromiseinterface.md)>*
|
||||
|
||||
*Defined in [promise/types.ts:16](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/types.ts#L16)*
|
||||
*Defined in [promise/types.ts:16](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/types.ts#L16)*
|
||||
|
||||
___
|
||||
|
||||
@@ -72,7 +72,7 @@ getderive(): [Derive](_types_.derive.md)<[OnCall](../modules/_promise_types_.md#
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[derive](../classes/_base_.apibase.md#derive)*
|
||||
|
||||
*Defined in [Base.ts:155](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L155)*
|
||||
*Defined in [Base.ts:155](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L155)*
|
||||
|
||||
*__description__*: Derived results that are injected into the API, allowing for combinations of various query results.
|
||||
|
||||
@@ -95,7 +95,7 @@ getgenesisHash(): `Hash`
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[genesisHash](../classes/_base_.apibase.md#genesishash)*
|
||||
|
||||
*Defined in [Base.ts:112](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L112)*
|
||||
*Defined in [Base.ts:112](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L112)*
|
||||
|
||||
*__description__*: Contains the genesis Hash of the attached chain. Apart from being useful to determine the actual chain, it can also be used to sign immortal transactions.
|
||||
|
||||
@@ -110,7 +110,7 @@ gethasSubscriptions(): `boolean`
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[hasSubscriptions](../classes/_base_.apibase.md#hassubscriptions)*
|
||||
|
||||
*Defined in [Base.ts:121](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L121)*
|
||||
*Defined in [Base.ts:121](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L121)*
|
||||
|
||||
*__description__*: `true` when subscriptions are supported
|
||||
|
||||
@@ -125,7 +125,7 @@ getquery(): [QueryableStorage](_types_.queryablestorage.md)<[OnCall](../modules/
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[query](../classes/_base_.apibase.md#query)*
|
||||
|
||||
*Defined in [Base.ts:175](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L175)*
|
||||
*Defined in [Base.ts:175](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L175)*
|
||||
|
||||
*__description__*: Contains all the chain state modules and their subsequent methods in the API. These are attached dynamically from the runtime metadata.
|
||||
|
||||
@@ -150,7 +150,7 @@ getrpc(): [DecoratedRpc](_types_.decoratedrpc.md)<[OnCall](../modules/_promise_t
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[rpc](../classes/_base_.apibase.md#rpc)*
|
||||
|
||||
*Defined in [Base.ts:195](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L195)*
|
||||
*Defined in [Base.ts:195](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L195)*
|
||||
|
||||
*__description__*: Contains all the raw rpc sections and their subsequent methods in the API as defined by the jsonrpc interface definitions. Unlike the dynamic `api.query` and `api.tx` sections, these methods are fixed (although extensible with node upgrades) and not determined by the runtime.
|
||||
|
||||
@@ -175,7 +175,7 @@ getruntimeMetadata(): `Metadata`
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[runtimeMetadata](../classes/_base_.apibase.md#runtimemetadata)*
|
||||
|
||||
*Defined in [Base.ts:128](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L128)*
|
||||
*Defined in [Base.ts:128](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L128)*
|
||||
|
||||
*__description__*: Yields the current attached runtime metadata. Generally this is only used to construct extrinsics & storage, but is useful for current runtime inspection.
|
||||
|
||||
@@ -190,7 +190,7 @@ getruntimeVersion(): `RuntimeVersion`
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[runtimeVersion](../classes/_base_.apibase.md#runtimeversion)*
|
||||
|
||||
*Defined in [Base.ts:137](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L137)*
|
||||
*Defined in [Base.ts:137](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L137)*
|
||||
|
||||
*__description__*: Contains the version information for the current runtime.
|
||||
|
||||
@@ -205,7 +205,7 @@ gettx(): [SubmittableExtrinsics](_types_.submittableextrinsics.md)<[OnCall](../m
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[tx](../classes/_base_.apibase.md#tx)*
|
||||
|
||||
*Defined in [Base.ts:214](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L214)*
|
||||
*Defined in [Base.ts:214](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L214)*
|
||||
|
||||
*__description__*: Contains all the extrinsic modules and their subsequent methods in the API. It allows for the construction of transactions and the submission thereof. These are attached dynamically from the runtime metadata.
|
||||
|
||||
@@ -234,7 +234,7 @@ ___
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[on](../classes/_base_.apibase.md#on)*
|
||||
|
||||
*Defined in [Base.ts:239](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L239)*
|
||||
*Defined in [Base.ts:239](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L239)*
|
||||
|
||||
*__description__*: Attach an eventemitter handler to listen to a specific event
|
||||
|
||||
@@ -268,7 +268,7 @@ ___
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[once](../classes/_base_.apibase.md#once)*
|
||||
|
||||
*Defined in [Base.ts:264](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L264)*
|
||||
*Defined in [Base.ts:264](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L264)*
|
||||
|
||||
*__description__*: Attach an one-time eventemitter handler to listen to a specific event
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[constructor](../classes/_base_.apibase.md#constructor)*
|
||||
|
||||
*Defined in [Base.ts:68](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L68)*
|
||||
*Defined in [Base.ts:68](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L68)*
|
||||
|
||||
*__description__*: Create an instance of the class
|
||||
|
||||
@@ -58,7 +58,7 @@ ___
|
||||
|
||||
**● isConnected**: *`Observable`<`boolean`>*
|
||||
|
||||
*Defined in [rx/types.ts:13](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/rx/types.ts#L13)*
|
||||
*Defined in [rx/types.ts:13](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/rx/types.ts#L13)*
|
||||
|
||||
___
|
||||
<a id="isready"></a>
|
||||
@@ -67,7 +67,7 @@ ___
|
||||
|
||||
**● isReady**: *`Observable`<[ApiRxInterface](_rx_types_.apirxinterface.md)>*
|
||||
|
||||
*Defined in [rx/types.ts:14](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/rx/types.ts#L14)*
|
||||
*Defined in [rx/types.ts:14](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/rx/types.ts#L14)*
|
||||
|
||||
___
|
||||
|
||||
@@ -81,7 +81,7 @@ getderive(): [Derive](_types_.derive.md)<[OnCall](../modules/_rx_types_.md#oncal
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[derive](../classes/_base_.apibase.md#derive)*
|
||||
|
||||
*Defined in [Base.ts:155](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L155)*
|
||||
*Defined in [Base.ts:155](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L155)*
|
||||
|
||||
*__description__*: Derived results that are injected into the API, allowing for combinations of various query results.
|
||||
|
||||
@@ -104,7 +104,7 @@ getgenesisHash(): `Hash`
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[genesisHash](../classes/_base_.apibase.md#genesishash)*
|
||||
|
||||
*Defined in [Base.ts:112](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L112)*
|
||||
*Defined in [Base.ts:112](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L112)*
|
||||
|
||||
*__description__*: Contains the genesis Hash of the attached chain. Apart from being useful to determine the actual chain, it can also be used to sign immortal transactions.
|
||||
|
||||
@@ -119,7 +119,7 @@ gethasSubscriptions(): `boolean`
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[hasSubscriptions](../classes/_base_.apibase.md#hassubscriptions)*
|
||||
|
||||
*Defined in [Base.ts:121](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L121)*
|
||||
*Defined in [Base.ts:121](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L121)*
|
||||
|
||||
*__description__*: `true` when subscriptions are supported
|
||||
|
||||
@@ -134,7 +134,7 @@ getquery(): [QueryableStorage](_types_.queryablestorage.md)<[OnCall](../modules/
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[query](../classes/_base_.apibase.md#query)*
|
||||
|
||||
*Defined in [Base.ts:175](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L175)*
|
||||
*Defined in [Base.ts:175](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L175)*
|
||||
|
||||
*__description__*: Contains all the chain state modules and their subsequent methods in the API. These are attached dynamically from the runtime metadata.
|
||||
|
||||
@@ -159,7 +159,7 @@ getrpc(): [DecoratedRpc](_types_.decoratedrpc.md)<[OnCall](../modules/_rx_types_
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[rpc](../classes/_base_.apibase.md#rpc)*
|
||||
|
||||
*Defined in [Base.ts:195](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L195)*
|
||||
*Defined in [Base.ts:195](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L195)*
|
||||
|
||||
*__description__*: Contains all the raw rpc sections and their subsequent methods in the API as defined by the jsonrpc interface definitions. Unlike the dynamic `api.query` and `api.tx` sections, these methods are fixed (although extensible with node upgrades) and not determined by the runtime.
|
||||
|
||||
@@ -184,7 +184,7 @@ getruntimeMetadata(): `Metadata`
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[runtimeMetadata](../classes/_base_.apibase.md#runtimemetadata)*
|
||||
|
||||
*Defined in [Base.ts:128](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L128)*
|
||||
*Defined in [Base.ts:128](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L128)*
|
||||
|
||||
*__description__*: Yields the current attached runtime metadata. Generally this is only used to construct extrinsics & storage, but is useful for current runtime inspection.
|
||||
|
||||
@@ -199,7 +199,7 @@ getruntimeVersion(): `RuntimeVersion`
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[runtimeVersion](../classes/_base_.apibase.md#runtimeversion)*
|
||||
|
||||
*Defined in [Base.ts:137](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L137)*
|
||||
*Defined in [Base.ts:137](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L137)*
|
||||
|
||||
*__description__*: Contains the version information for the current runtime.
|
||||
|
||||
@@ -214,7 +214,7 @@ gettx(): [SubmittableExtrinsics](_types_.submittableextrinsics.md)<[OnCall](../m
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[tx](../classes/_base_.apibase.md#tx)*
|
||||
|
||||
*Defined in [Base.ts:214](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L214)*
|
||||
*Defined in [Base.ts:214](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L214)*
|
||||
|
||||
*__description__*: Contains all the extrinsic modules and their subsequent methods in the API. It allows for the construction of transactions and the submission thereof. These are attached dynamically from the runtime metadata.
|
||||
|
||||
@@ -243,7 +243,7 @@ ___
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[on](../classes/_base_.apibase.md#on)*
|
||||
|
||||
*Defined in [Base.ts:239](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L239)*
|
||||
*Defined in [Base.ts:239](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L239)*
|
||||
|
||||
*__description__*: Attach an eventemitter handler to listen to a specific event
|
||||
|
||||
@@ -277,7 +277,7 @@ ___
|
||||
|
||||
*Inherited from [ApiBase](../classes/_base_.apibase.md).[once](../classes/_base_.apibase.md#once)*
|
||||
|
||||
*Defined in [Base.ts:264](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/Base.ts#L264)*
|
||||
*Defined in [Base.ts:264](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/Base.ts#L264)*
|
||||
|
||||
*__description__*: Attach an one-time eventemitter handler to listen to a specific event
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
**● on**: *`function`*
|
||||
|
||||
*Defined in [types.ts:100](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L100)*
|
||||
*Defined in [types.ts:101](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L101)*
|
||||
|
||||
#### Type declaration
|
||||
▸(type: *[ApiInterface$Events](../modules/_types_.md#apiinterface_events)*, handler: *`function`*): `this`
|
||||
@@ -45,7 +45,7 @@ ___
|
||||
|
||||
**● once**: *`function`*
|
||||
|
||||
*Defined in [types.ts:101](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L101)*
|
||||
*Defined in [types.ts:102](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L102)*
|
||||
|
||||
#### Type declaration
|
||||
▸(type: *[ApiInterface$Events](../modules/_types_.md#apiinterface_events)*, handler: *`function`*): `this`
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
**● derive**: *[Derive](_types_.derive.md)<`OnCall`>*
|
||||
|
||||
*Defined in [types.ts:89](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L89)*
|
||||
*Defined in [types.ts:90](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L90)*
|
||||
|
||||
___
|
||||
<a id="genesishash"></a>
|
||||
@@ -23,7 +23,7 @@ ___
|
||||
|
||||
**● genesisHash**: *`Hash`*
|
||||
|
||||
*Defined in [types.ts:85](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L85)*
|
||||
*Defined in [types.ts:86](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L86)*
|
||||
|
||||
___
|
||||
<a id="hassubscriptions"></a>
|
||||
@@ -32,7 +32,7 @@ ___
|
||||
|
||||
**● hasSubscriptions**: *`boolean`*
|
||||
|
||||
*Defined in [types.ts:86](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L86)*
|
||||
*Defined in [types.ts:87](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L87)*
|
||||
|
||||
___
|
||||
<a id="query"></a>
|
||||
@@ -41,7 +41,7 @@ ___
|
||||
|
||||
**● query**: *[QueryableStorage](_types_.queryablestorage.md)<`OnCall`>*
|
||||
|
||||
*Defined in [types.ts:90](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L90)*
|
||||
*Defined in [types.ts:91](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L91)*
|
||||
|
||||
___
|
||||
<a id="rpc"></a>
|
||||
@@ -50,7 +50,7 @@ ___
|
||||
|
||||
**● rpc**: *[DecoratedRpc](_types_.decoratedrpc.md)<`OnCall`>*
|
||||
|
||||
*Defined in [types.ts:91](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L91)*
|
||||
*Defined in [types.ts:92](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L92)*
|
||||
|
||||
___
|
||||
<a id="runtimemetadata"></a>
|
||||
@@ -59,7 +59,7 @@ ___
|
||||
|
||||
**● runtimeMetadata**: *`Metadata`*
|
||||
|
||||
*Defined in [types.ts:87](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L87)*
|
||||
*Defined in [types.ts:88](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L88)*
|
||||
|
||||
___
|
||||
<a id="runtimeversion"></a>
|
||||
@@ -68,7 +68,7 @@ ___
|
||||
|
||||
**● runtimeVersion**: *`RuntimeVersion`*
|
||||
|
||||
*Defined in [types.ts:88](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L88)*
|
||||
*Defined in [types.ts:89](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L89)*
|
||||
|
||||
___
|
||||
<a id="tx"></a>
|
||||
@@ -77,7 +77,7 @@ ___
|
||||
|
||||
**● tx**: *[SubmittableExtrinsics](_types_.submittableextrinsics.md)<`OnCall`>*
|
||||
|
||||
*Defined in [types.ts:92](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L92)*
|
||||
*Defined in [types.ts:93](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L93)*
|
||||
|
||||
___
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
**● provider**: *`ProviderInterface`*
|
||||
|
||||
*Defined in [types.ts:76](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L76)*
|
||||
*Defined in [types.ts:77](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L77)*
|
||||
|
||||
*__description__*: Transport Provider from rpc-provider. If not specified, it will default to connecting to a WsProvider connecting localhost with the default port, i.e. `ws://127.0.0.1:9944`
|
||||
|
||||
@@ -23,7 +23,7 @@ ___
|
||||
|
||||
**● types**: *`undefined` | `object`*
|
||||
|
||||
*Defined in [types.ts:81](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L81)*
|
||||
*Defined in [types.ts:82](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L82)*
|
||||
|
||||
*__description__*: Additional types used by runtime modules. This is nessusary if the runtime modules uses types not available in the base Substrate runtime.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
**● author**: *[DecoratedRpc$Section](_types_.decoratedrpc_section.md)<`OnCall`>*
|
||||
|
||||
*Defined in [types.ts:24](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L24)*
|
||||
*Defined in [types.ts:24](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L24)*
|
||||
|
||||
___
|
||||
<a id="chain"></a>
|
||||
@@ -23,7 +23,7 @@ ___
|
||||
|
||||
**● chain**: *[DecoratedRpc$Section](_types_.decoratedrpc_section.md)<`OnCall`>*
|
||||
|
||||
*Defined in [types.ts:25](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L25)*
|
||||
*Defined in [types.ts:25](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L25)*
|
||||
|
||||
___
|
||||
<a id="state"></a>
|
||||
@@ -32,7 +32,7 @@ ___
|
||||
|
||||
**● state**: *[DecoratedRpc$Section](_types_.decoratedrpc_section.md)<`OnCall`>*
|
||||
|
||||
*Defined in [types.ts:26](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L26)*
|
||||
*Defined in [types.ts:26](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L26)*
|
||||
|
||||
___
|
||||
<a id="system"></a>
|
||||
@@ -41,7 +41,7 @@ ___
|
||||
|
||||
**● system**: *[DecoratedRpc$Section](_types_.decoratedrpc_section.md)<`OnCall`>*
|
||||
|
||||
*Defined in [types.ts:27](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L27)*
|
||||
*Defined in [types.ts:27](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L27)*
|
||||
|
||||
___
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
▸ **__call**(arg?: *`any`*): `Uint8Array`
|
||||
|
||||
*Defined in [types.ts:30](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L30)*
|
||||
*Defined in [types.ts:30](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L30)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
**Returns:** `OnCall`
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/StorageKey.ts:12](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/StorageKey.ts#L12)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/StorageKey.ts:12](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/StorageKey.ts#L12)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -41,20 +41,40 @@
|
||||
|
||||
**● at**: *`function`*
|
||||
|
||||
*Defined in [types.ts:32](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L32)*
|
||||
*Defined in [types.ts:32](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L32)*
|
||||
|
||||
#### Type declaration
|
||||
▸(hash: *`Hash`*, arg?: *`any`*): `OnCall`
|
||||
▸(hash: *`Uint8Array` | `string`*, arg?: *`any`*): `OnCall`
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Name | Type |
|
||||
| ------ | ------ |
|
||||
| hash | `Hash` |
|
||||
| hash | `Uint8Array` | `string` |
|
||||
| `Optional` arg | `any` |
|
||||
|
||||
**Returns:** `OnCall`
|
||||
|
||||
___
|
||||
<a id="key"></a>
|
||||
|
||||
## key
|
||||
|
||||
**● key**: *`function`*
|
||||
|
||||
*Defined in [types.ts:33](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L33)*
|
||||
|
||||
#### Type declaration
|
||||
▸(arg?: *`any`*): `string`
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Name | Type |
|
||||
| ------ | ------ |
|
||||
| `Optional` arg | `any` |
|
||||
|
||||
**Returns:** `string`
|
||||
|
||||
___
|
||||
<a id="meta"></a>
|
||||
|
||||
@@ -64,7 +84,7 @@ ___
|
||||
|
||||
*Inherited from StorageFunction.meta*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/StorageKey.ts:14](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/StorageKey.ts#L14)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/StorageKey.ts:14](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/StorageKey.ts#L14)*
|
||||
|
||||
___
|
||||
<a id="method"></a>
|
||||
@@ -75,7 +95,7 @@ ___
|
||||
|
||||
*Inherited from StorageFunction.method*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/StorageKey.ts:15](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/StorageKey.ts#L15)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/StorageKey.ts:15](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/StorageKey.ts#L15)*
|
||||
|
||||
___
|
||||
<a id="section"></a>
|
||||
@@ -86,7 +106,7 @@ ___
|
||||
|
||||
*Inherited from StorageFunction.section*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/StorageKey.ts:16](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/StorageKey.ts#L16)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/StorageKey.ts:16](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/StorageKey.ts#L16)*
|
||||
|
||||
___
|
||||
<a id="tojson"></a>
|
||||
@@ -97,7 +117,7 @@ ___
|
||||
|
||||
*Inherited from StorageFunction.toJSON*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/StorageKey.ts:17](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/StorageKey.ts#L17)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/StorageKey.ts:17](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/StorageKey.ts#L17)*
|
||||
|
||||
#### Type declaration
|
||||
▸(): `any`
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
▸ **__call**(...args: *`any`[]*): `Method`
|
||||
|
||||
*Defined in [types.ts:43](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L43)*
|
||||
*Defined in [types.ts:44](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L44)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
**Returns:** [SubmittableExtrinsic](../classes/_submittableextrinsic_.submittableextrinsic.md)<`OnCall`>
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Method.ts:28](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Method.ts#L28)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Method.ts:28](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Method.ts#L28)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
*Inherited from MethodFunction.callIndex*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Method.ts:30](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Method.ts#L30)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Method.ts:30](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Method.ts#L30)*
|
||||
|
||||
___
|
||||
<a id="meta"></a>
|
||||
@@ -54,7 +54,7 @@ ___
|
||||
|
||||
*Inherited from MethodFunction.meta*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Method.ts:31](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Method.ts#L31)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Method.ts:31](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Method.ts#L31)*
|
||||
|
||||
___
|
||||
<a id="method"></a>
|
||||
@@ -65,7 +65,7 @@ ___
|
||||
|
||||
*Inherited from MethodFunction.method*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Method.ts:32](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Method.ts#L32)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Method.ts:32](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Method.ts#L32)*
|
||||
|
||||
___
|
||||
<a id="section"></a>
|
||||
@@ -76,7 +76,7 @@ ___
|
||||
|
||||
*Inherited from MethodFunction.section*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Method.ts:33](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Method.ts#L33)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Method.ts:33](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Method.ts#L33)*
|
||||
|
||||
___
|
||||
<a id="tojson"></a>
|
||||
@@ -87,7 +87,7 @@ ___
|
||||
|
||||
*Inherited from MethodFunction.toJSON*
|
||||
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Method.ts:34](https://github.com/polkadot-js/api/blob/f5b3d58/packages/types/src/Method.ts#L34)*
|
||||
*Defined in [/home/travis/build/polkadot-js/api/packages/types/src/Method.ts:34](https://github.com/polkadot-js/api/blob/9373e5d/packages/types/src/Method.ts#L34)*
|
||||
|
||||
#### Type declaration
|
||||
▸(): `any`
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
**Ƭ CombinatorCallback**: *`function`*
|
||||
|
||||
*Defined in [promise/Combinator.ts:9](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/Combinator.ts#L9)*
|
||||
*Defined in [promise/Combinator.ts:9](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/Combinator.ts#L9)*
|
||||
|
||||
#### Type declaration
|
||||
▸(value: *`Array`<`any`>*): `any`
|
||||
@@ -41,7 +41,7 @@ ___
|
||||
|
||||
**Ƭ CombinatorFunction**: *`function`*
|
||||
|
||||
*Defined in [promise/Combinator.ts:10](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/Combinator.ts#L10)*
|
||||
*Defined in [promise/Combinator.ts:10](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/Combinator.ts#L10)*
|
||||
|
||||
#### Type declaration
|
||||
▸(cb: *`function`*): [PromiseSubscription](_promise_types_.md#promisesubscription)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
**Ƭ OnCall**: *`Promise`<`Codec` | `null` | `undefined`> | [PromiseSubscription](_promise_types_.md#promisesubscription)*
|
||||
|
||||
*Defined in [promise/types.ts:11](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/types.ts#L11)*
|
||||
*Defined in [promise/types.ts:11](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/types.ts#L11)*
|
||||
|
||||
___
|
||||
<a id="promisesubscription"></a>
|
||||
@@ -33,7 +33,7 @@ ___
|
||||
|
||||
**Ƭ PromiseSubscription**: *`Promise`<`function`>*
|
||||
|
||||
*Defined in [promise/types.ts:13](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/types.ts#L13)*
|
||||
*Defined in [promise/types.ts:13](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/types.ts#L13)*
|
||||
|
||||
___
|
||||
<a id="queryablestoragefunction"></a>
|
||||
@@ -42,7 +42,7 @@ ___
|
||||
|
||||
**Ƭ QueryableStorageFunction**: *`QueryableStorageFunctionBase`<[OnCall](_promise_types_.md#oncall)>*
|
||||
|
||||
*Defined in [promise/types.ts:19](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/types.ts#L19)*
|
||||
*Defined in [promise/types.ts:19](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/types.ts#L19)*
|
||||
|
||||
___
|
||||
<a id="submittableextrinsic"></a>
|
||||
@@ -51,7 +51,7 @@ ___
|
||||
|
||||
**Ƭ SubmittableExtrinsic**: *`SubmittableExtrinsicBase`<[OnCall](_promise_types_.md#oncall)>*
|
||||
|
||||
*Defined in [promise/types.ts:20](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/types.ts#L20)*
|
||||
*Defined in [promise/types.ts:20](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/types.ts#L20)*
|
||||
|
||||
___
|
||||
<a id="submittableextrinsicfunction"></a>
|
||||
@@ -60,7 +60,7 @@ ___
|
||||
|
||||
**Ƭ SubmittableExtrinsicFunction**: *`SubmittableExtrinsicFunctionBase`<[OnCall](_promise_types_.md#oncall)>*
|
||||
|
||||
*Defined in [promise/types.ts:21](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/promise/types.ts#L21)*
|
||||
*Defined in [promise/types.ts:21](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/promise/types.ts#L21)*
|
||||
|
||||
___
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
**Ƭ OnCall**: *`Observable`<`Codec` | `null` | `undefined`>*
|
||||
|
||||
*Defined in [rx/types.ts:10](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/rx/types.ts#L10)*
|
||||
*Defined in [rx/types.ts:10](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/rx/types.ts#L10)*
|
||||
|
||||
___
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
**Ƭ ApiInterface$Events**: *`RpcRxInterface$Events` | "ready"*
|
||||
|
||||
*Defined in [types.ts:97](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L97)*
|
||||
*Defined in [types.ts:98](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L98)*
|
||||
|
||||
___
|
||||
<a id="apiinterface_rx"></a>
|
||||
@@ -46,7 +46,7 @@ ___
|
||||
|
||||
**Ƭ ApiInterface$Rx**: *[ApiInterface$Decorated](../interfaces/_types_.apiinterface_decorated.md)<`Observable`<`Codec` | `null` | `undefined`>>*
|
||||
|
||||
*Defined in [types.ts:95](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L95)*
|
||||
*Defined in [types.ts:96](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L96)*
|
||||
|
||||
___
|
||||
<a id="decoratedrpc_method"></a>
|
||||
@@ -55,7 +55,7 @@ ___
|
||||
|
||||
**Ƭ DecoratedRpc$Method**: *`function`*
|
||||
|
||||
*Defined in [types.ts:17](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L17)*
|
||||
*Defined in [types.ts:17](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L17)*
|
||||
|
||||
#### Type declaration
|
||||
▸(...params: *`Array`<`any`>*): `OnCall`
|
||||
@@ -75,7 +75,7 @@ ___
|
||||
|
||||
**Ƭ DeriveMethod**: *`function`*
|
||||
|
||||
*Defined in [types.ts:61](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L61)*
|
||||
*Defined in [types.ts:62](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L62)*
|
||||
|
||||
#### Type declaration
|
||||
▸(...params: *`Array`<`any`>*): `OnCall`
|
||||
@@ -95,7 +95,7 @@ ___
|
||||
|
||||
**Ƭ OnCallFunction**: *`function`*
|
||||
|
||||
*Defined in [types.ts:15](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L15)*
|
||||
*Defined in [types.ts:15](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L15)*
|
||||
|
||||
#### Type declaration
|
||||
▸(...args: *`any`[]*): `OnCall`
|
||||
@@ -115,7 +115,7 @@ ___
|
||||
|
||||
**Ƭ SubmittableSendResult**: *`object`*
|
||||
|
||||
*Defined in [types.ts:55](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/types.ts#L55)*
|
||||
*Defined in [types.ts:56](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/types.ts#L56)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **filterEvents**(extHash: *`Hash`*, __namedParameters: *`object`*, allEvents: *`Array`<`EventRecord`>*): `Array`<`EventRecord`> | `undefined`
|
||||
|
||||
*Defined in [util/filterEvents.ts:9](https://github.com/polkadot-js/api/blob/f5b3d58/packages/api/src/util/filterEvents.ts#L9)*
|
||||
*Defined in [util/filterEvents.ts:9](https://github.com/polkadot-js/api/blob/9373e5d/packages/api/src/util/filterEvents.ts#L9)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="../05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="../04_unsubscribe/">
|
||||
|
||||
<a href="../04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../05_read_storage/">
|
||||
|
||||
<a href="../05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="../06_make_transfer/">
|
||||
|
||||
<a href="../07_transfer_dots/">
|
||||
<a href="../06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="../08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="../08_system_events/">
|
||||
|
||||
<a href="../08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="../09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="../09_transfer_events/">
|
||||
|
||||
<a href="../09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="../10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="../10_upgrade_chain/">
|
||||
|
||||
<a href="../10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="../../rx/">
|
||||
|
||||
<a href="../../rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="../../rx/01_simple_connect/">
|
||||
|
||||
<a href="../../rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="../../rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="../../rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="../../rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="../../rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="../../rx/04_unsubscribe/">
|
||||
|
||||
<a href="../../rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="../../rx/05_read_storage/">
|
||||
|
||||
<a href="../../rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="../../rx/06_make_transfer/">
|
||||
|
||||
<a href="../../rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="../../rx/08_system_events/">
|
||||
|
||||
<a href="../../rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="../../rx/09_transfer_events/">
|
||||
|
||||
<a href="../../rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="../../rx/10_upgrade_chain/">
|
||||
|
||||
<a href="../../rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -1987,7 +2136,7 @@
|
||||
<section class="normal markdown-section">
|
||||
|
||||
<h1 id="simple-connect">Simple Connect</h1>
|
||||
<p>The following example shows how to instantiate a Polkadot API object and use it to connect to a node.</p>
|
||||
<p>The following example shows how to instantiate a Polkadot API object and use it to connect to a node using ApiPromise.</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-comment">// Required imports</span>
|
||||
<span class="sunlight-reservedWord">const</span> <span class="sunlight-punctuation">{</span> <span class="sunlight-ident">ApiPromise</span> <span class="sunlight-punctuation">}</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">require</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'@polkadot/api'</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
<span class="sunlight-reservedWord">const</span> <span class="sunlight-punctuation">{</span> <span class="sunlight-ident">WsProvider</span> <span class="sunlight-punctuation">}</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">require</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'@polkadot/rpc-provider'</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
@@ -2054,7 +2203,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Simple connect","level":"3.1.1","depth":2,"next":{"title":"Listen to blocks","level":"3.1.2","depth":2,"path":"examples/promise/02_listen_to_blocks/README.md","ref":"examples/promise/02_listen_to_blocks/README.md","articles":[]},"previous":{"title":"ApiPromise","level":"3.1","depth":1,"path":"examples/promise/README.md","ref":"examples/promise/README.md","articles":[{"title":"Simple connect","level":"3.1.1","depth":2,"path":"examples/promise/01_simple_connect/README.md","ref":"examples/promise/01_simple_connect/README.md","articles":[]},{"title":"Listen to blocks","level":"3.1.2","depth":2,"path":"examples/promise/02_listen_to_blocks/README.md","ref":"examples/promise/02_listen_to_blocks/README.md","articles":[]},{"title":"Listen to balance change","level":"3.1.3","depth":2,"path":"examples/promise/03_listen_to_balance_change/README.md","ref":"examples/promise/03_listen_to_balance_change/README.md","articles":[]},{"title":"Read chain state","level":"3.1.4","depth":2,"path":"examples/promise/05_read_storage/README.md","ref":"examples/promise/05_read_storage/README.md","articles":[]},{"title":"Make a transfer","level":"3.1.5","depth":2,"path":"examples/promise/07_transfer_dots/README.md","ref":"examples/promise/07_transfer_dots/README.md","articles":[]},{"title":"Display system events","level":"3.1.6","depth":2,"path":"examples/promise/08_system_events/README.md","ref":"examples/promise/08_system_events/README.md","articles":[]},{"title":"Transaction with events","level":"3.1.7","depth":2,"path":"examples/promise/09_transfer_events/README.md","ref":"examples/promise/09_transfer_events/README.md","articles":[]},{"title":"Upgrade via sudo","level":"3.1.8","depth":2,"path":"examples/promise/10_upgrade_chain/README.md","ref":"examples/promise/10_upgrade_chain/README.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":"examples/promise/01_simple_connect/README.md","mtime":"2019-01-17T16:15:44.321Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":"../../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Simple connect","level":"3.1.1","depth":2,"next":{"title":"Listen to blocks","level":"3.1.2","depth":2,"path":"examples/promise/02_listen_to_blocks/README.md","ref":"examples/promise/02_listen_to_blocks/README.md","articles":[]},"previous":{"title":"ApiPromise","level":"3.1","depth":1,"path":"examples/promise/README.md","ref":"examples/promise/README.md","articles":[{"title":"Simple connect","level":"3.1.1","depth":2,"path":"examples/promise/01_simple_connect/README.md","ref":"examples/promise/01_simple_connect/README.md","articles":[]},{"title":"Listen to blocks","level":"3.1.2","depth":2,"path":"examples/promise/02_listen_to_blocks/README.md","ref":"examples/promise/02_listen_to_blocks/README.md","articles":[]},{"title":"Listen to balance change","level":"3.1.3","depth":2,"path":"examples/promise/03_listen_to_balance_change/README.md","ref":"examples/promise/03_listen_to_balance_change/README.md","articles":[]},{"title":"Unsubscribe from listening","level":"3.1.4","depth":2,"path":"examples/promise/04_unsubscribe/README.md","ref":"examples/promise/04_unsubscribe/README.md","articles":[]},{"title":"Read chain state","level":"3.1.5","depth":2,"path":"examples/promise/05_read_storage/README.md","ref":"examples/promise/05_read_storage/README.md","articles":[]},{"title":"Make a transfer","level":"3.1.6","depth":2,"path":"examples/promise/06_make_transfer/README.md","ref":"examples/promise/06_make_transfer/README.md","articles":[]},{"title":"Display system events","level":"3.1.7","depth":2,"path":"examples/promise/08_system_events/README.md","ref":"examples/promise/08_system_events/README.md","articles":[]},{"title":"Transaction with events","level":"3.1.8","depth":2,"path":"examples/promise/09_transfer_events/README.md","ref":"examples/promise/09_transfer_events/README.md","articles":[]},{"title":"Upgrade via sudo","level":"3.1.9","depth":2,"path":"examples/promise/10_upgrade_chain/README.md","ref":"examples/promise/10_upgrade_chain/README.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":"examples/promise/01_simple_connect/README.md","mtime":"2019-01-22T22:13:44.152Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":"../../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="../05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="../04_unsubscribe/">
|
||||
|
||||
<a href="../04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../05_read_storage/">
|
||||
|
||||
<a href="../05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="../06_make_transfer/">
|
||||
|
||||
<a href="../07_transfer_dots/">
|
||||
<a href="../06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="../08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="../08_system_events/">
|
||||
|
||||
<a href="../08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="../09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="../09_transfer_events/">
|
||||
|
||||
<a href="../09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="../10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="../10_upgrade_chain/">
|
||||
|
||||
<a href="../10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="../../rx/">
|
||||
|
||||
<a href="../../rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="../../rx/01_simple_connect/">
|
||||
|
||||
<a href="../../rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="../../rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="../../rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="../../rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="../../rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="../../rx/04_unsubscribe/">
|
||||
|
||||
<a href="../../rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="../../rx/05_read_storage/">
|
||||
|
||||
<a href="../../rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="../../rx/06_make_transfer/">
|
||||
|
||||
<a href="../../rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="../../rx/08_system_events/">
|
||||
|
||||
<a href="../../rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="../../rx/09_transfer_events/">
|
||||
|
||||
<a href="../../rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="../../rx/10_upgrade_chain/">
|
||||
|
||||
<a href="../../rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2002,13 +2151,9 @@
|
||||
  <span class="sunlight-comment">// Subscribe to the new headers on-chain. The callback is fired when new headers</span>
|
||||
  <span class="sunlight-comment">// are found, the call itself returns a promise with a subscription that can be</span>
|
||||
  <span class="sunlight-comment">// used to unsubscribe from the newHead subscription</span>
|
||||
  <span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">subscriptionId</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">await</span> <span class="sunlight-ident">api</span><span class="sunlight-operator">.</span><span class="sunlight-ident">rpc</span><span class="sunlight-operator">.</span><span class="sunlight-ident">chain</span><span class="sunlight-operator">.</span><span class="sunlight-ident">subscribeNewHead</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">header</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-punctuation">`</span><span class="sunlight-ident">best</span> <span class="sunlight-punctuation">#</span><span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">header</span><span class="sunlight-operator">.</span><span class="sunlight-ident">blockNumber</span><span class="sunlight-punctuation">}</span><span class="sunlight-punctuation">`</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
  <span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">unsubscribe</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">await</span> <span class="sunlight-ident">api</span><span class="sunlight-operator">.</span><span class="sunlight-ident">rpc</span><span class="sunlight-operator">.</span><span class="sunlight-ident">chain</span><span class="sunlight-operator">.</span><span class="sunlight-ident">subscribeNewHead</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">header</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-punctuation">`</span><span class="sunlight-ident">Chain</span> <span class="sunlight-ident">is</span> <span class="sunlight-ident">at</span> <span class="sunlight-ident">block</span><span class="sunlight-operator">:</span> <span class="sunlight-punctuation">#</span><span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">header</span><span class="sunlight-operator">.</span><span class="sunlight-ident">blockNumber</span><span class="sunlight-punctuation">}</span><span class="sunlight-punctuation">`</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
  <span class="sunlight-punctuation">}</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
|
||||
  <span class="sunlight-comment">// Id for the subscription, we can cleanup and unsubscribe via</span>
|
||||
  <span class="sunlight-comment">// `api.chain.newHead.unsubscribe(subscriptionId)`</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-punctuation">`</span><span class="sunlight-ident">subsciptionId</span><span class="sunlight-operator">:</span> <span class="sunlight-ident">$</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 class="sunlight-punctuation">;</span>
|
||||
<span class="sunlight-punctuation">}</span>
|
||||
|
||||
<span class="sunlight-ident">main</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span><span class="sunlight-operator">.</span><span class="sunlight-keyword">catch</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">console</span><span class="sunlight-operator">.</span><span class="sunlight-ident">error</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
@@ -2056,7 +2201,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Listen to blocks","level":"3.1.2","depth":2,"next":{"title":"Listen to balance change","level":"3.1.3","depth":2,"path":"examples/promise/03_listen_to_balance_change/README.md","ref":"examples/promise/03_listen_to_balance_change/README.md","articles":[]},"previous":{"title":"Simple connect","level":"3.1.1","depth":2,"path":"examples/promise/01_simple_connect/README.md","ref":"examples/promise/01_simple_connect/README.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":"examples/promise/02_listen_to_blocks/README.md","mtime":"2019-01-17T16:15:44.321Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":"../../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Listen to blocks","level":"3.1.2","depth":2,"next":{"title":"Listen to balance change","level":"3.1.3","depth":2,"path":"examples/promise/03_listen_to_balance_change/README.md","ref":"examples/promise/03_listen_to_balance_change/README.md","articles":[]},"previous":{"title":"Simple connect","level":"3.1.1","depth":2,"path":"examples/promise/01_simple_connect/README.md","ref":"examples/promise/01_simple_connect/README.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":"examples/promise/02_listen_to_blocks/README.md","mtime":"2019-01-22T22:13:44.152Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":"../../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<link rel="shortcut icon" href="../../../gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="../05_read_storage/" />
|
||||
<link rel="next" href="../04_unsubscribe/" />
|
||||
|
||||
|
||||
<link rel="prev" href="../02_listen_to_blocks/" />
|
||||
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="../05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="../04_unsubscribe/">
|
||||
|
||||
<a href="../04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../05_read_storage/">
|
||||
|
||||
<a href="../05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="../06_make_transfer/">
|
||||
|
||||
<a href="../07_transfer_dots/">
|
||||
<a href="../06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="../08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="../08_system_events/">
|
||||
|
||||
<a href="../08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="../09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="../09_transfer_events/">
|
||||
|
||||
<a href="../09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="../10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="../10_upgrade_chain/">
|
||||
|
||||
<a href="../10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="../../rx/">
|
||||
|
||||
<a href="../../rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="../../rx/01_simple_connect/">
|
||||
|
||||
<a href="../../rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="../../rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="../../rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="../../rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="../../rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="../../rx/04_unsubscribe/">
|
||||
|
||||
<a href="../../rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="../../rx/05_read_storage/">
|
||||
|
||||
<a href="../../rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="../../rx/06_make_transfer/">
|
||||
|
||||
<a href="../../rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="../../rx/08_system_events/">
|
||||
|
||||
<a href="../../rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="../../rx/09_transfer_events/">
|
||||
|
||||
<a href="../../rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="../../rx/10_upgrade_chain/">
|
||||
|
||||
<a href="../../rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -1988,7 +2137,7 @@
|
||||
|
||||
<h1 id="listen-to-balance-changes">Listen to balance changes</h1>
|
||||
<p>This example shows how to instantiate a Polkadot API object and use it to connect to a node and retrieve balance updates.</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-comment">// Import the Api</span>
|
||||
<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-comment">// Import the API</span>
|
||||
<span class="sunlight-reservedWord">const</span> <span class="sunlight-punctuation">{</span> <span class="sunlight-ident">ApiPromise</span> <span class="sunlight-punctuation">}</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">require</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'@polkadot/api'</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
|
||||
<span class="sunlight-comment">// Known account we want to use (available on dev chain, with funds)</span>
|
||||
@@ -2002,7 +2151,7 @@
|
||||
  <span class="sunlight-comment">// that resolves to the current on-chain value</span>
|
||||
  <span class="sunlight-ident">let</span> <span class="sunlight-ident">previous</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">await</span> <span class="sunlight-ident">api</span><span class="sunlight-operator">.</span><span class="sunlight-ident">query</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-ident">Alice</span><span class="sunlight-punctuation">)</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-punctuation">`</span><span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">Alice</span><span class="sunlight-punctuation">}</span> <span class="sunlight-ident">has</span> <span class="sunlight-ident">a</span> <span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">previous</span><span class="sunlight-punctuation">}</span> <span class="sunlight-ident">balance</span><span class="sunlight-punctuation">`</span><span class="sunlight-punctuation">)</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-punctuation">`</span><span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">Alice</span><span class="sunlight-punctuation">}</span> <span class="sunlight-ident">has</span> <span class="sunlight-ident">a</span> <span class="sunlight-ident">balance</span> <span class="sunlight-ident">of</span> <span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">previous</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">console</span><span class="sunlight-operator">.</span><span class="sunlight-ident">log</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">`</span><span class="sunlight-ident">You</span> <span class="sunlight-ident">may</span> <span class="sunlight-ident">leave</span> <span class="sunlight-keyword">this</span> <span class="sunlight-ident">example</span> <span class="sunlight-ident">running</span> <span class="sunlight-ident">and</span> <span class="sunlight-ident">start</span> <span class="sunlight-ident">example</span> <span class="sunlight-number">06</span> <span class="sunlight-ident">or</span> <span class="sunlight-ident">transfer</span> <span class="sunlight-ident">any</span> <span class="sunlight-ident">value</span> <span class="sunlight-ident">to</span> <span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">Alice</span><span class="sunlight-punctuation">}</span><span class="sunlight-punctuation">`</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
|
||||
  <span class="sunlight-comment">// Here we subscribe to any balance changes and update the on-screen value</span>
|
||||
@@ -2012,13 +2161,10 @@
|
||||
|
||||
    <span class="sunlight-comment">// Only display positive value changes (Since we are pulling `previous` above already,</span>
|
||||
    <span class="sunlight-comment">// the initial balance change will also be zero)</span>
|
||||
    <span class="sunlight-keyword">if</span> <span class="sunlight-punctuation">(</span><span class="sunlight-ident">change</span><span class="sunlight-operator">.</span><span class="sunlight-ident">isZero</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">)</span> <span class="sunlight-punctuation">{</span>
|
||||
      <span class="sunlight-keyword">return</span><span class="sunlight-punctuation">;</span>
|
||||
    <span class="sunlight-keyword">if</span> <span class="sunlight-punctuation">(</span><span class="sunlight-operator">!</span><span class="sunlight-ident">change</span><span class="sunlight-operator">.</span><span class="sunlight-ident">isZero</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">previous</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">current</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-punctuation">`</span><span class="sunlight-ident">New</span> <span class="sunlight-ident">balance</span> <span class="sunlight-ident">change</span> <span class="sunlight-ident">of</span><span class="sunlight-operator">:</span> <span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">change</span><span class="sunlight-punctuation">}</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">previous</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">current</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-punctuation">`</span><span class="sunlight-ident">Balance</span> <span class="sunlight-ident">of</span> <span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">Alice</span><span class="sunlight-punctuation">}</span><span class="sunlight-operator">:</span> <span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">current</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">change</span><span class="sunlight-punctuation">}</span> <span class="sunlight-ident">change</span><span class="sunlight-punctuation">`</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
  <span class="sunlight-punctuation">}</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
<span class="sunlight-punctuation">}</span>
|
||||
|
||||
@@ -2056,7 +2202,7 @@
|
||||
</a>
|
||||
|
||||
|
||||
<a href="../05_read_storage/" class="navigation navigation-next " aria-label="Next page: Read chain state">
|
||||
<a href="../04_unsubscribe/" class="navigation navigation-next " aria-label="Next page: Unsubscribe from listening">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
@@ -2067,7 +2213,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Listen to balance change","level":"3.1.3","depth":2,"next":{"title":"Read chain state","level":"3.1.4","depth":2,"path":"examples/promise/05_read_storage/README.md","ref":"examples/promise/05_read_storage/README.md","articles":[]},"previous":{"title":"Listen to blocks","level":"3.1.2","depth":2,"path":"examples/promise/02_listen_to_blocks/README.md","ref":"examples/promise/02_listen_to_blocks/README.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":"examples/promise/03_listen_to_balance_change/README.md","mtime":"2019-01-17T16:15:44.321Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":"../../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Listen to balance change","level":"3.1.3","depth":2,"next":{"title":"Unsubscribe from listening","level":"3.1.4","depth":2,"path":"examples/promise/04_unsubscribe/README.md","ref":"examples/promise/04_unsubscribe/README.md","articles":[]},"previous":{"title":"Listen to blocks","level":"3.1.2","depth":2,"path":"examples/promise/02_listen_to_blocks/README.md","ref":"examples/promise/02_listen_to_blocks/README.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":"examples/promise/03_listen_to_balance_change/README.md","mtime":"2019-01-22T22:13:44.152Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":"../../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -61,10 +61,10 @@
|
||||
<link rel="shortcut icon" href="../../../gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="../07_transfer_dots/" />
|
||||
<link rel="next" href="../06_make_transfer/" />
|
||||
|
||||
|
||||
<link rel="prev" href="../03_listen_to_balance_change/" />
|
||||
<link rel="prev" href="../04_unsubscribe/" />
|
||||
|
||||
|
||||
</head>
|
||||
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="3.1.4" data-path="./">
|
||||
<li class="chapter " data-level="3.1.4" data-path="../04_unsubscribe/">
|
||||
|
||||
<a href="../04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="3.1.5" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="../06_make_transfer/">
|
||||
|
||||
<a href="../07_transfer_dots/">
|
||||
<a href="../06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="../08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="../08_system_events/">
|
||||
|
||||
<a href="../08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="../09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="../09_transfer_events/">
|
||||
|
||||
<a href="../09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="../10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="../10_upgrade_chain/">
|
||||
|
||||
<a href="../10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="../../rx/">
|
||||
|
||||
<a href="../../rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="../../rx/01_simple_connect/">
|
||||
|
||||
<a href="../../rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="../../rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="../../rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="../../rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="../../rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="../../rx/04_unsubscribe/">
|
||||
|
||||
<a href="../../rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="../../rx/05_read_storage/">
|
||||
|
||||
<a href="../../rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="../../rx/06_make_transfer/">
|
||||
|
||||
<a href="../../rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="../../rx/08_system_events/">
|
||||
|
||||
<a href="../../rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="../../rx/09_transfer_events/">
|
||||
|
||||
<a href="../../rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="../../rx/10_upgrade_chain/">
|
||||
|
||||
<a href="../../rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2008,17 +2157,20 @@
|
||||
  <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-punctuation">`</span><span class="sunlight-ident">accountNonce</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">Alice</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">accountNonce</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">console</span><span class="sunlight-operator">.</span><span class="sunlight-ident">log</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">`</span><span class="sunlight-ident">blockPeriod</span> <span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">blockPeriod</span><span class="sunlight-operator">.</span><span class="sunlight-ident">toNumber</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">}</span> <span class="sunlight-ident">seconds</span><span class="sunlight-punctuation">`</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
|
||||
  <span class="sunlight-comment">// Retrieve the balances for all validators</span>
|
||||
  <span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">validatorBalances</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">await</span> <span class="sunlight-ident">Promise</span><span class="sunlight-operator">.</span><span class="sunlight-ident">all</span><span class="sunlight-punctuation">(</span>
|
||||
    <span class="sunlight-ident">validators</span><span class="sunlight-operator">.</span><span class="sunlight-ident">map</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">authorityId</span><span class="sunlight-punctuation">)</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span>
|
||||
      <span class="sunlight-ident">api</span><span class="sunlight-operator">.</span><span class="sunlight-ident">query</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-ident">authorityId</span><span class="sunlight-punctuation">)</span>
|
||||
    <span class="sunlight-punctuation">)</span>
|
||||
  <span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
  <span class="sunlight-keyword">if</span> <span class="sunlight-punctuation">(</span><span class="sunlight-ident">validators</span> <span class="sunlight-operator">&&</span> <span class="sunlight-ident">validators</span><span class="sunlight-operator">.</span><span class="sunlight-ident">length</span> <span class="sunlight-operator">></span> <span class="sunlight-number">0</span><span class="sunlight-punctuation">)</span> <span class="sunlight-punctuation">{</span>
|
||||
    <span class="sunlight-comment">// Retrieve the balances for all validators</span>
|
||||
    <span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">validatorBalances</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">await</span> <span class="sunlight-ident">Promise</span><span class="sunlight-operator">.</span><span class="sunlight-ident">all</span><span class="sunlight-punctuation">(</span>
|
||||
      <span class="sunlight-ident">validators</span><span class="sunlight-operator">.</span><span class="sunlight-ident">map</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">authorityId</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span>
|
||||
        <span class="sunlight-ident">api</span><span class="sunlight-operator">.</span><span class="sunlight-ident">query</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-ident">authorityId</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">console</span><span class="sunlight-operator">.</span><span class="sunlight-ident">log</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'validators'</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">validators</span><span class="sunlight-operator">.</span><span class="sunlight-ident">map</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">authorityId</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">index</span><span class="sunlight-punctuation">)</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span> <span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">{</span>
|
||||
    <span class="sunlight-ident">address</span><span class="sunlight-operator">:</span> <span class="sunlight-ident">authorityId</span><span class="sunlight-operator">.</span><span class="sunlight-ident">toString</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">,</span>
|
||||
    <span class="sunlight-ident">balance</span><span class="sunlight-operator">:</span> <span class="sunlight-ident">validatorBalances</span><span class="sunlight-punctuation">[</span><span class="sunlight-ident">index</span><span class="sunlight-punctuation">]</span><span class="sunlight-operator">.</span><span class="sunlight-ident">toString</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span>
|
||||
  <span class="sunlight-punctuation">}</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
    <span class="sunlight-comment">// Print out the authorityIds and balances of all validators</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">'validators'</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">validators</span><span class="sunlight-operator">.</span><span class="sunlight-ident">map</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">authorityId</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">index</span><span class="sunlight-punctuation">)</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span> <span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">{</span>
|
||||
      <span class="sunlight-ident">address</span><span class="sunlight-operator">:</span> <span class="sunlight-ident">authorityId</span><span class="sunlight-operator">.</span><span class="sunlight-ident">toString</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">,</span>
|
||||
      <span class="sunlight-ident">balance</span><span class="sunlight-operator">:</span> <span class="sunlight-ident">validatorBalances</span><span class="sunlight-punctuation">[</span><span class="sunlight-ident">index</span><span class="sunlight-punctuation">]</span><span class="sunlight-operator">.</span><span class="sunlight-ident">toString</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span>
|
||||
    <span class="sunlight-punctuation">}</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">)</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">main</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span><span class="sunlight-operator">.</span><span class="sunlight-keyword">catch</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">console</span><span class="sunlight-operator">.</span><span class="sunlight-ident">error</span><span class="sunlight-punctuation">)</span><span class="sunlight-operator">.</span><span class="sunlight-keyword">finally</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">_</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span> <span class="sunlight-ident">process</span><span class="sunlight-operator">.</span><span class="sunlight-ident">exit</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
@@ -2050,12 +2202,12 @@
|
||||
|
||||
|
||||
|
||||
<a href="../03_listen_to_balance_change/" class="navigation navigation-prev " aria-label="Previous page: Listen to balance change">
|
||||
<a href="../04_unsubscribe/" class="navigation navigation-prev " aria-label="Previous page: Unsubscribe from listening">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a href="../07_transfer_dots/" class="navigation navigation-next " aria-label="Next page: Make a transfer">
|
||||
<a href="../06_make_transfer/" class="navigation navigation-next " aria-label="Next page: Make a transfer">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
@@ -2066,7 +2218,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Read chain state","level":"3.1.4","depth":2,"next":{"title":"Make a transfer","level":"3.1.5","depth":2,"path":"examples/promise/07_transfer_dots/README.md","ref":"examples/promise/07_transfer_dots/README.md","articles":[]},"previous":{"title":"Listen to balance change","level":"3.1.3","depth":2,"path":"examples/promise/03_listen_to_balance_change/README.md","ref":"examples/promise/03_listen_to_balance_change/README.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":"examples/promise/05_read_storage/README.md","mtime":"2019-01-17T16:15:44.321Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":"../../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Read chain state","level":"3.1.5","depth":2,"next":{"title":"Make a transfer","level":"3.1.6","depth":2,"path":"examples/promise/06_make_transfer/README.md","ref":"examples/promise/06_make_transfer/README.md","articles":[]},"previous":{"title":"Unsubscribe from listening","level":"3.1.4","depth":2,"path":"examples/promise/04_unsubscribe/README.md","ref":"examples/promise/04_unsubscribe/README.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":"examples/promise/05_read_storage/README.md","mtime":"2019-01-22T22:13:44.152Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":"../../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -64,7 +64,7 @@
|
||||
<link rel="next" href="../09_transfer_events/" />
|
||||
|
||||
|
||||
<link rel="prev" href="../07_transfer_dots/" />
|
||||
<link rel="prev" href="../06_make_transfer/" />
|
||||
|
||||
|
||||
</head>
|
||||
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="../05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="../04_unsubscribe/">
|
||||
|
||||
<a href="../04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../05_read_storage/">
|
||||
|
||||
<a href="../05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="../06_make_transfer/">
|
||||
|
||||
<a href="../07_transfer_dots/">
|
||||
<a href="../06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="3.1.6" data-path="./">
|
||||
<li class="chapter active" data-level="3.1.7" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="../09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="../09_transfer_events/">
|
||||
|
||||
<a href="../09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="../10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="../10_upgrade_chain/">
|
||||
|
||||
<a href="../10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="../../rx/">
|
||||
|
||||
<a href="../../rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="../../rx/01_simple_connect/">
|
||||
|
||||
<a href="../../rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="../../rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="../../rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="../../rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="../../rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="../../rx/04_unsubscribe/">
|
||||
|
||||
<a href="../../rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="../../rx/05_read_storage/">
|
||||
|
||||
<a href="../../rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="../../rx/06_make_transfer/">
|
||||
|
||||
<a href="../../rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="../../rx/08_system_events/">
|
||||
|
||||
<a href="../../rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="../../rx/09_transfer_events/">
|
||||
|
||||
<a href="../../rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="../../rx/10_upgrade_chain/">
|
||||
|
||||
<a href="../../rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2049,7 +2198,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="../07_transfer_dots/" class="navigation navigation-prev " aria-label="Previous page: Make a transfer">
|
||||
<a href="../06_make_transfer/" class="navigation navigation-prev " aria-label="Previous page: Make a transfer">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
|
||||
@@ -2065,7 +2214,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Display system events","level":"3.1.6","depth":2,"next":{"title":"Transaction with events","level":"3.1.7","depth":2,"path":"examples/promise/09_transfer_events/README.md","ref":"examples/promise/09_transfer_events/README.md","articles":[]},"previous":{"title":"Make a transfer","level":"3.1.5","depth":2,"path":"examples/promise/07_transfer_dots/README.md","ref":"examples/promise/07_transfer_dots/README.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":"examples/promise/08_system_events/README.md","mtime":"2019-01-17T16:15:44.321Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":"../../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Display system events","level":"3.1.7","depth":2,"next":{"title":"Transaction with events","level":"3.1.8","depth":2,"path":"examples/promise/09_transfer_events/README.md","ref":"examples/promise/09_transfer_events/README.md","articles":[]},"previous":{"title":"Make a transfer","level":"3.1.6","depth":2,"path":"examples/promise/06_make_transfer/README.md","ref":"examples/promise/06_make_transfer/README.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":"examples/promise/08_system_events/README.md","mtime":"2019-01-22T22:13:44.156Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":"../../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="../05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="../04_unsubscribe/">
|
||||
|
||||
<a href="../04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../05_read_storage/">
|
||||
|
||||
<a href="../05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="../06_make_transfer/">
|
||||
|
||||
<a href="../07_transfer_dots/">
|
||||
<a href="../06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="../08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="../08_system_events/">
|
||||
|
||||
<a href="../08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="3.1.7" data-path="./">
|
||||
<li class="chapter active" data-level="3.1.8" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="../10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="../10_upgrade_chain/">
|
||||
|
||||
<a href="../10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="../../rx/">
|
||||
|
||||
<a href="../../rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="../../rx/01_simple_connect/">
|
||||
|
||||
<a href="../../rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="../../rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="../../rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="../../rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="../../rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="../../rx/04_unsubscribe/">
|
||||
|
||||
<a href="../../rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="../../rx/05_read_storage/">
|
||||
|
||||
<a href="../../rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="../../rx/06_make_transfer/">
|
||||
|
||||
<a href="../../rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="../../rx/08_system_events/">
|
||||
|
||||
<a href="../../rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="../../rx/09_transfer_events/">
|
||||
|
||||
<a href="../../rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="../../rx/10_upgrade_chain/">
|
||||
|
||||
<a href="../../rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2003,6 +2152,8 @@
|
||||
|
||||
<span class="sunlight-ident">async</span> <span class="sunlight-keyword">function</span> <span class="sunlight-named-ident">main</span> <span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span> <span class="sunlight-punctuation">{</span>
|
||||
  <span class="sunlight-comment">// create an instance of our testign keyring</span>
|
||||
  <span class="sunlight-comment">// If you're using ES6 module imports instead of require, just change this line to:</span>
|
||||
  <span class="sunlight-comment">// const keyring = testKeyring();</span>
|
||||
  <span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">keyring</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">testKeyring</span><span class="sunlight-operator">.</span><span class="sunlight-keyword">default</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
|
||||
  <span class="sunlight-comment">// Create the API and wait until ready</span>
|
||||
@@ -2027,7 +2178,7 @@
|
||||
      <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">'Transaction status:'</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">type</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
|
||||
      <span class="sunlight-keyword">if</span> <span class="sunlight-punctuation">(</span><span class="sunlight-ident">type</span> <span class="sunlight-operator">===</span> <span class="sunlight-string">'Finalised'</span><span class="sunlight-punctuation">)</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">'Completed at block hash'</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">status</span><span class="sunlight-operator">.</span><span class="sunlight-ident">value</span><span class="sunlight-operator">.</span><span class="sunlight-ident">toHex</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">console</span><span class="sunlight-operator">.</span><span class="sunlight-ident">log</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'Completed at block hash'</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">status</span><span class="sunlight-operator">.</span><span class="sunlight-ident">asFinalised</span><span class="sunlight-operator">.</span><span class="sunlight-ident">toHex</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">console</span><span class="sunlight-operator">.</span><span class="sunlight-ident">log</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'Events:'</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
|
||||
        <span class="sunlight-ident">events</span><span class="sunlight-operator">.</span><span class="sunlight-ident">forEach</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">{</span> <span class="sunlight-ident">phase</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">event</span><span class="sunlight-operator">:</span> <span class="sunlight-punctuation">{</span> <span class="sunlight-ident">data</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">method</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">section</span> <span class="sunlight-punctuation">}</span> <span class="sunlight-punctuation">}</span><span class="sunlight-punctuation">)</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span> <span class="sunlight-punctuation">{</span>
|
||||
@@ -2084,7 +2235,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Transaction with events","level":"3.1.7","depth":2,"next":{"title":"Upgrade via sudo","level":"3.1.8","depth":2,"path":"examples/promise/10_upgrade_chain/README.md","ref":"examples/promise/10_upgrade_chain/README.md","articles":[]},"previous":{"title":"Display system events","level":"3.1.6","depth":2,"path":"examples/promise/08_system_events/README.md","ref":"examples/promise/08_system_events/README.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":"examples/promise/09_transfer_events/README.md","mtime":"2019-01-17T16:15:44.325Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":"../../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Transaction with events","level":"3.1.8","depth":2,"next":{"title":"Upgrade via sudo","level":"3.1.9","depth":2,"path":"examples/promise/10_upgrade_chain/README.md","ref":"examples/promise/10_upgrade_chain/README.md","articles":[]},"previous":{"title":"Display system events","level":"3.1.7","depth":2,"path":"examples/promise/08_system_events/README.md","ref":"examples/promise/08_system_events/README.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":"examples/promise/09_transfer_events/README.md","mtime":"2019-01-22T22:13:44.156Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":"../../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<link rel="shortcut icon" href="../../../gitbook/images/favicon.ico" type="image/x-icon">
|
||||
|
||||
|
||||
<link rel="next" href="../../../types/classes/_accountid_.accountid.html" />
|
||||
<link rel="next" href="../../rx/" />
|
||||
|
||||
|
||||
<link rel="prev" href="../09_transfer_events/" />
|
||||
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="../05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="../04_unsubscribe/">
|
||||
|
||||
<a href="../04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../05_read_storage/">
|
||||
|
||||
<a href="../05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="../06_make_transfer/">
|
||||
|
||||
<a href="../07_transfer_dots/">
|
||||
<a href="../06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="../08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="../08_system_events/">
|
||||
|
||||
<a href="../08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="../09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="../09_transfer_events/">
|
||||
|
||||
<a href="../09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter active" data-level="3.1.8" data-path="./">
|
||||
<li class="chapter active" data-level="3.1.9" data-path="./">
|
||||
|
||||
<a href="./">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="../../rx/">
|
||||
|
||||
<a href="../../rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="../../rx/01_simple_connect/">
|
||||
|
||||
<a href="../../rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="../../rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="../../rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="../../rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="../../rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="../../rx/04_unsubscribe/">
|
||||
|
||||
<a href="../../rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="../../rx/05_read_storage/">
|
||||
|
||||
<a href="../../rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="../../rx/06_make_transfer/">
|
||||
|
||||
<a href="../../rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="../../rx/08_system_events/">
|
||||
|
||||
<a href="../../rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="../../rx/09_transfer_events/">
|
||||
|
||||
<a href="../../rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="../../rx/10_upgrade_chain/">
|
||||
|
||||
<a href="../../rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -1995,9 +2144,6 @@
|
||||
<span class="sunlight-comment">// import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie)</span>
|
||||
<span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">testKeyring</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">require</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'@polkadot/keyring/testing'</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
|
||||
<span class="sunlight-comment">// utility functions</span>
|
||||
<span class="sunlight-reservedWord">const</span> <span class="sunlight-punctuation">{</span> <span class="sunlight-ident">compactAddLength</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">hexToU8a</span> <span class="sunlight-punctuation">}</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">require</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'@polkadot/util'</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
|
||||
<span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">fs</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">require</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'fs'</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
|
||||
<span class="sunlight-ident">async</span> <span class="sunlight-keyword">function</span> <span class="sunlight-named-ident">main</span> <span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">)</span> <span class="sunlight-punctuation">{</span>
|
||||
@@ -2028,14 +2174,13 @@
|
||||
  <span class="sunlight-comment">// preform the actual chain upgrade via the sudo module</span>
|
||||
  <span class="sunlight-ident">api</span><span class="sunlight-operator">.</span><span class="sunlight-ident">tx</span><span class="sunlight-operator">.</span><span class="sunlight-ident">sudo</span>
|
||||
    <span class="sunlight-operator">.</span><span class="sunlight-ident">sudo</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">proposal</span><span class="sunlight-punctuation">)</span>
|
||||
    <span class="sunlight-operator">.</span><span class="sunlight-ident">sign</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">adminPair</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">adminNonce</span><span class="sunlight-punctuation">)</span>
|
||||
    <span class="sunlight-operator">.</span><span class="sunlight-ident">send</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">{</span> <span class="sunlight-ident">events</span> <span class="sunlight-operator">=</span> <span class="sunlight-punctuation">[</span><span class="sunlight-punctuation">]</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">status</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">type</span> <span class="sunlight-punctuation">}</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">'Transaction status:'</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">type</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
    <span class="sunlight-operator">.</span><span class="sunlight-ident">signAndSend</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">adminPair</span><span class="sunlight-punctuation">,</span> <span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">{</span> <span class="sunlight-ident">events</span> <span class="sunlight-operator">=</span> <span class="sunlight-punctuation">[</span><span class="sunlight-punctuation">]</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">status</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">type</span> <span class="sunlight-punctuation">}</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">'Proposal status:'</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">type</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
|
||||
      <span class="sunlight-keyword">if</span> <span class="sunlight-punctuation">(</span><span class="sunlight-ident">type</span> <span class="sunlight-operator">===</span> <span class="sunlight-string">'Finalised'</span><span class="sunlight-punctuation">)</span> <span class="sunlight-punctuation">{</span>
|
||||
        <span class="sunlight-ident">console</span><span class="sunlight-operator">.</span><span class="sunlight-ident">error</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'You have just upgraded your chain'</span><span class="sunlight-punctuation">)</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">'Completed at block hash'</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">status</span><span class="sunlight-operator">.</span><span class="sunlight-ident">value</span><span class="sunlight-operator">.</span><span class="sunlight-ident">toHex</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">console</span><span class="sunlight-operator">.</span><span class="sunlight-ident">log</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'Completed at block hash'</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">status</span><span class="sunlight-operator">.</span><span class="sunlight-ident">asFinalised</span><span class="sunlight-operator">.</span><span class="sunlight-ident">toHex</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">console</span><span class="sunlight-operator">.</span><span class="sunlight-ident">log</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'Events:'</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
|
||||
        <span class="sunlight-ident">events</span><span class="sunlight-operator">.</span><span class="sunlight-ident">forEach</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">{</span> <span class="sunlight-ident">phase</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">event</span><span class="sunlight-operator">:</span> <span class="sunlight-punctuation">{</span> <span class="sunlight-ident">data</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">method</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">section</span> <span class="sunlight-punctuation">}</span> <span class="sunlight-punctuation">}</span><span class="sunlight-punctuation">)</span> <span class="sunlight-operator">=</span><span class="sunlight-operator">></span> <span class="sunlight-punctuation">{</span>
|
||||
@@ -2084,7 +2229,7 @@
|
||||
</a>
|
||||
|
||||
|
||||
<a href="../../../types/classes/_accountid_.accountid.html" class="navigation navigation-next " aria-label="Next page: hidden">
|
||||
<a href="../../rx/" class="navigation navigation-next " aria-label="Next page: ApiRx">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
@@ -2095,7 +2240,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Upgrade via sudo","level":"3.1.8","depth":2,"next":{"title":"hidden","level":"4.1","depth":1,"path":"types/classes/_accountid_.accountid.md","ref":"types/classes/_accountid_.accountid.md","articles":[]},"previous":{"title":"Transaction with events","level":"3.1.7","depth":2,"path":"examples/promise/09_transfer_events/README.md","ref":"examples/promise/09_transfer_events/README.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":"examples/promise/10_upgrade_chain/README.md","mtime":"2019-01-17T16:15:44.325Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":"../../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Upgrade via sudo","level":"3.1.9","depth":2,"next":{"title":"ApiRx","level":"3.2","depth":1,"path":"examples/rx/README.md","ref":"examples/rx/README.md","articles":[{"title":"Simple connect","level":"3.2.1","depth":2,"path":"examples/rx/01_simple_connect/README.md","ref":"examples/rx/01_simple_connect/README.md","articles":[]},{"title":"Listen to blocks","level":"3.2.2","depth":2,"path":"examples/rx/02_listen_to_blocks/README.md","ref":"examples/rx/02_listen_to_blocks/README.md","articles":[]},{"title":"Listen to balance change","level":"3.2.3","depth":2,"path":"examples/rx/03_listen_to_balance_change/README.md","ref":"examples/rx/03_listen_to_balance_change/README.md","articles":[]},{"title":"Unsubscribe from listening","level":"3.2.4","depth":2,"path":"examples/rx/04_unsubscribe/README.md","ref":"examples/rx/04_unsubscribe/README.md","articles":[]},{"title":"Read chain state","level":"3.2.5","depth":2,"path":"examples/rx/05_read_storage/README.md","ref":"examples/rx/05_read_storage/README.md","articles":[]},{"title":"Make a transfer","level":"3.2.6","depth":2,"path":"examples/rx/06_make_transfer/README.md","ref":"examples/rx/06_make_transfer/README.md","articles":[]},{"title":"Display system events","level":"3.2.7","depth":2,"path":"examples/rx/08_system_events/README.md","ref":"examples/rx/08_system_events/README.md","articles":[]},{"title":"Transaction with events","level":"3.2.8","depth":2,"path":"examples/rx/09_transfer_events/README.md","ref":"examples/rx/09_transfer_events/README.md","articles":[]},{"title":"Upgrade via sudo","level":"3.2.9","depth":2,"path":"examples/rx/10_upgrade_chain/README.md","ref":"examples/rx/10_upgrade_chain/README.md","articles":[]}]},"previous":{"title":"Transaction with events","level":"3.1.8","depth":2,"path":"examples/promise/09_transfer_events/README.md","ref":"examples/promise/09_transfer_events/README.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":"examples/promise/10_upgrade_chain/README.md","mtime":"2019-01-22T22:13:44.156Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":"../../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="04_unsubscribe/">
|
||||
|
||||
<a href="04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="05_read_storage/">
|
||||
|
||||
<a href="05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="06_make_transfer/">
|
||||
|
||||
<a href="07_transfer_dots/">
|
||||
<a href="06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="08_system_events/">
|
||||
|
||||
<a href="08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="09_transfer_events/">
|
||||
|
||||
<a href="09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="10_upgrade_chain/">
|
||||
|
||||
<a href="10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="../rx/">
|
||||
|
||||
<a href="../rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="../rx/01_simple_connect/">
|
||||
|
||||
<a href="../rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="../rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="../rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="../rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="../rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="../rx/04_unsubscribe/">
|
||||
|
||||
<a href="../rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="../rx/05_read_storage/">
|
||||
|
||||
<a href="../rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="../rx/06_make_transfer/">
|
||||
|
||||
<a href="../rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="../rx/08_system_events/">
|
||||
|
||||
<a href="../rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="../rx/09_transfer_events/">
|
||||
|
||||
<a href="../rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="../rx/10_upgrade_chain/">
|
||||
|
||||
<a href="../rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2044,7 +2193,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"ApiPromise","level":"3.1","depth":1,"next":{"title":"Simple connect","level":"3.1.1","depth":2,"path":"examples/promise/01_simple_connect/README.md","ref":"examples/promise/01_simple_connect/README.md","articles":[]},"previous":{"title":"Events (runtime)","level":"2.4","depth":1,"path":"METHODS_EVENTS.md","ref":"METHODS_EVENTS.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":"examples/promise/README.md","mtime":"2019-01-17T16:15:44.329Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":"../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"ApiPromise","level":"3.1","depth":1,"next":{"title":"Simple connect","level":"3.1.1","depth":2,"path":"examples/promise/01_simple_connect/README.md","ref":"examples/promise/01_simple_connect/README.md","articles":[]},"previous":{"title":"Events (runtime)","level":"2.4","depth":1,"path":"METHODS_EVENTS.md","ref":"METHODS_EVENTS.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":"examples/promise/README.md","mtime":"2019-01-22T22:13:44.160Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":"../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+156
-7
@@ -328,7 +328,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="examples/promise/05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="examples/promise/04_unsubscribe/">
|
||||
|
||||
<a href="examples/promise/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="examples/promise/05_read_storage/">
|
||||
|
||||
<a href="examples/promise/05_read_storage/">
|
||||
|
||||
@@ -341,9 +354,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="examples/promise/07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="examples/promise/06_make_transfer/">
|
||||
|
||||
<a href="examples/promise/07_transfer_dots/">
|
||||
<a href="examples/promise/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -354,7 +367,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="examples/promise/08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="examples/promise/08_system_events/">
|
||||
|
||||
<a href="examples/promise/08_system_events/">
|
||||
|
||||
@@ -367,7 +380,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="examples/promise/09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="examples/promise/09_transfer_events/">
|
||||
|
||||
<a href="examples/promise/09_transfer_events/">
|
||||
|
||||
@@ -380,7 +393,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="examples/promise/10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="examples/promise/10_upgrade_chain/">
|
||||
|
||||
<a href="examples/promise/10_upgrade_chain/">
|
||||
|
||||
@@ -391,6 +404,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="examples/rx/">
|
||||
|
||||
<a href="examples/rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="examples/rx/01_simple_connect/">
|
||||
|
||||
<a href="examples/rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="examples/rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="examples/rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="examples/rx/04_unsubscribe/">
|
||||
|
||||
<a href="examples/rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="examples/rx/05_read_storage/">
|
||||
|
||||
<a href="examples/rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="examples/rx/06_make_transfer/">
|
||||
|
||||
<a href="examples/rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="examples/rx/08_system_events/">
|
||||
|
||||
<a href="examples/rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="examples/rx/09_transfer_events/">
|
||||
|
||||
<a href="examples/rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="examples/rx/10_upgrade_chain/">
|
||||
|
||||
<a href="examples/rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2037,7 +2186,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Introduction","level":"1.1","depth":1,"next":{"title":"api","level":"1.2","depth":1,"path":"api/README.md","ref":"api/README.md","articles":[{"title":"ApiPromise","level":"1.2.1","depth":2,"path":"api/classes/_promise_index_.apipromise.md","ref":"api/classes/_promise_index_.apipromise.md","articles":[]},{"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":"README.md","mtime":"2019-01-17T16:15:44.317Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":".","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Introduction","level":"1.1","depth":1,"next":{"title":"api","level":"1.2","depth":1,"path":"api/README.md","ref":"api/README.md","articles":[{"title":"ApiPromise","level":"1.2.1","depth":2,"path":"api/classes/_promise_index_.apipromise.md","ref":"api/classes/_promise_index_.apipromise.md","articles":[]},{"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":"README.md","mtime":"2019-01-22T22:13:44.152Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":".","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -38,7 +38,7 @@ const api = new Api(provider);
|
||||
|
||||
⊕ **new Rpc**(provider?: *`ProviderInterface`*): [Rpc](_index_.rpc.md)
|
||||
|
||||
*Defined in [index.ts:46](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/index.ts#L46)*
|
||||
*Defined in [index.ts:46](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/index.ts#L46)*
|
||||
|
||||
*__constructor__*: Default constructor for the Api Object
|
||||
|
||||
@@ -60,7 +60,7 @@ ___
|
||||
|
||||
**● _provider**: *`ProviderInterface`*
|
||||
|
||||
*Defined in [index.ts:42](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/index.ts#L42)*
|
||||
*Defined in [index.ts:42](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/index.ts#L42)*
|
||||
|
||||
___
|
||||
<a id="author"></a>
|
||||
@@ -71,7 +71,7 @@ ___
|
||||
|
||||
*Implementation of [RpcInterface](../interfaces/_types_.rpcinterface.md).[author](../interfaces/_types_.rpcinterface.md#author)*
|
||||
|
||||
*Defined in [index.ts:43](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/index.ts#L43)*
|
||||
*Defined in [index.ts:43](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/index.ts#L43)*
|
||||
|
||||
___
|
||||
<a id="chain"></a>
|
||||
@@ -82,7 +82,7 @@ ___
|
||||
|
||||
*Implementation of [RpcInterface](../interfaces/_types_.rpcinterface.md).[chain](../interfaces/_types_.rpcinterface.md#chain)*
|
||||
|
||||
*Defined in [index.ts:44](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/index.ts#L44)*
|
||||
*Defined in [index.ts:44](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/index.ts#L44)*
|
||||
|
||||
___
|
||||
<a id="state"></a>
|
||||
@@ -93,7 +93,7 @@ ___
|
||||
|
||||
*Implementation of [RpcInterface](../interfaces/_types_.rpcinterface.md).[state](../interfaces/_types_.rpcinterface.md#state)*
|
||||
|
||||
*Defined in [index.ts:45](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/index.ts#L45)*
|
||||
*Defined in [index.ts:45](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/index.ts#L45)*
|
||||
|
||||
___
|
||||
<a id="system"></a>
|
||||
@@ -104,7 +104,7 @@ ___
|
||||
|
||||
*Implementation of [RpcInterface](../interfaces/_types_.rpcinterface.md).[system](../interfaces/_types_.rpcinterface.md#system)*
|
||||
|
||||
*Defined in [index.ts:46](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/index.ts#L46)*
|
||||
*Defined in [index.ts:46](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/index.ts#L46)*
|
||||
|
||||
___
|
||||
|
||||
@@ -116,7 +116,7 @@ ___
|
||||
|
||||
▸ **signature**(__namedParameters: *`object`*): `string`
|
||||
|
||||
*Defined in [index.ts:79](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/index.ts#L79)*
|
||||
*Defined in [index.ts:79](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/index.ts#L79)*
|
||||
|
||||
*__name__*: signature
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
**● author**: *[RpcInterface$Section](../modules/_types_.md#rpcinterface_section)*
|
||||
|
||||
*Defined in [types.ts:17](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/types.ts#L17)*
|
||||
*Defined in [types.ts:17](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/types.ts#L17)*
|
||||
|
||||
___
|
||||
<a id="chain"></a>
|
||||
@@ -25,7 +25,7 @@ ___
|
||||
|
||||
**● chain**: *[RpcInterface$Section](../modules/_types_.md#rpcinterface_section)*
|
||||
|
||||
*Defined in [types.ts:18](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/types.ts#L18)*
|
||||
*Defined in [types.ts:18](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/types.ts#L18)*
|
||||
|
||||
___
|
||||
<a id="state"></a>
|
||||
@@ -34,7 +34,7 @@ ___
|
||||
|
||||
**● state**: *[RpcInterface$Section](../modules/_types_.md#rpcinterface_section)*
|
||||
|
||||
*Defined in [types.ts:19](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/types.ts#L19)*
|
||||
*Defined in [types.ts:19](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/types.ts#L19)*
|
||||
|
||||
___
|
||||
<a id="system"></a>
|
||||
@@ -43,7 +43,7 @@ ___
|
||||
|
||||
**● system**: *[RpcInterface$Section](../modules/_types_.md#rpcinterface_section)*
|
||||
|
||||
*Defined in [types.ts:20](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/types.ts#L20)*
|
||||
*Defined in [types.ts:20](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/types.ts#L20)*
|
||||
|
||||
___
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# Callable
|
||||
▸ **__call**(...params: *`Array`<`any`>*): `Promise`<`any`>
|
||||
|
||||
*Defined in [types.ts:5](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/types.ts#L5)*
|
||||
*Defined in [types.ts:5](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/types.ts#L5)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
**● subscription**: *`string`*
|
||||
|
||||
*Defined in [types.ts:8](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/types.ts#L8)*
|
||||
*Defined in [types.ts:8](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/types.ts#L8)*
|
||||
|
||||
___
|
||||
<a id="unsubscribe"></a>
|
||||
@@ -34,7 +34,7 @@ ___
|
||||
|
||||
**● unsubscribe**: *`function`*
|
||||
|
||||
*Defined in [types.ts:9](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/types.ts#L9)*
|
||||
*Defined in [types.ts:9](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/types.ts#L9)*
|
||||
|
||||
#### Type declaration
|
||||
▸(id: *`number`*): `Promise`<`any`>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
**Ƭ RpcInterface$Section**: *`object`*
|
||||
|
||||
*Defined in [types.ts:12](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-core/src/types.ts#L12)*
|
||||
*Defined in [types.ts:12](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-core/src/types.ts#L12)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
▸ **decodeResponse**(response: *[JsonRpcResponse](../modules/_types_.md#jsonrpcresponse)*): `any`
|
||||
|
||||
*Defined in [coder/index.ts:12](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/coder/index.ts#L12)*
|
||||
*Defined in [coder/index.ts:12](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/coder/index.ts#L12)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -29,7 +29,7 @@ ___
|
||||
|
||||
▸ **encodeJson**(method: *`string`*, params: *`any` | `Array`<`any`>*): `string`
|
||||
|
||||
*Defined in [coder/index.ts:33](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/coder/index.ts#L33)*
|
||||
*Defined in [coder/index.ts:33](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/coder/index.ts#L33)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -47,7 +47,7 @@ ___
|
||||
|
||||
▸ **encodeObject**(method: *`string`*, params: *`any` | `Array`<`any`>*): [JsonRpcRequest](../modules/_types_.md#jsonrpcrequest)
|
||||
|
||||
*Defined in [coder/index.ts:39](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/coder/index.ts#L39)*
|
||||
*Defined in [coder/index.ts:39](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/coder/index.ts#L39)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -65,7 +65,7 @@ ___
|
||||
|
||||
▸ **getId**(): `number`
|
||||
|
||||
*Defined in [coder/index.ts:48](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/coder/index.ts#L48)*
|
||||
*Defined in [coder/index.ts:48](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/coder/index.ts#L48)*
|
||||
|
||||
**Returns:** `number`
|
||||
|
||||
|
||||
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="../../examples/promise/05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="../../examples/promise/04_unsubscribe/">
|
||||
|
||||
<a href="../../examples/promise/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../../examples/promise/05_read_storage/">
|
||||
|
||||
<a href="../../examples/promise/05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../../examples/promise/07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="../../examples/promise/06_make_transfer/">
|
||||
|
||||
<a href="../../examples/promise/07_transfer_dots/">
|
||||
<a href="../../examples/promise/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="../../examples/promise/08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="../../examples/promise/08_system_events/">
|
||||
|
||||
<a href="../../examples/promise/08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="../../examples/promise/09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="../../examples/promise/09_transfer_events/">
|
||||
|
||||
<a href="../../examples/promise/09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="../../examples/promise/10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="../../examples/promise/10_upgrade_chain/">
|
||||
|
||||
<a href="../../examples/promise/10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="../../examples/rx/">
|
||||
|
||||
<a href="../../examples/rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="../../examples/rx/01_simple_connect/">
|
||||
|
||||
<a href="../../examples/rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="../../examples/rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="../../examples/rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="../../examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="../../examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="../../examples/rx/04_unsubscribe/">
|
||||
|
||||
<a href="../../examples/rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="../../examples/rx/05_read_storage/">
|
||||
|
||||
<a href="../../examples/rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="../../examples/rx/06_make_transfer/">
|
||||
|
||||
<a href="../../examples/rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="../../examples/rx/08_system_events/">
|
||||
|
||||
<a href="../../examples/rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="../../examples/rx/09_transfer_events/">
|
||||
|
||||
<a href="../../examples/rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="../../examples/rx/10_upgrade_chain/">
|
||||
|
||||
<a href="../../examples/rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2007,7 +2156,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/f5b3d58/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/9373e5d/packages/rpc-provider/src/http/index.ts#L40" target="_blank">http/index.ts:40</a></em></p>
|
||||
<p><strong>Parameters:</strong></p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -2033,7 +2182,7 @@
|
||||
<p><a id="hassubscriptions"></a></p>
|
||||
<h2 id="hassubscriptions">hasSubscriptions</h2>
|
||||
<p>gethasSubscriptions(): <code>boolean</code></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/http/index.ts#L55" target="_blank">http/index.ts:55</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/http/index.ts#L55" target="_blank">http/index.ts:55</a></em></p>
|
||||
<p><em><strong>summary</strong></em>: <code>true</code> when this provider supports subscriptions</p>
|
||||
<p><strong>Returns:</strong> <code>boolean</code></p>
|
||||
<hr>
|
||||
@@ -2042,7 +2191,7 @@
|
||||
<h2 id="isconnected">isConnected</h2>
|
||||
<p>▸ <strong>isConnected</strong>(): <code>boolean</code></p>
|
||||
<p><em>Implementation of <a href="../interfaces/_types_.providerinterface.md">ProviderInterface</a>.<a href="../interfaces/_types_.providerinterface.md#isconnected">isConnected</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/http/index.ts#L63" target="_blank">http/index.ts:63</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/http/index.ts#L63" target="_blank">http/index.ts:63</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>
|
||||
@@ -2051,7 +2200,7 @@ true if connected</p>
|
||||
<h2 id="on">on</h2>
|
||||
<p>▸ <strong>on</strong>(type: <em><a href="../modules/_types_.md#providerinterface_emitted">ProviderInterface$Emitted</a></em>, sub: <em><a href="../modules/_types_.md#providerinterface_emitcb">ProviderInterface$EmitCb</a></em>): <code>void</code></p>
|
||||
<p><em>Implementation of <a href="../interfaces/_types_.providerinterface.md">ProviderInterface</a>.<a href="../interfaces/_types_.providerinterface.md#on">on</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/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/9373e5d/packages/rpc-provider/src/http/index.ts#L71" target="_blank">http/index.ts:71</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>
|
||||
@@ -2079,7 +2228,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_.providerinterface.md">ProviderInterface</a>.<a href="../interfaces/_types_.providerinterface.md#send">send</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/http/index.ts#L78" target="_blank">http/index.ts:78</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/http/index.ts#L78" target="_blank">http/index.ts:78</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>
|
||||
@@ -2106,7 +2255,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_.md#providerinterface_callback">ProviderInterface$Callback</a></em>): <code>Promise</code><<code>number</code>></p>
|
||||
<p><em>Implementation of <a href="../interfaces/_types_.providerinterface.md">ProviderInterface</a>.<a href="../interfaces/_types_.providerinterface.md#subscribe">subscribe</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/http/index.ts#L100" target="_blank">http/index.ts:100</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/http/index.ts#L100" target="_blank">http/index.ts:100</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>
|
||||
@@ -2141,7 +2290,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_.providerinterface.md">ProviderInterface</a>.<a href="../interfaces/_types_.providerinterface.md#unsubscribe">unsubscribe</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/http/index.ts#L109" target="_blank">http/index.ts:109</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/http/index.ts#L109" target="_blank">http/index.ts:109</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>
|
||||
@@ -2211,7 +2360,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":"2019-01-17T16:18:45.247Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"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":"2019-01-22T22:16:42.664Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":"../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -34,7 +34,7 @@ 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/f5b3d58/packages/rpc-provider/src/http/index.ts#L40)*
|
||||
*Defined in [http/index.ts:40](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/http/index.ts#L40)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -54,7 +54,7 @@ ___
|
||||
|
||||
gethasSubscriptions(): `boolean`
|
||||
|
||||
*Defined in [http/index.ts:55](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/http/index.ts#L55)*
|
||||
*Defined in [http/index.ts:55](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/http/index.ts#L55)*
|
||||
|
||||
*__summary__*: `true` when this provider supports subscriptions
|
||||
|
||||
@@ -72,7 +72,7 @@ ___
|
||||
|
||||
*Implementation of [ProviderInterface](../interfaces/_types_.providerinterface.md).[isConnected](../interfaces/_types_.providerinterface.md#isconnected)*
|
||||
|
||||
*Defined in [http/index.ts:63](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/http/index.ts#L63)*
|
||||
*Defined in [http/index.ts:63](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/http/index.ts#L63)*
|
||||
|
||||
*__summary__*: Whether the node is connected or not.
|
||||
|
||||
@@ -88,7 +88,7 @@ ___
|
||||
|
||||
*Implementation of [ProviderInterface](../interfaces/_types_.providerinterface.md).[on](../interfaces/_types_.providerinterface.md#on)*
|
||||
|
||||
*Defined in [http/index.ts:71](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/http/index.ts#L71)*
|
||||
*Defined in [http/index.ts:71](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/http/index.ts#L71)*
|
||||
|
||||
*__summary__*: Events are not supported with the HttpProvider, see [WsProvider](_ws_index_.wsprovider.md).
|
||||
|
||||
@@ -112,7 +112,7 @@ ___
|
||||
|
||||
*Implementation of [ProviderInterface](../interfaces/_types_.providerinterface.md).[send](../interfaces/_types_.providerinterface.md#send)*
|
||||
|
||||
*Defined in [http/index.ts:78](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/http/index.ts#L78)*
|
||||
*Defined in [http/index.ts:78](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/http/index.ts#L78)*
|
||||
|
||||
*__summary__*: Send HTTP POST Request with Body to configured HTTP Endpoint.
|
||||
|
||||
@@ -134,7 +134,7 @@ ___
|
||||
|
||||
*Implementation of [ProviderInterface](../interfaces/_types_.providerinterface.md).[subscribe](../interfaces/_types_.providerinterface.md#subscribe)*
|
||||
|
||||
*Defined in [http/index.ts:100](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/http/index.ts#L100)*
|
||||
*Defined in [http/index.ts:100](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/http/index.ts#L100)*
|
||||
|
||||
*__summary__*: Subscriptions are not supported with the HttpProvider, see [WsProvider](_ws_index_.wsprovider.md).
|
||||
|
||||
@@ -158,7 +158,7 @@ ___
|
||||
|
||||
*Implementation of [ProviderInterface](../interfaces/_types_.providerinterface.md).[unsubscribe](../interfaces/_types_.providerinterface.md#unsubscribe)*
|
||||
|
||||
*Defined in [http/index.ts:109](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/http/index.ts#L109)*
|
||||
*Defined in [http/index.ts:109](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/http/index.ts#L109)*
|
||||
|
||||
*__summary__*: Subscriptions are not supported with the HttpProvider, see [WsProvider](_ws_index_.wsprovider.md).
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ A mock provider mainly used for testing.
|
||||
|
||||
⊕ **new Mock**(): [Mock](_mock_index_.mock.md)
|
||||
|
||||
*Defined in [mock/index.ts:68](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/mock/index.ts#L68)*
|
||||
*Defined in [mock/index.ts:68](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/mock/index.ts#L68)*
|
||||
|
||||
**Returns:** [Mock](_mock_index_.mock.md)
|
||||
|
||||
@@ -33,7 +33,7 @@ ___
|
||||
|
||||
**● isUpdating**: *`boolean`* = true
|
||||
|
||||
*Defined in [mock/index.ts:43](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/mock/index.ts#L43)*
|
||||
*Defined in [mock/index.ts:43](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/mock/index.ts#L43)*
|
||||
|
||||
___
|
||||
<a id="subscriptions"></a>
|
||||
@@ -49,7 +49,7 @@ ___
|
||||
return subs;
|
||||
}, ({} as MockState$Subscriptions))
|
||||
|
||||
*Defined in [mock/index.ts:57](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/mock/index.ts#L57)*
|
||||
*Defined in [mock/index.ts:57](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/mock/index.ts#L57)*
|
||||
|
||||
___
|
||||
|
||||
@@ -61,7 +61,7 @@ ___
|
||||
|
||||
gethasSubscriptions(): `boolean`
|
||||
|
||||
*Defined in [mock/index.ts:74](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/mock/index.ts#L74)*
|
||||
*Defined in [mock/index.ts:74](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/mock/index.ts#L74)*
|
||||
|
||||
**Returns:** `boolean`
|
||||
|
||||
@@ -77,7 +77,7 @@ ___
|
||||
|
||||
*Implementation of [ProviderInterface](../interfaces/_types_.providerinterface.md).[isConnected](../interfaces/_types_.providerinterface.md#isconnected)*
|
||||
|
||||
*Defined in [mock/index.ts:78](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/mock/index.ts#L78)*
|
||||
*Defined in [mock/index.ts:78](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/mock/index.ts#L78)*
|
||||
|
||||
**Returns:** `boolean`
|
||||
|
||||
@@ -90,7 +90,7 @@ ___
|
||||
|
||||
*Implementation of [ProviderInterface](../interfaces/_types_.providerinterface.md).[on](../interfaces/_types_.providerinterface.md#on)*
|
||||
|
||||
*Defined in [mock/index.ts:82](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/mock/index.ts#L82)*
|
||||
*Defined in [mock/index.ts:82](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/mock/index.ts#L82)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -110,7 +110,7 @@ ___
|
||||
|
||||
*Implementation of [ProviderInterface](../interfaces/_types_.providerinterface.md).[send](../interfaces/_types_.providerinterface.md#send)*
|
||||
|
||||
*Defined in [mock/index.ts:86](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/mock/index.ts#L86)*
|
||||
*Defined in [mock/index.ts:86](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/mock/index.ts#L86)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -128,7 +128,7 @@ ___
|
||||
|
||||
▸ **subscribe**(type: *`string`*, method: *`string`*, ...params: *`Array`<`any`>*): `Promise`<`number`>
|
||||
|
||||
*Defined in [mock/index.ts:94](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/mock/index.ts#L94)*
|
||||
*Defined in [mock/index.ts:94](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/mock/index.ts#L94)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -149,7 +149,7 @@ ___
|
||||
|
||||
*Implementation of [ProviderInterface](../interfaces/_types_.providerinterface.md).[unsubscribe](../interfaces/_types_.providerinterface.md#unsubscribe)*
|
||||
|
||||
*Defined in [mock/index.ts:114](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/mock/index.ts#L114)*
|
||||
*Defined in [mock/index.ts:114](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/mock/index.ts#L114)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="../../examples/promise/05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="../../examples/promise/04_unsubscribe/">
|
||||
|
||||
<a href="../../examples/promise/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../../examples/promise/05_read_storage/">
|
||||
|
||||
<a href="../../examples/promise/05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../../examples/promise/07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="../../examples/promise/06_make_transfer/">
|
||||
|
||||
<a href="../../examples/promise/07_transfer_dots/">
|
||||
<a href="../../examples/promise/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="../../examples/promise/08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="../../examples/promise/08_system_events/">
|
||||
|
||||
<a href="../../examples/promise/08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="../../examples/promise/09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="../../examples/promise/09_transfer_events/">
|
||||
|
||||
<a href="../../examples/promise/09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="../../examples/promise/10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="../../examples/promise/10_upgrade_chain/">
|
||||
|
||||
<a href="../../examples/promise/10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="../../examples/rx/">
|
||||
|
||||
<a href="../../examples/rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="../../examples/rx/01_simple_connect/">
|
||||
|
||||
<a href="../../examples/rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="../../examples/rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="../../examples/rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="../../examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="../../examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="../../examples/rx/04_unsubscribe/">
|
||||
|
||||
<a href="../../examples/rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="../../examples/rx/05_read_storage/">
|
||||
|
||||
<a href="../../examples/rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="../../examples/rx/06_make_transfer/">
|
||||
|
||||
<a href="../../examples/rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="../../examples/rx/08_system_events/">
|
||||
|
||||
<a href="../../examples/rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="../../examples/rx/09_transfer_events/">
|
||||
|
||||
<a href="../../examples/rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="../../examples/rx/10_upgrade_chain/">
|
||||
|
||||
<a href="../../examples/rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2007,7 +2156,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/f5b3d58/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/9373e5d/packages/rpc-provider/src/ws/index.ts#L75" target="_blank">ws/index.ts:75</a></em></p>
|
||||
<p><strong>Parameters:</strong></p>
|
||||
<table>
|
||||
<thead>
|
||||
@@ -2039,7 +2188,7 @@
|
||||
<p><a id="hassubscriptions"></a></p>
|
||||
<h2 id="hassubscriptions">hasSubscriptions</h2>
|
||||
<p>gethasSubscriptions(): <code>boolean</code></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/ws/index.ts#L101" target="_blank">ws/index.ts:101</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L101" target="_blank">ws/index.ts:101</a></em></p>
|
||||
<p><em><strong>summary</strong></em>: <code>true</code> when this provider supports subscriptions</p>
|
||||
<p><strong>Returns:</strong> <code>boolean</code></p>
|
||||
<hr>
|
||||
@@ -2047,7 +2196,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/f5b3d58/packages/rpc-provider/src/ws/index.ts#L110" target="_blank">ws/index.ts:110</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L110" target="_blank">ws/index.ts:110</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>
|
||||
@@ -2055,7 +2204,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/f5b3d58/packages/rpc-provider/src/ws/index.ts#L127" target="_blank">ws/index.ts:127</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L127" target="_blank">ws/index.ts:127</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>
|
||||
@@ -2063,7 +2212,7 @@ true if connected</p>
|
||||
<p><a id="on"></a></p>
|
||||
<h2 id="on">on</h2>
|
||||
<p>▸ <strong>on</strong>(type: <em><a href="../modules/_types_.md#providerinterface_emitted">ProviderInterface$Emitted</a></em>, sub: <em><a href="../modules/_types_.md#providerinterface_emitcb">ProviderInterface$EmitCb</a></em>): <code>void</code></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/ws/index.ts#L136" target="_blank">ws/index.ts:136</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L136" target="_blank">ws/index.ts:136</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>
|
||||
@@ -2092,7 +2241,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/f5b3d58/packages/rpc-provider/src/ws/index.ts#L146" target="_blank">ws/index.ts:146</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L146" target="_blank">ws/index.ts:146</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>
|
||||
@@ -2126,7 +2275,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_.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/f5b3d58/packages/rpc-provider/src/ws/index.ts#L200" target="_blank">ws/index.ts:200</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L200" target="_blank">ws/index.ts:200</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>
|
||||
@@ -2177,7 +2326,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/f5b3d58/packages/rpc-provider/src/ws/index.ts#L209" target="_blank">ws/index.ts:209</a></em></p>
|
||||
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L209" target="_blank">ws/index.ts:209</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>
|
||||
@@ -2247,7 +2396,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":"types (codec implementation)","level":"1.4","depth":1,"path":"types/README.md","ref":"types/README.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":"2019-01-17T16:18:45.351Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"basePath":"../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"WsProvider","level":"1.3.2","depth":2,"next":{"title":"types (codec implementation)","level":"1.4","depth":1,"path":"types/README.md","ref":"types/README.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":"2019-01-22T22:16:42.764Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":"../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -34,7 +34,7 @@ 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/f5b3d58/packages/rpc-provider/src/ws/index.ts#L75)*
|
||||
*Defined in [ws/index.ts:75](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L75)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -55,7 +55,7 @@ ___
|
||||
|
||||
gethasSubscriptions(): `boolean`
|
||||
|
||||
*Defined in [ws/index.ts:101](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/ws/index.ts#L101)*
|
||||
*Defined in [ws/index.ts:101](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L101)*
|
||||
|
||||
*__summary__*: `true` when this provider supports subscriptions
|
||||
|
||||
@@ -71,7 +71,7 @@ ___
|
||||
|
||||
▸ **connect**(): `void`
|
||||
|
||||
*Defined in [ws/index.ts:110](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/ws/index.ts#L110)*
|
||||
*Defined in [ws/index.ts:110](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L110)*
|
||||
|
||||
*__summary__*: Manually connect
|
||||
|
||||
@@ -86,7 +86,7 @@ ___
|
||||
|
||||
▸ **isConnected**(): `boolean`
|
||||
|
||||
*Defined in [ws/index.ts:127](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/ws/index.ts#L127)*
|
||||
*Defined in [ws/index.ts:127](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L127)*
|
||||
|
||||
*__summary__*: Whether the node is connected or not.
|
||||
|
||||
@@ -100,7 +100,7 @@ ___
|
||||
|
||||
▸ **on**(type: *[ProviderInterface$Emitted](../modules/_types_.md#providerinterface_emitted)*, sub: *[ProviderInterface$EmitCb](../modules/_types_.md#providerinterface_emitcb)*): `void`
|
||||
|
||||
*Defined in [ws/index.ts:136](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/ws/index.ts#L136)*
|
||||
*Defined in [ws/index.ts:136](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L136)*
|
||||
|
||||
*__summary__*: Listens on events after having subscribed using the [subscribe](_ws_index_.wsprovider.md#subscribe) function.
|
||||
|
||||
@@ -120,7 +120,7 @@ ___
|
||||
|
||||
▸ **send**(method: *`string`*, params: *`Array`<`any`>*, subscription?: *`SubscriptionHandler`*): `Promise`<`any`>
|
||||
|
||||
*Defined in [ws/index.ts:146](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/ws/index.ts#L146)*
|
||||
*Defined in [ws/index.ts:146](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L146)*
|
||||
|
||||
*__summary__*: Send JSON data using WebSockets to configured HTTP Endpoint or queue.
|
||||
|
||||
@@ -141,7 +141,7 @@ ___
|
||||
|
||||
▸ **subscribe**(type: *`string`*, method: *`string`*, params: *`Array`<`any`>*, callback: *[ProviderInterface$Callback](../modules/_types_.md#providerinterface_callback)*): `Promise`<`number`>
|
||||
|
||||
*Defined in [ws/index.ts:200](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/ws/index.ts#L200)*
|
||||
*Defined in [ws/index.ts:200](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L200)*
|
||||
|
||||
*__name__*: subscribe
|
||||
|
||||
@@ -179,7 +179,7 @@ ___
|
||||
|
||||
▸ **unsubscribe**(type: *`string`*, method: *`string`*, id: *`number`*): `Promise`<`boolean`>
|
||||
|
||||
*Defined in [ws/index.ts:209](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/ws/index.ts#L209)*
|
||||
*Defined in [ws/index.ts:209](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/ws/index.ts#L209)*
|
||||
|
||||
*__summary__*: Allows unsubscribing to subscriptions made with [subscribe](_ws_index_.wsprovider.md#subscribe).
|
||||
|
||||
|
||||
@@ -330,7 +330,20 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.4" data-path="../examples/promise/05_read_storage/">
|
||||
<li class="chapter " data-level="3.1.4" data-path="../examples/promise/04_unsubscribe/">
|
||||
|
||||
<a href="../examples/promise/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../examples/promise/05_read_storage/">
|
||||
|
||||
<a href="../examples/promise/05_read_storage/">
|
||||
|
||||
@@ -343,9 +356,9 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.5" data-path="../examples/promise/07_transfer_dots/">
|
||||
<li class="chapter " data-level="3.1.6" data-path="../examples/promise/06_make_transfer/">
|
||||
|
||||
<a href="../examples/promise/07_transfer_dots/">
|
||||
<a href="../examples/promise/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
@@ -356,7 +369,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.6" data-path="../examples/promise/08_system_events/">
|
||||
<li class="chapter " data-level="3.1.7" data-path="../examples/promise/08_system_events/">
|
||||
|
||||
<a href="../examples/promise/08_system_events/">
|
||||
|
||||
@@ -369,7 +382,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.7" data-path="../examples/promise/09_transfer_events/">
|
||||
<li class="chapter " data-level="3.1.8" data-path="../examples/promise/09_transfer_events/">
|
||||
|
||||
<a href="../examples/promise/09_transfer_events/">
|
||||
|
||||
@@ -382,7 +395,7 @@
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.1.8" data-path="../examples/promise/10_upgrade_chain/">
|
||||
<li class="chapter " data-level="3.1.9" data-path="../examples/promise/10_upgrade_chain/">
|
||||
|
||||
<a href="../examples/promise/10_upgrade_chain/">
|
||||
|
||||
@@ -393,6 +406,142 @@
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2" data-path="../examples/rx/">
|
||||
|
||||
<a href="../examples/rx/">
|
||||
|
||||
|
||||
ApiRx
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<ul class="articles">
|
||||
|
||||
|
||||
<li class="chapter " data-level="3.2.1" data-path="../examples/rx/01_simple_connect/">
|
||||
|
||||
<a href="../examples/rx/01_simple_connect/">
|
||||
|
||||
|
||||
Simple connect
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.2" data-path="../examples/rx/02_listen_to_blocks/">
|
||||
|
||||
<a href="../examples/rx/02_listen_to_blocks/">
|
||||
|
||||
|
||||
Listen to blocks
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.3" data-path="../examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
<a href="../examples/rx/03_listen_to_balance_change/">
|
||||
|
||||
|
||||
Listen to balance change
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.4" data-path="../examples/rx/04_unsubscribe/">
|
||||
|
||||
<a href="../examples/rx/04_unsubscribe/">
|
||||
|
||||
|
||||
Unsubscribe from listening
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.5" data-path="../examples/rx/05_read_storage/">
|
||||
|
||||
<a href="../examples/rx/05_read_storage/">
|
||||
|
||||
|
||||
Read chain state
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.6" data-path="../examples/rx/06_make_transfer/">
|
||||
|
||||
<a href="../examples/rx/06_make_transfer/">
|
||||
|
||||
|
||||
Make a transfer
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.7" data-path="../examples/rx/08_system_events/">
|
||||
|
||||
<a href="../examples/rx/08_system_events/">
|
||||
|
||||
|
||||
Display system events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.8" data-path="../examples/rx/09_transfer_events/">
|
||||
|
||||
<a href="../examples/rx/09_transfer_events/">
|
||||
|
||||
|
||||
Transaction with events
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="chapter " data-level="3.2.9" data-path="../examples/rx/10_upgrade_chain/">
|
||||
|
||||
<a href="../examples/rx/10_upgrade_chain/">
|
||||
|
||||
|
||||
Upgrade via sudo
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -2055,7 +2204,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":"2019-01-17T16:18:45.067Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-17T16:19:54.997Z"},"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":"2019-01-22T22:16:42.488Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-22T22:17:48.947Z"},"basePath":"..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
**● hasSubscriptions**: *`boolean`*
|
||||
|
||||
*Defined in [types.ts:45](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/types.ts#L45)*
|
||||
*Defined in [types.ts:45](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/types.ts#L45)*
|
||||
|
||||
___
|
||||
|
||||
@@ -29,7 +29,7 @@ ___
|
||||
|
||||
▸ **isConnected**(): `boolean`
|
||||
|
||||
*Defined in [types.ts:46](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/types.ts#L46)*
|
||||
*Defined in [types.ts:46](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/types.ts#L46)*
|
||||
|
||||
**Returns:** `boolean`
|
||||
|
||||
@@ -40,7 +40,7 @@ ___
|
||||
|
||||
▸ **on**(type: *[ProviderInterface$Emitted](../modules/_types_.md#providerinterface_emitted)*, sub: *[ProviderInterface$EmitCb](../modules/_types_.md#providerinterface_emitcb)*): `void`
|
||||
|
||||
*Defined in [types.ts:47](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/types.ts#L47)*
|
||||
*Defined in [types.ts:47](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/types.ts#L47)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -58,7 +58,7 @@ ___
|
||||
|
||||
▸ **send**(method: *`string`*, params: *`Array`<`any`>*): `Promise`<`any`>
|
||||
|
||||
*Defined in [types.ts:48](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/types.ts#L48)*
|
||||
*Defined in [types.ts:48](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/types.ts#L48)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -76,7 +76,7 @@ ___
|
||||
|
||||
▸ **subscribe**(type: *`string`*, method: *`string`*, params: *`Array`<`any`>*, cb: *[ProviderInterface$Callback](../modules/_types_.md#providerinterface_callback)*): `Promise`<`number`>
|
||||
|
||||
*Defined in [types.ts:49](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/types.ts#L49)*
|
||||
*Defined in [types.ts:49](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/types.ts#L49)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -96,7 +96,7 @@ ___
|
||||
|
||||
▸ **unsubscribe**(type: *`string`*, method: *`string`*, id: *`number`*): `Promise`<`boolean`>
|
||||
|
||||
*Defined in [types.ts:50](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/types.ts#L50)*
|
||||
*Defined in [types.ts:50](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/types.ts#L50)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
**Ƭ HttpState**: *`object`*
|
||||
|
||||
*Defined in [http/types.ts:9](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/http/types.ts#L9)*
|
||||
*Defined in [http/types.ts:9](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/http/types.ts#L9)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
**Ƭ MockState$Db**: *`object`*
|
||||
|
||||
*Defined in [mock/types.ts:16](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/mock/types.ts#L16)*
|
||||
*Defined in [mock/types.ts:16](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/mock/types.ts#L16)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
@@ -21,7 +21,7 @@ ___
|
||||
|
||||
**Ƭ MockState$Requests**: *`object`*
|
||||
|
||||
*Defined in [mock/types.ts:20](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/mock/types.ts#L20)*
|
||||
*Defined in [mock/types.ts:20](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/mock/types.ts#L20)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
@@ -45,7 +45,7 @@ ___
|
||||
|
||||
**Ƭ MockState$Subscription$Callback**: *`function`*
|
||||
|
||||
*Defined in [mock/types.ts:5](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/mock/types.ts#L5)*
|
||||
*Defined in [mock/types.ts:5](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/mock/types.ts#L5)*
|
||||
|
||||
#### Type declaration
|
||||
▸(error: *`Error` | `null`*, value: *`any`*): `void`
|
||||
@@ -66,7 +66,7 @@ ___
|
||||
|
||||
**Ƭ MockState$Subscriptions**: *`object`*
|
||||
|
||||
*Defined in [mock/types.ts:7](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/mock/types.ts#L7)*
|
||||
*Defined in [mock/types.ts:7](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/mock/types.ts#L7)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
**Ƭ JsonRpcObject**: *`object`*
|
||||
|
||||
*Defined in [types.ts:5](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/types.ts#L5)*
|
||||
*Defined in [types.ts:5](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/types.ts#L5)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
@@ -38,7 +38,7 @@ ___
|
||||
|
||||
**Ƭ JsonRpcRequest**: *[JsonRpcObject](_types_.md#jsonrpcobject) & `object`*
|
||||
|
||||
*Defined in [types.ts:10](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/types.ts#L10)*
|
||||
*Defined in [types.ts:10](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/types.ts#L10)*
|
||||
|
||||
___
|
||||
<a id="jsonrpcresponse"></a>
|
||||
@@ -47,7 +47,7 @@ ___
|
||||
|
||||
**Ƭ JsonRpcResponse**: *[JsonRpcObject](_types_.md#jsonrpcobject) & [JsonRpcResponseBase](_types_.md#jsonrpcresponsebase)*
|
||||
|
||||
*Defined in [types.ts:36](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/types.ts#L36)*
|
||||
*Defined in [types.ts:36](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/types.ts#L36)*
|
||||
|
||||
___
|
||||
<a id="jsonrpcresponsebase"></a>
|
||||
@@ -56,7 +56,7 @@ ___
|
||||
|
||||
**Ƭ JsonRpcResponseBase**: *`JsonRpcResponse$Single` & `JsonRpcResponse$Subscription`*
|
||||
|
||||
*Defined in [types.ts:34](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/types.ts#L34)*
|
||||
*Defined in [types.ts:34](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/types.ts#L34)*
|
||||
|
||||
___
|
||||
<a id="jsonrpcresponsebase_error"></a>
|
||||
@@ -65,7 +65,7 @@ ___
|
||||
|
||||
**Ƭ JsonRpcResponseBase$Error**: *`object`*
|
||||
|
||||
*Defined in [types.ts:15](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/types.ts#L15)*
|
||||
*Defined in [types.ts:15](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/types.ts#L15)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
@@ -76,7 +76,7 @@ ___
|
||||
|
||||
**Ƭ ProviderInterface$Callback**: *`function`*
|
||||
|
||||
*Defined in [types.ts:38](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/types.ts#L38)*
|
||||
*Defined in [types.ts:38](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/types.ts#L38)*
|
||||
|
||||
#### Type declaration
|
||||
▸(result: *`any`*): `void`
|
||||
@@ -96,7 +96,7 @@ ___
|
||||
|
||||
**Ƭ ProviderInterface$EmitCb**: *`function`*
|
||||
|
||||
*Defined in [types.ts:42](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/types.ts#L42)*
|
||||
*Defined in [types.ts:42](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/types.ts#L42)*
|
||||
|
||||
#### Type declaration
|
||||
▸(value?: *`any`*): `any`
|
||||
@@ -116,7 +116,7 @@ ___
|
||||
|
||||
**Ƭ ProviderInterface$Emitted**: *"connected" | "disconnected" | "error"*
|
||||
|
||||
*Defined in [types.ts:40](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-provider/src/types.ts#L40)*
|
||||
*Defined in [types.ts:40](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-provider/src/types.ts#L40)*
|
||||
|
||||
___
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ const api = new RpcRx(provider);
|
||||
|
||||
⊕ **new RpcRx**(providerOrRpc?: *`Rpc` | `ProviderInterface`*): [RpcRx](_index_.rpcrx.md)
|
||||
|
||||
*Defined in [index.ts:45](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-rx/src/index.ts#L45)*
|
||||
*Defined in [index.ts:45](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-rx/src/index.ts#L45)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
@@ -52,7 +52,7 @@ ___
|
||||
|
||||
**● author**: *[RpcRxInterface$Section](../modules/_types_.md#rpcrxinterface_section)*
|
||||
|
||||
*Defined in [index.ts:42](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-rx/src/index.ts#L42)*
|
||||
*Defined in [index.ts:42](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-rx/src/index.ts#L42)*
|
||||
|
||||
___
|
||||
<a id="chain"></a>
|
||||
@@ -61,7 +61,7 @@ ___
|
||||
|
||||
**● chain**: *[RpcRxInterface$Section](../modules/_types_.md#rpcrxinterface_section)*
|
||||
|
||||
*Defined in [index.ts:43](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-rx/src/index.ts#L43)*
|
||||
*Defined in [index.ts:43](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-rx/src/index.ts#L43)*
|
||||
|
||||
___
|
||||
<a id="state"></a>
|
||||
@@ -70,7 +70,7 @@ ___
|
||||
|
||||
**● state**: *[RpcRxInterface$Section](../modules/_types_.md#rpcrxinterface_section)*
|
||||
|
||||
*Defined in [index.ts:44](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-rx/src/index.ts#L44)*
|
||||
*Defined in [index.ts:44](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-rx/src/index.ts#L44)*
|
||||
|
||||
___
|
||||
<a id="system"></a>
|
||||
@@ -79,7 +79,7 @@ ___
|
||||
|
||||
**● system**: *[RpcRxInterface$Section](../modules/_types_.md#rpcrxinterface_section)*
|
||||
|
||||
*Defined in [index.ts:45](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-rx/src/index.ts#L45)*
|
||||
*Defined in [index.ts:45](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-rx/src/index.ts#L45)*
|
||||
|
||||
___
|
||||
|
||||
@@ -91,7 +91,7 @@ ___
|
||||
|
||||
▸ **isConnected**(): `BehaviorSubject`<`boolean`>
|
||||
|
||||
*Defined in [index.ts:66](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-rx/src/index.ts#L66)*
|
||||
*Defined in [index.ts:66](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-rx/src/index.ts#L66)*
|
||||
|
||||
**Returns:** `BehaviorSubject`<`boolean`>
|
||||
|
||||
@@ -102,7 +102,7 @@ ___
|
||||
|
||||
▸ **on**(type: *[RpcRxInterface$Events](../modules/_types_.md#rpcrxinterface_events)*, handler: *`function`*): `void`
|
||||
|
||||
*Defined in [index.ts:70](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-rx/src/index.ts#L70)*
|
||||
*Defined in [index.ts:70](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-rx/src/index.ts#L70)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
**Ƭ RpcRxInterface**: *`object`*
|
||||
|
||||
*Defined in [types.ts:16](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-rx/src/types.ts#L16)*
|
||||
*Defined in [types.ts:16](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-rx/src/types.ts#L16)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
@@ -19,7 +19,7 @@ ___
|
||||
|
||||
**Ƭ RpcRxInterface$Events**: *`ProviderInterface$Emitted`*
|
||||
|
||||
*Defined in [types.ts:14](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-rx/src/types.ts#L14)*
|
||||
*Defined in [types.ts:14](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-rx/src/types.ts#L14)*
|
||||
|
||||
___
|
||||
<a id="rpcrxinterface_method"></a>
|
||||
@@ -28,7 +28,7 @@ ___
|
||||
|
||||
**Ƭ RpcRxInterface$Method**: *`function`*
|
||||
|
||||
*Defined in [types.ts:8](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-rx/src/types.ts#L8)*
|
||||
*Defined in [types.ts:8](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-rx/src/types.ts#L8)*
|
||||
|
||||
#### Type declaration
|
||||
▸(...params: *`Array`<`any`>*): `Observable`<`any`> | `ReplaySubject`<`any`>
|
||||
@@ -48,7 +48,7 @@ ___
|
||||
|
||||
**Ƭ RpcRxInterface$Section**: *`object`*
|
||||
|
||||
*Defined in [types.ts:10](https://github.com/polkadot-js/api/blob/f5b3d58/packages/rpc-rx/src/types.ts#L10)*
|
||||
*Defined in [types.ts:10](https://github.com/polkadot-js/api/blob/9373e5d/packages/rpc-rx/src/types.ts#L10)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **fromMetadata**(metadata: *`Metadata`*): `ModulesWithMethods`
|
||||
|
||||
*Defined in [fromMetadata.ts:21](https://github.com/polkadot-js/api/blob/f5b3d58/packages/type-extrinsics/src/fromMetadata.ts#L21)*
|
||||
*Defined in [fromMetadata.ts:21](https://github.com/polkadot-js/api/blob/9373e5d/packages/type-extrinsics/src/fromMetadata.ts#L21)*
|
||||
|
||||
Extend a storage object with the storage modules & module functions present in the metadata.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **createDescriptor**(section: *`string`*, method: *`string`*, index: *`number`*, meta: *`FunctionMetadata`*): `MethodFunction`
|
||||
|
||||
*Defined in [utils/createUnchecked.ts:16](https://github.com/polkadot-js/api/blob/f5b3d58/packages/type-extrinsics/src/utils/createUnchecked.ts#L16)*
|
||||
*Defined in [utils/createUnchecked.ts:16](https://github.com/polkadot-js/api/blob/9373e5d/packages/type-extrinsics/src/utils/createUnchecked.ts#L16)*
|
||||
|
||||
From the metadata of a function in the module's storage, generate the function that will return the an UncheckExtrinsic.
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **createMethod**(section: *`string`*, method: *`string`*, __namedParameters: *`object`*): [RpcMethod](_types_.md#rpcmethod)
|
||||
|
||||
*Defined in [create/method.ts:9](https://github.com/polkadot-js/api/blob/f5b3d58/packages/type-jsonrpc/src/create/method.ts#L9)*
|
||||
*Defined in [create/method.ts:9](https://github.com/polkadot-js/api/blob/9373e5d/packages/type-jsonrpc/src/create/method.ts#L9)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **createParam**(name: *`string`*, type: *`CodecTypes`*, __namedParameters?: *`object`*): [RpcParam](_types_.md#rpcparam)
|
||||
|
||||
*Defined in [create/param.ts:12](https://github.com/polkadot-js/api/blob/f5b3d58/packages/type-jsonrpc/src/create/param.ts#L12)*
|
||||
*Defined in [create/param.ts:12](https://github.com/polkadot-js/api/blob/9373e5d/packages/type-jsonrpc/src/create/param.ts#L12)*
|
||||
|
||||
**Parameters:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
**Ƭ RpcMethod**: *`object`*
|
||||
|
||||
*Defined in [types.ts:24](https://github.com/polkadot-js/api/blob/f5b3d58/packages/type-jsonrpc/src/types.ts#L24)*
|
||||
*Defined in [types.ts:24](https://github.com/polkadot-js/api/blob/9373e5d/packages/type-jsonrpc/src/types.ts#L24)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
@@ -19,7 +19,7 @@ ___
|
||||
|
||||
**Ƭ RpcMethodOpt**: *`object`*
|
||||
|
||||
*Defined in [types.ts:13](https://github.com/polkadot-js/api/blob/f5b3d58/packages/type-jsonrpc/src/types.ts#L13)*
|
||||
*Defined in [types.ts:13](https://github.com/polkadot-js/api/blob/9373e5d/packages/type-jsonrpc/src/types.ts#L13)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
@@ -30,7 +30,7 @@ ___
|
||||
|
||||
**Ƭ RpcParam**: *`object`*
|
||||
|
||||
*Defined in [types.ts:7](https://github.com/polkadot-js/api/blob/f5b3d58/packages/type-jsonrpc/src/types.ts#L7)*
|
||||
*Defined in [types.ts:7](https://github.com/polkadot-js/api/blob/9373e5d/packages/type-jsonrpc/src/types.ts#L7)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
@@ -41,7 +41,7 @@ ___
|
||||
|
||||
**Ƭ RpcSection**: *`object`*
|
||||
|
||||
*Defined in [types.ts:38](https://github.com/polkadot-js/api/blob/f5b3d58/packages/type-jsonrpc/src/types.ts#L38)*
|
||||
*Defined in [types.ts:38](https://github.com/polkadot-js/api/blob/9373e5d/packages/type-jsonrpc/src/types.ts#L38)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
**● substrate**: *`object`*
|
||||
|
||||
*Defined in [types.ts:17](https://github.com/polkadot-js/api/blob/f5b3d58/packages/type-storage/src/types.ts#L17)*
|
||||
*Defined in [types.ts:17](https://github.com/polkadot-js/api/blob/9373e5d/packages/type-storage/src/types.ts#L17)*
|
||||
|
||||
#### Type declaration
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
**● isUnhashed**: *`undefined` | `false` | `true`*
|
||||
|
||||
*Defined in [utils/createFunction.ts:14](https://github.com/polkadot-js/api/blob/f5b3d58/packages/type-storage/src/utils/createFunction.ts#L14)*
|
||||
*Defined in [utils/createFunction.ts:14](https://github.com/polkadot-js/api/blob/9373e5d/packages/type-storage/src/utils/createFunction.ts#L14)*
|
||||
|
||||
___
|
||||
<a id="key"></a>
|
||||
@@ -21,7 +21,7 @@ ___
|
||||
|
||||
**● key**: *`undefined` | `string`*
|
||||
|
||||
*Defined in [utils/createFunction.ts:15](https://github.com/polkadot-js/api/blob/f5b3d58/packages/type-storage/src/utils/createFunction.ts#L15)*
|
||||
*Defined in [utils/createFunction.ts:15](https://github.com/polkadot-js/api/blob/9373e5d/packages/type-storage/src/utils/createFunction.ts#L15)*
|
||||
|
||||
___
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
▸ **fromMetadata**(metadata: *`Metadata`*): [Storage](../interfaces/_types_.storage.md)
|
||||
|
||||
*Defined in [fromMetadata.ts:20](https://github.com/polkadot-js/api/blob/f5b3d58/packages/type-storage/src/fromMetadata.ts#L20)*
|
||||
*Defined in [fromMetadata.ts:20](https://github.com/polkadot-js/api/blob/9373e5d/packages/type-storage/src/fromMetadata.ts#L20)*
|
||||
|
||||
Extend a storage object with the storage modules & module functions present in the metadata.
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user