2022-05-26 10:21:40 -07:00
|
|
|
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Dex | @project-serum/serum-dev-tools</title><meta name="description" content="Documentation for @project-serum/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">@project-serum/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"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@project-serum/serum-dev-tools</a></li><li><a href="Dex.html">Dex</a></li></ul><h1>Class Dex </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
|
2022-05-17 09:08:24 -07:00
|
|
|
<p>Dex is a wrapper class for a deployed Serum Dex program.</p>
|
2022-06-27 14:41:25 -07:00
|
|
|
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Dex</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Dex.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section tsd-is-private tsd-is-private-protected"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Dex.html#_address" class="tsd-kind-icon">_address</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Dex.html#_coins" class="tsd-kind-icon">_coins</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Dex.html#_connection" class="tsd-kind-icon">_connection</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Dex.html#_markets" class="tsd-kind-icon">_markets</a></li></ul></section><section class="tsd-index-section "><h3>Accessors</h3><ul class="tsd-index-list"><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="Dex.html#address" class="tsd-kind-icon">address</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="Dex.html#coins" class="tsd-kind-icon">coins</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="Dex.html#connection" class="tsd-kind-icon">connection</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="Dex.html#markets" class="tsd-kind-icon">markets</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class"><a href="Dex.html#createCoin" class="tsd-kind-icon">create<wbr/>Coin</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Dex.html#getCoin" class="tsd-kind-icon">get<wbr/>Coin</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Dex.html#getMarket" class="tsd-kind-icon">get<wbr/>Market</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Dex.html#initDexMarket" class="tsd-kind-icon">init<wbr/>Dex<wbr/>Market</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Dex.html#runCrank" class="tsd-kind-icon">run<wbr/>Crank</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Dex.html#runMarketMaker" class="tsd-kind-icon">run<wbr/>Market<wbr/>Maker</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link">constructor<a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>Dex<span class="tsd-signature-symbol">(</span>address<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span>, connection<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Connection</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Dex.html" class="tsd-signature-type" data-tsd-kind="Class">Dex</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/project-serum/
|
2022-05-24 03:02:39 -07:00
|
|
|
<p>Create a <code>Coin</code> object to be associated with the <code>Dex</code>.</p>
|
|
|
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>symbol: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The symbol of the coin to create</p>
|
|
|
|
</div></div></li><li><h5>decimals: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The decimals of the coin to create</p>
|
|
|
|
</div></div></li><li><h5>payer: <span class="tsd-signature-type">Keypair</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The payer <code>Keypair</code> to use for the transactions</p>
|
|
|
|
</div></div></li><li><h5>mintAuthority: <span class="tsd-signature-type">Keypair</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
2022-06-22 05:19:22 -07:00
|
|
|
<p>The optional mint authority <code>Keypair</code> to use for the mint</p>
|
|
|
|
</div></div></li><li><h5>freezeAuthority: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Keypair</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The optionals freeze authority <code>Keypair</code> to use for the mint</p>
|
|
|
|
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> keypair: <span class="tsd-signature-type">Keypair</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The optional keypair for the Mint to be created, defaults to a random one</p>
|
2022-06-27 14:41:25 -07:00
|
|
|
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="Coin.html" class="tsd-signature-type" data-tsd-kind="Class">Coin</a><span class="tsd-signature-symbol">></span></h4><div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getCoin" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Coin<a href="#getCoin" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Coin<span class="tsd-signature-symbol">(</span>symbol<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Coin.html" class="tsd-signature-type" data-tsd-kind="Class">Coin</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/project-serum/serum-dev-tools/blob/247d1c0/ts/src/dex.ts#L140">dex.ts:140</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
2022-05-24 03:02:39 -07:00
|
|
|
<p>Fetch one of the <code>Coin</code> objects associated with the <code>Dex</code> by symbol.</p>
|
|
|
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>symbol: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The symbol of the coin to fetch</p>
|
2022-06-27 14:41:25 -07:00
|
|
|
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="Coin.html" class="tsd-signature-type" data-tsd-kind="Class">Coin</a></h4><div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getMarket" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Market<a href="#getMarket" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Market<span class="tsd-signature-symbol">(</span>baseCoin<span class="tsd-signature-symbol">: </span><a href="Coin.html" class="tsd-signature-type" data-tsd-kind="Class">Coin</a>, quoteCoin<span class="tsd-signature-symbol">: </span><a href="Coin.html" class="tsd-signature-type" data-tsd-kind="Class">Coin</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DexMarket.html" class="tsd-signature-type" data-tsd-kind="Class">DexMarket</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/project-serum/serum-dev-tools/blob/247d1c0/ts/src/dex.ts#L153">dex.ts:153</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
2022-05-24 03:02:39 -07:00
|
|
|
<p>Fetch a <code>DexMarket</code> object associated with the <code>Dex</code> by the base coin and quote coin.</p>
|
|
|
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>baseCoin: <a href="Coin.html" class="tsd-signature-type" data-tsd-kind="Class">Coin</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The base <code>Coin</code> of the market to fetch</p>
|
|
|
|
</div></div></li><li><h5>quoteCoin: <a href="Coin.html" class="tsd-signature-type" data-tsd-kind="Class">Coin</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The quote <code>Coin</code> of the market to fetch</p>
|
2022-06-27 14:41:25 -07:00
|
|
|
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DexMarket.html" class="tsd-signature-type" data-tsd-kind="Class">DexMarket</a></h4><div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="initDexMarket" class="tsd-anchor"></a><h3 class="tsd-anchor-link">init<wbr/>Dex<wbr/>Market<a href="#initDexMarket" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">init<wbr/>Dex<wbr/>Market<span class="tsd-signature-symbol">(</span>payer<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Keypair</span>, baseCoin<span class="tsd-signature-symbol">: </span><a href="Coin.html" class="tsd-signature-type" data-tsd-kind="Class">Coin</a>, quoteCoin<span class="tsd-signature-symbol">: </span><a href="Coin.html" class="tsd-signature-type" data-tsd-kind="Class">Coin</a>, marketParams<span class="tsd-signature-symbol">: </span><a href="../modules.html#MarketParams" class="tsd-signature-type" data-tsd-kind="Type alias">MarketParams</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="DexMarket.html" class="tsd-signature-type" data-tsd-kind="Class">DexMarket</a><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/project-serum/serum-dev-tools/blob/247d1c0/ts/src/dex.ts#L171">dex.ts:171</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
2022-05-24 03:02:39 -07:00
|
|
|
<p>Initialize a <code>DexMarket</code> instance associated with the <code>Dex</code>.</p>
|
|
|
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>payer: <span class="tsd-signature-type">Keypair</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The payer <code>Keypair</code> to use for the transactions</p>
|
|
|
|
</div></div></li><li><h5>baseCoin: <a href="Coin.html" class="tsd-signature-type" data-tsd-kind="Class">Coin</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The base <code>Coin</code> of the market to create</p>
|
|
|
|
</div></div></li><li><h5>quoteCoin: <a href="Coin.html" class="tsd-signature-type" data-tsd-kind="Class">Coin</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The quote <code>Coin</code> of the market to create</p>
|
|
|
|
</div></div></li><li><h5>marketParams: <a href="../modules.html#MarketParams" class="tsd-signature-type" data-tsd-kind="Type alias">MarketParams</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The parameters required to create the market</p>
|
2022-06-27 14:41:25 -07:00
|
|
|
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="DexMarket.html" class="tsd-signature-type" data-tsd-kind="Class">DexMarket</a><span class="tsd-signature-symbol">></span></h4><div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="runCrank" class="tsd-anchor"></a><h3 class="tsd-anchor-link">run<wbr/>Crank<a href="#runCrank" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">run<wbr/>Crank<span class="tsd-signature-symbol">(</span>market<span class="tsd-signature-symbol">: </span><a href="DexMarket.html" class="tsd-signature-type" data-tsd-kind="Class">DexMarket</a>, owner<span class="tsd-signature-symbol">: </span><a href="FileKeypair.html" class="tsd-signature-type" data-tsd-kind="Class">FileKeypair</a>, opts<span class="tsd-signature-symbol">: </span><a href="../modules.html#CrankOpts" class="tsd-signature-type" data-tsd-kind="Type alias">CrankOpts</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ChildProcess</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/project-serum/serum-dev-tools/blob/247d1c0/ts/src/dex.ts#L335">dex.ts:335</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
2022-06-22 05:19:22 -07:00
|
|
|
<p>Runs a crank on a separate node process for the given <code>DexMarket</code> for specified duration.</p>
|
|
|
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>market: <a href="DexMarket.html" class="tsd-signature-type" data-tsd-kind="Class">DexMarket</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The <code>DexMarket</code> to run a crank for</p>
|
|
|
|
</div></div></li><li><h5>owner: <a href="FileKeypair.html" class="tsd-signature-type" data-tsd-kind="Class">FileKeypair</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The owner <code>FileKeypair</code> consuming events.</p>
|
|
|
|
</div></div></li><li><h5>opts: <a href="../modules.html#CrankOpts" class="tsd-signature-type" data-tsd-kind="Type alias">CrankOpts</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The crank options used</p>
|
2022-06-27 14:41:25 -07:00
|
|
|
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">ChildProcess</span></h4><div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="runMarketMaker" class="tsd-anchor"></a><h3 class="tsd-anchor-link">run<wbr/>Market<wbr/>Maker<a href="#runMarketMaker" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">run<wbr/>Market<wbr/>Maker<span class="tsd-signature-symbol">(</span>market<span class="tsd-signature-symbol">: </span><a href="DexMarket.html" class="tsd-signature-type" data-tsd-kind="Class">DexMarket</a>, owner<span class="tsd-signature-symbol">: </span><a href="FileKeypair.html" class="tsd-signature-type" data-tsd-kind="Class">FileKeypair</a>, opts<span class="tsd-signature-symbol">: </span><a href="../modules.html#MarketMakerOpts" class="tsd-signature-type" data-tsd-kind="Type alias">MarketMakerOpts</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ChildProcess</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/project-serum/serum-dev-tools/blob/247d1c0/ts/src/dex.ts#L283">dex.ts:283</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
2022-05-24 03:02:39 -07:00
|
|
|
<p>Runs a Market Making on a separate node process for <code>durationInSecs</code> seconds.</p>
|
|
|
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>market: <a href="DexMarket.html" class="tsd-signature-type" data-tsd-kind="Class">DexMarket</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The <code>DexMarket</code> to run market maker on</p>
|
|
|
|
</div></div></li><li><h5>owner: <a href="FileKeypair.html" class="tsd-signature-type" data-tsd-kind="Class">FileKeypair</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
|
|
<p>The owner <code>Keypair</code> to use for the market making.</p>
|
2022-06-08 06:15:30 -07:00
|
|
|
</div></div></li><li><h5>opts: <a href="../modules.html#MarketMakerOpts" class="tsd-signature-type" data-tsd-kind="Type alias">MarketMakerOpts</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
2022-05-24 03:02:39 -07:00
|
|
|
<p>The market making options used.</p>
|
2022-06-22 05:19:22 -07:00
|
|
|
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">ChildProcess</span></h4><div></div></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class"><a href="Dex.html" class="tsd-kind-icon">Dex</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="Dex.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Dex.html#_address" class="tsd-kind-icon">_address</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Dex.html#_coins" class="tsd-kind-icon">_coins</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Dex.html#_connection" class="tsd-kind-icon">_connection</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="Dex.html#_markets" class="tsd-kind-icon">_markets</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="Dex.html#address" class="tsd-kind-icon">address</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="Dex.html#coins" class="tsd-kind-icon">coins</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="Dex.html#connection" class="tsd-kind-icon">connection</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="Dex.html#markets" class="tsd-kind-icon">markets</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Dex.html#createCoin" class="tsd-kind-icon">create<wbr/>Coin</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Dex.html#getCoin" class="tsd-kind-icon">get<wbr/>Coin</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Dex.html#getMarket" class="tsd-kind-icon">get<wbr/>Market</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Dex.html#initDexMarket" class="tsd-kind-icon">init<wbr/>Dex<wbr/>Market</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Dex.html#runCrank" class="tsd-kind-icon">run<wbr/>Crank</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Dex.html#runMarketMaker" class="tsd-kind-icon">run<wbr/>Market<wbr/>Maker</a></li></ul></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-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private 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>
|