add typedocs

This commit is contained in:
Sayantan Karmakar 2022-05-17 21:15:50 +05:30
parent 936dd3f5a4
commit 3d6289b763
23 changed files with 2590 additions and 2 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

BIN
ts/.DS_Store vendored Normal file

Binary file not shown.

1
ts/docs/.nojekyll Normal file
View File

@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.

View File

@ -0,0 +1,36 @@
:root {
--light-hl-0: #001080;
--dark-hl-0: #9CDCFE;
--light-hl-1: #000000;
--dark-hl-1: #D4D4D4;
--light-code-background: #F5F5F5;
--dark-code-background: #1E1E1E;
}
@media (prefers-color-scheme: light) { :root {
--hl-0: var(--light-hl-0);
--hl-1: var(--light-hl-1);
--code-background: var(--light-code-background);
} }
@media (prefers-color-scheme: dark) { :root {
--hl-0: var(--dark-hl-0);
--hl-1: var(--dark-hl-1);
--code-background: var(--dark-code-background);
} }
body.light {
--hl-0: var(--light-hl-0);
--hl-1: var(--light-hl-1);
--code-background: var(--light-code-background);
}
body.dark {
--hl-0: var(--dark-hl-0);
--hl-1: var(--dark-hl-1);
--code-background: var(--dark-code-background);
}
.hl-0 { color: var(--hl-0); }
.hl-1 { color: var(--hl-1); }
pre, code { background: var(--code-background); }

1043
ts/docs/assets/icons.css Normal file

File diff suppressed because it is too large Load Diff

BIN
ts/docs/assets/icons.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
ts/docs/assets/icons@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

52
ts/docs/assets/main.js Normal file

File diff suppressed because one or more lines are too long

1
ts/docs/assets/search.js Normal file

File diff suppressed because one or more lines are too long

1414
ts/docs/assets/style.css Normal file

File diff suppressed because it is too large Load Diff

BIN
ts/docs/assets/widgets.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 B

File diff suppressed because one or more lines are too long

1
ts/docs/classes/Dex.html Normal file

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

32
ts/docs/index.html Normal file
View File

@ -0,0 +1,32 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>serum-dev-tools</title><meta name="description" content="Documentation for serum-dev-tools"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">serum-dev-tools</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>serum-dev-tools </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><div class="tsd-panel tsd-typography">
<a href="#serum-devtools-🛠️" id="serum-devtools-🛠️" style="color: inherit; text-decoration: none;">
<h1>Serum DevTools 🛠️</h1>
</a>
<p>A developer tooling suite for building on Serum.</p>
<a href="#dev-setup" id="dev-setup" style="color: inherit; text-decoration: none;">
<h2>Dev Setup</h2>
</a>
<ol>
<li><p>Get a local validator running</p>
<pre><code><span class="hl-0">solana</span><span class="hl-1">-</span><span class="hl-0">test</span><span class="hl-1">-</span><span class="hl-0">validator</span><span class="hl-1"> -</span><span class="hl-0">r</span>
</code></pre>
</li>
<li><p>Init <code>serum-dev-tools</code> CLI in the <code>/cli</code> directory</p>
<pre><code><span class="hl-0">cd</span><span class="hl-1"> </span><span class="hl-0">cli</span><span class="hl-1"> &amp;&amp; </span><span class="hl-0">cargo</span><span class="hl-1"> </span><span class="hl-0">run</span><span class="hl-1"> -- </span><span class="hl-0">init</span>
</code></pre>
</li>
<li><p>Deploy <code>serum-dex</code> on localnet using the CLI</p>
<pre><code><span class="hl-0">cd</span><span class="hl-1"> </span><span class="hl-0">cli</span><span class="hl-1"> &amp;&amp; </span><span class="hl-0">cargo</span><span class="hl-1"> </span><span class="hl-0">run</span><span class="hl-1"> -- </span><span class="hl-0">deploy</span><span class="hl-1"> </span><span class="hl-0">l</span>
</code></pre>
</li>
<li><p>Install node packages and update <code>dexAddress</code> in <code>/ts/tests/dev.spec.ts</code> to the deployed program ID.</p>
<pre><code><span class="hl-0">cd</span><span class="hl-1"> </span><span class="hl-0">ts</span><span class="hl-1"> &amp;&amp; </span><span class="hl-0">yarn</span><span class="hl-1"> </span><span class="hl-0">install</span>
</code></pre>
</li>
<li><p>Run tests</p>
<pre><code><span class="hl-0">cd</span><span class="hl-1"> </span><span class="hl-0">ts</span><span class="hl-1"> &amp;&amp; </span><span class="hl-0">yarn</span><span class="hl-1"> </span><span class="hl-0">test</span>
</code></pre>
</li>
</ol>
</div></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-class"><a href="classes/Coin.html" class="tsd-kind-icon">Coin</a></li><li class="tsd-kind-class"><a href="classes/Dex.html" class="tsd-kind-icon">Dex</a></li><li class="tsd-kind-class"><a href="classes/DexMarket.html" class="tsd-kind-icon">Dex<wbr/>Market</a></li><li class="tsd-kind-class"><a href="classes/FileKeypair.html" class="tsd-kind-icon">File<wbr/>Keypair</a></li><li class="tsd-kind-interface"><a href="interfaces/MarketAccounts.html" class="tsd-kind-icon">Market<wbr/>Accounts</a></li><li class="tsd-kind-type-alias"><a href="modules.html#MarketArgs" class="tsd-kind-icon">Market<wbr/>Args</a></li><li class="tsd-kind-type-alias"><a href="modules.html#TransactionWithSigners" class="tsd-kind-icon">Transaction<wbr/>With<wbr/>Signers</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html>

File diff suppressed because one or more lines are too long

1
ts/docs/modules.html Normal file

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
[48,60,232,75,134,233,217,180,250,100,65,224,99,37,18,161,73,198,171,54,144,102,97,62,119,217,186,210,108,7,93,1,1,240,96,18,13,92,245,173,230,7,116,125,250,200,129,216,71,154,172,214,162,86,249,54,36,234,154,227,17,99,78,52]
[41,71,255,114,2,72,101,119,30,178,128,173,91,226,42,221,112,234,251,0,89,243,154,60,192,168,157,252,161,234,72,172,166,236,136,62,61,102,249,44,148,30,1,111,251,68,66,13,36,179,183,71,178,22,87,157,8,20,46,231,152,252,45,96]

View File

@ -13,6 +13,7 @@ const main = async () => {
const connection = new Connection("http://localhost:8899", "confirmed");
const owner = FileKeypair.generate("./scripts/keys/owner.json");
console.log("Owner: ", owner.keypair.publicKey.toString());
const airdropSig = await connection.requestAirdrop(
owner.keypair.publicKey,

View File

@ -8,6 +8,7 @@ const main = async () => {
const connection = new Connection("http://localhost:8899", "confirmed");
const owner = FileKeypair.generate("./scripts/keys/owner.json");
console.log("Owner: ", owner.keypair.publicKey.toString());
const airdropSig = await connection.requestAirdrop(
owner.keypair.publicKey,

View File

@ -8,7 +8,8 @@
"typeRoots": ["./node_modules/@types"],
"types": ["mocha", "chai", "node"],
// for BN constructor
"esModuleInterop": true
"esModuleInterop": true,
"skipLibCheck": true
},
"include": ["src/**/*", "**/*.spec.ts", "**/*.test.ts"],
"typedocOptions": {