Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Velenir committed Dec 9, 2024
1 parent a1215ef commit 81dfb0a
Show file tree
Hide file tree
Showing 180 changed files with 2,366 additions and 76 deletions.
8 changes: 4 additions & 4 deletions docs/html/assets/highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
--dark-hl-8: #B5CEA8;
--light-hl-9: #267F99;
--dark-hl-9: #4EC9B0;
--light-hl-10: #CD3131;
--dark-hl-10: #F44747;
--light-hl-11: #000000FF;
--dark-hl-11: #D4D4D4;
--light-hl-10: #000000FF;
--dark-hl-10: #D4D4D4;
--light-hl-11: #CD3131;
--dark-hl-11: #F44747;
--light-hl-12: #EE0000;
--dark-hl-12: #D7BA7D;
--light-hl-13: #811F3F;
Expand Down
2 changes: 1 addition & 1 deletion docs/html/assets/navigation.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/html/assets/search.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/html/classes/_internal_.Duplex.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/html/classes/_internal_.Readable.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/html/classes/_internal_.ReadableBase.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/html/classes/_internal_.Socket.html
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@
<p>The <code>readable.read()</code> method should only be called on <code>Readable</code> streams
operating in paused mode. In flowing mode, <code>readable.read()</code> is called
automatically until the internal buffer is fully drained.</p>
<pre><code class="js"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">readable</span><span class="hl-1"> = </span><span class="hl-0">getReadableStreamSomehow</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// &#39;readable&#39; may be triggered multiple times as data is buffered in</span><br/><span class="hl-4">readable</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;readable&#39;</span><span class="hl-1">, () </span><span class="hl-6">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">let</span><span class="hl-1"> </span><span class="hl-4">chunk</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Stream is readable (new data received in buffer)&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-5">// Use a loop to make sure we read all currently available data</span><br/><span class="hl-1"> </span><span class="hl-3">while</span><span class="hl-1"> (</span><span class="hl-6">null</span><span class="hl-1"> !== (</span><span class="hl-4">chunk</span><span class="hl-1"> = </span><span class="hl-4">readable</span><span class="hl-1">.</span><span class="hl-0">read</span><span class="hl-1">())) {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Read </span><span class="hl-6">${</span><span class="hl-4">chunk</span><span class="hl-11">.</span><span class="hl-4">length</span><span class="hl-6">}</span><span class="hl-2"> bytes of data...`</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">// &#39;end&#39; will be triggered once when there is no more data available</span><br/><span class="hl-4">readable</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;end&#39;</span><span class="hl-1">, () </span><span class="hl-6">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Reached end of stream.&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
<pre><code class="js"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">readable</span><span class="hl-1"> = </span><span class="hl-0">getReadableStreamSomehow</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// &#39;readable&#39; may be triggered multiple times as data is buffered in</span><br/><span class="hl-4">readable</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;readable&#39;</span><span class="hl-1">, () </span><span class="hl-6">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">let</span><span class="hl-1"> </span><span class="hl-4">chunk</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Stream is readable (new data received in buffer)&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-5">// Use a loop to make sure we read all currently available data</span><br/><span class="hl-1"> </span><span class="hl-3">while</span><span class="hl-1"> (</span><span class="hl-6">null</span><span class="hl-1"> !== (</span><span class="hl-4">chunk</span><span class="hl-1"> = </span><span class="hl-4">readable</span><span class="hl-1">.</span><span class="hl-0">read</span><span class="hl-1">())) {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Read </span><span class="hl-6">${</span><span class="hl-4">chunk</span><span class="hl-10">.</span><span class="hl-4">length</span><span class="hl-6">}</span><span class="hl-2"> bytes of data...`</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">// &#39;end&#39; will be triggered once when there is no more data available</span><br/><span class="hl-4">readable</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;end&#39;</span><span class="hl-1">, () </span><span class="hl-6">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Reached end of stream.&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
</code><button type="button">Copy</button></pre>

<p>Each call to <code>readable.read()</code> returns a chunk of data, or <code>null</code>. The chunks
Expand Down
2 changes: 1 addition & 1 deletion docs/html/classes/_internal_.Wallet.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">password</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The password which will be used for encryption</p>
</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Record.html" class="tsd-signature-type tsd-kind-type-alias">Record</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>encryption options</p>
</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/_internal_.__home_velenir_gnx570_Projects_Paraswap_paraswap_sdk_node_modules_web3_types_lib_commonjs_index_.KeyStore.html" class="tsd-signature-type tsd-kind-type-alias">KeyStore</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>An array of the encrypted keystore v3.</p>
<pre><code class="ts"><span class="hl-4">web3</span><span class="hl-1">.</span><span class="hl-4">eth</span><span class="hl-1">.</span><span class="hl-4">accounts</span><span class="hl-1">.</span><span class="hl-4">wallet</span><span class="hl-1">.</span><span class="hl-0">create</span><span class="hl-1">(</span><span class="hl-8">1</span><span class="hl-1">)</span><br/><span class="hl-4">web3</span><span class="hl-1">.</span><span class="hl-4">eth</span><span class="hl-1">.</span><span class="hl-4">accounts</span><span class="hl-1">.</span><span class="hl-4">wallet</span><span class="hl-1">.</span><span class="hl-0">encrypt</span><span class="hl-1">(</span><span class="hl-2">&quot;abc&quot;</span><span class="hl-1">).</span><span class="hl-0">then</span><span class="hl-1">(</span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-4">log</span><span class="hl-1">);</span><br/><span class="hl-1">&gt; [</span><br/><span class="hl-2">&#39;{&quot;version&quot;:3,&quot;id&quot;:&quot;fa46e213-a7c3-4844-b903-dd14d39cc7db&quot;</span><span class="hl-10">,</span><br/><span class="hl-2">&quot;address&quot;</span><span class="hl-1">:</span><span class="hl-2">&quot;fa3e41a401609103c241431cbdee8623ae2a321a&quot;</span><span class="hl-1">,</span><span class="hl-2">&quot;crypto&quot;</span><span class="hl-1">:</span><br/><span class="hl-1">{</span><span class="hl-2">&quot;ciphertext&quot;</span><span class="hl-4">:</span><span class="hl-2">&quot;8d179a911d6146ad2924e86bf493ed89b8ff3596ffec0816e761c542016ab13c&quot;</span><span class="hl-1">,</span><br/><span class="hl-2">&quot;cipherparams&quot;</span><span class="hl-4">:</span><span class="hl-1">{</span><span class="hl-2">&quot;iv&quot;</span><span class="hl-4">:</span><span class="hl-2">&quot;acc888c6cf4a19b86846cef0185a7164&quot;</span><span class="hl-1">},</span><span class="hl-2">&quot;cipher&quot;</span><span class="hl-4">:</span><span class="hl-2">&quot;aes-128-ctr&quot;</span><span class="hl-1">,</span><br/><span class="hl-2">&quot;kdf&quot;</span><span class="hl-4">:</span><span class="hl-2">&quot;scrypt&quot;</span><span class="hl-1">,</span><span class="hl-2">&quot;kdfparams&quot;</span><span class="hl-4">:</span><span class="hl-1">{</span><span class="hl-2">&quot;n&quot;</span><span class="hl-4">:</span><span class="hl-8">8192</span><span class="hl-1">,</span><span class="hl-2">&quot;r&quot;</span><span class="hl-4">:</span><span class="hl-8">8</span><span class="hl-1">,</span><span class="hl-2">&quot;p&quot;</span><span class="hl-4">:</span><span class="hl-8">1</span><span class="hl-1">,</span><span class="hl-2">&quot;dklen&quot;</span><span class="hl-4">:</span><span class="hl-8">32</span><span class="hl-1">,</span><span class="hl-2">&quot;salt&quot;</span><span class="hl-4">:</span><span class="hl-2">&quot;6a743c9b367d15f4758e4f3f3378ff0fd443708d1c64854e07588ea5331823ae&quot;</span><span class="hl-1">},</span><br/><span class="hl-2">&quot;mac&quot;</span><span class="hl-4">:</span><span class="hl-2">&quot;410544c8307e3691fda305eb3722d82c3431f212a87daa119a21587d96698b57&quot;</span><span class="hl-1">}}</span><span class="hl-2">&#39;</span><br/><span class="hl-10">]</span>
<pre><code class="ts"><span class="hl-4">web3</span><span class="hl-1">.</span><span class="hl-4">eth</span><span class="hl-1">.</span><span class="hl-4">accounts</span><span class="hl-1">.</span><span class="hl-4">wallet</span><span class="hl-1">.</span><span class="hl-0">create</span><span class="hl-1">(</span><span class="hl-8">1</span><span class="hl-1">)</span><br/><span class="hl-4">web3</span><span class="hl-1">.</span><span class="hl-4">eth</span><span class="hl-1">.</span><span class="hl-4">accounts</span><span class="hl-1">.</span><span class="hl-4">wallet</span><span class="hl-1">.</span><span class="hl-0">encrypt</span><span class="hl-1">(</span><span class="hl-2">&quot;abc&quot;</span><span class="hl-1">).</span><span class="hl-0">then</span><span class="hl-1">(</span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-4">log</span><span class="hl-1">);</span><br/><span class="hl-1">&gt; [</span><br/><span class="hl-2">&#39;{&quot;version&quot;:3,&quot;id&quot;:&quot;fa46e213-a7c3-4844-b903-dd14d39cc7db&quot;</span><span class="hl-11">,</span><br/><span class="hl-2">&quot;address&quot;</span><span class="hl-1">:</span><span class="hl-2">&quot;fa3e41a401609103c241431cbdee8623ae2a321a&quot;</span><span class="hl-1">,</span><span class="hl-2">&quot;crypto&quot;</span><span class="hl-1">:</span><br/><span class="hl-1">{</span><span class="hl-2">&quot;ciphertext&quot;</span><span class="hl-4">:</span><span class="hl-2">&quot;8d179a911d6146ad2924e86bf493ed89b8ff3596ffec0816e761c542016ab13c&quot;</span><span class="hl-1">,</span><br/><span class="hl-2">&quot;cipherparams&quot;</span><span class="hl-4">:</span><span class="hl-1">{</span><span class="hl-2">&quot;iv&quot;</span><span class="hl-4">:</span><span class="hl-2">&quot;acc888c6cf4a19b86846cef0185a7164&quot;</span><span class="hl-1">},</span><span class="hl-2">&quot;cipher&quot;</span><span class="hl-4">:</span><span class="hl-2">&quot;aes-128-ctr&quot;</span><span class="hl-1">,</span><br/><span class="hl-2">&quot;kdf&quot;</span><span class="hl-4">:</span><span class="hl-2">&quot;scrypt&quot;</span><span class="hl-1">,</span><span class="hl-2">&quot;kdfparams&quot;</span><span class="hl-4">:</span><span class="hl-1">{</span><span class="hl-2">&quot;n&quot;</span><span class="hl-4">:</span><span class="hl-8">8192</span><span class="hl-1">,</span><span class="hl-2">&quot;r&quot;</span><span class="hl-4">:</span><span class="hl-8">8</span><span class="hl-1">,</span><span class="hl-2">&quot;p&quot;</span><span class="hl-4">:</span><span class="hl-8">1</span><span class="hl-1">,</span><span class="hl-2">&quot;dklen&quot;</span><span class="hl-4">:</span><span class="hl-8">32</span><span class="hl-1">,</span><span class="hl-2">&quot;salt&quot;</span><span class="hl-4">:</span><span class="hl-2">&quot;6a743c9b367d15f4758e4f3f3378ff0fd443708d1c64854e07588ea5331823ae&quot;</span><span class="hl-1">},</span><br/><span class="hl-2">&quot;mac&quot;</span><span class="hl-4">:</span><span class="hl-2">&quot;410544c8307e3691fda305eb3722d82c3431f212a87daa119a21587d96698b57&quot;</span><span class="hl-1">}}</span><span class="hl-2">&#39;</span><br/><span class="hl-11">]</span>
</code><button type="button">Copy</button></pre>

<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides <a href="_internal_.Web3BaseWallet.html">Web3BaseWallet</a>.<a href="_internal_.Web3BaseWallet.html#encrypt">encrypt</a></p><ul><li>Defined in node_modules/web3-eth-accounts/lib/commonjs/wallet.d.ts:171</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="entries-1" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>entries</span><a href="#entries-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="entries-1.entries-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">entries</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.ArrayIterator.html" class="tsd-signature-type tsd-kind-interface">ArrayIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.Wallet.html#constructor.new_Wallet.T-1">T</a><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">&gt;</span><a href="#entries-1.entries-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an iterable of key, value pairs for every entry in the array</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/html/classes/_internal_.internal.PassThrough.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/html/classes/_internal_.internal.Transform.html

Large diffs are not rendered by default.

Loading

0 comments on commit 81dfb0a

Please sign in to comment.