Files
api/docs/type-extrinsics/index.html
T
2018-09-17 12:37:37 +00:00

763 lines
22 KiB
HTML

<!DOCTYPE HTML>
<html lang="" >
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>type-extrinsics · Polkadot API Book</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="GitBook 3.2.3">
<link rel="stylesheet" href="../gitbook/style.css">
<link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="../type-jsonrpc/" />
<link rel="prev" href="../api-rx/" />
</head>
<body>
<div class="book">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="header">Intro</li>
<li class="chapter " data-level="1.1" data-path="../">
<a href="../">
Introduction
</a>
</li>
<li class="header">API</li>
<li class="chapter " data-level="2.1" data-path="../api/">
<a href="../api/">
api
</a>
</li>
<li class="chapter " data-level="2.2" data-path="../api-format/">
<a href="../api-format/">
api-format
</a>
</li>
<li class="chapter " data-level="2.3" data-path="../api-provider/">
<a href="../api-provider/">
api-provider
</a>
</li>
<li class="chapter " data-level="2.4" data-path="../api-rx/">
<a href="../api-rx/">
api-rx
</a>
</li>
<li class="chapter active" data-level="2.5" data-path="./">
<a href="./">
type-extrinsics
</a>
</li>
<li class="chapter " data-level="2.6" data-path="../type-jsonrpc/">
<a href="../type-jsonrpc/">
type-jsonrpc
</a>
</li>
<li class="chapter " data-level="2.7" data-path="../type-params/">
<a href="../type-params/">
type-params
</a>
</li>
<li class="chapter " data-level="2.8" data-path="../type-primitives/">
<a href="../type-primitives/">
type-primitives
</a>
</li>
<li class="chapter " data-level="2.9" data-path="../type-storage/">
<a href="../type-storage/">
type-storage
</a>
</li>
<li class="header">Examples</li>
<li class="chapter " data-level="3.1" data-path="../examples/">
<a href="../examples/">
Overview
</a>
</li>
<li class="chapter " data-level="3.2" data-path="../examples/01_simple_connect/">
<a href="../examples/01_simple_connect/">
Simple connect
</a>
</li>
<li class="chapter " data-level="3.3" data-path="../examples/02_listen_to_blocks/">
<a href="../examples/02_listen_to_blocks/">
Listen to blocks
</a>
</li>
<li class="chapter " data-level="3.4" data-path="../examples/03_listen_to_balance_change/">
<a href="../examples/03_listen_to_balance_change/">
Listen to balance change
</a>
</li>
<li class="chapter " data-level="3.5" data-path="../examples/04_generate_account/">
<a href="../examples/04_generate_account/">
Generate Accounts
</a>
</li>
<li class="chapter " data-level="3.6" data-path="../examples/05_read_storage/">
<a href="../examples/05_read_storage/">
Read Storage
</a>
</li>
<li class="chapter " data-level="3.7" data-path="../examples/06_craft_extrinsic/">
<a href="../examples/06_craft_extrinsic/">
Craft Extrinsic
</a>
</li>
<li class="chapter " data-level="3.8" data-path="../examples/07_transfer_dots/">
<a href="../examples/07_transfer_dots/">
Transfer DOTs
</a>
</li>
<li class="header">Contributing</li>
<li class="chapter " data-level="4.1" data-path="../CONTRIBUTING.html">
<a href="../CONTRIBUTING.html">
Contributing guide
</a>
</li>
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
Published with GitBook
</a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href=".." >type-extrinsics</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h1 id="polkadotextrinsics">@polkadot/extrinsics</h1>
<h2 id="index">Index</h2>
<h3 id="type-aliases">Type aliases</h3>
<ul>
<li><a href="#extrinsic_sections">Extrinsic$Sections</a></li>
<li><a href="#extrinsicunchecked">ExtrinsicUnchecked</a></li>
<li><a href="#extrinsicwithaccount">ExtrinsicWithAccount</a></li>
<li><a href="#extrinsicwithindex">ExtrinsicWithIndex</a></li>
<li><a href="#extrinsics">Extrinsics</a></li>
</ul>
<h3 id="functions">Functions</h3>
<ul>
<li><a href="#decodelength">decodeLength</a></li>
<li><a href="#encode">encode</a></li>
<li><a href="#encodecall">encodeCall</a></li>
<li><a href="#encodeextrinsic">encodeExtrinsic</a></li>
<li><a href="#encodelength">encodeLength</a></li>
<li><a href="#unchecked">unchecked</a></li>
<li><a href="#uncheckedlength">uncheckedLength</a></li>
</ul>
<hr>
<h2 id="type-aliases">Type aliases</h2>
<p><a id="extrinsic_sections"></a></p>
<h3 id="extrinsicsections">Extrinsic$Sections</h3>
<p><strong>&#x1AC; Extrinsic$Sections</strong>: <em><code>keyof Extrinsics</code></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b0e23/packages/type-extrinsics/src/types.d.ts#L21" target="_blank">types.d.ts:21</a></em></p>
<hr>
<p><a id="extrinsicunchecked"></a></p>
<h3 id="extrinsicunchecked">ExtrinsicUnchecked</h3>
<p><strong>&#x1AC; ExtrinsicUnchecked</strong>: <em><code>Uint8Array</code></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b0e23/packages/type-extrinsics/src/codec/types.d.ts#L9" target="_blank">codec/types.d.ts:9</a></em></p>
<hr>
<p><a id="extrinsicwithaccount"></a></p>
<h3 id="extrinsicwithaccount">ExtrinsicWithAccount</h3>
<p><strong>&#x1AC; ExtrinsicWithAccount</strong>: <em><code>Uint8Array</code></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b0e23/packages/type-extrinsics/src/codec/types.d.ts#L5" target="_blank">codec/types.d.ts:5</a></em></p>
<hr>
<p><a id="extrinsicwithindex"></a></p>
<h3 id="extrinsicwithindex">ExtrinsicWithIndex</h3>
<p><strong>&#x1AC; ExtrinsicWithIndex</strong>: <em><code>Uint8Array</code></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b0e23/packages/type-extrinsics/src/codec/types.d.ts#L7" target="_blank">codec/types.d.ts:7</a></em></p>
<hr>
<p><a id="extrinsics"></a></p>
<h3 id="extrinsics">Extrinsics</h3>
<p><strong>&#x1AC; Extrinsics</strong>: <em><code>object</code></em></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b0e23/packages/type-extrinsics/src/types.d.ts#L7" target="_blank">types.d.ts:7</a></em></p>
<h4 id="type-declaration">Type declaration</h4>
<hr>
<h2 id="functions">Functions</h2>
<p><a id="decodelength"></a></p>
<h3 id="decodelength">decodeLength</h3>
<p>&#x25B8; <strong>decodeLength</strong>(unchecked: <em><code>Uint8Array</code></em>): <code>UncheckedRaw</code></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b0e23/packages/type-extrinsics/src/codec/decode/length.ts#L9" target="_blank">codec/decode/length.ts:9</a></em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>unchecked</td>
<td><code>Uint8Array</code></td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <code>UncheckedRaw</code></p>
<hr>
<p><a id="encode"></a></p>
<h3 id="encode">encode</h3>
<p>&#x25B8; <strong>encode</strong>(publicKey: <em><code>Uint8Array</code></em>, index: <em> <code>number</code> | <code>BN</code></em>, extrinsic: <em><code>SectionItem</code>&lt;<a href="#extrinsics">Extrinsics</a>&gt;</em>, values: <em><code>Array</code>&lt;<code>any</code>&gt;</em>, version: <em><code>EncodingVersions</code></em>): <a href="#extrinsicwithaccount">ExtrinsicWithAccount</a></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b0e23/packages/type-extrinsics/src/codec/encode/index.ts#L13" target="_blank">codec/encode/index.ts:13</a></em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>publicKey</td>
<td><code>Uint8Array</code></td>
</tr>
<tr>
<td>index</td>
<td><code>number</code> | <code>BN</code></td>
</tr>
<tr>
<td>extrinsic</td>
<td><code>SectionItem</code>&lt;<a href="#extrinsics">Extrinsics</a>&gt;</td>
</tr>
<tr>
<td>values</td>
<td><code>Array</code>&lt;<code>any</code>&gt;</td>
</tr>
<tr>
<td>version</td>
<td><code>EncodingVersions</code></td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <a href="#extrinsicwithaccount">ExtrinsicWithAccount</a></p>
<hr>
<p><a id="encodecall"></a></p>
<h3 id="encodecall">encodeCall</h3>
<p>&#x25B8; <strong>encodeCall</strong>(publicKey: <em><code>Uint8Array</code></em>, nonce: <em> <code>number</code> | <code>BN</code></em>, data: <em><a href="#extrinsicwithindex">ExtrinsicWithIndex</a></em>, version: <em><code>EncodingVersions</code></em>): <a href="#extrinsicwithaccount">ExtrinsicWithAccount</a></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b0e23/packages/type-extrinsics/src/codec/encode/call.ts#L14" target="_blank">codec/encode/call.ts:14</a></em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>publicKey</td>
<td><code>Uint8Array</code></td>
</tr>
<tr>
<td>nonce</td>
<td><code>number</code> | <code>BN</code></td>
</tr>
<tr>
<td>data</td>
<td><a href="#extrinsicwithindex">ExtrinsicWithIndex</a></td>
</tr>
<tr>
<td>version</td>
<td><code>EncodingVersions</code></td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <a href="#extrinsicwithaccount">ExtrinsicWithAccount</a></p>
<hr>
<p><a id="encodeextrinsic"></a></p>
<h3 id="encodeextrinsic">encodeExtrinsic</h3>
<p>&#x25B8; <strong>encodeExtrinsic</strong>(extrinsic: <em><code>SectionItem</code>&lt;<a href="#extrinsics">Extrinsics</a>&gt;</em>, values: <em><code>Array</code>&lt;<code>any</code>&gt;</em>, version: <em><code>EncodingVersions</code></em>): <a href="#extrinsicwithindex">ExtrinsicWithIndex</a></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b0e23/packages/type-extrinsics/src/codec/encode/extrinsic.ts#L12" target="_blank">codec/encode/extrinsic.ts:12</a></em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td>extrinsic</td>
<td><code>SectionItem</code>&lt;<a href="#extrinsics">Extrinsics</a>&gt;</td>
</tr>
<tr>
<td>values</td>
<td><code>Array</code>&lt;<code>any</code>&gt;</td>
</tr>
<tr>
<td>version</td>
<td><code>EncodingVersions</code></td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <a href="#extrinsicwithindex">ExtrinsicWithIndex</a></p>
<hr>
<p><a id="encodelength"></a></p>
<h3 id="encodelength">encodeLength</h3>
<p>&#x25B8; <strong>encodeLength</strong>(...values: <em><code>Array</code>&lt;<code>Uint8Array</code>&gt;</em>): <code>Uint8Array</code></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b0e23/packages/type-extrinsics/src/codec/encode/length.ts#L8" target="_blank">codec/encode/length.ts:8</a></em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Rest</code> values</td>
<td><code>Array</code>&lt;<code>Uint8Array</code>&gt;</td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <code>Uint8Array</code></p>
<hr>
<p><a id="unchecked"></a></p>
<h3 id="unchecked">unchecked</h3>
<p>&#x25B8; <strong>unchecked</strong>(pair: <em><code>KeyringPair</code></em>, index: <em> <code>number</code> | <code>BN</code></em>, extrinsic: <em><code>SectionItem</code>&lt;<a href="#extrinsics">Extrinsics</a>&gt;</em>, values: <em><code>Array</code>&lt;<code>any</code>&gt;</em>, version?: <em><code>EncodingVersions</code></em>): <code>UncheckedRaw</code></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b0e23/packages/type-extrinsics/src/codec/encode/unchecked.ts#L16" target="_blank">codec/encode/unchecked.ts:16</a></em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
<th>Default value</th>
</tr>
</thead>
<tbody>
<tr>
<td>pair</td>
<td><code>KeyringPair</code></td>
<td>-</td>
</tr>
<tr>
<td>index</td>
<td><code>number</code> | <code>BN</code></td>
<td>-</td>
</tr>
<tr>
<td>extrinsic</td>
<td><code>SectionItem</code>&lt;<a href="#extrinsics">Extrinsics</a>&gt;</td>
<td>-</td>
</tr>
<tr>
<td>values</td>
<td><code>Array</code>&lt;<code>any</code>&gt;</td>
<td>-</td>
</tr>
<tr>
<td><code>Default value</code> version</td>
<td><code>EncodingVersions</code></td>
<td>&quot;latest&quot;</td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <code>UncheckedRaw</code></p>
<hr>
<p><a id="uncheckedlength"></a></p>
<h3 id="uncheckedlength">uncheckedLength</h3>
<p>&#x25B8; <strong>uncheckedLength</strong>(pair: <em><code>KeyringPair</code></em>, index: <em> <code>number</code> | <code>BN</code></em>, extrinsic: <em><code>SectionItem</code>&lt;<a href="#extrinsics">Extrinsics</a>&gt;</em>, values: <em><code>Array</code>&lt;<code>any</code>&gt;</em>, version?: <em><code>EncodingVersions</code></em>): <code>UncheckedRaw</code></p>
<p><em>Defined in <a href="https://github.com/polkadot-js/api/blob/f5b0e23/packages/type-extrinsics/src/codec/encode/uncheckedLength.ts#L14" target="_blank">codec/encode/uncheckedLength.ts:14</a></em></p>
<p><strong>Parameters:</strong></p>
<table>
<thead>
<tr>
<th>Param</th>
<th>Type</th>
<th>Default value</th>
</tr>
</thead>
<tbody>
<tr>
<td>pair</td>
<td><code>KeyringPair</code></td>
<td>-</td>
</tr>
<tr>
<td>index</td>
<td><code>number</code> | <code>BN</code></td>
<td>-</td>
</tr>
<tr>
<td>extrinsic</td>
<td><code>SectionItem</code>&lt;<a href="#extrinsics">Extrinsics</a>&gt;</td>
<td>-</td>
</tr>
<tr>
<td>values</td>
<td><code>Array</code>&lt;<code>any</code>&gt;</td>
<td>-</td>
</tr>
<tr>
<td><code>Default value</code> version</td>
<td><code>EncodingVersions</code></td>
<td>&quot;latest&quot;</td>
</tr>
</tbody>
</table>
<p><strong>Returns:</strong> <code>UncheckedRaw</code></p>
<hr>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="../api-rx/" class="navigation navigation-prev " aria-label="Previous page: api-rx">
<i class="fa fa-angle-left"></i>
</a>
<a href="../type-jsonrpc/" class="navigation navigation-next " aria-label="Next page: type-jsonrpc">
<i class="fa fa-angle-right"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"type-extrinsics","level":"2.5","depth":1,"next":{"title":"type-jsonrpc","level":"2.6","depth":1,"path":"type-jsonrpc/README.md","ref":"type-jsonrpc/README.md","articles":[]},"previous":{"title":"api-rx","level":"2.4","depth":1,"path":"api-rx/README.md","ref":"api-rx/README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["asciidoc-include"],"root":"docs","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"asciidoc-include":{"syntax":"asciidoc"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Polkadot API Book","gitbook":">=2.4.0"},"file":{"path":"type-extrinsics/README.md","mtime":"2018-09-17T12:36:23.490Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-09-17T12:37:27.221Z"},"basePath":"..","book":{"language":""}});
});
</script>
</div>
<script src="../gitbook/gitbook.js"></script>
<script src="../gitbook/theme.js"></script>
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
<script src="../gitbook/gitbook-plugin-search/search.js"></script>
<script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
<script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
</body>
</html>