@runesx/api-client 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.mjs +6 -2
package/package.json
CHANGED
package/src/index.mjs
CHANGED
|
@@ -154,8 +154,12 @@ export function createRunesXClient(options = {}) {
|
|
|
154
154
|
deleteYardMessage: api.deleteYardMessage,
|
|
155
155
|
|
|
156
156
|
// ---- Client-side estimation utilities ----
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
// skipSelfTradeCheck: pass true when estimating on behalf of a different user
|
|
158
|
+
// (e.g. tipbot swaps) — the API key user's CLOB orders would incorrectly
|
|
159
|
+
// trigger self-trade prevention against bids/asks that the actual swap user
|
|
160
|
+
// (a Discord user with no CLOB orders) would freely fill.
|
|
161
|
+
estimateSwap: (inputCoin, outputCoin, amountIn, maxHops = 6, algorithm = 'dfs', { skipSelfTradeCheck = false } = {}) =>
|
|
162
|
+
estimateSwap(inputCoin, outputCoin, amountIn, getPools(), getCoins(), maxHops, algorithm, getAllOrderBooks(), skipSelfTradeCheck ? null : getUserOrders(), getClobFees(), getMarketByCoinKey()),
|
|
159
163
|
estimateLiquidityFrontend,
|
|
160
164
|
estimateDepositShares: ({ pool, amountA, amountB, slippagePercent } = {}) =>
|
|
161
165
|
estimateDepositShares({ pool, amountA, amountB, slippagePercent }),
|