This commit is contained in:
sayantank 2022-05-27 15:32:26 +00:00
parent 3015b0f8c7
commit a55fea3f6b
7 changed files with 18 additions and 18 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
<a href="#prerequisites" id="prerequisites" style="color: inherit; text-decoration: none;">
<h2>Prerequisites</h2>
</a>
<p>You will need to use the <code>FileKeypair</code> class that extends the (<code>Keypair</code>)[<a href="https://solana-labs.github.io/solana-web3.js/classes/Keypair.html%5D">https://solana-labs.github.io/solana-web3.js/classes/Keypair.html]</a> class from (<code>@solana/web3.js</code>)[<a href="https://npmjs.com/package/@solana/web3.js%5D">https://npmjs.com/package/@solana/web3.js]</a> to provide easy file-based keypair management, which is required for the market making features provided by this package.</p>
<p>You will need to use the <code>FileKeypair</code> class that extends the (Keypair)[<a href="https://solana-labs.github.io/solana-web3.js/classes/Keypair.html%5D">https://solana-labs.github.io/solana-web3.js/classes/Keypair.html]</a> class from (@solana/web3.js)[<a href="https://npmjs.com/package/@solana/web3.js%5D">https://npmjs.com/package/@solana/web3.js]</a> to provide easy file-based keypair management, which is required for the market making features provided by this package.</p>
<pre><code><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">owner</span><span class="hl-1"> = </span><span class="hl-3">FileKeypair</span><span class="hl-1">.</span><span class="hl-4">generate</span><span class="hl-1">(</span><span class="hl-5">&quot;./scripts/keys/owner.json&quot;</span><span class="hl-1">);</span><br/><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-2">airdropSig</span><span class="hl-1"> = </span><span class="hl-6">await</span><span class="hl-1"> </span><span class="hl-3">connection</span><span class="hl-1">.</span><span class="hl-4">requestAirdrop</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-3">owner</span><span class="hl-1">.</span><span class="hl-3">keypair</span><span class="hl-1">.</span><span class="hl-3">publicKey</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">10</span><span class="hl-1"> * </span><span class="hl-2">LAMPORTS_PER_SOL</span><span class="hl-1">,</span><br/><span class="hl-1">);</span><br/><span class="hl-6">await</span><span class="hl-1"> </span><span class="hl-3">connection</span><span class="hl-1">.</span><span class="hl-4">confirmTransaction</span><span class="hl-1">(</span><span class="hl-3">airdropSig</span><span class="hl-1">);</span>
</code></pre>
<p>You need to have a <a href="https://github.com/project-serum/serum-dex/">serum-dex</a> program deployed on the cluster you wish to interact with.</p>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long