@cetusprotocol/aggregator-sdk 1.5.7 → 1.5.9
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/index.cjs +71 -27
- package/dist/index.d.cts +50 -7
- package/dist/index.d.ts +50 -7
- package/dist/index.js +66 -27
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3416,7 +3416,7 @@ var AGGREGATOR_V3_CONFIG = {
|
|
|
3416
3416
|
};
|
|
3417
3417
|
|
|
3418
3418
|
// src/api.ts
|
|
3419
|
-
var SDK_VERSION =
|
|
3419
|
+
var SDK_VERSION = 1010509;
|
|
3420
3420
|
function parseRouterResponse(data, byAmountIn) {
|
|
3421
3421
|
let packages = /* @__PURE__ */ new Map();
|
|
3422
3422
|
if (data.packages) {
|
|
@@ -8325,6 +8325,37 @@ function exportToCSV(comparison) {
|
|
|
8325
8325
|
return rows.join("\n");
|
|
8326
8326
|
}
|
|
8327
8327
|
|
|
8328
|
+
// src/utils/gas-budget.ts
|
|
8329
|
+
var SWAP_GAS_BUDGET_TABLE = [
|
|
8330
|
+
{ maxCommands: 10, noPyth: 5e7, pyth: 5e7 },
|
|
8331
|
+
{ maxCommands: 19, noPyth: 15e7, pyth: 1e8 },
|
|
8332
|
+
{ maxCommands: 29, noPyth: 25e7, pyth: 2e8 },
|
|
8333
|
+
{ maxCommands: 39, noPyth: 35e7, pyth: 3e8 },
|
|
8334
|
+
{ maxCommands: Infinity, noPyth: 5e8, pyth: 5e8 }
|
|
8335
|
+
];
|
|
8336
|
+
var PYTH_PRELUDE_CALLS = /* @__PURE__ */ new Set([
|
|
8337
|
+
"vaa::parse_and_verify",
|
|
8338
|
+
"pyth::create_authenticated_price_infos_using_accumulator",
|
|
8339
|
+
"pyth::update_single_price_feed",
|
|
8340
|
+
"hot_potato_vector::destroy"
|
|
8341
|
+
]);
|
|
8342
|
+
function hasPythPrelude(tx) {
|
|
8343
|
+
return tx.getData().commands.some(
|
|
8344
|
+
(command) => command.MoveCall != null && PYTH_PRELUDE_CALLS.has(
|
|
8345
|
+
`${command.MoveCall.module}::${command.MoveCall.function}`
|
|
8346
|
+
)
|
|
8347
|
+
);
|
|
8348
|
+
}
|
|
8349
|
+
function lookupGasBudget(commandCount, hasPyth) {
|
|
8350
|
+
const bucket = SWAP_GAS_BUDGET_TABLE.find(
|
|
8351
|
+
(row) => commandCount <= row.maxCommands
|
|
8352
|
+
);
|
|
8353
|
+
return hasPyth ? bucket.pyth : bucket.noPyth;
|
|
8354
|
+
}
|
|
8355
|
+
function estimateSwapGasBudget(tx) {
|
|
8356
|
+
return lookupGasBudget(tx.getData().commands.length, hasPythPrelude(tx));
|
|
8357
|
+
}
|
|
8358
|
+
|
|
8328
8359
|
// src/utils/msafe.ts
|
|
8329
8360
|
var import_bn5 = __toESM(require_bn());
|
|
8330
8361
|
var dealWithFastRouterSwapParamsForMsafe = (data) => {
|
|
@@ -8762,43 +8793,45 @@ var MagmaPropAmmRouter = class {
|
|
|
8762
8793
|
});
|
|
8763
8794
|
}
|
|
8764
8795
|
};
|
|
8765
|
-
var
|
|
8796
|
+
var HaedalPropAmmRouter = class {
|
|
8766
8797
|
constructor(_env) {
|
|
8767
8798
|
}
|
|
8768
8799
|
swap(txb, flattenedPath, swapContext, _extends) {
|
|
8769
8800
|
const path = flattenedPath.path;
|
|
8770
8801
|
if (!path.extendedDetails) {
|
|
8771
|
-
throw new Error("Extended details not found for
|
|
8802
|
+
throw new Error("Extended details not found for HAEDALPROPAMM");
|
|
8772
8803
|
}
|
|
8773
8804
|
this.validateExtendedDetails(path.extendedDetails);
|
|
8774
8805
|
const swapData = this.prepareSwapData(flattenedPath);
|
|
8775
8806
|
this.executeSwapContract(txb, swapData, swapContext);
|
|
8776
8807
|
}
|
|
8777
8808
|
validateExtendedDetails(extendedDetails) {
|
|
8778
|
-
if (!extendedDetails.
|
|
8779
|
-
throw new Error("
|
|
8809
|
+
if (!extendedDetails.haedalpropamm_pool_id) {
|
|
8810
|
+
throw new Error("HAEDALPROPAMM pool id not found in extended details");
|
|
8780
8811
|
}
|
|
8781
|
-
if (!extendedDetails.
|
|
8782
|
-
throw new Error("
|
|
8812
|
+
if (!extendedDetails.haedalpropamm_regime_id) {
|
|
8813
|
+
throw new Error("HAEDALPROPAMM regime id not found in extended details");
|
|
8783
8814
|
}
|
|
8784
|
-
if (extendedDetails.
|
|
8815
|
+
if (extendedDetails.haedalpropamm_oracle_mode !== "pyth_core") {
|
|
8785
8816
|
throw new Error(
|
|
8786
|
-
`
|
|
8817
|
+
`HAEDALPROPAMM oracle mode "${extendedDetails.haedalpropamm_oracle_mode}" not supported (only "pyth_core")`
|
|
8787
8818
|
);
|
|
8788
8819
|
}
|
|
8789
|
-
if (!extendedDetails.
|
|
8790
|
-
throw new Error(
|
|
8820
|
+
if (!extendedDetails.haedalpropamm_base_price_info_object) {
|
|
8821
|
+
throw new Error(
|
|
8822
|
+
"HAEDALPROPAMM base price info object not found in extended details"
|
|
8823
|
+
);
|
|
8791
8824
|
}
|
|
8792
|
-
if (!extendedDetails.
|
|
8825
|
+
if (!extendedDetails.haedalpropamm_quote_price_info_object) {
|
|
8793
8826
|
throw new Error(
|
|
8794
|
-
"
|
|
8827
|
+
"HAEDALPROPAMM quote price info object not found in extended details"
|
|
8795
8828
|
);
|
|
8796
8829
|
}
|
|
8797
8830
|
}
|
|
8798
8831
|
prepareSwapData(flattenedPath) {
|
|
8799
8832
|
const path = flattenedPath.path;
|
|
8800
8833
|
if (path.publishedAt == null) {
|
|
8801
|
-
throw new Error("
|
|
8834
|
+
throw new Error("HAEDALPROPAMM not set publishedAt");
|
|
8802
8835
|
}
|
|
8803
8836
|
const extendedDetails = path.extendedDetails;
|
|
8804
8837
|
const [baseType, quoteType] = path.direction ? [path.from, path.target] : [path.target, path.from];
|
|
@@ -8809,16 +8842,16 @@ var TideRouter = class {
|
|
|
8809
8842
|
a2b: path.direction,
|
|
8810
8843
|
amountIn,
|
|
8811
8844
|
publishedAt: path.publishedAt,
|
|
8812
|
-
poolId: extendedDetails.
|
|
8813
|
-
regimeId: extendedDetails.
|
|
8814
|
-
basePriceInfoObject: extendedDetails.
|
|
8815
|
-
quotePriceInfoObject: extendedDetails.
|
|
8845
|
+
poolId: extendedDetails.haedalpropamm_pool_id,
|
|
8846
|
+
regimeId: extendedDetails.haedalpropamm_regime_id,
|
|
8847
|
+
basePriceInfoObject: extendedDetails.haedalpropamm_base_price_info_object,
|
|
8848
|
+
quotePriceInfoObject: extendedDetails.haedalpropamm_quote_price_info_object
|
|
8816
8849
|
};
|
|
8817
8850
|
}
|
|
8818
8851
|
executeSwapContract(txb, swapData, swapContext) {
|
|
8819
8852
|
const fn = swapData.a2b ? "swap_a2b_pyth_core" : "swap_b2a_pyth_core";
|
|
8820
8853
|
txb.moveCall({
|
|
8821
|
-
target: `${swapData.publishedAt}::
|
|
8854
|
+
target: `${swapData.publishedAt}::haedalpropamm::${fn}`,
|
|
8822
8855
|
typeArguments: [swapData.baseType, swapData.quoteType],
|
|
8823
8856
|
arguments: [
|
|
8824
8857
|
swapContext,
|
|
@@ -8876,7 +8909,7 @@ var FERRADLMM = "FERRADLMM";
|
|
|
8876
8909
|
var FERRACLMM = "FERRACLMM";
|
|
8877
8910
|
var BOLT = "BOLT";
|
|
8878
8911
|
var MAGMAPROPAMM = "MAGMAPROPAMM";
|
|
8879
|
-
var
|
|
8912
|
+
var HAEDALPROPAMM = "HAEDALPROPAMM";
|
|
8880
8913
|
var DEFAULT_ENDPOINT = "https://api-sui.cetus.zone/router_v3";
|
|
8881
8914
|
var ALL_DEXES = [
|
|
8882
8915
|
CETUS,
|
|
@@ -8913,7 +8946,7 @@ var ALL_DEXES = [
|
|
|
8913
8946
|
FERRACLMM,
|
|
8914
8947
|
BOLT,
|
|
8915
8948
|
MAGMAPROPAMM,
|
|
8916
|
-
|
|
8949
|
+
HAEDALPROPAMM
|
|
8917
8950
|
];
|
|
8918
8951
|
function getAllProviders() {
|
|
8919
8952
|
return ALL_DEXES;
|
|
@@ -9125,8 +9158,8 @@ var _AggregatorClient = class _AggregatorClient {
|
|
|
9125
9158
|
return new BoltRouter(this.env);
|
|
9126
9159
|
case MAGMAPROPAMM:
|
|
9127
9160
|
return new MagmaPropAmmRouter(this.env);
|
|
9128
|
-
case
|
|
9129
|
-
return new
|
|
9161
|
+
case HAEDALPROPAMM:
|
|
9162
|
+
return new HaedalPropAmmRouter(this.env);
|
|
9130
9163
|
default:
|
|
9131
9164
|
throw new Error(
|
|
9132
9165
|
`${CLIENT_CONFIG.ERRORS.UNSUPPORTED_DEX} ${provider}`
|
|
@@ -9809,10 +9842,16 @@ var _AggregatorClient = class _AggregatorClient {
|
|
|
9809
9842
|
tempMaxAmount = amount2;
|
|
9810
9843
|
}
|
|
9811
9844
|
} else {
|
|
9812
|
-
const
|
|
9813
|
-
if (
|
|
9845
|
+
const amountOut = new import_bn6.default(eventJson2?.data?.amount_out ?? 0);
|
|
9846
|
+
if (!amountOut.eq(amount)) {
|
|
9847
|
+
continue;
|
|
9848
|
+
}
|
|
9849
|
+
const pureAmountIn2 = new import_bn6.default(eventJson2?.data?.amount_in ?? 0);
|
|
9850
|
+
const feeAmount2 = new import_bn6.default(eventJson2?.data?.fee_amount ?? 0);
|
|
9851
|
+
const totalAmountIn = pureAmountIn2.add(feeAmount2);
|
|
9852
|
+
if (totalAmountIn.lt(tempMaxAmount)) {
|
|
9814
9853
|
tempIndex = i;
|
|
9815
|
-
tempMaxAmount =
|
|
9854
|
+
tempMaxAmount = totalAmountIn;
|
|
9816
9855
|
}
|
|
9817
9856
|
}
|
|
9818
9857
|
}
|
|
@@ -10035,6 +10074,7 @@ exports.GAS_TYPE_ARG_LONG = GAS_TYPE_ARG_LONG;
|
|
|
10035
10074
|
exports.HAEDAL = HAEDAL;
|
|
10036
10075
|
exports.HAEDALHMMV2 = HAEDALHMMV2;
|
|
10037
10076
|
exports.HAEDALPMM = HAEDALPMM;
|
|
10077
|
+
exports.HAEDALPROPAMM = HAEDALPROPAMM;
|
|
10038
10078
|
exports.HAWAL = HAWAL;
|
|
10039
10079
|
exports.INTEGRATE = INTEGRATE;
|
|
10040
10080
|
exports.JOIN_FUNC = JOIN_FUNC;
|
|
@@ -10060,6 +10100,7 @@ exports.PAY_MODULE = PAY_MODULE;
|
|
|
10060
10100
|
exports.POOL_MODULT = POOL_MODULT;
|
|
10061
10101
|
exports.PUBLISHED_ADDRESSES = PUBLISHED_ADDRESSES;
|
|
10062
10102
|
exports.PYTH_CONFIG = PYTH_CONFIG;
|
|
10103
|
+
exports.PYTH_PRELUDE_CALLS = PYTH_PRELUDE_CALLS;
|
|
10063
10104
|
exports.REPAY_FLASH_SWAP_A2B_FUNC = REPAY_FLASH_SWAP_A2B_FUNC;
|
|
10064
10105
|
exports.REPAY_FLASH_SWAP_B2A_FUNC = REPAY_FLASH_SWAP_B2A_FUNC;
|
|
10065
10106
|
exports.REPAY_FLASH_SWAP_WITH_PARTNER_A2B_FUNC = REPAY_FLASH_SWAP_WITH_PARTNER_A2B_FUNC;
|
|
@@ -10076,6 +10117,7 @@ exports.SUILEND = SUILEND;
|
|
|
10076
10117
|
exports.SUI_SYSTEM_STATE_OBJECT_ID = SUI_SYSTEM_STATE_OBJECT_ID;
|
|
10077
10118
|
exports.SWAP_A2B_FUNC = SWAP_A2B_FUNC;
|
|
10078
10119
|
exports.SWAP_B2A_FUNC = SWAP_B2A_FUNC;
|
|
10120
|
+
exports.SWAP_GAS_BUDGET_TABLE = SWAP_GAS_BUDGET_TABLE;
|
|
10079
10121
|
exports.SuiZeroCoinFn = SuiZeroCoinFn;
|
|
10080
10122
|
exports.TEN_POW_NINE = TEN_POW_NINE;
|
|
10081
10123
|
exports.TESTNET_AFTERMATH_INSURANCE_FUND_ID = TESTNET_AFTERMATH_INSURANCE_FUND_ID;
|
|
@@ -10085,7 +10127,6 @@ exports.TESTNET_AFTERMATH_REGISTRY_ID = TESTNET_AFTERMATH_REGISTRY_ID;
|
|
|
10085
10127
|
exports.TESTNET_AFTERMATH_TREASURY_ID = TESTNET_AFTERMATH_TREASURY_ID;
|
|
10086
10128
|
exports.TESTNET_CETUS_V3_PUBLISHED_AT = TESTNET_CETUS_V3_PUBLISHED_AT;
|
|
10087
10129
|
exports.TESTNET_FLOWX_AMM_CONTAINER_ID = TESTNET_FLOWX_AMM_CONTAINER_ID;
|
|
10088
|
-
exports.TIDE = TIDE;
|
|
10089
10130
|
exports.TRANSFER_ACCOUNT_CAP = TRANSFER_ACCOUNT_CAP;
|
|
10090
10131
|
exports.TRANSFER_OR_DESTORY_COIN_FUNC = TRANSFER_OR_DESTORY_COIN_FUNC;
|
|
10091
10132
|
exports.TURBOS = TURBOS;
|
|
@@ -10111,6 +10152,7 @@ exports.completionCoin = completionCoin;
|
|
|
10111
10152
|
exports.composeType = composeType;
|
|
10112
10153
|
exports.createTarget = createTarget;
|
|
10113
10154
|
exports.dealWithFastRouterSwapParamsForMsafe = dealWithFastRouterSwapParamsForMsafe;
|
|
10155
|
+
exports.estimateSwapGasBudget = estimateSwapGasBudget;
|
|
10114
10156
|
exports.exportToCSV = exportToCSV;
|
|
10115
10157
|
exports.exportToJSON = exportToJSON;
|
|
10116
10158
|
exports.extractAddressFromType = extractAddressFromType;
|
|
@@ -10133,8 +10175,10 @@ exports.getOrCreateAccountCap = getOrCreateAccountCap;
|
|
|
10133
10175
|
exports.getProvidersExcluding = getProvidersExcluding;
|
|
10134
10176
|
exports.getProvidersIncluding = getProvidersIncluding;
|
|
10135
10177
|
exports.getRouterResult = getRouterResult;
|
|
10178
|
+
exports.hasPythPrelude = hasPythPrelude;
|
|
10136
10179
|
exports.isSortedSymbols = isSortedSymbols;
|
|
10137
10180
|
exports.isValidDowngradeUuid6 = isValidDowngradeUuid6;
|
|
10181
|
+
exports.lookupGasBudget = lookupGasBudget;
|
|
10138
10182
|
exports.mintZeroCoin = mintZeroCoin;
|
|
10139
10183
|
exports.normalizeCoinType = normalizeCoinType;
|
|
10140
10184
|
exports.parseAftermathFeeType = parseAftermathFeeType;
|
package/dist/index.d.cts
CHANGED
|
@@ -132,11 +132,11 @@ type ExtendedDetails = {
|
|
|
132
132
|
bolt_oracle_id?: string;
|
|
133
133
|
bolt_quote_coin_type?: string;
|
|
134
134
|
magmapropamm_pool_id?: string;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
haedalpropamm_pool_id?: string;
|
|
136
|
+
haedalpropamm_regime_id?: string;
|
|
137
|
+
haedalpropamm_oracle_mode?: string;
|
|
138
|
+
haedalpropamm_base_price_info_object?: string;
|
|
139
|
+
haedalpropamm_quote_price_info_object?: string;
|
|
140
140
|
aux_shared_versions?: Record<string, number>;
|
|
141
141
|
};
|
|
142
142
|
type Path = {
|
|
@@ -365,7 +365,7 @@ declare const FERRADLMM = "FERRADLMM";
|
|
|
365
365
|
declare const FERRACLMM = "FERRACLMM";
|
|
366
366
|
declare const BOLT = "BOLT";
|
|
367
367
|
declare const MAGMAPROPAMM = "MAGMAPROPAMM";
|
|
368
|
-
declare const
|
|
368
|
+
declare const HAEDALPROPAMM = "HAEDALPROPAMM";
|
|
369
369
|
declare const DEFAULT_ENDPOINT = "https://api-sui.cetus.zone/router_v3";
|
|
370
370
|
declare const ALL_DEXES: string[];
|
|
371
371
|
type BuildRouterSwapParamsV3 = {
|
|
@@ -786,6 +786,49 @@ declare function exportToJSON(comparison: ComparisonResult): string;
|
|
|
786
786
|
*/
|
|
787
787
|
declare function exportToCSV(comparison: ComparisonResult): string;
|
|
788
788
|
|
|
789
|
+
/**
|
|
790
|
+
* Fixed gas budget table for SDK-generated swap PTBs, bucketed by command
|
|
791
|
+
* count and whether the PTB contains a Pyth oracle prelude.
|
|
792
|
+
*
|
|
793
|
+
* Values are in MIST (1 SUI = 1e9 MIST). Each bucket's budget is at least 2x
|
|
794
|
+
* the worst observed `required_gas_floor` across 15504 replayed mainnet
|
|
795
|
+
* router transactions (validated 2026-06), and holds up to a 10x increase of
|
|
796
|
+
* the reference gas price.
|
|
797
|
+
*/
|
|
798
|
+
declare const SWAP_GAS_BUDGET_TABLE: ReadonlyArray<{
|
|
799
|
+
maxCommands: number;
|
|
800
|
+
noPyth: number;
|
|
801
|
+
pyth: number;
|
|
802
|
+
}>;
|
|
803
|
+
/**
|
|
804
|
+
* `module::function` pairs of the Pyth oracle prelude calls emitted by the
|
|
805
|
+
* SDK (see src/pyth/adapter.ts). Matched without the package id since Pyth /
|
|
806
|
+
* Wormhole package ids change across upgrades.
|
|
807
|
+
*/
|
|
808
|
+
declare const PYTH_PRELUDE_CALLS: ReadonlySet<string>;
|
|
809
|
+
/**
|
|
810
|
+
* Whether the transaction contains a Pyth oracle prelude (price feed update)
|
|
811
|
+
* emitted by the SDK.
|
|
812
|
+
*/
|
|
813
|
+
declare function hasPythPrelude(tx: Transaction): boolean;
|
|
814
|
+
/**
|
|
815
|
+
* Look up the fixed gas budget (in MIST) for a swap PTB with the given
|
|
816
|
+
* command count and Pyth flag.
|
|
817
|
+
*/
|
|
818
|
+
declare function lookupGasBudget(commandCount: number, hasPyth: boolean): number;
|
|
819
|
+
/**
|
|
820
|
+
* Estimate the gas budget (in MIST) for a built swap transaction, using a
|
|
821
|
+
* fixed table bucketed by command count and Pyth prelude presence — no RPC
|
|
822
|
+
* call needed. Usage: `tx.setGasBudget(estimateSwapGasBudget(tx))`.
|
|
823
|
+
*
|
|
824
|
+
* Only valid for swap PTBs generated by this SDK (router context + DEX
|
|
825
|
+
* swaps + optional Pyth prelude). If you append calls with unbounded storage
|
|
826
|
+
* costs (flashloans, LP zaps, position management, lending, ...), dry-run
|
|
827
|
+
* the transaction instead or add your own margin. Note the gas coin balance
|
|
828
|
+
* must be >= the budget, even though only the actual gas used is charged.
|
|
829
|
+
*/
|
|
830
|
+
declare function estimateSwapGasBudget(tx: Transaction): number;
|
|
831
|
+
|
|
789
832
|
declare const dealWithFastRouterSwapParamsForMsafe: (data: any) => any;
|
|
790
833
|
declare const restituteMsafeFastRouterSwapParams: (data: any) => any;
|
|
791
834
|
|
|
@@ -1134,4 +1177,4 @@ declare class CoinUtils {
|
|
|
1134
1177
|
static calculateTotalBalance(coins: CoinAsset[]): bigint;
|
|
1135
1178
|
}
|
|
1136
1179
|
|
|
1137
|
-
export { AFSUI, AFTERMATH, AFTERMATH_AMM, AFTERMATH_MODULE, AGGREGATOR, AGGREGATOR_V3_CONFIG, ALL_DEXES, ALPHAFI, AggregatorClient, type AggregatorClientParams, AggregatorConfig, AggregatorError, type AggregatorErrorCode, type AggregatorResponse, AggregatorServerErrorCode, BLUEFIN, BLUEMOVE, BOLT, type BigNumber, type BuildCoinResult, type BuildFastMergeSwapParams, type BuildFastRouterSwapParams, type BuildFastRouterSwapParamsV2, type BuildFastRouterSwapParamsV3, type BuildMergeSwapParams, type BuildRouterSwapParams, type BuildRouterSwapParamsV2, type BuildRouterSwapParamsV3, CETUS, CETUSDLMM, CETUS_DEX, CETUS_MODULE, CETUS_PUBLISHED_AT, CHECK_COINS_THRESHOLD_FUNC, CLIENT_CONFIG, CLOCK_ADDRESS, type CoinAsset, CoinInfoAddress, CoinStoreAddress, CoinUtils, type ComparisonResult, ConfigErrorCode, DEEPBOOKV2, DEEPBOOKV3, DEEPBOOK_CLOB_V2_MODULE, DEEPBOOK_CUSTODIAN_V2_MODULE, DEEPBOOK_DEX, DEEPBOOK_MODULE, DEEPBOOK_PACKAGE_ID, DEEPBOOK_PUBLISHED_AT, DEEPBOOK_V3_DEEP_FEE_TYPES, DEFAULT_AGG_V2_ENDPOINT, DEFAULT_AGG_V3_ENDPOINT, DEFAULT_ENDPOINT, DEFAULT_GAS_BUDGET_FOR_MERGE, DEFAULT_GAS_BUDGET_FOR_SPLIT, DEFAULT_GAS_BUDGET_FOR_STAKE, DEFAULT_GAS_BUDGET_FOR_TRANSFER, DEFAULT_GAS_BUDGET_FOR_TRANSFER_SUI, DEFAULT_NFT_TRANSFER_GAS_FEE, type DeepbookV3Config, type DeepbookV3ConfigResponse, type Dex, Env, type ExtendedDetails, FERRACLMM, FERRADLMM, FLOWXV2, FLOWXV3, FLOWX_AMM, FLOWX_AMM_MODULE, FULLSAIL, type FindRouterParams, FlashSwapA2BFunc, FlashSwapB2AFunc, FlashSwapFunc, FlashSwapWithPartnerA2BFunc, FlashSwapWithPartnerB2AFunc, FlashSwapWithPartnerFunc, type FlattenedPath, GAS_SYMBOL, GAS_TYPE_ARG, GAS_TYPE_ARG_LONG, type GasMetrics, type GetOrCreateAccountCapResult, HAEDAL, HAEDALHMMV2, HAEDALPMM, HAWAL, INTEGRATE, JOIN_FUNC, KRIYA, KRIYAV3, KRIYA_DEX, KRIYA_MODULE, MAGMA, MAGMAPROPAMM, MAINNET_AFTERMATH_INSURANCE_FUND_ID, MAINNET_AFTERMATH_PROTOCOL_FEE_VAULT_ID, MAINNET_AFTERMATH_REFERRAL_VAULT_ID, MAINNET_AFTERMATH_REGISTRY_ID, MAINNET_AFTERMATH_TREASURY_ID, MAINNET_CETUS_V3_PUBLISHED_AT, MAINNET_FLOWX_AMM_CONTAINER_ID, METASTABLE, MOMENTUM, type MergeRoute, type MergeSwapFromCoin, type MergeSwapInputCoin, type MergeSwapParams, type MergeSwapRouterData, type NFT, OBRIC, ONE, PACKAGE_NAMES, PAY_MODULE, POOL_MODULT, PUBLISHED_ADDRESSES, PYTH_CONFIG, type Package, type Path, type PathV2, type PreSwapLpChangeParams, type ProcessedRouterData, type PythConfig, REPAY_FLASH_SWAP_A2B_FUNC, REPAY_FLASH_SWAP_B2A_FUNC, REPAY_FLASH_SWAP_WITH_PARTNER_A2B_FUNC, REPAY_FLASH_SWAP_WITH_PARTNER_B2A_FUNC, RepayFalshSwapFunc, RepayFlashSwapWithPartnerFunc, type Router, type RouterData, type RouterDataV2, type RouterDataV3, type RouterError, type RouterV2, SCALLOP, SEVENK, SPRINGSUI, STEAMM, STEAMM_OMM, STEAMM_OMM_V2, SUILEND, SUI_SYSTEM_STATE_OBJECT_ID, SWAP_A2B_FUNC, SWAP_B2A_FUNC, type SimulateTransactionResult, type SuiAddress, type SuiBasicTypes, type SuiInputTypes, type SuiMoveObject, type SuiObjectIdType, type SuiResource, type SuiStructTag, type SuiTxArg, SuiZeroCoinFn, type SwapGasAnalysis, type SwapInPoolsParams, type SwapInPoolsResultV3, TEN_POW_NINE, TESTNET_AFTERMATH_INSURANCE_FUND_ID, TESTNET_AFTERMATH_PROTOCOL_FEE_VAULT_ID, TESTNET_AFTERMATH_REFERRAL_VAULT_ID, TESTNET_AFTERMATH_REGISTRY_ID, TESTNET_AFTERMATH_TREASURY_ID, TESTNET_CETUS_V3_PUBLISHED_AT, TESTNET_FLOWX_AMM_CONTAINER_ID,
|
|
1180
|
+
export { AFSUI, AFTERMATH, AFTERMATH_AMM, AFTERMATH_MODULE, AGGREGATOR, AGGREGATOR_V3_CONFIG, ALL_DEXES, ALPHAFI, AggregatorClient, type AggregatorClientParams, AggregatorConfig, AggregatorError, type AggregatorErrorCode, type AggregatorResponse, AggregatorServerErrorCode, BLUEFIN, BLUEMOVE, BOLT, type BigNumber, type BuildCoinResult, type BuildFastMergeSwapParams, type BuildFastRouterSwapParams, type BuildFastRouterSwapParamsV2, type BuildFastRouterSwapParamsV3, type BuildMergeSwapParams, type BuildRouterSwapParams, type BuildRouterSwapParamsV2, type BuildRouterSwapParamsV3, CETUS, CETUSDLMM, CETUS_DEX, CETUS_MODULE, CETUS_PUBLISHED_AT, CHECK_COINS_THRESHOLD_FUNC, CLIENT_CONFIG, CLOCK_ADDRESS, type CoinAsset, CoinInfoAddress, CoinStoreAddress, CoinUtils, type ComparisonResult, ConfigErrorCode, DEEPBOOKV2, DEEPBOOKV3, DEEPBOOK_CLOB_V2_MODULE, DEEPBOOK_CUSTODIAN_V2_MODULE, DEEPBOOK_DEX, DEEPBOOK_MODULE, DEEPBOOK_PACKAGE_ID, DEEPBOOK_PUBLISHED_AT, DEEPBOOK_V3_DEEP_FEE_TYPES, DEFAULT_AGG_V2_ENDPOINT, DEFAULT_AGG_V3_ENDPOINT, DEFAULT_ENDPOINT, DEFAULT_GAS_BUDGET_FOR_MERGE, DEFAULT_GAS_BUDGET_FOR_SPLIT, DEFAULT_GAS_BUDGET_FOR_STAKE, DEFAULT_GAS_BUDGET_FOR_TRANSFER, DEFAULT_GAS_BUDGET_FOR_TRANSFER_SUI, DEFAULT_NFT_TRANSFER_GAS_FEE, type DeepbookV3Config, type DeepbookV3ConfigResponse, type Dex, Env, type ExtendedDetails, FERRACLMM, FERRADLMM, FLOWXV2, FLOWXV3, FLOWX_AMM, FLOWX_AMM_MODULE, FULLSAIL, type FindRouterParams, FlashSwapA2BFunc, FlashSwapB2AFunc, FlashSwapFunc, FlashSwapWithPartnerA2BFunc, FlashSwapWithPartnerB2AFunc, FlashSwapWithPartnerFunc, type FlattenedPath, GAS_SYMBOL, GAS_TYPE_ARG, GAS_TYPE_ARG_LONG, type GasMetrics, type GetOrCreateAccountCapResult, HAEDAL, HAEDALHMMV2, HAEDALPMM, HAEDALPROPAMM, HAWAL, INTEGRATE, JOIN_FUNC, KRIYA, KRIYAV3, KRIYA_DEX, KRIYA_MODULE, MAGMA, MAGMAPROPAMM, MAINNET_AFTERMATH_INSURANCE_FUND_ID, MAINNET_AFTERMATH_PROTOCOL_FEE_VAULT_ID, MAINNET_AFTERMATH_REFERRAL_VAULT_ID, MAINNET_AFTERMATH_REGISTRY_ID, MAINNET_AFTERMATH_TREASURY_ID, MAINNET_CETUS_V3_PUBLISHED_AT, MAINNET_FLOWX_AMM_CONTAINER_ID, METASTABLE, MOMENTUM, type MergeRoute, type MergeSwapFromCoin, type MergeSwapInputCoin, type MergeSwapParams, type MergeSwapRouterData, type NFT, OBRIC, ONE, PACKAGE_NAMES, PAY_MODULE, POOL_MODULT, PUBLISHED_ADDRESSES, PYTH_CONFIG, PYTH_PRELUDE_CALLS, type Package, type Path, type PathV2, type PreSwapLpChangeParams, type ProcessedRouterData, type PythConfig, REPAY_FLASH_SWAP_A2B_FUNC, REPAY_FLASH_SWAP_B2A_FUNC, REPAY_FLASH_SWAP_WITH_PARTNER_A2B_FUNC, REPAY_FLASH_SWAP_WITH_PARTNER_B2A_FUNC, RepayFalshSwapFunc, RepayFlashSwapWithPartnerFunc, type Router, type RouterData, type RouterDataV2, type RouterDataV3, type RouterError, type RouterV2, SCALLOP, SEVENK, SPRINGSUI, STEAMM, STEAMM_OMM, STEAMM_OMM_V2, SUILEND, SUI_SYSTEM_STATE_OBJECT_ID, SWAP_A2B_FUNC, SWAP_B2A_FUNC, SWAP_GAS_BUDGET_TABLE, type SimulateTransactionResult, type SuiAddress, type SuiBasicTypes, type SuiInputTypes, type SuiMoveObject, type SuiObjectIdType, type SuiResource, type SuiStructTag, type SuiTxArg, SuiZeroCoinFn, type SwapGasAnalysis, type SwapInPoolsParams, type SwapInPoolsResultV3, TEN_POW_NINE, TESTNET_AFTERMATH_INSURANCE_FUND_ID, TESTNET_AFTERMATH_PROTOCOL_FEE_VAULT_ID, TESTNET_AFTERMATH_REFERRAL_VAULT_ID, TESTNET_AFTERMATH_REGISTRY_ID, TESTNET_AFTERMATH_TREASURY_ID, TESTNET_CETUS_V3_PUBLISHED_AT, TESTNET_FLOWX_AMM_CONTAINER_ID, TRANSFER_ACCOUNT_CAP, TRANSFER_OR_DESTORY_COIN_FUNC, TURBOS, TURBOS_DEX, TURBOS_MODULE, TURBOS_VERSIONED, TWO, TransactionErrorCode, TypesErrorCode, U128, U64_MAX, U64_MAX_BN, UTILS_MODULE, VOLO, ZERO, buildInputCoin, calculateGasEfficiency, calculatePriceImpact, checkInvalidSuiAddress, compareCoins, compareGasMetrics, completionCoin, composeType, createTarget, dealWithFastRouterSwapParamsForMsafe, estimateSwapGasBudget, exportToCSV, exportToJSON, extractAddressFromType, extractGasMetrics, extractStructTagFromType, extractTimestampFromDowngradeUuid6, fixSuiObjectId, formatGasMetrics, generateDowngradeUuid6, generateSimpleDowngradeUuid6, getAggregatorServerErrorMessage, getAggregatorV2Extend2PublishedAt, getAggregatorV2ExtendPublishedAt, getAggregatorV2PublishedAt, getAllProviders, getDeepbookV3Config, getDefaultSuiInputType, getMergeSwapResult, getOrCreateAccountCap, getProvidersExcluding, getProvidersIncluding, getRouterResult, hasPythPrelude, isSortedSymbols, isValidDowngradeUuid6, lookupGasBudget, mintZeroCoin, normalizeCoinType, parseAftermathFeeType, parseTurbosPoolFeeType, patchFixSuiObjectId, printTransaction, processEndpoint, processFlattenRoutes, restituteMsafeFastRouterSwapParams };
|
package/dist/index.d.ts
CHANGED
|
@@ -132,11 +132,11 @@ type ExtendedDetails = {
|
|
|
132
132
|
bolt_oracle_id?: string;
|
|
133
133
|
bolt_quote_coin_type?: string;
|
|
134
134
|
magmapropamm_pool_id?: string;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
haedalpropamm_pool_id?: string;
|
|
136
|
+
haedalpropamm_regime_id?: string;
|
|
137
|
+
haedalpropamm_oracle_mode?: string;
|
|
138
|
+
haedalpropamm_base_price_info_object?: string;
|
|
139
|
+
haedalpropamm_quote_price_info_object?: string;
|
|
140
140
|
aux_shared_versions?: Record<string, number>;
|
|
141
141
|
};
|
|
142
142
|
type Path = {
|
|
@@ -365,7 +365,7 @@ declare const FERRADLMM = "FERRADLMM";
|
|
|
365
365
|
declare const FERRACLMM = "FERRACLMM";
|
|
366
366
|
declare const BOLT = "BOLT";
|
|
367
367
|
declare const MAGMAPROPAMM = "MAGMAPROPAMM";
|
|
368
|
-
declare const
|
|
368
|
+
declare const HAEDALPROPAMM = "HAEDALPROPAMM";
|
|
369
369
|
declare const DEFAULT_ENDPOINT = "https://api-sui.cetus.zone/router_v3";
|
|
370
370
|
declare const ALL_DEXES: string[];
|
|
371
371
|
type BuildRouterSwapParamsV3 = {
|
|
@@ -786,6 +786,49 @@ declare function exportToJSON(comparison: ComparisonResult): string;
|
|
|
786
786
|
*/
|
|
787
787
|
declare function exportToCSV(comparison: ComparisonResult): string;
|
|
788
788
|
|
|
789
|
+
/**
|
|
790
|
+
* Fixed gas budget table for SDK-generated swap PTBs, bucketed by command
|
|
791
|
+
* count and whether the PTB contains a Pyth oracle prelude.
|
|
792
|
+
*
|
|
793
|
+
* Values are in MIST (1 SUI = 1e9 MIST). Each bucket's budget is at least 2x
|
|
794
|
+
* the worst observed `required_gas_floor` across 15504 replayed mainnet
|
|
795
|
+
* router transactions (validated 2026-06), and holds up to a 10x increase of
|
|
796
|
+
* the reference gas price.
|
|
797
|
+
*/
|
|
798
|
+
declare const SWAP_GAS_BUDGET_TABLE: ReadonlyArray<{
|
|
799
|
+
maxCommands: number;
|
|
800
|
+
noPyth: number;
|
|
801
|
+
pyth: number;
|
|
802
|
+
}>;
|
|
803
|
+
/**
|
|
804
|
+
* `module::function` pairs of the Pyth oracle prelude calls emitted by the
|
|
805
|
+
* SDK (see src/pyth/adapter.ts). Matched without the package id since Pyth /
|
|
806
|
+
* Wormhole package ids change across upgrades.
|
|
807
|
+
*/
|
|
808
|
+
declare const PYTH_PRELUDE_CALLS: ReadonlySet<string>;
|
|
809
|
+
/**
|
|
810
|
+
* Whether the transaction contains a Pyth oracle prelude (price feed update)
|
|
811
|
+
* emitted by the SDK.
|
|
812
|
+
*/
|
|
813
|
+
declare function hasPythPrelude(tx: Transaction): boolean;
|
|
814
|
+
/**
|
|
815
|
+
* Look up the fixed gas budget (in MIST) for a swap PTB with the given
|
|
816
|
+
* command count and Pyth flag.
|
|
817
|
+
*/
|
|
818
|
+
declare function lookupGasBudget(commandCount: number, hasPyth: boolean): number;
|
|
819
|
+
/**
|
|
820
|
+
* Estimate the gas budget (in MIST) for a built swap transaction, using a
|
|
821
|
+
* fixed table bucketed by command count and Pyth prelude presence — no RPC
|
|
822
|
+
* call needed. Usage: `tx.setGasBudget(estimateSwapGasBudget(tx))`.
|
|
823
|
+
*
|
|
824
|
+
* Only valid for swap PTBs generated by this SDK (router context + DEX
|
|
825
|
+
* swaps + optional Pyth prelude). If you append calls with unbounded storage
|
|
826
|
+
* costs (flashloans, LP zaps, position management, lending, ...), dry-run
|
|
827
|
+
* the transaction instead or add your own margin. Note the gas coin balance
|
|
828
|
+
* must be >= the budget, even though only the actual gas used is charged.
|
|
829
|
+
*/
|
|
830
|
+
declare function estimateSwapGasBudget(tx: Transaction): number;
|
|
831
|
+
|
|
789
832
|
declare const dealWithFastRouterSwapParamsForMsafe: (data: any) => any;
|
|
790
833
|
declare const restituteMsafeFastRouterSwapParams: (data: any) => any;
|
|
791
834
|
|
|
@@ -1134,4 +1177,4 @@ declare class CoinUtils {
|
|
|
1134
1177
|
static calculateTotalBalance(coins: CoinAsset[]): bigint;
|
|
1135
1178
|
}
|
|
1136
1179
|
|
|
1137
|
-
export { AFSUI, AFTERMATH, AFTERMATH_AMM, AFTERMATH_MODULE, AGGREGATOR, AGGREGATOR_V3_CONFIG, ALL_DEXES, ALPHAFI, AggregatorClient, type AggregatorClientParams, AggregatorConfig, AggregatorError, type AggregatorErrorCode, type AggregatorResponse, AggregatorServerErrorCode, BLUEFIN, BLUEMOVE, BOLT, type BigNumber, type BuildCoinResult, type BuildFastMergeSwapParams, type BuildFastRouterSwapParams, type BuildFastRouterSwapParamsV2, type BuildFastRouterSwapParamsV3, type BuildMergeSwapParams, type BuildRouterSwapParams, type BuildRouterSwapParamsV2, type BuildRouterSwapParamsV3, CETUS, CETUSDLMM, CETUS_DEX, CETUS_MODULE, CETUS_PUBLISHED_AT, CHECK_COINS_THRESHOLD_FUNC, CLIENT_CONFIG, CLOCK_ADDRESS, type CoinAsset, CoinInfoAddress, CoinStoreAddress, CoinUtils, type ComparisonResult, ConfigErrorCode, DEEPBOOKV2, DEEPBOOKV3, DEEPBOOK_CLOB_V2_MODULE, DEEPBOOK_CUSTODIAN_V2_MODULE, DEEPBOOK_DEX, DEEPBOOK_MODULE, DEEPBOOK_PACKAGE_ID, DEEPBOOK_PUBLISHED_AT, DEEPBOOK_V3_DEEP_FEE_TYPES, DEFAULT_AGG_V2_ENDPOINT, DEFAULT_AGG_V3_ENDPOINT, DEFAULT_ENDPOINT, DEFAULT_GAS_BUDGET_FOR_MERGE, DEFAULT_GAS_BUDGET_FOR_SPLIT, DEFAULT_GAS_BUDGET_FOR_STAKE, DEFAULT_GAS_BUDGET_FOR_TRANSFER, DEFAULT_GAS_BUDGET_FOR_TRANSFER_SUI, DEFAULT_NFT_TRANSFER_GAS_FEE, type DeepbookV3Config, type DeepbookV3ConfigResponse, type Dex, Env, type ExtendedDetails, FERRACLMM, FERRADLMM, FLOWXV2, FLOWXV3, FLOWX_AMM, FLOWX_AMM_MODULE, FULLSAIL, type FindRouterParams, FlashSwapA2BFunc, FlashSwapB2AFunc, FlashSwapFunc, FlashSwapWithPartnerA2BFunc, FlashSwapWithPartnerB2AFunc, FlashSwapWithPartnerFunc, type FlattenedPath, GAS_SYMBOL, GAS_TYPE_ARG, GAS_TYPE_ARG_LONG, type GasMetrics, type GetOrCreateAccountCapResult, HAEDAL, HAEDALHMMV2, HAEDALPMM, HAWAL, INTEGRATE, JOIN_FUNC, KRIYA, KRIYAV3, KRIYA_DEX, KRIYA_MODULE, MAGMA, MAGMAPROPAMM, MAINNET_AFTERMATH_INSURANCE_FUND_ID, MAINNET_AFTERMATH_PROTOCOL_FEE_VAULT_ID, MAINNET_AFTERMATH_REFERRAL_VAULT_ID, MAINNET_AFTERMATH_REGISTRY_ID, MAINNET_AFTERMATH_TREASURY_ID, MAINNET_CETUS_V3_PUBLISHED_AT, MAINNET_FLOWX_AMM_CONTAINER_ID, METASTABLE, MOMENTUM, type MergeRoute, type MergeSwapFromCoin, type MergeSwapInputCoin, type MergeSwapParams, type MergeSwapRouterData, type NFT, OBRIC, ONE, PACKAGE_NAMES, PAY_MODULE, POOL_MODULT, PUBLISHED_ADDRESSES, PYTH_CONFIG, type Package, type Path, type PathV2, type PreSwapLpChangeParams, type ProcessedRouterData, type PythConfig, REPAY_FLASH_SWAP_A2B_FUNC, REPAY_FLASH_SWAP_B2A_FUNC, REPAY_FLASH_SWAP_WITH_PARTNER_A2B_FUNC, REPAY_FLASH_SWAP_WITH_PARTNER_B2A_FUNC, RepayFalshSwapFunc, RepayFlashSwapWithPartnerFunc, type Router, type RouterData, type RouterDataV2, type RouterDataV3, type RouterError, type RouterV2, SCALLOP, SEVENK, SPRINGSUI, STEAMM, STEAMM_OMM, STEAMM_OMM_V2, SUILEND, SUI_SYSTEM_STATE_OBJECT_ID, SWAP_A2B_FUNC, SWAP_B2A_FUNC, type SimulateTransactionResult, type SuiAddress, type SuiBasicTypes, type SuiInputTypes, type SuiMoveObject, type SuiObjectIdType, type SuiResource, type SuiStructTag, type SuiTxArg, SuiZeroCoinFn, type SwapGasAnalysis, type SwapInPoolsParams, type SwapInPoolsResultV3, TEN_POW_NINE, TESTNET_AFTERMATH_INSURANCE_FUND_ID, TESTNET_AFTERMATH_PROTOCOL_FEE_VAULT_ID, TESTNET_AFTERMATH_REFERRAL_VAULT_ID, TESTNET_AFTERMATH_REGISTRY_ID, TESTNET_AFTERMATH_TREASURY_ID, TESTNET_CETUS_V3_PUBLISHED_AT, TESTNET_FLOWX_AMM_CONTAINER_ID,
|
|
1180
|
+
export { AFSUI, AFTERMATH, AFTERMATH_AMM, AFTERMATH_MODULE, AGGREGATOR, AGGREGATOR_V3_CONFIG, ALL_DEXES, ALPHAFI, AggregatorClient, type AggregatorClientParams, AggregatorConfig, AggregatorError, type AggregatorErrorCode, type AggregatorResponse, AggregatorServerErrorCode, BLUEFIN, BLUEMOVE, BOLT, type BigNumber, type BuildCoinResult, type BuildFastMergeSwapParams, type BuildFastRouterSwapParams, type BuildFastRouterSwapParamsV2, type BuildFastRouterSwapParamsV3, type BuildMergeSwapParams, type BuildRouterSwapParams, type BuildRouterSwapParamsV2, type BuildRouterSwapParamsV3, CETUS, CETUSDLMM, CETUS_DEX, CETUS_MODULE, CETUS_PUBLISHED_AT, CHECK_COINS_THRESHOLD_FUNC, CLIENT_CONFIG, CLOCK_ADDRESS, type CoinAsset, CoinInfoAddress, CoinStoreAddress, CoinUtils, type ComparisonResult, ConfigErrorCode, DEEPBOOKV2, DEEPBOOKV3, DEEPBOOK_CLOB_V2_MODULE, DEEPBOOK_CUSTODIAN_V2_MODULE, DEEPBOOK_DEX, DEEPBOOK_MODULE, DEEPBOOK_PACKAGE_ID, DEEPBOOK_PUBLISHED_AT, DEEPBOOK_V3_DEEP_FEE_TYPES, DEFAULT_AGG_V2_ENDPOINT, DEFAULT_AGG_V3_ENDPOINT, DEFAULT_ENDPOINT, DEFAULT_GAS_BUDGET_FOR_MERGE, DEFAULT_GAS_BUDGET_FOR_SPLIT, DEFAULT_GAS_BUDGET_FOR_STAKE, DEFAULT_GAS_BUDGET_FOR_TRANSFER, DEFAULT_GAS_BUDGET_FOR_TRANSFER_SUI, DEFAULT_NFT_TRANSFER_GAS_FEE, type DeepbookV3Config, type DeepbookV3ConfigResponse, type Dex, Env, type ExtendedDetails, FERRACLMM, FERRADLMM, FLOWXV2, FLOWXV3, FLOWX_AMM, FLOWX_AMM_MODULE, FULLSAIL, type FindRouterParams, FlashSwapA2BFunc, FlashSwapB2AFunc, FlashSwapFunc, FlashSwapWithPartnerA2BFunc, FlashSwapWithPartnerB2AFunc, FlashSwapWithPartnerFunc, type FlattenedPath, GAS_SYMBOL, GAS_TYPE_ARG, GAS_TYPE_ARG_LONG, type GasMetrics, type GetOrCreateAccountCapResult, HAEDAL, HAEDALHMMV2, HAEDALPMM, HAEDALPROPAMM, HAWAL, INTEGRATE, JOIN_FUNC, KRIYA, KRIYAV3, KRIYA_DEX, KRIYA_MODULE, MAGMA, MAGMAPROPAMM, MAINNET_AFTERMATH_INSURANCE_FUND_ID, MAINNET_AFTERMATH_PROTOCOL_FEE_VAULT_ID, MAINNET_AFTERMATH_REFERRAL_VAULT_ID, MAINNET_AFTERMATH_REGISTRY_ID, MAINNET_AFTERMATH_TREASURY_ID, MAINNET_CETUS_V3_PUBLISHED_AT, MAINNET_FLOWX_AMM_CONTAINER_ID, METASTABLE, MOMENTUM, type MergeRoute, type MergeSwapFromCoin, type MergeSwapInputCoin, type MergeSwapParams, type MergeSwapRouterData, type NFT, OBRIC, ONE, PACKAGE_NAMES, PAY_MODULE, POOL_MODULT, PUBLISHED_ADDRESSES, PYTH_CONFIG, PYTH_PRELUDE_CALLS, type Package, type Path, type PathV2, type PreSwapLpChangeParams, type ProcessedRouterData, type PythConfig, REPAY_FLASH_SWAP_A2B_FUNC, REPAY_FLASH_SWAP_B2A_FUNC, REPAY_FLASH_SWAP_WITH_PARTNER_A2B_FUNC, REPAY_FLASH_SWAP_WITH_PARTNER_B2A_FUNC, RepayFalshSwapFunc, RepayFlashSwapWithPartnerFunc, type Router, type RouterData, type RouterDataV2, type RouterDataV3, type RouterError, type RouterV2, SCALLOP, SEVENK, SPRINGSUI, STEAMM, STEAMM_OMM, STEAMM_OMM_V2, SUILEND, SUI_SYSTEM_STATE_OBJECT_ID, SWAP_A2B_FUNC, SWAP_B2A_FUNC, SWAP_GAS_BUDGET_TABLE, type SimulateTransactionResult, type SuiAddress, type SuiBasicTypes, type SuiInputTypes, type SuiMoveObject, type SuiObjectIdType, type SuiResource, type SuiStructTag, type SuiTxArg, SuiZeroCoinFn, type SwapGasAnalysis, type SwapInPoolsParams, type SwapInPoolsResultV3, TEN_POW_NINE, TESTNET_AFTERMATH_INSURANCE_FUND_ID, TESTNET_AFTERMATH_PROTOCOL_FEE_VAULT_ID, TESTNET_AFTERMATH_REFERRAL_VAULT_ID, TESTNET_AFTERMATH_REGISTRY_ID, TESTNET_AFTERMATH_TREASURY_ID, TESTNET_CETUS_V3_PUBLISHED_AT, TESTNET_FLOWX_AMM_CONTAINER_ID, TRANSFER_ACCOUNT_CAP, TRANSFER_OR_DESTORY_COIN_FUNC, TURBOS, TURBOS_DEX, TURBOS_MODULE, TURBOS_VERSIONED, TWO, TransactionErrorCode, TypesErrorCode, U128, U64_MAX, U64_MAX_BN, UTILS_MODULE, VOLO, ZERO, buildInputCoin, calculateGasEfficiency, calculatePriceImpact, checkInvalidSuiAddress, compareCoins, compareGasMetrics, completionCoin, composeType, createTarget, dealWithFastRouterSwapParamsForMsafe, estimateSwapGasBudget, exportToCSV, exportToJSON, extractAddressFromType, extractGasMetrics, extractStructTagFromType, extractTimestampFromDowngradeUuid6, fixSuiObjectId, formatGasMetrics, generateDowngradeUuid6, generateSimpleDowngradeUuid6, getAggregatorServerErrorMessage, getAggregatorV2Extend2PublishedAt, getAggregatorV2ExtendPublishedAt, getAggregatorV2PublishedAt, getAllProviders, getDeepbookV3Config, getDefaultSuiInputType, getMergeSwapResult, getOrCreateAccountCap, getProvidersExcluding, getProvidersIncluding, getRouterResult, hasPythPrelude, isSortedSymbols, isValidDowngradeUuid6, lookupGasBudget, mintZeroCoin, normalizeCoinType, parseAftermathFeeType, parseTurbosPoolFeeType, patchFixSuiObjectId, printTransaction, processEndpoint, processFlattenRoutes, restituteMsafeFastRouterSwapParams };
|
package/dist/index.js
CHANGED
|
@@ -3410,7 +3410,7 @@ var AGGREGATOR_V3_CONFIG = {
|
|
|
3410
3410
|
};
|
|
3411
3411
|
|
|
3412
3412
|
// src/api.ts
|
|
3413
|
-
var SDK_VERSION =
|
|
3413
|
+
var SDK_VERSION = 1010509;
|
|
3414
3414
|
function parseRouterResponse(data, byAmountIn) {
|
|
3415
3415
|
let packages = /* @__PURE__ */ new Map();
|
|
3416
3416
|
if (data.packages) {
|
|
@@ -8319,6 +8319,37 @@ function exportToCSV(comparison) {
|
|
|
8319
8319
|
return rows.join("\n");
|
|
8320
8320
|
}
|
|
8321
8321
|
|
|
8322
|
+
// src/utils/gas-budget.ts
|
|
8323
|
+
var SWAP_GAS_BUDGET_TABLE = [
|
|
8324
|
+
{ maxCommands: 10, noPyth: 5e7, pyth: 5e7 },
|
|
8325
|
+
{ maxCommands: 19, noPyth: 15e7, pyth: 1e8 },
|
|
8326
|
+
{ maxCommands: 29, noPyth: 25e7, pyth: 2e8 },
|
|
8327
|
+
{ maxCommands: 39, noPyth: 35e7, pyth: 3e8 },
|
|
8328
|
+
{ maxCommands: Infinity, noPyth: 5e8, pyth: 5e8 }
|
|
8329
|
+
];
|
|
8330
|
+
var PYTH_PRELUDE_CALLS = /* @__PURE__ */ new Set([
|
|
8331
|
+
"vaa::parse_and_verify",
|
|
8332
|
+
"pyth::create_authenticated_price_infos_using_accumulator",
|
|
8333
|
+
"pyth::update_single_price_feed",
|
|
8334
|
+
"hot_potato_vector::destroy"
|
|
8335
|
+
]);
|
|
8336
|
+
function hasPythPrelude(tx) {
|
|
8337
|
+
return tx.getData().commands.some(
|
|
8338
|
+
(command) => command.MoveCall != null && PYTH_PRELUDE_CALLS.has(
|
|
8339
|
+
`${command.MoveCall.module}::${command.MoveCall.function}`
|
|
8340
|
+
)
|
|
8341
|
+
);
|
|
8342
|
+
}
|
|
8343
|
+
function lookupGasBudget(commandCount, hasPyth) {
|
|
8344
|
+
const bucket = SWAP_GAS_BUDGET_TABLE.find(
|
|
8345
|
+
(row) => commandCount <= row.maxCommands
|
|
8346
|
+
);
|
|
8347
|
+
return hasPyth ? bucket.pyth : bucket.noPyth;
|
|
8348
|
+
}
|
|
8349
|
+
function estimateSwapGasBudget(tx) {
|
|
8350
|
+
return lookupGasBudget(tx.getData().commands.length, hasPythPrelude(tx));
|
|
8351
|
+
}
|
|
8352
|
+
|
|
8322
8353
|
// src/utils/msafe.ts
|
|
8323
8354
|
var import_bn5 = __toESM(require_bn());
|
|
8324
8355
|
var dealWithFastRouterSwapParamsForMsafe = (data) => {
|
|
@@ -8756,43 +8787,45 @@ var MagmaPropAmmRouter = class {
|
|
|
8756
8787
|
});
|
|
8757
8788
|
}
|
|
8758
8789
|
};
|
|
8759
|
-
var
|
|
8790
|
+
var HaedalPropAmmRouter = class {
|
|
8760
8791
|
constructor(_env) {
|
|
8761
8792
|
}
|
|
8762
8793
|
swap(txb, flattenedPath, swapContext, _extends) {
|
|
8763
8794
|
const path = flattenedPath.path;
|
|
8764
8795
|
if (!path.extendedDetails) {
|
|
8765
|
-
throw new Error("Extended details not found for
|
|
8796
|
+
throw new Error("Extended details not found for HAEDALPROPAMM");
|
|
8766
8797
|
}
|
|
8767
8798
|
this.validateExtendedDetails(path.extendedDetails);
|
|
8768
8799
|
const swapData = this.prepareSwapData(flattenedPath);
|
|
8769
8800
|
this.executeSwapContract(txb, swapData, swapContext);
|
|
8770
8801
|
}
|
|
8771
8802
|
validateExtendedDetails(extendedDetails) {
|
|
8772
|
-
if (!extendedDetails.
|
|
8773
|
-
throw new Error("
|
|
8803
|
+
if (!extendedDetails.haedalpropamm_pool_id) {
|
|
8804
|
+
throw new Error("HAEDALPROPAMM pool id not found in extended details");
|
|
8774
8805
|
}
|
|
8775
|
-
if (!extendedDetails.
|
|
8776
|
-
throw new Error("
|
|
8806
|
+
if (!extendedDetails.haedalpropamm_regime_id) {
|
|
8807
|
+
throw new Error("HAEDALPROPAMM regime id not found in extended details");
|
|
8777
8808
|
}
|
|
8778
|
-
if (extendedDetails.
|
|
8809
|
+
if (extendedDetails.haedalpropamm_oracle_mode !== "pyth_core") {
|
|
8779
8810
|
throw new Error(
|
|
8780
|
-
`
|
|
8811
|
+
`HAEDALPROPAMM oracle mode "${extendedDetails.haedalpropamm_oracle_mode}" not supported (only "pyth_core")`
|
|
8781
8812
|
);
|
|
8782
8813
|
}
|
|
8783
|
-
if (!extendedDetails.
|
|
8784
|
-
throw new Error(
|
|
8814
|
+
if (!extendedDetails.haedalpropamm_base_price_info_object) {
|
|
8815
|
+
throw new Error(
|
|
8816
|
+
"HAEDALPROPAMM base price info object not found in extended details"
|
|
8817
|
+
);
|
|
8785
8818
|
}
|
|
8786
|
-
if (!extendedDetails.
|
|
8819
|
+
if (!extendedDetails.haedalpropamm_quote_price_info_object) {
|
|
8787
8820
|
throw new Error(
|
|
8788
|
-
"
|
|
8821
|
+
"HAEDALPROPAMM quote price info object not found in extended details"
|
|
8789
8822
|
);
|
|
8790
8823
|
}
|
|
8791
8824
|
}
|
|
8792
8825
|
prepareSwapData(flattenedPath) {
|
|
8793
8826
|
const path = flattenedPath.path;
|
|
8794
8827
|
if (path.publishedAt == null) {
|
|
8795
|
-
throw new Error("
|
|
8828
|
+
throw new Error("HAEDALPROPAMM not set publishedAt");
|
|
8796
8829
|
}
|
|
8797
8830
|
const extendedDetails = path.extendedDetails;
|
|
8798
8831
|
const [baseType, quoteType] = path.direction ? [path.from, path.target] : [path.target, path.from];
|
|
@@ -8803,16 +8836,16 @@ var TideRouter = class {
|
|
|
8803
8836
|
a2b: path.direction,
|
|
8804
8837
|
amountIn,
|
|
8805
8838
|
publishedAt: path.publishedAt,
|
|
8806
|
-
poolId: extendedDetails.
|
|
8807
|
-
regimeId: extendedDetails.
|
|
8808
|
-
basePriceInfoObject: extendedDetails.
|
|
8809
|
-
quotePriceInfoObject: extendedDetails.
|
|
8839
|
+
poolId: extendedDetails.haedalpropamm_pool_id,
|
|
8840
|
+
regimeId: extendedDetails.haedalpropamm_regime_id,
|
|
8841
|
+
basePriceInfoObject: extendedDetails.haedalpropamm_base_price_info_object,
|
|
8842
|
+
quotePriceInfoObject: extendedDetails.haedalpropamm_quote_price_info_object
|
|
8810
8843
|
};
|
|
8811
8844
|
}
|
|
8812
8845
|
executeSwapContract(txb, swapData, swapContext) {
|
|
8813
8846
|
const fn = swapData.a2b ? "swap_a2b_pyth_core" : "swap_b2a_pyth_core";
|
|
8814
8847
|
txb.moveCall({
|
|
8815
|
-
target: `${swapData.publishedAt}::
|
|
8848
|
+
target: `${swapData.publishedAt}::haedalpropamm::${fn}`,
|
|
8816
8849
|
typeArguments: [swapData.baseType, swapData.quoteType],
|
|
8817
8850
|
arguments: [
|
|
8818
8851
|
swapContext,
|
|
@@ -8870,7 +8903,7 @@ var FERRADLMM = "FERRADLMM";
|
|
|
8870
8903
|
var FERRACLMM = "FERRACLMM";
|
|
8871
8904
|
var BOLT = "BOLT";
|
|
8872
8905
|
var MAGMAPROPAMM = "MAGMAPROPAMM";
|
|
8873
|
-
var
|
|
8906
|
+
var HAEDALPROPAMM = "HAEDALPROPAMM";
|
|
8874
8907
|
var DEFAULT_ENDPOINT = "https://api-sui.cetus.zone/router_v3";
|
|
8875
8908
|
var ALL_DEXES = [
|
|
8876
8909
|
CETUS,
|
|
@@ -8907,7 +8940,7 @@ var ALL_DEXES = [
|
|
|
8907
8940
|
FERRACLMM,
|
|
8908
8941
|
BOLT,
|
|
8909
8942
|
MAGMAPROPAMM,
|
|
8910
|
-
|
|
8943
|
+
HAEDALPROPAMM
|
|
8911
8944
|
];
|
|
8912
8945
|
function getAllProviders() {
|
|
8913
8946
|
return ALL_DEXES;
|
|
@@ -9119,8 +9152,8 @@ var _AggregatorClient = class _AggregatorClient {
|
|
|
9119
9152
|
return new BoltRouter(this.env);
|
|
9120
9153
|
case MAGMAPROPAMM:
|
|
9121
9154
|
return new MagmaPropAmmRouter(this.env);
|
|
9122
|
-
case
|
|
9123
|
-
return new
|
|
9155
|
+
case HAEDALPROPAMM:
|
|
9156
|
+
return new HaedalPropAmmRouter(this.env);
|
|
9124
9157
|
default:
|
|
9125
9158
|
throw new Error(
|
|
9126
9159
|
`${CLIENT_CONFIG.ERRORS.UNSUPPORTED_DEX} ${provider}`
|
|
@@ -9803,10 +9836,16 @@ var _AggregatorClient = class _AggregatorClient {
|
|
|
9803
9836
|
tempMaxAmount = amount2;
|
|
9804
9837
|
}
|
|
9805
9838
|
} else {
|
|
9806
|
-
const
|
|
9807
|
-
if (
|
|
9839
|
+
const amountOut = new import_bn6.default(eventJson2?.data?.amount_out ?? 0);
|
|
9840
|
+
if (!amountOut.eq(amount)) {
|
|
9841
|
+
continue;
|
|
9842
|
+
}
|
|
9843
|
+
const pureAmountIn2 = new import_bn6.default(eventJson2?.data?.amount_in ?? 0);
|
|
9844
|
+
const feeAmount2 = new import_bn6.default(eventJson2?.data?.fee_amount ?? 0);
|
|
9845
|
+
const totalAmountIn = pureAmountIn2.add(feeAmount2);
|
|
9846
|
+
if (totalAmountIn.lt(tempMaxAmount)) {
|
|
9808
9847
|
tempIndex = i;
|
|
9809
|
-
tempMaxAmount =
|
|
9848
|
+
tempMaxAmount = totalAmountIn;
|
|
9810
9849
|
}
|
|
9811
9850
|
}
|
|
9812
9851
|
}
|
|
@@ -9964,4 +10003,4 @@ decimal.js/decimal.mjs:
|
|
|
9964
10003
|
*)
|
|
9965
10004
|
*/
|
|
9966
10005
|
|
|
9967
|
-
export { AFSUI, AFTERMATH, AFTERMATH_AMM, AFTERMATH_MODULE, AGGREGATOR, AGGREGATOR_V3_CONFIG, ALL_DEXES, ALPHAFI, AggregatorClient, AggregatorConfig, AggregatorError, AggregatorServerErrorCode, BLUEFIN, BLUEMOVE, BOLT, CETUS, CETUSDLMM, CETUS_DEX, CETUS_MODULE, CETUS_PUBLISHED_AT, CHECK_COINS_THRESHOLD_FUNC, CLIENT_CONFIG, CLOCK_ADDRESS, CoinInfoAddress, CoinStoreAddress, CoinUtils, ConfigErrorCode, DEEPBOOKV2, DEEPBOOKV3, DEEPBOOK_CLOB_V2_MODULE, DEEPBOOK_CUSTODIAN_V2_MODULE, DEEPBOOK_DEX, DEEPBOOK_MODULE, DEEPBOOK_PACKAGE_ID, DEEPBOOK_PUBLISHED_AT, DEEPBOOK_V3_DEEP_FEE_TYPES, DEFAULT_AGG_V2_ENDPOINT, DEFAULT_AGG_V3_ENDPOINT, DEFAULT_ENDPOINT, DEFAULT_GAS_BUDGET_FOR_MERGE, DEFAULT_GAS_BUDGET_FOR_SPLIT, DEFAULT_GAS_BUDGET_FOR_STAKE, DEFAULT_GAS_BUDGET_FOR_TRANSFER, DEFAULT_GAS_BUDGET_FOR_TRANSFER_SUI, DEFAULT_NFT_TRANSFER_GAS_FEE, Env, FERRACLMM, FERRADLMM, FLOWXV2, FLOWXV3, FLOWX_AMM, FLOWX_AMM_MODULE, FULLSAIL, FlashSwapA2BFunc, FlashSwapB2AFunc, FlashSwapFunc, FlashSwapWithPartnerA2BFunc, FlashSwapWithPartnerB2AFunc, FlashSwapWithPartnerFunc, GAS_SYMBOL, GAS_TYPE_ARG, GAS_TYPE_ARG_LONG, HAEDAL, HAEDALHMMV2, HAEDALPMM, HAWAL, INTEGRATE, JOIN_FUNC, KRIYA, KRIYAV3, KRIYA_DEX, KRIYA_MODULE, MAGMA, MAGMAPROPAMM, MAINNET_AFTERMATH_INSURANCE_FUND_ID, MAINNET_AFTERMATH_PROTOCOL_FEE_VAULT_ID, MAINNET_AFTERMATH_REFERRAL_VAULT_ID, MAINNET_AFTERMATH_REGISTRY_ID, MAINNET_AFTERMATH_TREASURY_ID, MAINNET_CETUS_V3_PUBLISHED_AT, MAINNET_FLOWX_AMM_CONTAINER_ID, METASTABLE, MOMENTUM, OBRIC, ONE, PACKAGE_NAMES, PAY_MODULE, POOL_MODULT, PUBLISHED_ADDRESSES, PYTH_CONFIG, REPAY_FLASH_SWAP_A2B_FUNC, REPAY_FLASH_SWAP_B2A_FUNC, REPAY_FLASH_SWAP_WITH_PARTNER_A2B_FUNC, REPAY_FLASH_SWAP_WITH_PARTNER_B2A_FUNC, RepayFalshSwapFunc, RepayFlashSwapWithPartnerFunc, SCALLOP, SEVENK, SPRINGSUI, STEAMM, STEAMM_OMM, STEAMM_OMM_V2, SUILEND, SUI_SYSTEM_STATE_OBJECT_ID, SWAP_A2B_FUNC, SWAP_B2A_FUNC, SuiZeroCoinFn, TEN_POW_NINE, TESTNET_AFTERMATH_INSURANCE_FUND_ID, TESTNET_AFTERMATH_PROTOCOL_FEE_VAULT_ID, TESTNET_AFTERMATH_REFERRAL_VAULT_ID, TESTNET_AFTERMATH_REGISTRY_ID, TESTNET_AFTERMATH_TREASURY_ID, TESTNET_CETUS_V3_PUBLISHED_AT, TESTNET_FLOWX_AMM_CONTAINER_ID,
|
|
10006
|
+
export { AFSUI, AFTERMATH, AFTERMATH_AMM, AFTERMATH_MODULE, AGGREGATOR, AGGREGATOR_V3_CONFIG, ALL_DEXES, ALPHAFI, AggregatorClient, AggregatorConfig, AggregatorError, AggregatorServerErrorCode, BLUEFIN, BLUEMOVE, BOLT, CETUS, CETUSDLMM, CETUS_DEX, CETUS_MODULE, CETUS_PUBLISHED_AT, CHECK_COINS_THRESHOLD_FUNC, CLIENT_CONFIG, CLOCK_ADDRESS, CoinInfoAddress, CoinStoreAddress, CoinUtils, ConfigErrorCode, DEEPBOOKV2, DEEPBOOKV3, DEEPBOOK_CLOB_V2_MODULE, DEEPBOOK_CUSTODIAN_V2_MODULE, DEEPBOOK_DEX, DEEPBOOK_MODULE, DEEPBOOK_PACKAGE_ID, DEEPBOOK_PUBLISHED_AT, DEEPBOOK_V3_DEEP_FEE_TYPES, DEFAULT_AGG_V2_ENDPOINT, DEFAULT_AGG_V3_ENDPOINT, DEFAULT_ENDPOINT, DEFAULT_GAS_BUDGET_FOR_MERGE, DEFAULT_GAS_BUDGET_FOR_SPLIT, DEFAULT_GAS_BUDGET_FOR_STAKE, DEFAULT_GAS_BUDGET_FOR_TRANSFER, DEFAULT_GAS_BUDGET_FOR_TRANSFER_SUI, DEFAULT_NFT_TRANSFER_GAS_FEE, Env, FERRACLMM, FERRADLMM, FLOWXV2, FLOWXV3, FLOWX_AMM, FLOWX_AMM_MODULE, FULLSAIL, FlashSwapA2BFunc, FlashSwapB2AFunc, FlashSwapFunc, FlashSwapWithPartnerA2BFunc, FlashSwapWithPartnerB2AFunc, FlashSwapWithPartnerFunc, GAS_SYMBOL, GAS_TYPE_ARG, GAS_TYPE_ARG_LONG, HAEDAL, HAEDALHMMV2, HAEDALPMM, HAEDALPROPAMM, HAWAL, INTEGRATE, JOIN_FUNC, KRIYA, KRIYAV3, KRIYA_DEX, KRIYA_MODULE, MAGMA, MAGMAPROPAMM, MAINNET_AFTERMATH_INSURANCE_FUND_ID, MAINNET_AFTERMATH_PROTOCOL_FEE_VAULT_ID, MAINNET_AFTERMATH_REFERRAL_VAULT_ID, MAINNET_AFTERMATH_REGISTRY_ID, MAINNET_AFTERMATH_TREASURY_ID, MAINNET_CETUS_V3_PUBLISHED_AT, MAINNET_FLOWX_AMM_CONTAINER_ID, METASTABLE, MOMENTUM, OBRIC, ONE, PACKAGE_NAMES, PAY_MODULE, POOL_MODULT, PUBLISHED_ADDRESSES, PYTH_CONFIG, PYTH_PRELUDE_CALLS, REPAY_FLASH_SWAP_A2B_FUNC, REPAY_FLASH_SWAP_B2A_FUNC, REPAY_FLASH_SWAP_WITH_PARTNER_A2B_FUNC, REPAY_FLASH_SWAP_WITH_PARTNER_B2A_FUNC, RepayFalshSwapFunc, RepayFlashSwapWithPartnerFunc, SCALLOP, SEVENK, SPRINGSUI, STEAMM, STEAMM_OMM, STEAMM_OMM_V2, SUILEND, SUI_SYSTEM_STATE_OBJECT_ID, SWAP_A2B_FUNC, SWAP_B2A_FUNC, SWAP_GAS_BUDGET_TABLE, SuiZeroCoinFn, TEN_POW_NINE, TESTNET_AFTERMATH_INSURANCE_FUND_ID, TESTNET_AFTERMATH_PROTOCOL_FEE_VAULT_ID, TESTNET_AFTERMATH_REFERRAL_VAULT_ID, TESTNET_AFTERMATH_REGISTRY_ID, TESTNET_AFTERMATH_TREASURY_ID, TESTNET_CETUS_V3_PUBLISHED_AT, TESTNET_FLOWX_AMM_CONTAINER_ID, TRANSFER_ACCOUNT_CAP, TRANSFER_OR_DESTORY_COIN_FUNC, TURBOS, TURBOS_DEX, TURBOS_MODULE, TURBOS_VERSIONED, TWO, TransactionErrorCode, TypesErrorCode, U128, U64_MAX, U64_MAX_BN, UTILS_MODULE, VOLO, ZERO, buildInputCoin, calculateGasEfficiency, calculatePriceImpact, checkInvalidSuiAddress, compareCoins, compareGasMetrics, completionCoin, composeType, createTarget, dealWithFastRouterSwapParamsForMsafe, estimateSwapGasBudget, exportToCSV, exportToJSON, extractAddressFromType, extractGasMetrics, extractStructTagFromType, extractTimestampFromDowngradeUuid6, fixSuiObjectId, formatGasMetrics, generateDowngradeUuid6, generateSimpleDowngradeUuid6, getAggregatorServerErrorMessage, getAggregatorV2Extend2PublishedAt, getAggregatorV2ExtendPublishedAt, getAggregatorV2PublishedAt, getAllProviders, getDeepbookV3Config, getDefaultSuiInputType, getMergeSwapResult, getOrCreateAccountCap, getProvidersExcluding, getProvidersIncluding, getRouterResult, hasPythPrelude, isSortedSymbols, isValidDowngradeUuid6, lookupGasBudget, mintZeroCoin, normalizeCoinType, parseAftermathFeeType, parseTurbosPoolFeeType, patchFixSuiObjectId, printTransaction, processEndpoint, processFlattenRoutes, restituteMsafeFastRouterSwapParams };
|