Remove lodash.combinations (#114)

* remove lodash.combinations

* fix test cases for PR104(increase fee rate limit)

https://github.com/orca-so/whirlpools/pull/104

* add newly supported tickspacing

* bump v0.11.5

* build docs only
This commit is contained in:
yugure-orca 2023-09-21 01:25:20 +09:00 committed by GitHub
parent 5f5323b8cd
commit 71ed7d5432
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 486 additions and 306 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

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

@ -2,12 +2,12 @@
<p>A builder class for creating a <a href="../modules.html#PoolGraph">PoolGraph</a></p>
</div><div><p>Note: we use an adjacency list as a representation of our pool graph,
since we assume that most token pairings don&#39;t exist as pools</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">PoolGraphBuilder</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="PoolGraphBuilder.html#constructor" class="tsd-kind-icon">constructor</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 tsd-is-static"><a href="PoolGraphBuilder.html#buildPoolGraph" class="tsd-kind-icon">build<wbr/>Pool<wbr/>Graph</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PoolGraphBuilder.html#buildPoolGraphWithFetch" class="tsd-kind-icon">build<wbr/>Pool<wbr/>Graph<wbr/>With<wbr/>Fetch</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/>Pool<wbr/>Graph<wbr/>Builder<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="PoolGraphBuilder.html" class="tsd-signature-type" data-tsd-kind="Class">PoolGraphBuilder</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="PoolGraphBuilder.html" class="tsd-signature-type" data-tsd-kind="Class">PoolGraphBuilder</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="buildPoolGraph" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> build<wbr/>Pool<wbr/>Graph<a href="#buildPoolGraph" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">build<wbr/>Pool<wbr/>Graph<span class="tsd-signature-symbol">(</span>poolTokenPairs<span class="tsd-signature-symbol">: </span><a href="../interfaces/PoolTokenPair.html" class="tsd-signature-type" data-tsd-kind="Interface">PoolTokenPair</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#PoolGraph" class="tsd-signature-type" data-tsd-kind="Type alias">PoolGraph</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/graphs/public/pool-graph-builder.ts#L46">utils/graphs/public/pool-graph-builder.ts:46</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">PoolGraphBuilder</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="PoolGraphBuilder.html#constructor" class="tsd-kind-icon">constructor</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 tsd-is-static"><a href="PoolGraphBuilder.html#buildPoolGraph" class="tsd-kind-icon">build<wbr/>Pool<wbr/>Graph</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PoolGraphBuilder.html#buildPoolGraphWithFetch" class="tsd-kind-icon">build<wbr/>Pool<wbr/>Graph<wbr/>With<wbr/>Fetch</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/>Pool<wbr/>Graph<wbr/>Builder<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="PoolGraphBuilder.html" class="tsd-signature-type" data-tsd-kind="Class">PoolGraphBuilder</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="PoolGraphBuilder.html" class="tsd-signature-type" data-tsd-kind="Class">PoolGraphBuilder</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="buildPoolGraph" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> build<wbr/>Pool<wbr/>Graph<a href="#buildPoolGraph" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">build<wbr/>Pool<wbr/>Graph<span class="tsd-signature-symbol">(</span>poolTokenPairs<span class="tsd-signature-symbol">: </span><a href="../interfaces/PoolTokenPair.html" class="tsd-signature-type" data-tsd-kind="Interface">PoolTokenPair</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#PoolGraph" class="tsd-signature-type" data-tsd-kind="Type alias">PoolGraph</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/graphs/public/pool-graph-builder.ts#L46">utils/graphs/public/pool-graph-builder.ts:46</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Build a <a href="../modules.html#PoolGraph">PoolGraph</a> from a list of pools in the format of <a href="../interfaces/PoolTokenPair.html">PoolTokenPair</a></p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>poolTokenPairs: <a href="../interfaces/PoolTokenPair.html" class="tsd-signature-type" data-tsd-kind="Interface">PoolTokenPair</a><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>a list of <a href="../interfaces/PoolTokenPair.html">PoolTokenPair</a> to generate this pool graph</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules.html#PoolGraph" class="tsd-signature-type" data-tsd-kind="Type alias">PoolGraph</a></h4><div><p>A <a href="../modules.html#PoolGraph">PoolGraph</a> with the provided pools</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="buildPoolGraphWithFetch" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> build<wbr/>Pool<wbr/>Graph<wbr/>With<wbr/>Fetch<a href="#buildPoolGraphWithFetch" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">build<wbr/>Pool<wbr/>Graph<wbr/>With<wbr/>Fetch<span class="tsd-signature-symbol">(</span>pools<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span>, fetcher<span class="tsd-signature-symbol">: </span><a href="../interfaces/WhirlpoolAccountFetcherInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolAccountFetcherInterface</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">&lt;</span><a href="../modules.html#PoolGraph" class="tsd-signature-type" data-tsd-kind="Type alias">PoolGraph</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/graphs/public/pool-graph-builder.ts#L20">utils/graphs/public/pool-graph-builder.ts:20</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="buildPoolGraphWithFetch" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> build<wbr/>Pool<wbr/>Graph<wbr/>With<wbr/>Fetch<a href="#buildPoolGraphWithFetch" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">build<wbr/>Pool<wbr/>Graph<wbr/>With<wbr/>Fetch<span class="tsd-signature-symbol">(</span>pools<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span>, fetcher<span class="tsd-signature-symbol">: </span><a href="../interfaces/WhirlpoolAccountFetcherInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolAccountFetcherInterface</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">&lt;</span><a href="../modules.html#PoolGraph" class="tsd-signature-type" data-tsd-kind="Type alias">PoolGraph</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/graphs/public/pool-graph-builder.ts#L20">utils/graphs/public/pool-graph-builder.ts:20</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Fetch data and build a <a href="../modules.html#PoolGraph">PoolGraph</a> from a list of pools addresses</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>pools: <span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>a list of pool addresses to generate this pool graph</p>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,48 +1,48 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>PositionBundleUtil | @orca-so/whirlpools-sdk</title><meta name="description" content="Documentation for @orca-so/whirlpools-sdk"/><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">@orca-so/whirlpools-sdk</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">@orca-so/whirlpools-sdk</a></li><li><a href="PositionBundleUtil.html">PositionBundleUtil</a></li></ul><h1>Class PositionBundleUtil </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">
<p>A collection of utility functions when interacting with a PositionBundle.</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">PositionBundleUtil</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>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#checkBundleIndexInBounds" class="tsd-kind-icon">check<wbr/>Bundle<wbr/>Index<wbr/>In<wbr/>Bounds</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#convertBitmapToArray" class="tsd-kind-icon">convert<wbr/>Bitmap<wbr/>To<wbr/>Array</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#findUnoccupiedBundleIndex" class="tsd-kind-icon">find<wbr/>Unoccupied<wbr/>Bundle<wbr/>Index</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#getOccupiedBundleIndexes" class="tsd-kind-icon">get<wbr/>Occupied<wbr/>Bundle<wbr/>Indexes</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#getUnoccupiedBundleIndexes" class="tsd-kind-icon">get<wbr/>Unoccupied<wbr/>Bundle<wbr/>Indexes</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#isEmpty" class="tsd-kind-icon">is<wbr/>Empty</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#isFull" class="tsd-kind-icon">is<wbr/>Full</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#isOccupied" class="tsd-kind-icon">is<wbr/>Occupied</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#isUnoccupied" class="tsd-kind-icon">is<wbr/>Unoccupied</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="checkBundleIndexInBounds" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> check<wbr/>Bundle<wbr/>Index<wbr/>In<wbr/>Bounds<a href="#checkBundleIndexInBounds" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">check<wbr/>Bundle<wbr/>Index<wbr/>In<wbr/>Bounds<span class="tsd-signature-symbol">(</span>bundleIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/public/position-bundle-util.ts#L17">utils/public/position-bundle-util.ts:17</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">PositionBundleUtil</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>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#checkBundleIndexInBounds" class="tsd-kind-icon">check<wbr/>Bundle<wbr/>Index<wbr/>In<wbr/>Bounds</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#convertBitmapToArray" class="tsd-kind-icon">convert<wbr/>Bitmap<wbr/>To<wbr/>Array</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#findUnoccupiedBundleIndex" class="tsd-kind-icon">find<wbr/>Unoccupied<wbr/>Bundle<wbr/>Index</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#getOccupiedBundleIndexes" class="tsd-kind-icon">get<wbr/>Occupied<wbr/>Bundle<wbr/>Indexes</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#getUnoccupiedBundleIndexes" class="tsd-kind-icon">get<wbr/>Unoccupied<wbr/>Bundle<wbr/>Indexes</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#isEmpty" class="tsd-kind-icon">is<wbr/>Empty</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#isFull" class="tsd-kind-icon">is<wbr/>Full</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#isOccupied" class="tsd-kind-icon">is<wbr/>Occupied</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PositionBundleUtil.html#isUnoccupied" class="tsd-kind-icon">is<wbr/>Unoccupied</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="checkBundleIndexInBounds" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> check<wbr/>Bundle<wbr/>Index<wbr/>In<wbr/>Bounds<a href="#checkBundleIndexInBounds" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">check<wbr/>Bundle<wbr/>Index<wbr/>In<wbr/>Bounds<span class="tsd-signature-symbol">(</span>bundleIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/public/position-bundle-util.ts#L17">utils/public/position-bundle-util.ts:17</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Check if the bundle index is in the correct range.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>bundleIndex: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The bundle index to be checked</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div><p>true if bundle index is in the correct range</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="convertBitmapToArray" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> convert<wbr/>Bitmap<wbr/>To<wbr/>Array<a href="#convertBitmapToArray" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">convert<wbr/>Bitmap<wbr/>To<wbr/>Array<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><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/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/public/position-bundle-util.ts#L116">utils/public/position-bundle-util.ts:116</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="convertBitmapToArray" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> convert<wbr/>Bitmap<wbr/>To<wbr/>Array<a href="#convertBitmapToArray" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">convert<wbr/>Bitmap<wbr/>To<wbr/>Array<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><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/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/public/position-bundle-util.ts#L116">utils/public/position-bundle-util.ts:116</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Convert position bitmap to the array of boolean which represent if Bundled Position is open.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>positionBundle: <a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The position bundle whose bitmap will be converted</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">[]</span></h4><div><p>The array of boolean representing if Bundled Position is open</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="findUnoccupiedBundleIndex" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> find<wbr/>Unoccupied<wbr/>Bundle<wbr/>Index<a href="#findUnoccupiedBundleIndex" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">find<wbr/>Unoccupied<wbr/>Bundle<wbr/>Index<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</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><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/public/position-bundle-util.ts#L105">utils/public/position-bundle-util.ts:105</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="findUnoccupiedBundleIndex" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> find<wbr/>Unoccupied<wbr/>Bundle<wbr/>Index<a href="#findUnoccupiedBundleIndex" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">find<wbr/>Unoccupied<wbr/>Bundle<wbr/>Index<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</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><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/public/position-bundle-util.ts#L105">utils/public/position-bundle-util.ts:105</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get the first unoccupied bundle index in the position bundle.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>positionBundle: <a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The position bundle to be checked</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></h4><div><p>The first unoccupied bundle index, null if the position bundle is full</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="getOccupiedBundleIndexes" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Occupied<wbr/>Bundle<wbr/>Indexes<a href="#getOccupiedBundleIndexes" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">get<wbr/>Occupied<wbr/>Bundle<wbr/>Indexes<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><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/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/public/position-bundle-util.ts#L73">utils/public/position-bundle-util.ts:73</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="getOccupiedBundleIndexes" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Occupied<wbr/>Bundle<wbr/>Indexes<a href="#getOccupiedBundleIndexes" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">get<wbr/>Occupied<wbr/>Bundle<wbr/>Indexes<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><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/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/public/position-bundle-util.ts#L73">utils/public/position-bundle-util.ts:73</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get all bundle indexes where the corresponding Bundled Position is open.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>positionBundle: <a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The position bundle to be checked</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><div><p>The array of bundle index where the corresponding Bundled Position is open</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="getUnoccupiedBundleIndexes" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Unoccupied<wbr/>Bundle<wbr/>Indexes<a href="#getUnoccupiedBundleIndexes" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">get<wbr/>Unoccupied<wbr/>Bundle<wbr/>Indexes<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><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/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/public/position-bundle-util.ts#L89">utils/public/position-bundle-util.ts:89</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="getUnoccupiedBundleIndexes" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Unoccupied<wbr/>Bundle<wbr/>Indexes<a href="#getUnoccupiedBundleIndexes" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">get<wbr/>Unoccupied<wbr/>Bundle<wbr/>Indexes<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><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/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/public/position-bundle-util.ts#L89">utils/public/position-bundle-util.ts:89</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get all bundle indexes where the corresponding Bundled Position is not open.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>positionBundle: <a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The position bundle to be checked</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><div><p>The array of bundle index where the corresponding Bundled Position is not open</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="isEmpty" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> is<wbr/>Empty<a href="#isEmpty" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">is<wbr/>Empty<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/public/position-bundle-util.ts#L62">utils/public/position-bundle-util.ts:62</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="isEmpty" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> is<wbr/>Empty<a href="#isEmpty" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">is<wbr/>Empty<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/public/position-bundle-util.ts#L62">utils/public/position-bundle-util.ts:62</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Check if all bundle index is unoccupied.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>positionBundle: <a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The position bundle to be checked</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div><p>true if all bundle index is unoccupied</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="isFull" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> is<wbr/>Full<a href="#isFull" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">is<wbr/>Full<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/public/position-bundle-util.ts#L51">utils/public/position-bundle-util.ts:51</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="isFull" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> is<wbr/>Full<a href="#isFull" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">is<wbr/>Full<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/public/position-bundle-util.ts#L51">utils/public/position-bundle-util.ts:51</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Check if all bundle index is occupied.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>positionBundle: <a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The position bundle to be checked</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div><p>true if all bundle index is occupied</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="isOccupied" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> is<wbr/>Occupied<a href="#isOccupied" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">is<wbr/>Occupied<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a>, bundleIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/public/position-bundle-util.ts#L28">utils/public/position-bundle-util.ts:28</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="isOccupied" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> is<wbr/>Occupied<a href="#isOccupied" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">is<wbr/>Occupied<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a>, bundleIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/public/position-bundle-util.ts#L28">utils/public/position-bundle-util.ts:28</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Check if the Bundled Position corresponding to the bundle index has been opened.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>positionBundle: <a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The position bundle to be checked</p>
</div></div></li><li><h5>bundleIndex: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The bundle index to be checked</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div><p>true if Bundled Position has been opened</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="isUnoccupied" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> is<wbr/>Unoccupied<a href="#isUnoccupied" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">is<wbr/>Unoccupied<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a>, bundleIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/public/position-bundle-util.ts#L41">utils/public/position-bundle-util.ts:41</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="isUnoccupied" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> is<wbr/>Unoccupied<a href="#isUnoccupied" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">is<wbr/>Unoccupied<span class="tsd-signature-symbol">(</span>positionBundle<span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a>, bundleIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/public/position-bundle-util.ts#L41">utils/public/position-bundle-util.ts:41</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Check if the Bundled Position corresponding to the bundle index has not been opened.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>positionBundle: <a href="../modules.html#PositionBundleData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionBundleData</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The position bundle to be checked</p>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>PriceModuleUtils | @orca-so/whirlpools-sdk</title><meta name="description" content="Documentation for @orca-so/whirlpools-sdk"/><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">@orca-so/whirlpools-sdk</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">@orca-so/whirlpools-sdk</a></li><li><a href="PriceModuleUtils.html">PriceModuleUtils</a></li></ul><h1>Class PriceModuleUtils </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">
<p>A list of utility functions for the price module.</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">PriceModuleUtils</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="PriceModuleUtils.html#constructor" class="tsd-kind-icon">constructor</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 tsd-is-static"><a href="PriceModuleUtils.html#fetchDecimalsForMints" class="tsd-kind-icon">fetch<wbr/>Decimals<wbr/>For<wbr/>Mints</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PriceModuleUtils.html#fetchPoolDataFromMints" class="tsd-kind-icon">fetch<wbr/>Pool<wbr/>Data<wbr/>From<wbr/>Mints</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PriceModuleUtils.html#fetchTickArraysForPools" class="tsd-kind-icon">fetch<wbr/>Tick<wbr/>Arrays<wbr/>For<wbr/>Pools</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/>Price<wbr/>Module<wbr/>Utils<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="PriceModuleUtils.html" class="tsd-signature-type" data-tsd-kind="Class">PriceModuleUtils</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="PriceModuleUtils.html" class="tsd-signature-type" data-tsd-kind="Class">PriceModuleUtils</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="fetchDecimalsForMints" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> fetch<wbr/>Decimals<wbr/>For<wbr/>Mints<a href="#fetchDecimalsForMints" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">fetch<wbr/>Decimals<wbr/>For<wbr/>Mints<span class="tsd-signature-symbol">(</span>fetcher<span class="tsd-signature-symbol">: </span><a href="../interfaces/WhirlpoolAccountFetcherInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolAccountFetcherInterface</a>, mints<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#DecimalsMap" class="tsd-signature-type" data-tsd-kind="Type alias">DecimalsMap</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/prices/price-module.ts#L336">prices/price-module.ts:336</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">PriceModuleUtils</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="PriceModuleUtils.html#constructor" class="tsd-kind-icon">constructor</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 tsd-is-static"><a href="PriceModuleUtils.html#fetchDecimalsForMints" class="tsd-kind-icon">fetch<wbr/>Decimals<wbr/>For<wbr/>Mints</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PriceModuleUtils.html#fetchPoolDataFromMints" class="tsd-kind-icon">fetch<wbr/>Pool<wbr/>Data<wbr/>From<wbr/>Mints</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="PriceModuleUtils.html#fetchTickArraysForPools" class="tsd-kind-icon">fetch<wbr/>Tick<wbr/>Arrays<wbr/>For<wbr/>Pools</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/>Price<wbr/>Module<wbr/>Utils<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="PriceModuleUtils.html" class="tsd-signature-type" data-tsd-kind="Class">PriceModuleUtils</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="PriceModuleUtils.html" class="tsd-signature-type" data-tsd-kind="Class">PriceModuleUtils</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="fetchDecimalsForMints" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> fetch<wbr/>Decimals<wbr/>For<wbr/>Mints<a href="#fetchDecimalsForMints" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">fetch<wbr/>Decimals<wbr/>For<wbr/>Mints<span class="tsd-signature-symbol">(</span>fetcher<span class="tsd-signature-symbol">: </span><a href="../interfaces/WhirlpoolAccountFetcherInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolAccountFetcherInterface</a>, mints<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#DecimalsMap" class="tsd-signature-type" data-tsd-kind="Type alias">DecimalsMap</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/prices/price-module.ts#L336">prices/price-module.ts:336</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Fetch the decimals to token mapping for the given mints.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>fetcher: <a href="../interfaces/WhirlpoolAccountFetcherInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolAccountFetcherInterface</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p><a href="../interfaces/WhirlpoolAccountFetcherInterface.html">WhirlpoolAccountFetcherInterface</a></p>
@ -9,7 +9,7 @@
</div></div></li><li><h5>opts: <span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol"> = IGNORE_CACHE</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>an <a href="../modules.html#WhirlpoolAccountFetchOptions">WhirlpoolAccountFetchOptions</a> object to define fetch and cache options when accessing on-chain accounts</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#DecimalsMap" class="tsd-signature-type" data-tsd-kind="Type alias">DecimalsMap</a><span class="tsd-signature-symbol">&gt;</span></h4><div><p>A <a href="../modules.html#DecimalsMap">DecimalsMap</a> of mint addresses to decimals.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="fetchPoolDataFromMints" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> fetch<wbr/>Pool<wbr/>Data<wbr/>From<wbr/>Mints<a href="#fetchPoolDataFromMints" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">fetch<wbr/>Pool<wbr/>Data<wbr/>From<wbr/>Mints<span class="tsd-signature-symbol">(</span>fetcher<span class="tsd-signature-symbol">: </span><a href="../interfaces/WhirlpoolAccountFetcherInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolAccountFetcherInterface</a>, mints<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span>, config<span class="tsd-signature-symbol">?: </span><a href="../modules.html#GetPricesConfig" class="tsd-signature-type" data-tsd-kind="Type alias">GetPricesConfig</a>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#PoolMap" class="tsd-signature-type" data-tsd-kind="Type alias">PoolMap</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/prices/price-module.ts#L240">prices/price-module.ts:240</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="fetchPoolDataFromMints" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> fetch<wbr/>Pool<wbr/>Data<wbr/>From<wbr/>Mints<a href="#fetchPoolDataFromMints" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">fetch<wbr/>Pool<wbr/>Data<wbr/>From<wbr/>Mints<span class="tsd-signature-symbol">(</span>fetcher<span class="tsd-signature-symbol">: </span><a href="../interfaces/WhirlpoolAccountFetcherInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolAccountFetcherInterface</a>, mints<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span>, config<span class="tsd-signature-symbol">?: </span><a href="../modules.html#GetPricesConfig" class="tsd-signature-type" data-tsd-kind="Type alias">GetPricesConfig</a>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#PoolMap" class="tsd-signature-type" data-tsd-kind="Type alias">PoolMap</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/prices/price-module.ts#L240">prices/price-module.ts:240</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Fetch pool data for the given mints by deriving the PDA from all combinations of mints &amp; tick-arrays.
Note that this method can be slow.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>fetcher: <a href="../interfaces/WhirlpoolAccountFetcherInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolAccountFetcherInterface</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
@ -21,7 +21,7 @@ Note that this method can be slow.</p>
</div></div></li><li><h5>opts: <span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol"> = IGNORE_CACHE</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>an <a href="../modules.html#WhirlpoolAccountFetchOptions">WhirlpoolAccountFetchOptions</a> object to define fetch and cache options when accessing on-chain accounts</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#PoolMap" class="tsd-signature-type" data-tsd-kind="Type alias">PoolMap</a><span class="tsd-signature-symbol">&gt;</span></h4><div><p>A <a href="../modules.html#PoolMap">PoolMap</a> of pool addresses to pool data.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="fetchTickArraysForPools" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> fetch<wbr/>Tick<wbr/>Arrays<wbr/>For<wbr/>Pools<a href="#fetchTickArraysForPools" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">fetch<wbr/>Tick<wbr/>Arrays<wbr/>For<wbr/>Pools<span class="tsd-signature-symbol">(</span>fetcher<span class="tsd-signature-symbol">: </span><a href="../interfaces/WhirlpoolAccountFetcherInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolAccountFetcherInterface</a>, pools<span class="tsd-signature-symbol">: </span><a href="../modules.html#PoolMap" class="tsd-signature-type" data-tsd-kind="Type alias">PoolMap</a>, config<span class="tsd-signature-symbol">?: </span><a href="../modules.html#GetPricesConfig" class="tsd-signature-type" data-tsd-kind="Type alias">GetPricesConfig</a>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#TickArrayMap" class="tsd-signature-type" data-tsd-kind="Type alias">TickArrayMap</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/prices/price-module.ts#L281">prices/price-module.ts:281</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="fetchTickArraysForPools" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> fetch<wbr/>Tick<wbr/>Arrays<wbr/>For<wbr/>Pools<a href="#fetchTickArraysForPools" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">fetch<wbr/>Tick<wbr/>Arrays<wbr/>For<wbr/>Pools<span class="tsd-signature-symbol">(</span>fetcher<span class="tsd-signature-symbol">: </span><a href="../interfaces/WhirlpoolAccountFetcherInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolAccountFetcherInterface</a>, pools<span class="tsd-signature-symbol">: </span><a href="../modules.html#PoolMap" class="tsd-signature-type" data-tsd-kind="Type alias">PoolMap</a>, config<span class="tsd-signature-symbol">?: </span><a href="../modules.html#GetPricesConfig" class="tsd-signature-type" data-tsd-kind="Type alias">GetPricesConfig</a>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#TickArrayMap" class="tsd-signature-type" data-tsd-kind="Type alias">TickArrayMap</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/prices/price-module.ts#L281">prices/price-module.ts:281</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Fetch tick-array data for the given pools</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>fetcher: <a href="../interfaces/WhirlpoolAccountFetcherInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolAccountFetcherInterface</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p><a href="../interfaces/WhirlpoolAccountFetcherInterface.html">WhirlpoolAccountFetcherInterface</a></p>

View File

@ -1,24 +1,24 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>RouterUtils | @orca-so/whirlpools-sdk</title><meta name="description" content="Documentation for @orca-so/whirlpools-sdk"/><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">@orca-so/whirlpools-sdk</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">@orca-so/whirlpools-sdk</a></li><li><a href="RouterUtils.html">RouterUtils</a></li></ul><h1>Class RouterUtils </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">
<p>A selection of utility functions for the <a href="../interfaces/WhirlpoolRouter.html">WhirlpoolRouter</a>.</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">RouterUtils</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="RouterUtils.html#constructor" class="tsd-kind-icon">constructor</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 tsd-is-static"><a href="RouterUtils.html#getDefaultRouteOptions" class="tsd-kind-icon">get<wbr/>Default<wbr/>Route<wbr/>Options</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="RouterUtils.html#getDefaultSelectOptions" class="tsd-kind-icon">get<wbr/>Default<wbr/>Select<wbr/>Options</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="RouterUtils.html#getPriceImpactForRoute" class="tsd-kind-icon">get<wbr/>Price<wbr/>Impact<wbr/>For<wbr/>Route</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="RouterUtils.html#getTouchedTickArraysFromRoute" class="tsd-kind-icon">get<wbr/>Touched<wbr/>Tick<wbr/>Arrays<wbr/>From<wbr/>Route</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="RouterUtils.html#selectFirstExecutableRoute" class="tsd-kind-icon">select<wbr/>First<wbr/>Executable<wbr/>Route</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/>Router<wbr/>Utils<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="RouterUtils.html" class="tsd-signature-type" data-tsd-kind="Class">RouterUtils</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="RouterUtils.html" class="tsd-signature-type" data-tsd-kind="Class">RouterUtils</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="getDefaultRouteOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Default<wbr/>Route<wbr/>Options<a href="#getDefaultRouteOptions" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">get<wbr/>Default<wbr/>Route<wbr/>Options<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#RoutingOptions" class="tsd-signature-type" data-tsd-kind="Type alias">RoutingOptions</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/router/public/router-utils.ts#L220">router/public/router-utils.ts:220</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">RouterUtils</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="RouterUtils.html#constructor" class="tsd-kind-icon">constructor</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 tsd-is-static"><a href="RouterUtils.html#getDefaultRouteOptions" class="tsd-kind-icon">get<wbr/>Default<wbr/>Route<wbr/>Options</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="RouterUtils.html#getDefaultSelectOptions" class="tsd-kind-icon">get<wbr/>Default<wbr/>Select<wbr/>Options</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="RouterUtils.html#getPriceImpactForRoute" class="tsd-kind-icon">get<wbr/>Price<wbr/>Impact<wbr/>For<wbr/>Route</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="RouterUtils.html#getTouchedTickArraysFromRoute" class="tsd-kind-icon">get<wbr/>Touched<wbr/>Tick<wbr/>Arrays<wbr/>From<wbr/>Route</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="RouterUtils.html#selectFirstExecutableRoute" class="tsd-kind-icon">select<wbr/>First<wbr/>Executable<wbr/>Route</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/>Router<wbr/>Utils<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="RouterUtils.html" class="tsd-signature-type" data-tsd-kind="Class">RouterUtils</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="RouterUtils.html" class="tsd-signature-type" data-tsd-kind="Class">RouterUtils</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="getDefaultRouteOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Default<wbr/>Route<wbr/>Options<a href="#getDefaultRouteOptions" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">get<wbr/>Default<wbr/>Route<wbr/>Options<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#RoutingOptions" class="tsd-signature-type" data-tsd-kind="Type alias">RoutingOptions</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/router/public/router-utils.ts#L220">router/public/router-utils.ts:220</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get the default options for generating trade routes.</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="../modules.html#RoutingOptions" class="tsd-signature-type" data-tsd-kind="Type alias">RoutingOptions</a></h4><div><p>Default options for generating trade routes.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="getDefaultSelectOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Default<wbr/>Select<wbr/>Options<a href="#getDefaultSelectOptions" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">get<wbr/>Default<wbr/>Select<wbr/>Options<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#RouteSelectOptions" class="tsd-signature-type" data-tsd-kind="Type alias">RouteSelectOptions</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/router/public/router-utils.ts#L233">router/public/router-utils.ts:233</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="getDefaultSelectOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Default<wbr/>Select<wbr/>Options<a href="#getDefaultSelectOptions" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">get<wbr/>Default<wbr/>Select<wbr/>Options<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#RouteSelectOptions" class="tsd-signature-type" data-tsd-kind="Type alias">RouteSelectOptions</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/router/public/router-utils.ts#L233">router/public/router-utils.ts:233</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get the default options for selecting a route from a list of generated routes.</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="../modules.html#RouteSelectOptions" class="tsd-signature-type" data-tsd-kind="Type alias">RouteSelectOptions</a></h4><div><p>Default options for selecting a a route from a list of generated routes.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="getPriceImpactForRoute" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Price<wbr/>Impact<wbr/>For<wbr/>Route<a href="#getPriceImpactForRoute" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">get<wbr/>Price<wbr/>Impact<wbr/>For<wbr/>Route<span class="tsd-signature-symbol">(</span>trade<span class="tsd-signature-symbol">: </span><a href="../modules.html#Trade" class="tsd-signature-type" data-tsd-kind="Type alias">Trade</a>, route<span class="tsd-signature-symbol">: </span><a href="../modules.html#TradeRoute" class="tsd-signature-type" data-tsd-kind="Type alias">TradeRoute</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Decimal</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/router/public/router-utils.ts#L149">router/public/router-utils.ts:149</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="getPriceImpactForRoute" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Price<wbr/>Impact<wbr/>For<wbr/>Route<a href="#getPriceImpactForRoute" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">get<wbr/>Price<wbr/>Impact<wbr/>For<wbr/>Route<span class="tsd-signature-symbol">(</span>trade<span class="tsd-signature-symbol">: </span><a href="../modules.html#Trade" class="tsd-signature-type" data-tsd-kind="Type alias">Trade</a>, route<span class="tsd-signature-symbol">: </span><a href="../modules.html#TradeRoute" class="tsd-signature-type" data-tsd-kind="Type alias">TradeRoute</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Decimal</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/router/public/router-utils.ts#L149">router/public/router-utils.ts:149</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Calculate the price impact for a route.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>trade: <a href="../modules.html#Trade" class="tsd-signature-type" data-tsd-kind="Type alias">Trade</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The trade the user used to derive the route.</p>
</div></div></li><li><h5>route: <a href="../modules.html#TradeRoute" class="tsd-signature-type" data-tsd-kind="Type alias">TradeRoute</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The route to calculate the price impact for.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Decimal</span></h4><div><p>A Decimal object representing the percentage value of the price impact (ex. 3.01%)</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="getTouchedTickArraysFromRoute" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Touched<wbr/>Tick<wbr/>Arrays<wbr/>From<wbr/>Route<a href="#getTouchedTickArraysFromRoute" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">get<wbr/>Touched<wbr/>Tick<wbr/>Arrays<wbr/>From<wbr/>Route<span class="tsd-signature-symbol">(</span>route<span class="tsd-signature-symbol">: </span><a href="../modules.html#TradeRoute" class="tsd-signature-type" data-tsd-kind="Type alias">TradeRoute</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span><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/orca-so/whirlpools/blob/3f5f209/sdk/src/router/public/router-utils.ts#L202">router/public/router-utils.ts:202</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="getTouchedTickArraysFromRoute" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Touched<wbr/>Tick<wbr/>Arrays<wbr/>From<wbr/>Route<a href="#getTouchedTickArraysFromRoute" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">get<wbr/>Touched<wbr/>Tick<wbr/>Arrays<wbr/>From<wbr/>Route<span class="tsd-signature-symbol">(</span>route<span class="tsd-signature-symbol">: </span><a href="../modules.html#TradeRoute" class="tsd-signature-type" data-tsd-kind="Type alias">TradeRoute</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span><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/yugure-orca/whirlpools/blob/5f9140b/sdk/src/router/public/router-utils.ts#L202">router/public/router-utils.ts:202</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get the tick arrays addresses that are touched by a route.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>route: <a href="../modules.html#TradeRoute" class="tsd-signature-type" data-tsd-kind="Type alias">TradeRoute</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The route to get the tick arrays from.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">[]</span></h4><div><p>The tick arrays addresses that are touched by the route.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="selectFirstExecutableRoute" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> select<wbr/>First<wbr/>Executable<wbr/>Route<a href="#selectFirstExecutableRoute" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">select<wbr/>First<wbr/>Executable<wbr/>Route<span class="tsd-signature-symbol">(</span>ctx<span class="tsd-signature-symbol">: </span><a href="WhirlpoolContext.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolContext</a>, orderedRoutes<span class="tsd-signature-symbol">: </span><a href="../modules.html#TradeRoute" class="tsd-signature-type" data-tsd-kind="Type alias">TradeRoute</a><span class="tsd-signature-symbol">[]</span>, opts<span class="tsd-signature-symbol">: </span><a href="../modules.html#RouteSelectOptions" class="tsd-signature-type" data-tsd-kind="Type alias">RouteSelectOptions</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">&lt;</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../modules.html#ExecutableRoute" class="tsd-signature-type" data-tsd-kind="Type alias">ExecutableRoute</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/router/public/router-utils.ts#L63">router/public/router-utils.ts:63</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="selectFirstExecutableRoute" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> select<wbr/>First<wbr/>Executable<wbr/>Route<a href="#selectFirstExecutableRoute" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">select<wbr/>First<wbr/>Executable<wbr/>Route<span class="tsd-signature-symbol">(</span>ctx<span class="tsd-signature-symbol">: </span><a href="WhirlpoolContext.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolContext</a>, orderedRoutes<span class="tsd-signature-symbol">: </span><a href="../modules.html#TradeRoute" class="tsd-signature-type" data-tsd-kind="Type alias">TradeRoute</a><span class="tsd-signature-symbol">[]</span>, opts<span class="tsd-signature-symbol">: </span><a href="../modules.html#RouteSelectOptions" class="tsd-signature-type" data-tsd-kind="Type alias">RouteSelectOptions</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">&lt;</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../modules.html#ExecutableRoute" class="tsd-signature-type" data-tsd-kind="Type alias">ExecutableRoute</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/router/public/router-utils.ts#L63">router/public/router-utils.ts:63</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Selects the best executable route from a list of routes using the current execution environment.
The wallet support type, available ATA accounts, existance of lookup tables all effect the transaction size
and eligibility of a route.</p>

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,13 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>WhirlpoolRouterBuilder | @orca-so/whirlpools-sdk</title><meta name="description" content="Documentation for @orca-so/whirlpools-sdk"/><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">@orca-so/whirlpools-sdk</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">@orca-so/whirlpools-sdk</a></li><li><a href="WhirlpoolRouterBuilder.html">WhirlpoolRouterBuilder</a></li></ul><h1>Class WhirlpoolRouterBuilder </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">
<p>Builder to build instances of the <a href="../interfaces/WhirlpoolRouter.html">WhirlpoolRouter</a></p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">WhirlpoolRouterBuilder</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="WhirlpoolRouterBuilder.html#constructor" class="tsd-kind-icon">constructor</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 tsd-is-static"><a href="WhirlpoolRouterBuilder.html#buildWithPoolGraph" class="tsd-kind-icon">build<wbr/>With<wbr/>Pool<wbr/>Graph</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="WhirlpoolRouterBuilder.html#buildWithPools" class="tsd-kind-icon">build<wbr/>With<wbr/>Pools</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/>Whirlpool<wbr/>Router<wbr/>Builder<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="WhirlpoolRouterBuilder.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolRouterBuilder</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="WhirlpoolRouterBuilder.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolRouterBuilder</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="buildWithPoolGraph" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> build<wbr/>With<wbr/>Pool<wbr/>Graph<a href="#buildWithPoolGraph" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">build<wbr/>With<wbr/>Pool<wbr/>Graph<span class="tsd-signature-symbol">(</span>ctx<span class="tsd-signature-symbol">: </span><a href="WhirlpoolContext.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolContext</a>, graph<span class="tsd-signature-symbol">: </span><a href="../modules.html#PoolGraph" class="tsd-signature-type" data-tsd-kind="Type alias">PoolGraph</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/WhirlpoolRouter.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolRouter</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/router/public/router-builder.ts#L19">router/public/router-builder.ts:19</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">WhirlpoolRouterBuilder</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="WhirlpoolRouterBuilder.html#constructor" class="tsd-kind-icon">constructor</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 tsd-is-static"><a href="WhirlpoolRouterBuilder.html#buildWithPoolGraph" class="tsd-kind-icon">build<wbr/>With<wbr/>Pool<wbr/>Graph</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="WhirlpoolRouterBuilder.html#buildWithPools" class="tsd-kind-icon">build<wbr/>With<wbr/>Pools</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/>Whirlpool<wbr/>Router<wbr/>Builder<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="WhirlpoolRouterBuilder.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolRouterBuilder</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="WhirlpoolRouterBuilder.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolRouterBuilder</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="buildWithPoolGraph" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> build<wbr/>With<wbr/>Pool<wbr/>Graph<a href="#buildWithPoolGraph" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">build<wbr/>With<wbr/>Pool<wbr/>Graph<span class="tsd-signature-symbol">(</span>ctx<span class="tsd-signature-symbol">: </span><a href="WhirlpoolContext.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolContext</a>, graph<span class="tsd-signature-symbol">: </span><a href="../modules.html#PoolGraph" class="tsd-signature-type" data-tsd-kind="Type alias">PoolGraph</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/WhirlpoolRouter.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolRouter</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/router/public/router-builder.ts#L19">router/public/router-builder.ts:19</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Builds a <a href="../interfaces/WhirlpoolRouter.html">WhirlpoolRouter</a> with a prebuilt <a href="../modules.html#PoolGraph">PoolGraph</a></p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>ctx: <a href="WhirlpoolContext.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolContext</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A <a href="WhirlpoolContext.html">WhirlpoolContext</a> for the current execution environment</p>
</div></div></li><li><h5>graph: <a href="../modules.html#PoolGraph" class="tsd-signature-type" data-tsd-kind="Type alias">PoolGraph</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A <a href="../modules.html#PoolGraph">PoolGraph</a> that represents the connections between all pools.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="../interfaces/WhirlpoolRouter.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolRouter</a></h4><div><p>A <a href="../interfaces/WhirlpoolRouter.html">WhirlpoolRouter</a> that can be used to find routes and execute swaps</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="buildWithPools" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> build<wbr/>With<wbr/>Pools<a href="#buildWithPools" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">build<wbr/>With<wbr/>Pools<span class="tsd-signature-symbol">(</span>ctx<span class="tsd-signature-symbol">: </span><a href="WhirlpoolContext.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolContext</a>, pools<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/WhirlpoolRouter.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolRouter</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/router/public/router-builder.ts#L29">router/public/router-builder.ts:29</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static"><a id="buildWithPools" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> build<wbr/>With<wbr/>Pools<a href="#buildWithPools" 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 tsd-is-static"><li class="tsd-signature tsd-kind-icon">build<wbr/>With<wbr/>Pools<span class="tsd-signature-symbol">(</span>ctx<span class="tsd-signature-symbol">: </span><a href="WhirlpoolContext.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolContext</a>, pools<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/WhirlpoolRouter.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolRouter</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/router/public/router-builder.ts#L29">router/public/router-builder.ts:29</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Fetch and builds a <a href="../interfaces/WhirlpoolRouter.html">WhirlpoolRouter</a> with a list of pool addresses.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>ctx: <a href="WhirlpoolContext.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolContext</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A <a href="WhirlpoolContext.html">WhirlpoolContext</a> for the current execution environment</p>

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SwapDirection | @orca-so/whirlpools-sdk</title><meta name="description" content="Documentation for @orca-so/whirlpools-sdk"/><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">@orca-so/whirlpools-sdk</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">@orca-so/whirlpools-sdk</a></li><li><a href="SwapDirection.html">SwapDirection</a></li></ul><h1>Enumeration SwapDirection </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">
<p>An enum for the direction of a swap.</p>
</div></div></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>Enumeration Members</h3><ul class="tsd-index-list"><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="SwapDirection.html#AtoB" class="tsd-kind-icon">AtoB</a></li><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="SwapDirection.html#BtoA" class="tsd-kind-icon">BtoA</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Enumeration Members</h2><section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum"><a id="AtoB" class="tsd-anchor"></a><h3 class="tsd-anchor-link">AtoB<a href="#AtoB" 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><div class="tsd-signature tsd-kind-icon">AtoB<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;aToB&quot;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/public/types.ts#L6">utils/public/types.ts:6</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum"><a id="BtoA" class="tsd-anchor"></a><h3 class="tsd-anchor-link">BtoA<a href="#BtoA" 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><div class="tsd-signature tsd-kind-icon">BtoA<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;bToA&quot;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/public/types.ts#L7">utils/public/types.ts:7</a></li></ul></aside></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-enum"><a href="SwapDirection.html" class="tsd-kind-icon">Swap<wbr/>Direction</a><ul><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="SwapDirection.html#AtoB" class="tsd-kind-icon">AtoB</a></li><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="SwapDirection.html#BtoA" class="tsd-kind-icon">BtoA</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><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><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>
</div></div></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>Enumeration Members</h3><ul class="tsd-index-list"><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="SwapDirection.html#AtoB" class="tsd-kind-icon">AtoB</a></li><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="SwapDirection.html#BtoA" class="tsd-kind-icon">BtoA</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Enumeration Members</h2><section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum"><a id="AtoB" class="tsd-anchor"></a><h3 class="tsd-anchor-link">AtoB<a href="#AtoB" 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><div class="tsd-signature tsd-kind-icon">AtoB<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;aToB&quot;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/public/types.ts#L6">utils/public/types.ts:6</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum"><a id="BtoA" class="tsd-anchor"></a><h3 class="tsd-anchor-link">BtoA<a href="#BtoA" 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><div class="tsd-signature tsd-kind-icon">BtoA<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;bToA&quot;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/public/types.ts#L7">utils/public/types.ts:7</a></li></ul></aside></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-enum"><a href="SwapDirection.html" class="tsd-kind-icon">Swap<wbr/>Direction</a><ul><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="SwapDirection.html#AtoB" class="tsd-kind-icon">AtoB</a></li><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="SwapDirection.html#BtoA" class="tsd-kind-icon">BtoA</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><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><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>

View File

@ -1,3 +1,3 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>TokenType | @orca-so/whirlpools-sdk</title><meta name="description" content="Documentation for @orca-so/whirlpools-sdk"/><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">@orca-so/whirlpools-sdk</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">@orca-so/whirlpools-sdk</a></li><li><a href="TokenType.html">TokenType</a></li></ul><h1>Enumeration TokenType </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">
<p>An enum for the token type in a Whirlpool.</p>
</div></div></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>Enumeration Members</h3><ul class="tsd-index-list"><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="TokenType.html#TokenA" class="tsd-kind-icon">TokenA</a></li><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="TokenType.html#TokenB" class="tsd-kind-icon">TokenB</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Enumeration Members</h2><section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum"><a id="TokenA" class="tsd-anchor"></a><h3 class="tsd-anchor-link">TokenA<a href="#TokenA" 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><div class="tsd-signature tsd-kind-icon">TokenA<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">1</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/public/types.ts#L15">utils/public/types.ts:15</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum"><a id="TokenB" class="tsd-anchor"></a><h3 class="tsd-anchor-link">TokenB<a href="#TokenB" 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><div class="tsd-signature tsd-kind-icon">TokenB<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">2</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/utils/public/types.ts#L16">utils/public/types.ts:16</a></li></ul></aside></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-enum"><a href="TokenType.html" class="tsd-kind-icon">Token<wbr/>Type</a><ul><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="TokenType.html#TokenA" class="tsd-kind-icon">TokenA</a></li><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="TokenType.html#TokenB" class="tsd-kind-icon">TokenB</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><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><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>
</div></div></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>Enumeration Members</h3><ul class="tsd-index-list"><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="TokenType.html#TokenA" class="tsd-kind-icon">TokenA</a></li><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="TokenType.html#TokenB" class="tsd-kind-icon">TokenB</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Enumeration Members</h2><section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum"><a id="TokenA" class="tsd-anchor"></a><h3 class="tsd-anchor-link">TokenA<a href="#TokenA" 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><div class="tsd-signature tsd-kind-icon">TokenA<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">1</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/public/types.ts#L15">utils/public/types.ts:15</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-enum-member tsd-parent-kind-enum"><a id="TokenB" class="tsd-anchor"></a><h3 class="tsd-anchor-link">TokenB<a href="#TokenB" 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><div class="tsd-signature tsd-kind-icon">TokenB<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">2</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/utils/public/types.ts#L16">utils/public/types.ts:16</a></li></ul></aside></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-enum"><a href="TokenType.html" class="tsd-kind-icon">Token<wbr/>Type</a><ul><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="TokenType.html#TokenA" class="tsd-kind-icon">TokenA</a></li><li class="tsd-kind-enum-member tsd-parent-kind-enum"><a href="TokenType.html#TokenB" class="tsd-kind-icon">TokenB</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><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><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

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Position | @orca-so/whirlpools-sdk</title><meta name="description" content="Documentation for @orca-so/whirlpools-sdk"/><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">@orca-so/whirlpools-sdk</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">@orca-so/whirlpools-sdk</a></li><li><a href="Position.html">Position</a></li></ul><h1>Interface Position </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">
<p>Helper class to interact with a Position account and build complex transactions.</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Position</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>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#collectFees" class="tsd-kind-icon">collect<wbr/>Fees</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#collectRewards" class="tsd-kind-icon">collect<wbr/>Rewards</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#decreaseLiquidity" class="tsd-kind-icon">decrease<wbr/>Liquidity</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getAddress" class="tsd-kind-icon">get<wbr/>Address</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getData" class="tsd-kind-icon">get<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getLowerTickData" class="tsd-kind-icon">get<wbr/>Lower<wbr/>Tick<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getUpperTickData" class="tsd-kind-icon">get<wbr/>Upper<wbr/>Tick<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getWhirlpoolData" class="tsd-kind-icon">get<wbr/>Whirlpool<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#increaseLiquidity" class="tsd-kind-icon">increase<wbr/>Liquidity</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#refreshData" class="tsd-kind-icon">refresh<wbr/>Data</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="collectFees" class="tsd-anchor"></a><h3 class="tsd-anchor-link">collect<wbr/>Fees<a href="#collectFees" 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-interface"><li class="tsd-signature tsd-kind-icon">collect<wbr/>Fees<span class="tsd-signature-symbol">(</span>updateFeesAndRewards<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span>, ownerTokenAccountMap<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Record</span><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">Address</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span>, destinationWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, positionWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, ataPayer<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L387">whirlpool-client.ts:387</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Position</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>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#collectFees" class="tsd-kind-icon">collect<wbr/>Fees</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#collectRewards" class="tsd-kind-icon">collect<wbr/>Rewards</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#decreaseLiquidity" class="tsd-kind-icon">decrease<wbr/>Liquidity</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getAddress" class="tsd-kind-icon">get<wbr/>Address</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getData" class="tsd-kind-icon">get<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getLowerTickData" class="tsd-kind-icon">get<wbr/>Lower<wbr/>Tick<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getUpperTickData" class="tsd-kind-icon">get<wbr/>Upper<wbr/>Tick<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getWhirlpoolData" class="tsd-kind-icon">get<wbr/>Whirlpool<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#increaseLiquidity" class="tsd-kind-icon">increase<wbr/>Liquidity</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#refreshData" class="tsd-kind-icon">refresh<wbr/>Data</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="collectFees" class="tsd-anchor"></a><h3 class="tsd-anchor-link">collect<wbr/>Fees<a href="#collectFees" 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-interface"><li class="tsd-signature tsd-kind-icon">collect<wbr/>Fees<span class="tsd-signature-symbol">(</span>updateFeesAndRewards<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span>, ownerTokenAccountMap<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Record</span><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">Address</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span>, destinationWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, positionWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, ataPayer<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L387">whirlpool-client.ts:387</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Collect fees from this position</p>
</div><div><p>If <code>positionWallet</code> is provided, the wallet owners have to sign this transaction.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> updateFeesAndRewards: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
@ -16,7 +16,7 @@
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> opts: <span class="tsd-signature-type">SimpleAccountFetchOptions</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>an options object to define fetch and cache options when accessing on-chain accounts</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>the transaction that will collect fees from the position</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="collectRewards" class="tsd-anchor"></a><h3 class="tsd-anchor-link">collect<wbr/>Rewards<a href="#collectRewards" 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-interface"><li class="tsd-signature tsd-kind-icon">collect<wbr/>Rewards<span class="tsd-signature-symbol">(</span>rewardsToCollect<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span>, updateFeesAndRewards<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span>, ownerTokenAccountMap<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Record</span><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">Address</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span>, destinationWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, positionWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, ataPayer<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L410">whirlpool-client.ts:410</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="collectRewards" class="tsd-anchor"></a><h3 class="tsd-anchor-link">collect<wbr/>Rewards<a href="#collectRewards" 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-interface"><li class="tsd-signature tsd-kind-icon">collect<wbr/>Rewards<span class="tsd-signature-symbol">(</span>rewardsToCollect<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span>, updateFeesAndRewards<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span>, ownerTokenAccountMap<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Record</span><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">Address</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span>, destinationWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, positionWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, ataPayer<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L410">whirlpool-client.ts:410</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Collect rewards from this position</p>
</div><div><p>If <code>positionWallet</code> is provided, the wallet owners have to sign this transaction.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> rewardsToCollect: <span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
@ -34,7 +34,7 @@
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> opts: <span class="tsd-signature-type">SimpleAccountFetchOptions</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>an options object to define fetch and cache options when accessing on-chain accounts</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>the transaction that will collect fees from the position</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="decreaseLiquidity" class="tsd-anchor"></a><h3 class="tsd-anchor-link">decrease<wbr/>Liquidity<a href="#decreaseLiquidity" 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-interface"><li class="tsd-signature tsd-kind-icon">decrease<wbr/>Liquidity<span class="tsd-signature-symbol">(</span>liquidityInput<span class="tsd-signature-symbol">: </span><a href="../modules.html#DecreaseLiquidityInput" class="tsd-signature-type" data-tsd-kind="Type alias">DecreaseLiquidityInput</a>, resolveATA<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span>, destinationWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, positionWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, ataPayer<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L366">whirlpool-client.ts:366</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="decreaseLiquidity" class="tsd-anchor"></a><h3 class="tsd-anchor-link">decrease<wbr/>Liquidity<a href="#decreaseLiquidity" 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-interface"><li class="tsd-signature tsd-kind-icon">decrease<wbr/>Liquidity<span class="tsd-signature-symbol">(</span>liquidityInput<span class="tsd-signature-symbol">: </span><a href="../modules.html#DecreaseLiquidityInput" class="tsd-signature-type" data-tsd-kind="Type alias">DecreaseLiquidityInput</a>, resolveATA<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span>, destinationWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, positionWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, ataPayer<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L366">whirlpool-client.ts:366</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Withdraw liquidity from this position.</p>
</div><div><p>If <code>positionWallet</code> is provided, the wallet owners have to sign this transaction.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>liquidityInput: <a href="../modules.html#DecreaseLiquidityInput" class="tsd-signature-type" data-tsd-kind="Type alias">DecreaseLiquidityInput</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
@ -48,22 +48,22 @@
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> ataPayer: <span class="tsd-signature-type">Address</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>wallet that will fund the creation of the new associated token accounts</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>the transaction that will deposit the tokens into the position when executed.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getAddress" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Address<a href="#getAddress" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Address<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L302">whirlpool-client.ts:302</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getAddress" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Address<a href="#getAddress" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Address<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L302">whirlpool-client.ts:302</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Return the address for this Whirlpool instance.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">PublicKey</span></h4><div><p>the PublicKey for this Whirlpool instance.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Data<a href="#getData" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionData</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L308">whirlpool-client.ts:308</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Data<a href="#getData" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#PositionData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionData</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L308">whirlpool-client.ts:308</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Return the most recently fetched Position account data.</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="../modules.html#PositionData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionData</a></h4><div><p>most recently fetched PositionData for this address.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getLowerTickData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Lower<wbr/>Tick<wbr/>Data<a href="#getLowerTickData" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Lower<wbr/>Tick<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#TickData" class="tsd-signature-type" data-tsd-kind="Type alias">TickData</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L320">whirlpool-client.ts:320</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getLowerTickData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Lower<wbr/>Tick<wbr/>Data<a href="#getLowerTickData" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Lower<wbr/>Tick<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#TickData" class="tsd-signature-type" data-tsd-kind="Type alias">TickData</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L320">whirlpool-client.ts:320</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Return the most recently fetched TickData account data for this position&#39;s lower tick.</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="../modules.html#TickData" class="tsd-signature-type" data-tsd-kind="Type alias">TickData</a></h4><div><p>most recently fetched TickData for this position&#39;s lower tick.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getUpperTickData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Upper<wbr/>Tick<wbr/>Data<a href="#getUpperTickData" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Upper<wbr/>Tick<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#TickData" class="tsd-signature-type" data-tsd-kind="Type alias">TickData</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L326">whirlpool-client.ts:326</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getUpperTickData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Upper<wbr/>Tick<wbr/>Data<a href="#getUpperTickData" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Upper<wbr/>Tick<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#TickData" class="tsd-signature-type" data-tsd-kind="Type alias">TickData</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L326">whirlpool-client.ts:326</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Return the most recently fetched TickData account data for this position&#39;s upper tick.</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="../modules.html#TickData" class="tsd-signature-type" data-tsd-kind="Type alias">TickData</a></h4><div><p>most recently fetched TickData for this position&#39;s upper tick.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getWhirlpoolData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Whirlpool<wbr/>Data<a href="#getWhirlpoolData" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Whirlpool<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#WhirlpoolData" class="tsd-signature-type" data-tsd-kind="Type alias">WhirlpoolData</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L314">whirlpool-client.ts:314</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getWhirlpoolData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Whirlpool<wbr/>Data<a href="#getWhirlpoolData" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Whirlpool<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#WhirlpoolData" class="tsd-signature-type" data-tsd-kind="Type alias">WhirlpoolData</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L314">whirlpool-client.ts:314</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Return the most recently fetched Whirlpool account data for this position.</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="../modules.html#WhirlpoolData" class="tsd-signature-type" data-tsd-kind="Type alias">WhirlpoolData</a></h4><div><p>most recently fetched WhirlpoolData for this position.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="increaseLiquidity" class="tsd-anchor"></a><h3 class="tsd-anchor-link">increase<wbr/>Liquidity<a href="#increaseLiquidity" 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-interface"><li class="tsd-signature tsd-kind-icon">increase<wbr/>Liquidity<span class="tsd-signature-symbol">(</span>liquidityInput<span class="tsd-signature-symbol">: </span><a href="../modules.html#IncreaseLiquidityInput" class="tsd-signature-type" data-tsd-kind="Type alias">IncreaseLiquidityInput</a>, resolveATA<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span>, wallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, positionWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, ataPayer<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L346">whirlpool-client.ts:346</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="increaseLiquidity" class="tsd-anchor"></a><h3 class="tsd-anchor-link">increase<wbr/>Liquidity<a href="#increaseLiquidity" 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-interface"><li class="tsd-signature tsd-kind-icon">increase<wbr/>Liquidity<span class="tsd-signature-symbol">(</span>liquidityInput<span class="tsd-signature-symbol">: </span><a href="../modules.html#IncreaseLiquidityInput" class="tsd-signature-type" data-tsd-kind="Type alias">IncreaseLiquidityInput</a>, resolveATA<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span>, wallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, positionWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, ataPayer<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L346">whirlpool-client.ts:346</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Deposit additional tokens into this postiion.
The wallet must contain the position token and the necessary token A &amp; B to complete the deposit.
If <code>positionWallet</code> and <code>wallet</code> is provided, the wallet owners have to sign this transaction.</p>
@ -78,7 +78,7 @@ If <code>positionWallet</code> and <code>wallet</code> is provided, the wallet
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> ataPayer: <span class="tsd-signature-type">Address</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>wallet that will fund the creation of the new associated token accounts</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>the transaction that will deposit the tokens into the position when executed.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="refreshData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">refresh<wbr/>Data<a href="#refreshData" 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-interface"><li class="tsd-signature tsd-kind-icon">refresh<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#PositionData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionData</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L332">whirlpool-client.ts:332</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="refreshData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">refresh<wbr/>Data<a href="#refreshData" 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-interface"><li class="tsd-signature tsd-kind-icon">refresh<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#PositionData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionData</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L332">whirlpool-client.ts:332</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Fetch and return the most recently fetched Position account data.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#PositionData" class="tsd-signature-type" data-tsd-kind="Type alias">PositionData</a><span class="tsd-signature-symbol">&gt;</span></h4><div><p>the most up to date PositionData for this address.</p>
</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-interface"><a href="Position.html" class="tsd-kind-icon">Position</a><ul><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#collectFees" class="tsd-kind-icon">collect<wbr/>Fees</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#collectRewards" class="tsd-kind-icon">collect<wbr/>Rewards</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#decreaseLiquidity" class="tsd-kind-icon">decrease<wbr/>Liquidity</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getAddress" class="tsd-kind-icon">get<wbr/>Address</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getData" class="tsd-kind-icon">get<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getLowerTickData" class="tsd-kind-icon">get<wbr/>Lower<wbr/>Tick<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getUpperTickData" class="tsd-kind-icon">get<wbr/>Upper<wbr/>Tick<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#getWhirlpoolData" class="tsd-kind-icon">get<wbr/>Whirlpool<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#increaseLiquidity" class="tsd-kind-icon">increase<wbr/>Liquidity</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Position.html#refreshData" class="tsd-kind-icon">refresh<wbr/>Data</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><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><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

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Whirlpool | @orca-so/whirlpools-sdk</title><meta name="description" content="Documentation for @orca-so/whirlpools-sdk"/><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">@orca-so/whirlpools-sdk</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">@orca-so/whirlpools-sdk</a></li><li><a href="Whirlpool.html">Whirlpool</a></li></ul><h1>Interface Whirlpool </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">
<p>Helper class to interact with a Whirlpool account and build complex transactions.</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Whirlpool</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>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#closePosition" class="tsd-kind-icon">close<wbr/>Position</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#getAddress" class="tsd-kind-icon">get<wbr/>Address</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#getData" class="tsd-kind-icon">get<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#getRewardInfos" class="tsd-kind-icon">get<wbr/>Reward<wbr/>Infos</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#getTokenAInfo" class="tsd-kind-icon">get<wbr/>TokenAInfo</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#getTokenBInfo" class="tsd-kind-icon">get<wbr/>TokenBInfo</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#getTokenVaultAInfo" class="tsd-kind-icon">get<wbr/>Token<wbr/>VaultAInfo</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#getTokenVaultBInfo" class="tsd-kind-icon">get<wbr/>Token<wbr/>VaultBInfo</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#initTickArrayForTicks" class="tsd-kind-icon">init<wbr/>Tick<wbr/>Array<wbr/>For<wbr/>Ticks</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#openPosition" class="tsd-kind-icon">open<wbr/>Position</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#openPositionWithMetadata" class="tsd-kind-icon">open<wbr/>Position<wbr/>With<wbr/>Metadata</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#refreshData" class="tsd-kind-icon">refresh<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#swap" class="tsd-kind-icon">swap</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#swapWithDevFees" class="tsd-kind-icon">swap<wbr/>With<wbr/>Dev<wbr/>Fees</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="closePosition" class="tsd-anchor"></a><h3 class="tsd-anchor-link">close<wbr/>Position<a href="#closePosition" 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-interface"><li class="tsd-signature tsd-kind-icon">close<wbr/>Position<span class="tsd-signature-symbol">(</span>positionAddress<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span>, slippageTolerance<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Percentage</span>, destinationWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, positionWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, payer<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L259">whirlpool-client.ts:259</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Whirlpool</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>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#closePosition" class="tsd-kind-icon">close<wbr/>Position</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#getAddress" class="tsd-kind-icon">get<wbr/>Address</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#getData" class="tsd-kind-icon">get<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#getRewardInfos" class="tsd-kind-icon">get<wbr/>Reward<wbr/>Infos</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#getTokenAInfo" class="tsd-kind-icon">get<wbr/>TokenAInfo</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#getTokenBInfo" class="tsd-kind-icon">get<wbr/>TokenBInfo</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#getTokenVaultAInfo" class="tsd-kind-icon">get<wbr/>Token<wbr/>VaultAInfo</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#getTokenVaultBInfo" class="tsd-kind-icon">get<wbr/>Token<wbr/>VaultBInfo</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#initTickArrayForTicks" class="tsd-kind-icon">init<wbr/>Tick<wbr/>Array<wbr/>For<wbr/>Ticks</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#openPosition" class="tsd-kind-icon">open<wbr/>Position</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#openPositionWithMetadata" class="tsd-kind-icon">open<wbr/>Position<wbr/>With<wbr/>Metadata</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#refreshData" class="tsd-kind-icon">refresh<wbr/>Data</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#swap" class="tsd-kind-icon">swap</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="Whirlpool.html#swapWithDevFees" class="tsd-kind-icon">swap<wbr/>With<wbr/>Dev<wbr/>Fees</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="closePosition" class="tsd-anchor"></a><h3 class="tsd-anchor-link">close<wbr/>Position<a href="#closePosition" 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-interface"><li class="tsd-signature tsd-kind-icon">close<wbr/>Position<span class="tsd-signature-symbol">(</span>positionAddress<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span>, slippageTolerance<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Percentage</span>, destinationWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, positionWallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, payer<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L259">whirlpool-client.ts:259</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Withdraw all tokens from a position, close the account and burn the position token.</p>
</div><div><p>Users have to collect all fees and rewards from this position prior to closing the account.</p>
<p>If <code>positionWallet</code>, <code>payer</code> is provided, the wallet owner has to sign this transaction.</p>
@ -14,28 +14,28 @@
<p>The wallet that houses the position token that corresponds to this position address. If null, the WhirlpoolContext wallet is used.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> payer: <span class="tsd-signature-type">Address</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>the wallet that will fund the cost needed to initialize the token ATA accounts. If null, the WhirlpoolContext wallet is used.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getAddress" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Address<a href="#getAddress" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Address<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L142">whirlpool-client.ts:142</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getAddress" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Address<a href="#getAddress" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Address<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L142">whirlpool-client.ts:142</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Return the address for this Whirlpool instance.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">PublicKey</span></h4><div><p>the PublicKey for this Whirlpool instance.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Data<a href="#getData" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#WhirlpoolData" class="tsd-signature-type" data-tsd-kind="Type alias">WhirlpoolData</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L148">whirlpool-client.ts:148</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Data<a href="#getData" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#WhirlpoolData" class="tsd-signature-type" data-tsd-kind="Type alias">WhirlpoolData</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L148">whirlpool-client.ts:148</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Return the most recently fetched Whirlpool account data.</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="../modules.html#WhirlpoolData" class="tsd-signature-type" data-tsd-kind="Type alias">WhirlpoolData</a></h4><div><p>most recently fetched WhirlpoolData for this address.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getRewardInfos" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Reward<wbr/>Infos<a href="#getRewardInfos" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Reward<wbr/>Infos<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#WhirlpoolRewardInfo" class="tsd-signature-type" data-tsd-kind="Type alias">WhirlpoolRewardInfo</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/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L184">whirlpool-client.ts:184</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getRewardInfos" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Reward<wbr/>Infos<a href="#getRewardInfos" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Reward<wbr/>Infos<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#WhirlpoolRewardInfo" class="tsd-signature-type" data-tsd-kind="Type alias">WhirlpoolRewardInfo</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/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L184">whirlpool-client.ts:184</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get the WhirlpoolRewardInfos for this pool.</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="../modules.html#WhirlpoolRewardInfo" class="tsd-signature-type" data-tsd-kind="Type alias">WhirlpoolRewardInfo</a><span class="tsd-signature-symbol">[]</span></h4><div><p>Array of 3 WhirlpoolRewardInfos. However, not all of them may be initialized. Use the initialized field on WhirlpoolRewardInfo to check if the reward is active.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getTokenAInfo" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>TokenAInfo<a href="#getTokenAInfo" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>TokenAInfo<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#TokenInfo" class="tsd-signature-type" data-tsd-kind="Type alias">TokenInfo</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L160">whirlpool-client.ts:160</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getTokenAInfo" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>TokenAInfo<a href="#getTokenAInfo" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>TokenAInfo<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#TokenInfo" class="tsd-signature-type" data-tsd-kind="Type alias">TokenInfo</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L160">whirlpool-client.ts:160</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get the TokenInfo for token A of this pool.</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="../modules.html#TokenInfo" class="tsd-signature-type" data-tsd-kind="Type alias">TokenInfo</a></h4><div><p>TokenInfo for token A</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getTokenBInfo" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>TokenBInfo<a href="#getTokenBInfo" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>TokenBInfo<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#TokenInfo" class="tsd-signature-type" data-tsd-kind="Type alias">TokenInfo</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L166">whirlpool-client.ts:166</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getTokenBInfo" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>TokenBInfo<a href="#getTokenBInfo" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>TokenBInfo<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#TokenInfo" class="tsd-signature-type" data-tsd-kind="Type alias">TokenInfo</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L166">whirlpool-client.ts:166</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get the TokenInfo for token B of this pool.</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="../modules.html#TokenInfo" class="tsd-signature-type" data-tsd-kind="Type alias">TokenInfo</a></h4><div><p>TokenInfo for token B</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getTokenVaultAInfo" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Token<wbr/>VaultAInfo<a href="#getTokenVaultAInfo" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Token<wbr/>VaultAInfo<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Account</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L172">whirlpool-client.ts:172</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getTokenVaultAInfo" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Token<wbr/>VaultAInfo<a href="#getTokenVaultAInfo" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Token<wbr/>VaultAInfo<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Account</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L172">whirlpool-client.ts:172</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get the TokenAccountInfo for token vault A of this pool.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Account</span></h4><div><p>TokenAccountInfo for token vault A</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getTokenVaultBInfo" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Token<wbr/>VaultBInfo<a href="#getTokenVaultBInfo" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Token<wbr/>VaultBInfo<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Account</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L178">whirlpool-client.ts:178</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getTokenVaultBInfo" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Token<wbr/>VaultBInfo<a href="#getTokenVaultBInfo" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Token<wbr/>VaultBInfo<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Account</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L178">whirlpool-client.ts:178</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get the TokenAccountInfo for token vault B of this pool.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Account</span></h4><div><p>TokenAccountInfo for token vault B</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="initTickArrayForTicks" class="tsd-anchor"></a><h3 class="tsd-anchor-link">init<wbr/>Tick<wbr/>Array<wbr/>For<wbr/>Ticks<a href="#initTickArrayForTicks" 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-interface"><li class="tsd-signature tsd-kind-icon">init<wbr/>Tick<wbr/>Array<wbr/>For<wbr/>Ticks<span class="tsd-signature-symbol">(</span>ticks<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span>, funder<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L196">whirlpool-client.ts:196</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="initTickArrayForTicks" class="tsd-anchor"></a><h3 class="tsd-anchor-link">init<wbr/>Tick<wbr/>Array<wbr/>For<wbr/>Ticks<a href="#initTickArrayForTicks" 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-interface"><li class="tsd-signature tsd-kind-icon">init<wbr/>Tick<wbr/>Array<wbr/>For<wbr/>Ticks<span class="tsd-signature-symbol">(</span>ticks<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span>, funder<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L196">whirlpool-client.ts:196</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Initialize a set of tick-arrays that encompasses the provided ticks.</p>
</div><div><p>If <code>funder</code> is provided, the funder wallet has to sign this transaction.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>ticks: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
@ -45,7 +45,7 @@
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> opts: <span class="tsd-signature-type">SimpleAccountFetchOptions</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>an <a href="../modules.html#WhirlpoolAccountFetchOptions">WhirlpoolAccountFetchOptions</a> object to define fetch and cache options when accessing on-chain accounts</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>a transaction that will initialize the defined tick-arrays if executed. Return null if all of the tick&#39;s arrays are initialized.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="openPosition" class="tsd-anchor"></a><h3 class="tsd-anchor-link">open<wbr/>Position<a href="#openPosition" 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-interface"><li class="tsd-signature tsd-kind-icon">open<wbr/>Position<span class="tsd-signature-symbol">(</span>tickLower<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, tickUpper<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, liquidityInput<span class="tsd-signature-symbol">: </span><a href="../modules.html#IncreaseLiquidityInput" class="tsd-signature-type" data-tsd-kind="Type alias">IncreaseLiquidityInput</a>, wallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, funder<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>positionMint<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">; </span>tx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L216">whirlpool-client.ts:216</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="openPosition" class="tsd-anchor"></a><h3 class="tsd-anchor-link">open<wbr/>Position<a href="#openPosition" 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-interface"><li class="tsd-signature tsd-kind-icon">open<wbr/>Position<span class="tsd-signature-symbol">(</span>tickLower<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, tickUpper<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, liquidityInput<span class="tsd-signature-symbol">: </span><a href="../modules.html#IncreaseLiquidityInput" class="tsd-signature-type" data-tsd-kind="Type alias">IncreaseLiquidityInput</a>, wallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, funder<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>positionMint<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">; </span>tx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L216">whirlpool-client.ts:216</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Open and fund a position on this Whirlpool.</p>
</div><div><p>User has to ensure the TickArray for tickLower and tickUpper has been initialized prior to calling this function.</p>
<p>If <code>wallet</code> or <code>funder</code> is provided, those wallets have to sign this transaction.</p>
@ -60,7 +60,7 @@
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> funder: <span class="tsd-signature-type">Address</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>the wallet that will fund the cost needed to initialize the position. If null, the WhirlpoolContext wallet is used.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>positionMint<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">; </span>tx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p><code>positionMint</code> - the position to be created. <code>tx</code> - The transaction containing the instructions to perform the operation on chain.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="openPositionWithMetadata" class="tsd-anchor"></a><h3 class="tsd-anchor-link">open<wbr/>Position<wbr/>With<wbr/>Metadata<a href="#openPositionWithMetadata" 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-interface"><li class="tsd-signature tsd-kind-icon">open<wbr/>Position<wbr/>With<wbr/>Metadata<span class="tsd-signature-symbol">(</span>tickLower<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, tickUpper<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, liquidityInput<span class="tsd-signature-symbol">: </span><a href="../modules.html#IncreaseLiquidityInput" class="tsd-signature-type" data-tsd-kind="Type alias">IncreaseLiquidityInput</a>, wallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, funder<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>positionMint<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">; </span>tx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L238">whirlpool-client.ts:238</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="openPositionWithMetadata" class="tsd-anchor"></a><h3 class="tsd-anchor-link">open<wbr/>Position<wbr/>With<wbr/>Metadata<a href="#openPositionWithMetadata" 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-interface"><li class="tsd-signature tsd-kind-icon">open<wbr/>Position<wbr/>With<wbr/>Metadata<span class="tsd-signature-symbol">(</span>tickLower<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, tickUpper<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, liquidityInput<span class="tsd-signature-symbol">: </span><a href="../modules.html#IncreaseLiquidityInput" class="tsd-signature-type" data-tsd-kind="Type alias">IncreaseLiquidityInput</a>, wallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span>, funder<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>positionMint<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">; </span>tx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L238">whirlpool-client.ts:238</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Open and fund a position with meta-data on this Whirlpool.</p>
</div><div><p>User has to ensure the TickArray for tickLower and tickUpper has been initialized prior to calling this function.</p>
<p>If <code>wallet</code> or <code>funder</code> is provided, the wallet owners have to sign this transaction.</p>
@ -75,17 +75,17 @@
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> funder: <span class="tsd-signature-type">Address</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>the wallet that will fund the cost needed to initialize the position. If null, the WhirlpoolContext wallet is used.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>positionMint<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">; </span>tx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p><code>positionMint</code> - the position to be created. <code>tx</code> - The transaction containing the instructions to perform the operation on chain.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="refreshData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">refresh<wbr/>Data<a href="#refreshData" 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-interface"><li class="tsd-signature tsd-kind-icon">refresh<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#WhirlpoolData" class="tsd-signature-type" data-tsd-kind="Type alias">WhirlpoolData</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L154">whirlpool-client.ts:154</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="refreshData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">refresh<wbr/>Data<a href="#refreshData" 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-interface"><li class="tsd-signature tsd-kind-icon">refresh<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#WhirlpoolData" class="tsd-signature-type" data-tsd-kind="Type alias">WhirlpoolData</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L154">whirlpool-client.ts:154</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Fetch and return the most recently fetched Whirlpool account data.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#WhirlpoolData" class="tsd-signature-type" data-tsd-kind="Type alias">WhirlpoolData</a><span class="tsd-signature-symbol">&gt;</span></h4><div><p>the most up to date WhirlpoolData for this address.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="swap" class="tsd-anchor"></a><h3 class="tsd-anchor-link">swap<a href="#swap" 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-interface"><li class="tsd-signature tsd-kind-icon">swap<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><a href="../modules.html#SwapInput" class="tsd-signature-type" data-tsd-kind="Type alias">SwapInput</a>, wallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L274">whirlpool-client.ts:274</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="swap" class="tsd-anchor"></a><h3 class="tsd-anchor-link">swap<a href="#swap" 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-interface"><li class="tsd-signature tsd-kind-icon">swap<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><a href="../modules.html#SwapInput" class="tsd-signature-type" data-tsd-kind="Type alias">SwapInput</a>, wallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L274">whirlpool-client.ts:274</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Perform a swap between tokenA and tokenB on this pool.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <a href="../modules.html#SwapInput" class="tsd-signature-type" data-tsd-kind="Type alias">SwapInput</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A quote on the desired tokenIn and tokenOut for this swap. Use <a href="../modules.html#swapQuoteWithParams">swapQuoteWithParams</a> or other swap quote functions to generate this object.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> wallet: <span class="tsd-signature-type">PublicKey</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The wallet that tokens will be withdrawn and deposit into. If null, the WhirlpoolContext wallet is used.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>a transaction that will perform the swap once executed.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="swapWithDevFees" class="tsd-anchor"></a><h3 class="tsd-anchor-link">swap<wbr/>With<wbr/>Dev<wbr/>Fees<a href="#swapWithDevFees" 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-interface"><li class="tsd-signature tsd-kind-icon">swap<wbr/>With<wbr/>Dev<wbr/>Fees<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><a href="../modules.html#DevFeeSwapInput" class="tsd-signature-type" data-tsd-kind="Type alias">DevFeeSwapInput</a>, devFeeWallet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span>, wallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">PublicKey</span>, payer<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L285">whirlpool-client.ts:285</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="swapWithDevFees" class="tsd-anchor"></a><h3 class="tsd-anchor-link">swap<wbr/>With<wbr/>Dev<wbr/>Fees<a href="#swapWithDevFees" 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-interface"><li class="tsd-signature tsd-kind-icon">swap<wbr/>With<wbr/>Dev<wbr/>Fees<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><a href="../modules.html#DevFeeSwapInput" class="tsd-signature-type" data-tsd-kind="Type alias">DevFeeSwapInput</a>, devFeeWallet<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span>, wallet<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">PublicKey</span>, payer<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L285">whirlpool-client.ts:285</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Collect a developer fee and perform a swap between tokenA and tokenB on this pool.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <a href="../modules.html#DevFeeSwapInput" class="tsd-signature-type" data-tsd-kind="Type alias">DevFeeSwapInput</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A quote on the desired tokenIn and tokenOut for this swap. Use <a href="../modules.html#swapQuoteByInputTokenWithDevFees">swapQuoteByInputTokenWithDevFees</a> to generate this object.</p>

File diff suppressed because one or more lines are too long

View File

@ -1,16 +1,16 @@
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>WhirlpoolClient | @orca-so/whirlpools-sdk</title><meta name="description" content="Documentation for @orca-so/whirlpools-sdk"/><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">@orca-so/whirlpools-sdk</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">@orca-so/whirlpools-sdk</a></li><li><a href="WhirlpoolClient.html">WhirlpoolClient</a></li></ul><h1>Interface WhirlpoolClient </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">
<p>Helper class to help interact with Whirlpool Accounts with a simpler interface.</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">WhirlpoolClient</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>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#collectFeesAndRewardsForPositions" class="tsd-kind-icon">collect<wbr/>Fees<wbr/>And<wbr/>Rewards<wbr/>For<wbr/>Positions</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#collectProtocolFeesForPools" class="tsd-kind-icon">collect<wbr/>Protocol<wbr/>Fees<wbr/>For<wbr/>Pools</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#createPool" class="tsd-kind-icon">create<wbr/>Pool</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#getContext" class="tsd-kind-icon">get<wbr/>Context</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#getFetcher" class="tsd-kind-icon">get<wbr/>Fetcher</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#getPool" class="tsd-kind-icon">get<wbr/>Pool</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#getPools" class="tsd-kind-icon">get<wbr/>Pools</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#getPosition" class="tsd-kind-icon">get<wbr/>Position</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#getPositions" class="tsd-kind-icon">get<wbr/>Positions</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#getRouter" class="tsd-kind-icon">get<wbr/>Router</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="collectFeesAndRewardsForPositions" class="tsd-anchor"></a><h3 class="tsd-anchor-link">collect<wbr/>Fees<wbr/>And<wbr/>Rewards<wbr/>For<wbr/>Positions<a href="#collectFeesAndRewardsForPositions" 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-interface"><li class="tsd-signature tsd-kind-icon">collect<wbr/>Fees<wbr/>And<wbr/>Rewards<wbr/>For<wbr/>Positions<span class="tsd-signature-symbol">(</span>positionAddresses<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L89">whirlpool-client.ts:89</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">WhirlpoolClient</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>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#collectFeesAndRewardsForPositions" class="tsd-kind-icon">collect<wbr/>Fees<wbr/>And<wbr/>Rewards<wbr/>For<wbr/>Positions</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#collectProtocolFeesForPools" class="tsd-kind-icon">collect<wbr/>Protocol<wbr/>Fees<wbr/>For<wbr/>Pools</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#createPool" class="tsd-kind-icon">create<wbr/>Pool</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#getContext" class="tsd-kind-icon">get<wbr/>Context</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#getFetcher" class="tsd-kind-icon">get<wbr/>Fetcher</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#getPool" class="tsd-kind-icon">get<wbr/>Pool</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#getPools" class="tsd-kind-icon">get<wbr/>Pools</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#getPosition" class="tsd-kind-icon">get<wbr/>Position</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#getPositions" class="tsd-kind-icon">get<wbr/>Positions</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolClient.html#getRouter" class="tsd-kind-icon">get<wbr/>Router</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="collectFeesAndRewardsForPositions" class="tsd-anchor"></a><h3 class="tsd-anchor-link">collect<wbr/>Fees<wbr/>And<wbr/>Rewards<wbr/>For<wbr/>Positions<a href="#collectFeesAndRewardsForPositions" 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-interface"><li class="tsd-signature tsd-kind-icon">collect<wbr/>Fees<wbr/>And<wbr/>Rewards<wbr/>For<wbr/>Positions<span class="tsd-signature-symbol">(</span>positionAddresses<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L89">whirlpool-client.ts:89</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Collect all fees and rewards from a list of positions.</p>
</div><dl class="tsd-comment-tags"><dt>experimental</dt><dd></dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>positionAddresses: <span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> opts: <span class="tsd-signature-type">SimpleAccountFetchOptions</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>an options object to define fetch and cache options when accessing on-chain accounts</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>A set of transaction-builders to resolve ATA for affliated tokens, collect fee &amp; rewards for all positions.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="collectProtocolFeesForPools" class="tsd-anchor"></a><h3 class="tsd-anchor-link">collect<wbr/>Protocol<wbr/>Fees<wbr/>For<wbr/>Pools<a href="#collectProtocolFeesForPools" 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-interface"><li class="tsd-signature tsd-kind-icon">collect<wbr/>Protocol<wbr/>Fees<wbr/>For<wbr/>Pools<span class="tsd-signature-symbol">(</span>poolAddresses<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L119">whirlpool-client.ts:119</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="collectProtocolFeesForPools" class="tsd-anchor"></a><h3 class="tsd-anchor-link">collect<wbr/>Protocol<wbr/>Fees<wbr/>For<wbr/>Pools<a href="#collectProtocolFeesForPools" 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-interface"><li class="tsd-signature tsd-kind-icon">collect<wbr/>Protocol<wbr/>Fees<wbr/>For<wbr/>Pools<span class="tsd-signature-symbol">(</span>poolAddresses<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L119">whirlpool-client.ts:119</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Collect protocol fees from a list of pools</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>poolAddresses: <span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>the addresses of the Whirlpool accounts to collect protocol fees from</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>A transaction builder to resolve ATA for tokenA and tokenB if needed, and collect protocol fees for all pools</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="createPool" class="tsd-anchor"></a><h3 class="tsd-anchor-link">create<wbr/>Pool<a href="#createPool" 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-interface"><li class="tsd-signature tsd-kind-icon">create<wbr/>Pool<span class="tsd-signature-symbol">(</span>whirlpoolsConfig<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span>, tokenMintA<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span>, tokenMintB<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span>, tickSpacing<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, initialTick<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, funder<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>poolKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">; </span>tx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L105">whirlpool-client.ts:105</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="createPool" class="tsd-anchor"></a><h3 class="tsd-anchor-link">create<wbr/>Pool<a href="#createPool" 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-interface"><li class="tsd-signature tsd-kind-icon">create<wbr/>Pool<span class="tsd-signature-symbol">(</span>whirlpoolsConfig<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span>, tokenMintA<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span>, tokenMintB<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span>, tickSpacing<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, initialTick<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, funder<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>poolKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">; </span>tx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L105">whirlpool-client.ts:105</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Create a Whirlpool account for a group of token A, token B and tick spacing</p>
</div><dl class="tsd-comment-tags"><dt>throws</dt><dd><p>error when the tokens are not in the canonical byte-based ordering. To resolve this, invert the token order and the initialTick (see <code>TickUtil.invertTick()</code>, <code>PriceMath.invertSqrtPriceX64()</code>, or <code>PriceMath.invertPrice()</code>).</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>whirlpoolsConfig: <span class="tsd-signature-type">Address</span></h5></li><li><h5>tokenMintA: <span class="tsd-signature-type">Address</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
@ -24,27 +24,27 @@
</div></div></li><li><h5>funder: <span class="tsd-signature-type">Address</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>the account to debit SOL from to fund the creation of the account(s)</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span>poolKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PublicKey</span><span class="tsd-signature-symbol">; </span>tx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p><code>poolKey</code>: The public key of the newly created whirlpool account. <code>tx</code>: The transaction containing instructions for the on-chain operations.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getContext" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Context<a href="#getContext" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Context<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../classes/WhirlpoolContext.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolContext</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L31">whirlpool-client.ts:31</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getContext" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Context<a href="#getContext" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Context<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../classes/WhirlpoolContext.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolContext</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L31">whirlpool-client.ts:31</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get this client&#39;s WhirlpoolContext object</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="../classes/WhirlpoolContext.html" class="tsd-signature-type" data-tsd-kind="Class">WhirlpoolContext</a></h4><div><p>a WhirlpoolContext object</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getFetcher" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Fetcher<a href="#getFetcher" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Fetcher<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="WhirlpoolAccountFetcherInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolAccountFetcherInterface</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L37">whirlpool-client.ts:37</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getFetcher" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Fetcher<a href="#getFetcher" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Fetcher<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="WhirlpoolAccountFetcherInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolAccountFetcherInterface</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L37">whirlpool-client.ts:37</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get an WhirlpoolAccountCacheInterface to fetch and cache Whirlpool accounts</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="WhirlpoolAccountFetcherInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolAccountFetcherInterface</a></h4><div><p>an WhirlpoolAccountCacheInterface instance</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getPool" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Pool<a href="#getPool" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Pool<span class="tsd-signature-symbol">(</span>poolAddress<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="Whirlpool.html" class="tsd-signature-type" data-tsd-kind="Interface">Whirlpool</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L52">whirlpool-client.ts:52</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getPool" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Pool<a href="#getPool" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Pool<span class="tsd-signature-symbol">(</span>poolAddress<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="Whirlpool.html" class="tsd-signature-type" data-tsd-kind="Interface">Whirlpool</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L52">whirlpool-client.ts:52</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get a Whirlpool object to interact with the Whirlpool account at the given address.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>poolAddress: <span class="tsd-signature-type">Address</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>the address of the Whirlpool account</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> opts: <span class="tsd-signature-type">SimpleAccountFetchOptions</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>an options object to define fetch and cache options when accessing on-chain accounts</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="Whirlpool.html" class="tsd-signature-type" data-tsd-kind="Interface">Whirlpool</a><span class="tsd-signature-symbol">&gt;</span></h4><div><p>a Whirlpool object to interact with</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getPools" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Pools<a href="#getPools" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Pools<span class="tsd-signature-symbol">(</span>poolAddresses<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="Whirlpool.html" class="tsd-signature-type" data-tsd-kind="Interface">Whirlpool</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L60">whirlpool-client.ts:60</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getPools" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Pools<a href="#getPools" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Pools<span class="tsd-signature-symbol">(</span>poolAddresses<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="Whirlpool.html" class="tsd-signature-type" data-tsd-kind="Interface">Whirlpool</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L60">whirlpool-client.ts:60</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get a list of Whirlpool objects matching the provided list of addresses.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>poolAddresses: <span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>the addresses of the Whirlpool accounts</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> opts: <span class="tsd-signature-type">SimpleAccountFetchOptions</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>an options object to define fetch and cache options when accessing on-chain accounts</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="Whirlpool.html" class="tsd-signature-type" data-tsd-kind="Interface">Whirlpool</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>a list of Whirlpool objects to interact with</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getPosition" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Position<a href="#getPosition" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Position<span class="tsd-signature-symbol">(</span>positionAddress<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="Position.html" class="tsd-signature-type" data-tsd-kind="Interface">Position</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L69">whirlpool-client.ts:69</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getPosition" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Position<a href="#getPosition" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Position<span class="tsd-signature-symbol">(</span>positionAddress<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="Position.html" class="tsd-signature-type" data-tsd-kind="Interface">Position</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L69">whirlpool-client.ts:69</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get a Position object to interact with the Position account at the given address.</p>
</div><dl class="tsd-comment-tags"><dt>throws</dt><dd><p>error when address does not return a Position account.</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>positionAddress: <span class="tsd-signature-type">Address</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
@ -52,12 +52,12 @@
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> opts: <span class="tsd-signature-type">SimpleAccountFetchOptions</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>an options object to define fetch and cache options when accessing on-chain accounts</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="Position.html" class="tsd-signature-type" data-tsd-kind="Interface">Position</a><span class="tsd-signature-symbol">&gt;</span></h4><div><p>a Position object to interact with.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getPositions" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Positions<a href="#getPositions" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Positions<span class="tsd-signature-symbol">(</span>positionAddresses<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Record</span><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">null</span><span class="tsd-signature-symbol"> | </span><a href="Position.html" class="tsd-signature-type" data-tsd-kind="Interface">Position</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L77">whirlpool-client.ts:77</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getPositions" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Positions<a href="#getPositions" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Positions<span class="tsd-signature-symbol">(</span>positionAddresses<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Record</span><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">null</span><span class="tsd-signature-symbol"> | </span><a href="Position.html" class="tsd-signature-type" data-tsd-kind="Interface">Position</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L77">whirlpool-client.ts:77</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get a list of Position objects to interact with the Position account at the given addresses.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>positionAddresses: <span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> opts: <span class="tsd-signature-type">SimpleAccountFetchOptions</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>an options object to define fetch and cache options when accessing on-chain accounts</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Record</span><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">null</span><span class="tsd-signature-symbol"> | </span><a href="Position.html" class="tsd-signature-type" data-tsd-kind="Interface">Position</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>a Record object between account address and Position. If an address is not a Position account, it will be null.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getRouter" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Router<a href="#getRouter" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Router<span class="tsd-signature-symbol">(</span>poolAddresses<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="WhirlpoolRouter.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolRouter</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/whirlpool-client.ts#L44">whirlpool-client.ts:44</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getRouter" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Router<a href="#getRouter" 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-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Router<span class="tsd-signature-symbol">(</span>poolAddresses<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="WhirlpoolRouter.html" class="tsd-signature-type" data-tsd-kind="Interface">WhirlpoolRouter</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/whirlpool-client.ts#L44">whirlpool-client.ts:44</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get a WhirlpoolRouter to help generate the best prices when transacting across a set of pools.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>poolAddresses: <span class="tsd-signature-type">Address</span><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>the addresses of the Whirlpool account addresses to route through</p>

View File

@ -2,7 +2,7 @@
<p>Convienience class to find routes through a set of Whirlpools and execute a swap across them.
The router only supports up to 2-hop trades between pools and does not support arbitrage trades
between the same token.</p>
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">WhirlpoolRouter</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>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolRouter.html#findAllRoutes" class="tsd-kind-icon">find<wbr/>All<wbr/>Routes</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolRouter.html#findBestRoute" class="tsd-kind-icon">find<wbr/>Best<wbr/>Route</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolRouter.html#swap" class="tsd-kind-icon">swap</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="findAllRoutes" class="tsd-anchor"></a><h3 class="tsd-anchor-link">find<wbr/>All<wbr/>Routes<a href="#findAllRoutes" 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-interface"><li class="tsd-signature tsd-kind-icon">find<wbr/>All<wbr/>Routes<span class="tsd-signature-symbol">(</span>trade<span class="tsd-signature-symbol">: </span><a href="../modules.html#Trade" class="tsd-signature-type" data-tsd-kind="Type alias">Trade</a>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#RoutingOptions" class="tsd-signature-type" data-tsd-kind="Type alias">RoutingOptions</a><span class="tsd-signature-symbol">&gt;</span>, fetchOpts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#TradeRoute" class="tsd-signature-type" data-tsd-kind="Type alias">TradeRoute</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/router/public/index.ts#L152">router/public/index.ts:152</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">WhirlpoolRouter</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>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolRouter.html#findAllRoutes" class="tsd-kind-icon">find<wbr/>All<wbr/>Routes</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolRouter.html#findBestRoute" class="tsd-kind-icon">find<wbr/>Best<wbr/>Route</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="WhirlpoolRouter.html#swap" class="tsd-kind-icon">swap</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="findAllRoutes" class="tsd-anchor"></a><h3 class="tsd-anchor-link">find<wbr/>All<wbr/>Routes<a href="#findAllRoutes" 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-interface"><li class="tsd-signature tsd-kind-icon">find<wbr/>All<wbr/>Routes<span class="tsd-signature-symbol">(</span>trade<span class="tsd-signature-symbol">: </span><a href="../modules.html#Trade" class="tsd-signature-type" data-tsd-kind="Type alias">Trade</a>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#RoutingOptions" class="tsd-signature-type" data-tsd-kind="Type alias">RoutingOptions</a><span class="tsd-signature-symbol">&gt;</span>, fetchOpts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#TradeRoute" class="tsd-signature-type" data-tsd-kind="Type alias">TradeRoute</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/router/public/index.ts#L152">router/public/index.ts:152</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Finds all possible routes for a trade, ordered by the best other token amount you would get from a trade.
Use <a href="../classes/RouterUtils.html#selectFirstExecutableRoute">RouterUtils.selectFirstExecutableRoute</a> to find the best executable route.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>trade: <a href="../modules.html#Trade" class="tsd-signature-type" data-tsd-kind="Type alias">Trade</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
@ -12,7 +12,7 @@ Use <a href="../classes/RouterUtils.html#selectFirstExecutableRoute">RouterUtils
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> fetchOpts: <span class="tsd-signature-type">SimpleAccountFetchOptions</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p><a href="../modules.html#WhirlpoolAccountFetchOptions">WhirlpoolAccountFetchOptions</a> to configure the fetching of on-chain data.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#TradeRoute" class="tsd-signature-type" data-tsd-kind="Type alias">TradeRoute</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>A list of <a href="../modules.html#TradeRoute">TradeRoute</a> that can be used to execute a swap, ordered by the best other token amount.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="findBestRoute" class="tsd-anchor"></a><h3 class="tsd-anchor-link">find<wbr/>Best<wbr/>Route<a href="#findBestRoute" 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-interface"><li class="tsd-signature tsd-kind-icon">find<wbr/>Best<wbr/>Route<span class="tsd-signature-symbol">(</span>trade<span class="tsd-signature-symbol">: </span><a href="../modules.html#Trade" class="tsd-signature-type" data-tsd-kind="Type alias">Trade</a>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#RoutingOptions" class="tsd-signature-type" data-tsd-kind="Type alias">RoutingOptions</a><span class="tsd-signature-symbol">&gt;</span>, selectionOpts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#RouteSelectOptions" class="tsd-signature-type" data-tsd-kind="Type alias">RouteSelectOptions</a><span class="tsd-signature-symbol">&gt;</span>, fetchOpts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../modules.html#ExecutableRoute" class="tsd-signature-type" data-tsd-kind="Type alias">ExecutableRoute</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/router/public/index.ts#L175">router/public/index.ts:175</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="findBestRoute" class="tsd-anchor"></a><h3 class="tsd-anchor-link">find<wbr/>Best<wbr/>Route<a href="#findBestRoute" 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-interface"><li class="tsd-signature tsd-kind-icon">find<wbr/>Best<wbr/>Route<span class="tsd-signature-symbol">(</span>trade<span class="tsd-signature-symbol">: </span><a href="../modules.html#Trade" class="tsd-signature-type" data-tsd-kind="Type alias">Trade</a>, opts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#RoutingOptions" class="tsd-signature-type" data-tsd-kind="Type alias">RoutingOptions</a><span class="tsd-signature-symbol">&gt;</span>, selectionOpts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="../modules.html#RouteSelectOptions" class="tsd-signature-type" data-tsd-kind="Type alias">RouteSelectOptions</a><span class="tsd-signature-symbol">&gt;</span>, fetchOpts<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SimpleAccountFetchOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../modules.html#ExecutableRoute" class="tsd-signature-type" data-tsd-kind="Type alias">ExecutableRoute</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/router/public/index.ts#L175">router/public/index.ts:175</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Finds all possible routes for a trade and select the best route that is executable
under the current execution environment.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>trade: <a href="../modules.html#Trade" class="tsd-signature-type" data-tsd-kind="Type alias">Trade</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
@ -25,7 +25,7 @@ will be filled with default values from {@link RouterUtils.getDefaultRouteSelect
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> fetchOpts: <span class="tsd-signature-type">SimpleAccountFetchOptions</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p><a href="../modules.html#WhirlpoolAccountFetchOptions">WhirlpoolAccountFetchOptions</a> to configure the fetching of on-chain data.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../modules.html#ExecutableRoute" class="tsd-signature-type" data-tsd-kind="Type alias">ExecutableRoute</a><span class="tsd-signature-symbol">&gt;</span></h4><div><p>The best <a href="../modules.html#ExecutableRoute">ExecutableRoute</a> that can be used to execute a swap. If no executable route is found, null is returned.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="swap" class="tsd-anchor"></a><h3 class="tsd-anchor-link">swap<a href="#swap" 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-interface"><li class="tsd-signature tsd-kind-icon">swap<span class="tsd-signature-symbol">(</span>trade<span class="tsd-signature-symbol">: </span><a href="../modules.html#TradeRoute" class="tsd-signature-type" data-tsd-kind="Type alias">TradeRoute</a>, slippage<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Percentage</span>, resolvedAtas<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../modules.html#AtaAccountInfo" class="tsd-signature-type" data-tsd-kind="Type alias">AtaAccountInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/orca-so/whirlpools/blob/3f5f209/sdk/src/router/public/index.ts#L194">router/public/index.ts:194</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="swap" class="tsd-anchor"></a><h3 class="tsd-anchor-link">swap<a href="#swap" 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-interface"><li class="tsd-signature tsd-kind-icon">swap<span class="tsd-signature-symbol">(</span>trade<span class="tsd-signature-symbol">: </span><a href="../modules.html#TradeRoute" class="tsd-signature-type" data-tsd-kind="Type alias">TradeRoute</a>, slippage<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Percentage</span>, resolvedAtas<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../modules.html#AtaAccountInfo" class="tsd-signature-type" data-tsd-kind="Type alias">AtaAccountInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">TransactionBuilder</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/yugure-orca/whirlpools/blob/5f9140b/sdk/src/router/public/index.ts#L194">router/public/index.ts:194</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Construct a {@link TransactionBuilder} to help execute a trade route.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>trade: <a href="../modules.html#TradeRoute" class="tsd-signature-type" data-tsd-kind="Type alias">TradeRoute</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The trade route to execute.</p>

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "@orca-so/whirlpools-sdk",
"version": "0.11.4",
"version": "0.11.5",
"description": "Typescript SDK to interact with Orca's Whirlpool program.",
"license": "Apache-2.0",
"main": "dist/index.js",
@ -11,12 +11,10 @@
"@solana/spl-token": "^0.3.8",
"@solana/web3.js": "^1.75.0",
"decimal.js": "^10.3.1",
"lodash.combinations": "^18.11.1",
"tiny-invariant": "^1.2.0"
},
"devDependencies": {
"@types/bn.js": "~5.1.0",
"@types/lodash": "4.14.194",
"@types/mocha": "^9.0.0",
"@metaplex-foundation/mpl-token-metadata": "2.12.0",
"@typescript-eslint/eslint-plugin": "^4.26.0",

View File

@ -19,7 +19,7 @@ export const ORCA_WHIRLPOOLS_CONFIG = new PublicKey("2LecshUwdy9xi7meFgHtFJQNSKk
* Orca's supported tick spacings.
* @category Constants
*/
export const ORCA_SUPPORTED_TICK_SPACINGS = [1, 8, 64, 128];
export const ORCA_SUPPORTED_TICK_SPACINGS = [1, 2, 4, 8, 16, 64, 128];
/**
* The number of rewards supported by this whirlpool.

View File

@ -1,7 +1,5 @@
import { Address } from "@coral-xyz/anchor";
import { AddressUtil } from "@orca-so/common-sdk";
import _ from "lodash";
import "lodash.combinations";
import {
Edge,
Path,
@ -77,7 +75,7 @@ export class AdjacencyListPoolGraph implements PoolGraph {
}
getAllPaths(options?: PathSearchOptions | undefined): PathSearchEntries {
const tokenPairCombinations = _.combinations(this.tokens, 2) as [string, string][];
const tokenPairCombinations = combinations2(this.tokens) as [string, string][];
const searchTokenPairsInString = tokenPairCombinations.map(([startMint, endMint]) => {
return [startMint, endMint] as const;
});
@ -265,3 +263,16 @@ function getInternalRouteId(tokenA: Address, tokenB: Address, sort = true): stri
const sortedMints = sort ? mints.sort() : mints;
return `${sortedMints[0]}${PoolGraphUtils.PATH_ID_DELIMITER}${sortedMints[1]}`;
}
// equivalent to lodash.combinations(array, 2)
function combinations2<T>(array: Readonly<T[]>): [T, T][] {
const result: [T, T][] = [];
for (let i = 0; i < array.length - 1; i++) {
for (let j = i+1; j < array.length; j++) {
result.push([array[i], array[j]]);
}
}
return result;
}

View File

@ -60,6 +60,26 @@ describe("initialize_fee_tier", () => {
assert.ok(feeTierAccount.defaultFeeRate == params.defaultFeeRate);
});
it("successfully init a FeeRate max account", async () => {
const { configInitInfo, configKeypairs } = generateDefaultConfigParams(ctx);
await toTx(ctx, WhirlpoolIx.initializeConfigIx(ctx.program, configInitInfo)).buildAndExecute();
const testTickSpacing = TickSpacing.Standard;
const { params } = await initFeeTier(
ctx,
configInitInfo,
configKeypairs.feeAuthorityKeypair,
testTickSpacing,
30_000 // 3 %
);
const feeTierAccount = (await fetcher.getFeeTier(params.feeTierPda.publicKey)) as FeeTierData;
assert.ok(feeTierAccount.tickSpacing == params.tickSpacing);
assert.ok(feeTierAccount.defaultFeeRate == params.defaultFeeRate);
assert.ok(params.defaultFeeRate === 30_000);
});
it("successfully init a FeeRate with another funder wallet", async () => {
const { configInitInfo, configKeypairs } = generateDefaultConfigParams(ctx);
await toTx(ctx, WhirlpoolIx.initializeConfigIx(ctx.program, configInitInfo)).buildAndExecute();
@ -86,7 +106,7 @@ describe("initialize_fee_tier", () => {
configInitInfo,
configKeypairs.feeAuthorityKeypair,
TickSpacing.Stable,
20_000
30_000 + 1
),
/0x178c/ // FeeRateMaxExceeded
);

View File

@ -78,12 +78,61 @@ describe("set_default_fee_rate", () => {
assert.equal(whirlpool_1.feeRate, newDefaultFeeRate);
});
it("successfully set_default_fee_rate max", async () => {
const { poolInitInfo, configInitInfo, configKeypairs, feeTierParams } = await initTestPool(
ctx,
TickSpacing.Standard
);
const whirlpoolsConfigKey = configInitInfo.whirlpoolsConfigKeypair.publicKey;
const feeAuthorityKeypair = configKeypairs.feeAuthorityKeypair;
const newDefaultFeeRate = 30_000;
await toTx(
ctx,
WhirlpoolIx.setDefaultFeeRateIx(ctx.program, {
whirlpoolsConfig: whirlpoolsConfigKey,
feeAuthority: feeAuthorityKeypair.publicKey,
tickSpacing: TickSpacing.Standard,
defaultFeeRate: newDefaultFeeRate,
})
)
.addSigner(feeAuthorityKeypair)
.buildAndExecute();
// Newly initialized whirlpools have new default fee rate
const [tokenMintA, tokenMintB] = await createInOrderMints(ctx);
const whirlpoolPda = PDAUtil.getWhirlpool(
ctx.program.programId,
whirlpoolsConfigKey,
tokenMintA,
tokenMintB,
TickSpacing.Stable
);
const tokenVaultAKeypair = anchor.web3.Keypair.generate();
const tokenVaultBKeypair = anchor.web3.Keypair.generate();
const newPoolInitInfo: InitPoolParams = {
...poolInitInfo,
tokenMintA,
tokenMintB,
whirlpoolPda,
tokenVaultAKeypair,
tokenVaultBKeypair,
tickSpacing: TickSpacing.Stable,
};
await toTx(ctx, WhirlpoolIx.initializePoolIx(ctx.program, newPoolInitInfo)).buildAndExecute();
const whirlpool_1 = (await fetcher.getPool(whirlpoolPda.publicKey)) as WhirlpoolData;
assert.equal(whirlpool_1.feeRate, newDefaultFeeRate);
});
it("fails when default fee rate exceeds max", async () => {
const { configInitInfo, configKeypairs } = await initTestPool(ctx, TickSpacing.Standard);
const whirlpoolsConfigKey = configInitInfo.whirlpoolsConfigKeypair.publicKey;
const feeAuthorityKeypair = configKeypairs.feeAuthorityKeypair;
const newDefaultFeeRate = 20_000;
const newDefaultFeeRate = 30_000 + 1;
await assert.rejects(
toTx(
ctx,

View File

@ -41,6 +41,33 @@ describe("set_fee_rate", () => {
assert.equal(whirlpool.feeRate, newFeeRate);
});
it("successfully sets_fee_rate max", async () => {
const { poolInitInfo, configInitInfo, configKeypairs, feeTierParams } = await initTestPool(
ctx,
TickSpacing.Standard
);
const whirlpoolKey = poolInitInfo.whirlpoolPda.publicKey;
const whirlpoolsConfigKey = configInitInfo.whirlpoolsConfigKeypair.publicKey;
const feeAuthorityKeypair = configKeypairs.feeAuthorityKeypair;
const newFeeRate = 30_000;
let whirlpool = (await fetcher.getPool(whirlpoolKey, IGNORE_CACHE)) as WhirlpoolData;
assert.equal(whirlpool.feeRate, feeTierParams.defaultFeeRate);
const setFeeRateTx = toTx(ctx, WhirlpoolIx.setFeeRateIx(program, {
whirlpool: whirlpoolKey,
whirlpoolsConfig: whirlpoolsConfigKey,
feeAuthority: feeAuthorityKeypair.publicKey,
feeRate: newFeeRate
})).addSigner(feeAuthorityKeypair);
await setFeeRateTx.buildAndExecute();
whirlpool = (await fetcher.getPool(poolInitInfo.whirlpoolPda.publicKey, IGNORE_CACHE)) as WhirlpoolData;
assert.equal(whirlpool.feeRate, newFeeRate);
});
it("fails when fee rate exceeds max", async () => {
const { poolInitInfo, configInitInfo, configKeypairs } = await initTestPool(
ctx,
@ -50,7 +77,7 @@ describe("set_fee_rate", () => {
const whirlpoolsConfigKey = configInitInfo.whirlpoolsConfigKeypair.publicKey;
const feeAuthorityKeypair = configKeypairs.feeAuthorityKeypair;
const newFeeRate = 20_000;
const newFeeRate = 30_000 + 1;
await assert.rejects(
toTx(
ctx,

View File

@ -15,6 +15,8 @@ const uniqueTokenPairSorted = uniqueTokenMintsGraphData[0];
const rlbSolPool = solConnectedPools[0];
const mSolSolPool = solConnectedPools[1];
const dustSolPool = solConnectedPools[2];
const stSolSolPool = solConnectedPools[3];
const usdcSolPool = solConnectedPools[4];
const rlbUsdcPool = usdcConnectedPools[0];
const msolUsdcPool = usdcConnectedPools[1];
const dustUsdcPool = usdcConnectedPools[2];
@ -382,6 +384,75 @@ describe("PoolGraph tests", () => {
assertGetPathsForPairsResult(results, expectedPathsForTokenPairQueries);
});
});
describe("getAllPaths", () => {
it("Zero pools", async () => {
const graph = PoolGraphBuilder.buildPoolGraph([]);
const results = graph.getAllPaths();
assert.equal(results.length, 0);
});
it("solConnectedPools", () => {
const testData = solConnectedPools;
const graph = PoolGraphBuilder.buildPoolGraph(testData);
const results = graph.getAllPaths();
const sol = rlbSolPool.tokenMintA;
const rlb = rlbSolPool.tokenMintB;
const msol = mSolSolPool.tokenMintB;
const dust = dustSolPool.tokenMintB;
const stSol = stSolSolPool.tokenMintB;
const usdc = usdcSolPool.tokenMintB;
const expectedPaths = new Map<string, PoolTokenPair[][]>();
// combinations
expectedPaths.set(PoolGraphUtils.getSearchPathId(sol, rlb), [[rlbSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(sol, msol), [[mSolSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(sol, dust), [[dustSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(sol, stSol), [[stSolSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(sol, usdc), [[usdcSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(rlb, msol), [[rlbSolPool, mSolSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(rlb, dust), [[rlbSolPool, dustSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(rlb, stSol), [[rlbSolPool, stSolSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(rlb, usdc), [[rlbSolPool, usdcSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(msol, dust), [[mSolSolPool, dustSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(msol, stSol), [[mSolSolPool, stSolSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(msol, usdc), [[mSolSolPool, usdcSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(dust, stSol), [[dustSolPool, stSolSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(dust, usdc), [[dustSolPool, usdcSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(stSol, usdc), [[stSolSolPool, usdcSolPool]]);
// reverse
expectedPaths.set(PoolGraphUtils.getSearchPathId(rlb, sol), [[rlbSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(msol, sol), [[mSolSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(dust, sol), [[dustSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(stSol, sol), [[stSolSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(usdc, sol), [[usdcSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(msol, rlb), [[mSolSolPool, rlbSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(dust, rlb), [[dustSolPool, rlbSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(stSol, rlb), [[stSolSolPool, rlbSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(usdc, rlb), [[usdcSolPool, rlbSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(dust, msol), [[dustSolPool, mSolSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(stSol, msol), [[stSolSolPool, mSolSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(usdc, msol), [[usdcSolPool, mSolSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(stSol, dust), [[stSolSolPool, dustSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(usdc, dust), [[usdcSolPool, dustSolPool]]);
expectedPaths.set(PoolGraphUtils.getSearchPathId(usdc, stSol), [[usdcSolPool, stSolSolPool]]);
assert.equal(results.length, expectedPaths.size, "Number of paths should match expected paths");
results.forEach((searchEntry) => {
const [pathId, paths] = searchEntry;
const [startMint, endMint] = PoolGraphUtils.deconstructPathId(pathId);
const expected = expectedPaths.get(pathId);
assert.ok(!!expected, `Expected path for ${pathId} to exist`);
assertGetPathResult(paths, expected, startMint, endMint);
});
});
});
});
function assertGetPathsForPairsResult(

View File

@ -275,11 +275,6 @@
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==
"@types/lodash@4.14.194":
version "4.14.194"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.194.tgz#b71eb6f7a0ff11bff59fc987134a093029258a76"
integrity sha512-r22s9tAS7imvBt2lyHC9B8AGwWnXaYb1tY09oyLkXDs4vArpYJzw09nj8MLx5VfciBPGIb+ZwG0ssYnEPJxn/g==
"@types/mocha@^9.0.0":
version "9.1.1"
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4"
@ -1129,11 +1124,6 @@ locate-path@^6.0.0:
dependencies:
p-locate "^5.0.0"
lodash.combinations@^18.11.1:
version "18.11.1"
resolved "https://registry.yarnpkg.com/lodash.combinations/-/lodash.combinations-18.11.1.tgz#4b55cba7f01f6a8fd889a15fe6f57f0e61a77b4f"
integrity sha512-0jtulyUQA1My13JuMR23MHqsMk8pQswcy+fO0jTKRp41bi+dDWflv/Ct4qRW6CcbLkk2Qi3PZyzx+tqgqSYLug==
log-symbols@4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503"