[CI Skip] 0.32.19
This commit is contained in:
@@ -393,7 +393,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Create Account","level":"2.1.1","depth":2,"next":{"title":"Load Accounts","level":"2.1.2","depth":2,"path":"examples/keyring/02_load_accounts/README.md","ref":"examples/keyring/02_load_accounts/README.md","articles":[]},"previous":{"title":"Keyring","level":"2.1","depth":1,"path":"examples/keyring/README.md","ref":"examples/keyring/README.md","articles":[{"title":"Create Account","level":"2.1.1","depth":2,"path":"examples/keyring/01_create_account/README.md","ref":"examples/keyring/01_create_account/README.md","articles":[]},{"title":"Load Accounts","level":"2.1.2","depth":2,"path":"examples/keyring/02_load_accounts/README.md","ref":"examples/keyring/02_load_accounts/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":"/common/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 Common Book","gitbook":">=2.4.0"},"file":{"path":"examples/keyring/01_create_account/README.md","mtime":"2018-11-14T09:57:25.732Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T10:00:55.327Z"},"basePath":"../../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Create Account","level":"2.1.1","depth":2,"next":{"title":"Load Accounts","level":"2.1.2","depth":2,"path":"examples/keyring/02_load_accounts/README.md","ref":"examples/keyring/02_load_accounts/README.md","articles":[]},"previous":{"title":"Keyring","level":"2.1","depth":1,"path":"examples/keyring/README.md","ref":"examples/keyring/README.md","articles":[{"title":"Create Account","level":"2.1.1","depth":2,"path":"examples/keyring/01_create_account/README.md","ref":"examples/keyring/01_create_account/README.md","articles":[]},{"title":"Load Accounts","level":"2.1.2","depth":2,"path":"examples/keyring/02_load_accounts/README.md","ref":"examples/keyring/02_load_accounts/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":"/common/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 Common Book","gitbook":">=2.4.0"},"file":{"path":"examples/keyring/01_create_account/README.md","mtime":"2018-11-14T12:27:50.323Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T12:31:37.866Z"},"basePath":"../../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
    <span class="sunlight-operator">.</span><span class="sunlight-ident">forEach</span><span class="sunlight-punctuation">(</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">pair</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-reservedWord">const</span> <span class="sunlight-ident">address</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">pair</span><span class="sunlight-operator">.</span><span class="sunlight-ident">address</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">index</span><span class="sunlight-punctuation">}</span> <span class="sunlight-ident">account</span> <span class="sunlight-ident">has</span> <span class="sunlight-ident">json</span><span class="sunlight-operator">:</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-punctuation">\</span><span class="sunlight-ident">nAccount</span> <span class="sunlight-keyword">with</span> <span class="sunlight-ident">index</span> <span class="sunlight-punctuation">#</span><span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">index</span><span class="sunlight-punctuation">}</span> <span class="sunlight-ident">has</span> <span class="sunlight-ident">json</span><span class="sunlight-operator">:</span> <span class="sunlight-punctuation">`</span><span class="sunlight-punctuation">,</span>
|
||||
        <span class="sunlight-globalObject">JSON</span><span class="sunlight-operator">.</span><span class="sunlight-ident">stringify</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">keyring</span><span class="sunlight-operator">.</span><span class="sunlight-ident">toJson</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">address</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">,</span> <span class="sunlight-keyword">null</span><span class="sunlight-punctuation">,</span> <span class="sunlight-number">2</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>
|
||||
@@ -405,7 +405,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Load Accounts","level":"2.1.2","depth":2,"next":{"title":"Util-Crypto","level":"2.2","depth":1,"path":"examples/util-crypto/README.md","ref":"examples/util-crypto/README.md","articles":[{"title":"Encrypt & Decrypt Message","level":"2.2.1","depth":2,"path":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","ref":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","articles":[]},{"title":"Sign & Verify Message","level":"2.2.2","depth":2,"path":"examples/util-crypto/02_sign_verify_message_nacl/README.md","ref":"examples/util-crypto/02_sign_verify_message_nacl/README.md","articles":[]},{"title":"Create & Validate Mnemonic","level":"2.2.3","depth":2,"path":"examples/util-crypto/03_mnemonic_generate_validate_bip39/README.md","ref":"examples/util-crypto/03_mnemonic_generate_validate_bip39/README.md","articles":[]}]},"previous":{"title":"Create Account","level":"2.1.1","depth":2,"path":"examples/keyring/01_create_account/README.md","ref":"examples/keyring/01_create_account/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":"/common/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 Common Book","gitbook":">=2.4.0"},"file":{"path":"examples/keyring/02_load_accounts/README.md","mtime":"2018-11-14T09:57:25.732Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T10:00:55.327Z"},"basePath":"../../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Load Accounts","level":"2.1.2","depth":2,"next":{"title":"Util-Crypto","level":"2.2","depth":1,"path":"examples/util-crypto/README.md","ref":"examples/util-crypto/README.md","articles":[{"title":"Encrypt & Decrypt Message","level":"2.2.1","depth":2,"path":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","ref":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","articles":[]},{"title":"Sign & Verify Message","level":"2.2.2","depth":2,"path":"examples/util-crypto/02_sign_verify_message_nacl/README.md","ref":"examples/util-crypto/02_sign_verify_message_nacl/README.md","articles":[]},{"title":"Create & Validate Mnemonic","level":"2.2.3","depth":2,"path":"examples/util-crypto/03_mnemonic_generate_validate_bip39/README.md","ref":"examples/util-crypto/03_mnemonic_generate_validate_bip39/README.md","articles":[]}]},"previous":{"title":"Create Account","level":"2.1.1","depth":2,"path":"examples/keyring/01_create_account/README.md","ref":"examples/keyring/01_create_account/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":"/common/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 Common Book","gitbook":">=2.4.0"},"file":{"path":"examples/keyring/02_load_accounts/README.md","mtime":"2018-11-14T12:27:50.323Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T12:31:37.866Z"},"basePath":"../../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -378,7 +378,7 @@ yarn start
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Keyring","level":"2.1","depth":1,"next":{"title":"Create Account","level":"2.1.1","depth":2,"path":"examples/keyring/01_create_account/README.md","ref":"examples/keyring/01_create_account/README.md","articles":[]},"previous":{"title":"util-crypto","level":"1.6","depth":1,"path":"util-crypto/README.md","ref":"util-crypto/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":"/common/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 Common Book","gitbook":">=2.4.0"},"file":{"path":"examples/keyring/README.md","mtime":"2018-11-14T09:57:25.732Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T10:00:55.327Z"},"basePath":"../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Keyring","level":"2.1","depth":1,"next":{"title":"Create Account","level":"2.1.1","depth":2,"path":"examples/keyring/01_create_account/README.md","ref":"examples/keyring/01_create_account/README.md","articles":[]},"previous":{"title":"util-crypto","level":"1.6","depth":1,"path":"util-crypto/README.md","ref":"util-crypto/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":"/common/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 Common Book","gitbook":">=2.4.0"},"file":{"path":"examples/keyring/README.md","mtime":"2018-11-14T12:27:50.323Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T12:31:37.866Z"},"basePath":"../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -330,8 +330,7 @@
|
||||
|
||||
<h1 id="encrypt--decrypt-message-using-nacl">Encrypt & Decrypt Message using NaCl</h1>
|
||||
<p>The following example shows how to encrypt and decrypt a message with NaCl (pronouced "salt"), which is a Networking and Cryptography library used in util-crypto.</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-punctuation">{</span> <span class="sunlight-ident">naclEncrypt</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-crypto'</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">naclDecrypt</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-crypto'</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</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-reservedWord">const</span> <span class="sunlight-punctuation">{</span> <span class="sunlight-ident">naclEncrypt</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">naclDecrypt</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-crypto'</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>
|
||||
  <span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">secret</span> <span class="sunlight-operator">=</span> <span class="sunlight-keyword">new</span> <span class="sunlight-ident">Uint8Array</span><span class="sunlight-punctuation">(</span><span class="sunlight-number">32</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
@@ -398,7 +397,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Encrypt & Decrypt Message","level":"2.2.1","depth":2,"next":{"title":"Sign & Verify Message","level":"2.2.2","depth":2,"path":"examples/util-crypto/02_sign_verify_message_nacl/README.md","ref":"examples/util-crypto/02_sign_verify_message_nacl/README.md","articles":[]},"previous":{"title":"Util-Crypto","level":"2.2","depth":1,"path":"examples/util-crypto/README.md","ref":"examples/util-crypto/README.md","articles":[{"title":"Encrypt & Decrypt Message","level":"2.2.1","depth":2,"path":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","ref":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","articles":[]},{"title":"Sign & Verify Message","level":"2.2.2","depth":2,"path":"examples/util-crypto/02_sign_verify_message_nacl/README.md","ref":"examples/util-crypto/02_sign_verify_message_nacl/README.md","articles":[]},{"title":"Create & Validate Mnemonic","level":"2.2.3","depth":2,"path":"examples/util-crypto/03_mnemonic_generate_validate_bip39/README.md","ref":"examples/util-crypto/03_mnemonic_generate_validate_bip39/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":"/common/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 Common Book","gitbook":">=2.4.0"},"file":{"path":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","mtime":"2018-11-14T09:57:25.736Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T10:00:55.327Z"},"basePath":"../../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Encrypt & Decrypt Message","level":"2.2.1","depth":2,"next":{"title":"Sign & Verify Message","level":"2.2.2","depth":2,"path":"examples/util-crypto/02_sign_verify_message_nacl/README.md","ref":"examples/util-crypto/02_sign_verify_message_nacl/README.md","articles":[]},"previous":{"title":"Util-Crypto","level":"2.2","depth":1,"path":"examples/util-crypto/README.md","ref":"examples/util-crypto/README.md","articles":[{"title":"Encrypt & Decrypt Message","level":"2.2.1","depth":2,"path":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","ref":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","articles":[]},{"title":"Sign & Verify Message","level":"2.2.2","depth":2,"path":"examples/util-crypto/02_sign_verify_message_nacl/README.md","ref":"examples/util-crypto/02_sign_verify_message_nacl/README.md","articles":[]},{"title":"Create & Validate Mnemonic","level":"2.2.3","depth":2,"path":"examples/util-crypto/03_mnemonic_generate_validate_bip39/README.md","ref":"examples/util-crypto/03_mnemonic_generate_validate_bip39/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":"/common/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 Common Book","gitbook":">=2.4.0"},"file":{"path":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","mtime":"2018-11-14T12:27:50.323Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T12:31:37.866Z"},"basePath":"../../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -330,13 +330,8 @@
|
||||
|
||||
<h1 id="sign--verify-message-using-nacl">Sign & Verify Message using NaCl</h1>
|
||||
<p>The following example shows how to sign and verify a message with NaCl (pronouced "salt"), which is a Networking and Cryptography library used in util-crypto.</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">stringToU8a</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">require</span><span class="sunlight-punctuation">(</span><span class="sunlight-string">'@polkadot/util/string/toU8a'</span><span class="sunlight-punctuation">)</span><span class="sunlight-operator">.</span><span class="sunlight-keyword">default</span><span class="sunlight-punctuation">;</span>
|
||||
<span class="sunlight-reservedWord">const</span> <span class="sunlight-punctuation">{</span> <span class="sunlight-ident">randomAsU8a</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-crypto'</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">naclKeypairFromSeed</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-crypto'</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">naclEncrypt</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-crypto'</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">naclSign</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-crypto'</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">naclVerify</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-crypto'</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</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-reservedWord">const</span> <span class="sunlight-punctuation">{</span> <span class="sunlight-ident">stringToU8a</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">u8aToHex</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-punctuation">{</span> <span class="sunlight-ident">naclEncrypt</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">naclKeypairFromSeed</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">naclSign</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">naclVerify</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">randomAsU8a</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-crypto'</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>
|
||||
  <span class="sunlight-comment">// Create account seed for Alice as fallback if generated mnemonic not valid</span>
|
||||
@@ -355,6 +350,8 @@
|
||||
  <span class="sunlight-comment">// Sign the message with a valid signature</span>
|
||||
  <span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">messageSignature</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">naclSign</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">encrypted</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">secretKey</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">Message</span> <span class="sunlight-ident">signature</span><span class="sunlight-operator">:</span> <span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">u8aToHex</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">messageSignature</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">// Validate that the message was correctly signed</span>
|
||||
  <span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">isValidSignature</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">naclVerify</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">encrypted</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">messageSignature</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">publicKey</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
|
||||
@@ -406,7 +403,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Sign & Verify Message","level":"2.2.2","depth":2,"next":{"title":"Create & Validate Mnemonic","level":"2.2.3","depth":2,"path":"examples/util-crypto/03_mnemonic_generate_validate_bip39/README.md","ref":"examples/util-crypto/03_mnemonic_generate_validate_bip39/README.md","articles":[]},"previous":{"title":"Encrypt & Decrypt Message","level":"2.2.1","depth":2,"path":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","ref":"examples/util-crypto/01_encrypt_decrypt_message_nacl/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":"/common/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 Common Book","gitbook":">=2.4.0"},"file":{"path":"examples/util-crypto/02_sign_verify_message_nacl/README.md","mtime":"2018-11-14T09:57:25.736Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T10:00:55.327Z"},"basePath":"../../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Sign & Verify Message","level":"2.2.2","depth":2,"next":{"title":"Create & Validate Mnemonic","level":"2.2.3","depth":2,"path":"examples/util-crypto/03_mnemonic_generate_validate_bip39/README.md","ref":"examples/util-crypto/03_mnemonic_generate_validate_bip39/README.md","articles":[]},"previous":{"title":"Encrypt & Decrypt Message","level":"2.2.1","depth":2,"path":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","ref":"examples/util-crypto/01_encrypt_decrypt_message_nacl/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":"/common/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 Common Book","gitbook":">=2.4.0"},"file":{"path":"examples/util-crypto/02_sign_verify_message_nacl/README.md","mtime":"2018-11-14T12:27:50.323Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T12:31:37.866Z"},"basePath":"../../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -328,16 +328,14 @@
|
||||
|
||||
<h1 id="create--generate-mnemonic-using-bip39">Create & Generate Mnemonic using BIP39</h1>
|
||||
<p>The following example shows how to create and generate mnemonics using BIP39.</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-punctuation">{</span> <span class="sunlight-ident">mnemonicGenerate</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-crypto'</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">mnemonicToSeed</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-crypto'</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">mnemonicValidate</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-crypto'</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">toSecret</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-crypto'</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">naclKeypairFromSeed</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-crypto'</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</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-reservedWord">const</span> <span class="sunlight-punctuation">{</span> <span class="sunlight-ident">mnemonicGenerate</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">mnemonicToSeed</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">mnemonicValidate</span><span class="sunlight-punctuation">,</span> <span class="sunlight-ident">naclKeypairFromSeed</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-crypto'</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>
|
||||
  <span class="sunlight-comment">// Create mnemonic string for Alice using BIP39</span>
|
||||
  <span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">mnemonicAlice</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">mnemonicGenerate</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">Generated</span> <span class="sunlight-ident">mnemonic</span><span class="sunlight-operator">:</span> <span class="sunlight-ident">$</span><span class="sunlight-punctuation">{</span><span class="sunlight-ident">mnemonicAlice</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">// Validate the mnemic string that was generated</span>
|
||||
  <span class="sunlight-reservedWord">const</span> <span class="sunlight-ident">isValidMnemonic</span> <span class="sunlight-operator">=</span> <span class="sunlight-ident">mnemonicValidate</span><span class="sunlight-punctuation">(</span><span class="sunlight-ident">mnemonicAlice</span><span class="sunlight-punctuation">)</span><span class="sunlight-punctuation">;</span>
|
||||
|
||||
@@ -394,7 +392,7 @@
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Create & Validate Mnemonic","level":"2.2.3","depth":2,"previous":{"title":"Sign & Verify Message","level":"2.2.2","depth":2,"path":"examples/util-crypto/02_sign_verify_message_nacl/README.md","ref":"examples/util-crypto/02_sign_verify_message_nacl/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":"/common/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 Common Book","gitbook":">=2.4.0"},"file":{"path":"examples/util-crypto/03_mnemonic_generate_validate_bip39/README.md","mtime":"2018-11-14T09:57:25.736Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T10:00:55.327Z"},"basePath":"../../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Create & Validate Mnemonic","level":"2.2.3","depth":2,"previous":{"title":"Sign & Verify Message","level":"2.2.2","depth":2,"path":"examples/util-crypto/02_sign_verify_message_nacl/README.md","ref":"examples/util-crypto/02_sign_verify_message_nacl/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":"/common/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 Common Book","gitbook":">=2.4.0"},"file":{"path":"examples/util-crypto/03_mnemonic_generate_validate_bip39/README.md","mtime":"2018-11-14T12:27:50.323Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T12:31:37.866Z"},"basePath":"../../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -378,7 +378,7 @@ yarn start
|
||||
<script>
|
||||
var gitbook = gitbook || [];
|
||||
gitbook.push(function() {
|
||||
gitbook.page.hasChanged({"page":{"title":"Util-Crypto","level":"2.2","depth":1,"next":{"title":"Encrypt & Decrypt Message","level":"2.2.1","depth":2,"path":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","ref":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","articles":[]},"previous":{"title":"Load Accounts","level":"2.1.2","depth":2,"path":"examples/keyring/02_load_accounts/README.md","ref":"examples/keyring/02_load_accounts/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":"/common/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 Common Book","gitbook":">=2.4.0"},"file":{"path":"examples/util-crypto/README.md","mtime":"2018-11-14T09:57:25.736Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T10:00:55.327Z"},"basePath":"../..","book":{"language":""}});
|
||||
gitbook.page.hasChanged({"page":{"title":"Util-Crypto","level":"2.2","depth":1,"next":{"title":"Encrypt & Decrypt Message","level":"2.2.1","depth":2,"path":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","ref":"examples/util-crypto/01_encrypt_decrypt_message_nacl/README.md","articles":[]},"previous":{"title":"Load Accounts","level":"2.1.2","depth":2,"path":"examples/keyring/02_load_accounts/README.md","ref":"examples/keyring/02_load_accounts/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":"/common/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 Common Book","gitbook":">=2.4.0"},"file":{"path":"examples/util-crypto/README.md","mtime":"2018-11-14T12:27:50.323Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-14T12:31:37.866Z"},"basePath":"../..","book":{"language":""}});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user