@t2000/cli 1.27.0 → 1.27.1
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/dist/{chunk-GGXOFR5Y.js → chunk-V5GSOFGJ.js} +15 -3
- package/dist/{chunk-GGXOFR5Y.js.map → chunk-V5GSOFGJ.js.map} +1 -1
- package/dist/{dist-X5FWXI7K.js → dist-KIMZRUQE.js} +6 -2
- package/dist/{dist-OECMFTLF.js → dist-TUAS5C2A.js} +12 -3
- package/dist/{dist-OECMFTLF.js.map → dist-TUAS5C2A.js.map} +1 -1
- package/dist/index.js +3 -3
- package/package.json +3 -3
- /package/dist/{dist-X5FWXI7K.js.map → dist-KIMZRUQE.js.map} +0 -0
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
OVERLAY_FEE_RATE,
|
|
30
30
|
ProtocolRegistry,
|
|
31
31
|
SAVE_FEE_BPS,
|
|
32
|
+
SPONSORED_PYTH_DEPENDENT_PROVIDERS,
|
|
32
33
|
STABLE_ASSETS,
|
|
33
34
|
SUI_DECIMALS,
|
|
34
35
|
SUI_TYPE,
|
|
@@ -97,6 +98,7 @@ import {
|
|
|
97
98
|
getPendingRewards,
|
|
98
99
|
getPendingRewardsByAddress,
|
|
99
100
|
getRates,
|
|
101
|
+
getSponsoredSwapProviders,
|
|
100
102
|
getSwapQuote,
|
|
101
103
|
getTier,
|
|
102
104
|
getVoloStats,
|
|
@@ -136,7 +138,7 @@ import {
|
|
|
136
138
|
validateLabel,
|
|
137
139
|
verifyCetusRouteCoinMatch,
|
|
138
140
|
walletExists
|
|
139
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-V5GSOFGJ.js";
|
|
140
142
|
import "./chunk-NXTB2IJH.js";
|
|
141
143
|
import "./chunk-OCLKPYUU.js";
|
|
142
144
|
import "./chunk-6JATGRLJ.js";
|
|
@@ -175,6 +177,7 @@ export {
|
|
|
175
177
|
OVERLAY_FEE_RATE,
|
|
176
178
|
ProtocolRegistry,
|
|
177
179
|
SAVE_FEE_BPS,
|
|
180
|
+
SPONSORED_PYTH_DEPENDENT_PROVIDERS,
|
|
178
181
|
STABLE_ASSETS,
|
|
179
182
|
SUI_DECIMALS,
|
|
180
183
|
SUI_TYPE,
|
|
@@ -243,6 +246,7 @@ export {
|
|
|
243
246
|
getPendingRewards,
|
|
244
247
|
getPendingRewardsByAddress,
|
|
245
248
|
getRates,
|
|
249
|
+
getSponsoredSwapProviders,
|
|
246
250
|
getSwapQuote,
|
|
247
251
|
getTier,
|
|
248
252
|
getVoloStats,
|
|
@@ -283,4 +287,4 @@ export {
|
|
|
283
287
|
verifyCetusRouteCoinMatch,
|
|
284
288
|
walletExists
|
|
285
289
|
};
|
|
286
|
-
//# sourceMappingURL=dist-
|
|
290
|
+
//# sourceMappingURL=dist-KIMZRUQE.js.map
|
|
@@ -132056,6 +132056,7 @@ __export2(cetus_swap_exports, {
|
|
|
132056
132056
|
deserializeCetusRoute: () => deserializeCetusRoute,
|
|
132057
132057
|
findSwapRoute: () => findSwapRoute,
|
|
132058
132058
|
isCetusRouteFresh: () => isCetusRouteFresh,
|
|
132059
|
+
isPrecomputedRouteCompatibleWithProviders: () => isPrecomputedRouteCompatibleWithProviders,
|
|
132059
132060
|
resolveTokenType: () => resolveTokenType,
|
|
132060
132061
|
serializeCetusRoute: () => serializeCetusRoute,
|
|
132061
132062
|
simulateSwap: () => simulateSwap,
|
|
@@ -132172,6 +132173,14 @@ function getClient3(walletAddress, overlayFee) {
|
|
|
132172
132173
|
clientCache.set(key, client);
|
|
132173
132174
|
return client;
|
|
132174
132175
|
}
|
|
132176
|
+
function isPrecomputedRouteCompatibleWithProviders(route, providers) {
|
|
132177
|
+
if (!providers || providers.length === 0) return true;
|
|
132178
|
+
const allowed = new Set(providers);
|
|
132179
|
+
for (const path of route.routerData.paths) {
|
|
132180
|
+
if (!allowed.has(path.provider)) return false;
|
|
132181
|
+
}
|
|
132182
|
+
return true;
|
|
132183
|
+
}
|
|
132175
132184
|
async function findSwapRoute(params) {
|
|
132176
132185
|
const client = getClient3(params.walletAddress, params.overlayFee);
|
|
132177
132186
|
const findParams = {
|
|
@@ -132249,7 +132258,7 @@ async function addSwapToTx(tx, client, address2, input) {
|
|
|
132249
132258
|
}
|
|
132250
132259
|
let route;
|
|
132251
132260
|
let usedPrecomputedRoute = false;
|
|
132252
|
-
if (input.precomputedRoute && input.precomputedRoute.amountIn === effectiveRaw.toString() && input.precomputedRoute.byAmountIn === byAmountIn) {
|
|
132261
|
+
if (input.precomputedRoute && input.precomputedRoute.amountIn === effectiveRaw.toString() && input.precomputedRoute.byAmountIn === byAmountIn && isPrecomputedRouteCompatibleWithProviders(input.precomputedRoute, input.providers)) {
|
|
132253
132262
|
route = input.precomputedRoute;
|
|
132254
132263
|
usedPrecomputedRoute = true;
|
|
132255
132264
|
} else {
|
|
@@ -139820,7 +139829,7 @@ ${context}
|
|
|
139820
139829
|
})
|
|
139821
139830
|
);
|
|
139822
139831
|
}
|
|
139823
|
-
var PKG_VERSION = "1.27.
|
|
139832
|
+
var PKG_VERSION = "1.27.1";
|
|
139824
139833
|
console.log = (...args) => console.error("[log]", ...args);
|
|
139825
139834
|
console.warn = (...args) => console.error("[warn]", ...args);
|
|
139826
139835
|
async function startMcpServer(opts) {
|
|
@@ -139910,4 +139919,4 @@ axios/dist/node/axios.cjs:
|
|
|
139910
139919
|
@scure/bip39/index.js:
|
|
139911
139920
|
(*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
|
|
139912
139921
|
*/
|
|
139913
|
-
//# sourceMappingURL=dist-
|
|
139922
|
+
//# sourceMappingURL=dist-TUAS5C2A.js.map
|