@cetusprotocol/aggregator-sdk 1.4.1 → 1.4.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/dist/index.d.mts +10 -8
- package/dist/index.d.ts +10 -8
- package/dist/index.js +61 -19
- package/dist/index.mjs +60 -17
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -87,8 +87,11 @@ type ExtendedDetails = {
|
|
|
87
87
|
aftermath_lp_supply_type?: string;
|
|
88
88
|
turbos_fee_type?: string;
|
|
89
89
|
afterSqrtPrice?: string;
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
deepbookv3_deep_fee?: number;
|
|
91
|
+
deepbookv3_need_add_deep_price_point?: boolean;
|
|
92
|
+
deepbookv3_reference_pool_id?: string;
|
|
93
|
+
deepbookv3_reference_pool_base_type?: string;
|
|
94
|
+
deepbookv3_reference_pool_quote_type?: string;
|
|
92
95
|
scallop_scoin_treasury?: string;
|
|
93
96
|
haedal_pmm_base_price_seed?: string;
|
|
94
97
|
haedal_pmm_quote_price_seed?: string;
|
|
@@ -723,9 +726,8 @@ declare const SuiZeroCoinFn = "0x2::coin::zero";
|
|
|
723
726
|
declare const DEEPBOOK_PACKAGE_ID = "0x000000000000000000000000000000000000000000000000000000000000dee9";
|
|
724
727
|
declare const DEEPBOOK_PUBLISHED_AT = "0x000000000000000000000000000000000000000000000000000000000000dee9";
|
|
725
728
|
declare const CETUS_PUBLISHED_AT = "0x70968826ad1b4ba895753f634b0aea68d0672908ca1075a2abdf0fc9e0b2fc6a";
|
|
726
|
-
declare const
|
|
727
|
-
declare const
|
|
728
|
-
declare const TESTNET_CETUS_GLOBAL_CONFIG_ID = "0x6f4149091a5aea0e818e7243a13adcfb403842d670b9a2089de058512620687a";
|
|
729
|
+
declare const MAINNET_CETUS_V3_PUBLISHED_AT = "0xd7b0cfc33a3b46c0ae0e2584c44028385da11724d4c94ec5b21a78117c5c1ab9";
|
|
730
|
+
declare const TESTNET_CETUS_V3_PUBLISHED_AT = "0x7a82ed4b00a8c68d751b6c0cbd4e989691daa4716a1cf4f875c2f9b28fb72f3a";
|
|
729
731
|
declare const MAINNET_FLOWX_AMM_CONTAINER_ID = "0xb65dcbf63fd3ad5d0ebfbf334780dc9f785eff38a4459e37ab08fa79576ee511";
|
|
730
732
|
declare const TESTNET_FLOWX_AMM_CONTAINER_ID = "";
|
|
731
733
|
declare const TURBOS_VERSIONED = "0xf1cf0e81048df168ebeb1b8030fad24b3e0b53ae827c25053fff0779c1445b6f";
|
|
@@ -798,8 +800,8 @@ declare const AGGREGATOR_V3_CONFIG: {
|
|
|
798
800
|
readonly MAX_FEE_RATE: 100000;
|
|
799
801
|
readonly MAX_AMOUNT_IN: "18446744073709551615";
|
|
800
802
|
readonly DEFAULT_PUBLISHED_AT: {
|
|
801
|
-
readonly Mainnet: "
|
|
802
|
-
readonly Testnet: "
|
|
803
|
+
readonly Mainnet: "0xde5d696a79714ca5cb910b9aed99d41f67353abb00715ceaeb0663d57ee39640";
|
|
804
|
+
readonly Testnet: "0x61da681cf2af95cb214a71596b49e662290065536984ed7e06b47e701ef547e3";
|
|
803
805
|
};
|
|
804
806
|
};
|
|
805
807
|
|
|
@@ -1010,4 +1012,4 @@ declare class CoinUtils {
|
|
|
1010
1012
|
static calculateTotalBalance(coins: CoinAsset[]): bigint;
|
|
1011
1013
|
}
|
|
1012
1014
|
|
|
1013
|
-
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, 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,
|
|
1015
|
+
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, 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, 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 SuiAddress, type SuiBasicTypes, type SuiInputTypes, 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, exportToCSV, exportToJSON, extractAddressFromType, extractGasMetrics, extractStructTagFromType, extractTimestampFromDowngradeUuid6, fixSuiObjectId, formatGasMetrics, generateDowngradeUuid6, generateSimpleDowngradeUuid6, getAggregatorServerErrorMessage, getAggregatorV2Extend2PublishedAt, getAggregatorV2ExtendPublishedAt, getAggregatorV2PublishedAt, getAllProviders, getDeepbookV3Config, getDefaultSuiInputType, getMergeSwapResult, getOrCreateAccountCap, getProvidersExcluding, getProvidersIncluding, getRouterResult, isSortedSymbols, isValidDowngradeUuid6, mintZeroCoin, normalizeCoinType, parseAftermathFeeType, parseTurbosPoolFeeType, patchFixSuiObjectId, printTransaction, processEndpoint, processFlattenRoutes, restituteMsafeFastRouterSwapParams };
|
package/dist/index.d.ts
CHANGED
|
@@ -87,8 +87,11 @@ type ExtendedDetails = {
|
|
|
87
87
|
aftermath_lp_supply_type?: string;
|
|
88
88
|
turbos_fee_type?: string;
|
|
89
89
|
afterSqrtPrice?: string;
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
deepbookv3_deep_fee?: number;
|
|
91
|
+
deepbookv3_need_add_deep_price_point?: boolean;
|
|
92
|
+
deepbookv3_reference_pool_id?: string;
|
|
93
|
+
deepbookv3_reference_pool_base_type?: string;
|
|
94
|
+
deepbookv3_reference_pool_quote_type?: string;
|
|
92
95
|
scallop_scoin_treasury?: string;
|
|
93
96
|
haedal_pmm_base_price_seed?: string;
|
|
94
97
|
haedal_pmm_quote_price_seed?: string;
|
|
@@ -723,9 +726,8 @@ declare const SuiZeroCoinFn = "0x2::coin::zero";
|
|
|
723
726
|
declare const DEEPBOOK_PACKAGE_ID = "0x000000000000000000000000000000000000000000000000000000000000dee9";
|
|
724
727
|
declare const DEEPBOOK_PUBLISHED_AT = "0x000000000000000000000000000000000000000000000000000000000000dee9";
|
|
725
728
|
declare const CETUS_PUBLISHED_AT = "0x70968826ad1b4ba895753f634b0aea68d0672908ca1075a2abdf0fc9e0b2fc6a";
|
|
726
|
-
declare const
|
|
727
|
-
declare const
|
|
728
|
-
declare const TESTNET_CETUS_GLOBAL_CONFIG_ID = "0x6f4149091a5aea0e818e7243a13adcfb403842d670b9a2089de058512620687a";
|
|
729
|
+
declare const MAINNET_CETUS_V3_PUBLISHED_AT = "0xd7b0cfc33a3b46c0ae0e2584c44028385da11724d4c94ec5b21a78117c5c1ab9";
|
|
730
|
+
declare const TESTNET_CETUS_V3_PUBLISHED_AT = "0x7a82ed4b00a8c68d751b6c0cbd4e989691daa4716a1cf4f875c2f9b28fb72f3a";
|
|
729
731
|
declare const MAINNET_FLOWX_AMM_CONTAINER_ID = "0xb65dcbf63fd3ad5d0ebfbf334780dc9f785eff38a4459e37ab08fa79576ee511";
|
|
730
732
|
declare const TESTNET_FLOWX_AMM_CONTAINER_ID = "";
|
|
731
733
|
declare const TURBOS_VERSIONED = "0xf1cf0e81048df168ebeb1b8030fad24b3e0b53ae827c25053fff0779c1445b6f";
|
|
@@ -798,8 +800,8 @@ declare const AGGREGATOR_V3_CONFIG: {
|
|
|
798
800
|
readonly MAX_FEE_RATE: 100000;
|
|
799
801
|
readonly MAX_AMOUNT_IN: "18446744073709551615";
|
|
800
802
|
readonly DEFAULT_PUBLISHED_AT: {
|
|
801
|
-
readonly Mainnet: "
|
|
802
|
-
readonly Testnet: "
|
|
803
|
+
readonly Mainnet: "0xde5d696a79714ca5cb910b9aed99d41f67353abb00715ceaeb0663d57ee39640";
|
|
804
|
+
readonly Testnet: "0x61da681cf2af95cb214a71596b49e662290065536984ed7e06b47e701ef547e3";
|
|
803
805
|
};
|
|
804
806
|
};
|
|
805
807
|
|
|
@@ -1010,4 +1012,4 @@ declare class CoinUtils {
|
|
|
1010
1012
|
static calculateTotalBalance(coins: CoinAsset[]): bigint;
|
|
1011
1013
|
}
|
|
1012
1014
|
|
|
1013
|
-
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, 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,
|
|
1015
|
+
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, 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, 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 SuiAddress, type SuiBasicTypes, type SuiInputTypes, 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, exportToCSV, exportToJSON, extractAddressFromType, extractGasMetrics, extractStructTagFromType, extractTimestampFromDowngradeUuid6, fixSuiObjectId, formatGasMetrics, generateDowngradeUuid6, generateSimpleDowngradeUuid6, getAggregatorServerErrorMessage, getAggregatorV2Extend2PublishedAt, getAggregatorV2ExtendPublishedAt, getAggregatorV2PublishedAt, getAllProviders, getDeepbookV3Config, getDefaultSuiInputType, getMergeSwapResult, getOrCreateAccountCap, getProvidersExcluding, getProvidersIncluding, getRouterResult, isSortedSymbols, isValidDowngradeUuid6, mintZeroCoin, normalizeCoinType, parseAftermathFeeType, parseTurbosPoolFeeType, patchFixSuiObjectId, printTransaction, processEndpoint, processFlattenRoutes, restituteMsafeFastRouterSwapParams };
|
package/dist/index.js
CHANGED
|
@@ -3365,9 +3365,8 @@ var SuiZeroCoinFn = "0x2::coin::zero";
|
|
|
3365
3365
|
var DEEPBOOK_PACKAGE_ID = "0x000000000000000000000000000000000000000000000000000000000000dee9";
|
|
3366
3366
|
var DEEPBOOK_PUBLISHED_AT = "0x000000000000000000000000000000000000000000000000000000000000dee9";
|
|
3367
3367
|
var CETUS_PUBLISHED_AT = "0x70968826ad1b4ba895753f634b0aea68d0672908ca1075a2abdf0fc9e0b2fc6a";
|
|
3368
|
-
var
|
|
3369
|
-
var
|
|
3370
|
-
var TESTNET_CETUS_GLOBAL_CONFIG_ID = "0x6f4149091a5aea0e818e7243a13adcfb403842d670b9a2089de058512620687a";
|
|
3368
|
+
var MAINNET_CETUS_V3_PUBLISHED_AT = "0xd7b0cfc33a3b46c0ae0e2584c44028385da11724d4c94ec5b21a78117c5c1ab9";
|
|
3369
|
+
var TESTNET_CETUS_V3_PUBLISHED_AT = "0x7a82ed4b00a8c68d751b6c0cbd4e989691daa4716a1cf4f875c2f9b28fb72f3a";
|
|
3371
3370
|
var MAINNET_FLOWX_AMM_CONTAINER_ID = "0xb65dcbf63fd3ad5d0ebfbf334780dc9f785eff38a4459e37ab08fa79576ee511";
|
|
3372
3371
|
var TESTNET_FLOWX_AMM_CONTAINER_ID = "";
|
|
3373
3372
|
var TURBOS_VERSIONED = "0xf1cf0e81048df168ebeb1b8030fad24b3e0b53ae827c25053fff0779c1445b6f";
|
|
@@ -3447,13 +3446,13 @@ var AGGREGATOR_V3_CONFIG = {
|
|
|
3447
3446
|
// 10%
|
|
3448
3447
|
MAX_AMOUNT_IN: U64_MAX,
|
|
3449
3448
|
DEFAULT_PUBLISHED_AT: {
|
|
3450
|
-
Mainnet: "
|
|
3451
|
-
Testnet: "
|
|
3449
|
+
Mainnet: "0xde5d696a79714ca5cb910b9aed99d41f67353abb00715ceaeb0663d57ee39640",
|
|
3450
|
+
Testnet: "0x61da681cf2af95cb214a71596b49e662290065536984ed7e06b47e701ef547e3"
|
|
3452
3451
|
}
|
|
3453
3452
|
};
|
|
3454
3453
|
|
|
3455
3454
|
// src/api.ts
|
|
3456
|
-
var SDK_VERSION =
|
|
3455
|
+
var SDK_VERSION = 1010403;
|
|
3457
3456
|
function parseRouterResponse(data, byAmountIn) {
|
|
3458
3457
|
let packages = /* @__PURE__ */ new Map();
|
|
3459
3458
|
if (data.packages) {
|
|
@@ -6104,11 +6103,8 @@ function CalculateAmountLimitByDecimal(expectAmount, byAmountIn, slippage) {
|
|
|
6104
6103
|
}
|
|
6105
6104
|
var CetusRouter = class {
|
|
6106
6105
|
constructor(env, partner) {
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
}
|
|
6110
|
-
this.globalConfig = env === 0 /* Mainnet */ ? "0xdaa46292632c3c4d8f31f23ea0f9b36a28ff3677e9684980e4438403a67a3d8f" : "0x9774e359588ead122af1c7e7f64e14ade261cfeecdb5d0eb4a5b3b4c8ab8bd3e";
|
|
6111
|
-
this.partner = partner != null ? partner : env === 0 /* Mainnet */ ? "0x639b5e433da31739e800cd085f356e64cae222966d0f1b11bd9dc76b322ff58b" : "0x1f5fa5c820f40d43fc47815ad06d95e40a1942ff72a732a92e8ef4aa8cde70a5";
|
|
6106
|
+
this.globalConfig = env === 0 /* Mainnet */ ? "0xdaa46292632c3c4d8f31f23ea0f9b36a28ff3677e9684980e4438403a67a3d8f" : "0xc6273f844b4bc258952c4e477697aa12c918c8e08106fac6b934811298c9820a";
|
|
6107
|
+
this.partner = partner != null ? partner : env === 0 /* Mainnet */ ? "0x639b5e433da31739e800cd085f356e64cae222966d0f1b11bd9dc76b322ff58b" : "0xfdc30896f88f74544fd507722d3bf52e46b06412ba8241ba0e854cbc65f8d85f";
|
|
6112
6108
|
}
|
|
6113
6109
|
// By amount in
|
|
6114
6110
|
swap(txb, flattenedPath, swapContext, _extends) {
|
|
@@ -6616,24 +6612,69 @@ var DeepbookV3Router = class {
|
|
|
6616
6612
|
}
|
|
6617
6613
|
swap(txb, flattenedPath, swapContext, _extends) {
|
|
6618
6614
|
const swapData = this.prepareSwapData(flattenedPath);
|
|
6615
|
+
if (swapData.needAddDeepPricePoint) {
|
|
6616
|
+
this.addDeepPricePoint(txb, swapData);
|
|
6617
|
+
}
|
|
6619
6618
|
this.executeSwapContract(txb, swapData, swapContext, _extends);
|
|
6620
6619
|
}
|
|
6621
6620
|
prepareSwapData(flattenedPath) {
|
|
6621
|
+
var _a, _b, _c, _d, _e;
|
|
6622
6622
|
if (flattenedPath.path.publishedAt == null) {
|
|
6623
6623
|
throw new Error("DeepBook V3 not set publishedAt");
|
|
6624
6624
|
}
|
|
6625
6625
|
const path = flattenedPath.path;
|
|
6626
6626
|
const [coinAType, coinBType] = path.direction ? [path.from, path.target] : [path.target, path.from];
|
|
6627
6627
|
const amountIn = flattenedPath.isLastUseOfIntermediateToken ? AGGREGATOR_V3_CONFIG.MAX_AMOUNT_IN : path.amountIn;
|
|
6628
|
+
const needAddDeepPricePoint = (_b = (_a = path.extendedDetails) == null ? void 0 : _a.deepbookv3_need_add_deep_price_point) != null ? _b : false;
|
|
6629
|
+
const referencePoolId = (_c = path.extendedDetails) == null ? void 0 : _c.deepbookv3_reference_pool_id;
|
|
6630
|
+
const referencePoolBaseType = (_d = path.extendedDetails) == null ? void 0 : _d.deepbookv3_reference_pool_base_type;
|
|
6631
|
+
const referencePoolQuoteType = (_e = path.extendedDetails) == null ? void 0 : _e.deepbookv3_reference_pool_quote_type;
|
|
6632
|
+
if (needAddDeepPricePoint) {
|
|
6633
|
+
if (!referencePoolId) {
|
|
6634
|
+
throw new Error(
|
|
6635
|
+
"DeepBook V3: deepbookv3_reference_pool_id is required when deepbookv3_need_add_deep_price_point is true"
|
|
6636
|
+
);
|
|
6637
|
+
}
|
|
6638
|
+
if (!referencePoolBaseType) {
|
|
6639
|
+
throw new Error(
|
|
6640
|
+
"DeepBook V3: reference_pool_base_type is required when deepbookv3_need_add_deep_price_point is true"
|
|
6641
|
+
);
|
|
6642
|
+
}
|
|
6643
|
+
if (!referencePoolQuoteType) {
|
|
6644
|
+
throw new Error(
|
|
6645
|
+
"DeepBook V3: reference_pool_quote_type is required when deepbookv3_need_add_deep_price_point is true"
|
|
6646
|
+
);
|
|
6647
|
+
}
|
|
6648
|
+
}
|
|
6628
6649
|
return {
|
|
6629
6650
|
coinAType,
|
|
6630
6651
|
coinBType,
|
|
6631
6652
|
direction: path.direction,
|
|
6632
6653
|
amountIn,
|
|
6633
6654
|
publishedAt: path.publishedAt,
|
|
6634
|
-
poolId: path.id
|
|
6655
|
+
poolId: path.id,
|
|
6656
|
+
needAddDeepPricePoint,
|
|
6657
|
+
referencePoolId,
|
|
6658
|
+
referencePoolBaseType,
|
|
6659
|
+
referencePoolQuoteType
|
|
6635
6660
|
};
|
|
6636
6661
|
}
|
|
6662
|
+
addDeepPricePoint(txb, swapData) {
|
|
6663
|
+
txb.moveCall({
|
|
6664
|
+
target: `${swapData.publishedAt}::deepbookv3::add_deep_price_point`,
|
|
6665
|
+
typeArguments: [
|
|
6666
|
+
swapData.coinAType,
|
|
6667
|
+
swapData.coinBType,
|
|
6668
|
+
swapData.referencePoolBaseType,
|
|
6669
|
+
swapData.referencePoolQuoteType
|
|
6670
|
+
],
|
|
6671
|
+
arguments: [
|
|
6672
|
+
txb.object(swapData.poolId),
|
|
6673
|
+
txb.object(swapData.referencePoolId),
|
|
6674
|
+
txb.object(utils.SUI_CLOCK_OBJECT_ID)
|
|
6675
|
+
]
|
|
6676
|
+
});
|
|
6677
|
+
}
|
|
6637
6678
|
executeSwapContract(txb, swapData, swapContext, _extends) {
|
|
6638
6679
|
const deepCoin = (_extends == null ? void 0 : _extends.deepbookv3DeepFee) || txb.moveCall({
|
|
6639
6680
|
target: "0x2::coin::zero",
|
|
@@ -6821,7 +6862,7 @@ var ScallopRouter = class {
|
|
|
6821
6862
|
if (path.extendedDetails == null) {
|
|
6822
6863
|
throw new Error("Extended details not supported");
|
|
6823
6864
|
}
|
|
6824
|
-
const scallopScoinTreasury = path.extendedDetails.
|
|
6865
|
+
const scallopScoinTreasury = path.extendedDetails.scallop_scoin_treasury;
|
|
6825
6866
|
if (scallopScoinTreasury == null) {
|
|
6826
6867
|
throw new Error("Scallop scoin treasury not supported");
|
|
6827
6868
|
}
|
|
@@ -9388,7 +9429,7 @@ var _AggregatorClient = class _AggregatorClient {
|
|
|
9388
9429
|
const coinA = direction ? fromCoin : targetCoin;
|
|
9389
9430
|
const coinB = direction ? targetCoin : fromCoin;
|
|
9390
9431
|
const typeArguments = [coinA, coinB];
|
|
9391
|
-
const integratePublishedAt = this.env === 0 /* Mainnet */ ? "
|
|
9432
|
+
const integratePublishedAt = this.env === 0 /* Mainnet */ ? "0xfbb32ac0fa89a3cb0c56c745b688c6d2a53ac8e43447119ad822763997ffb9c3" : "0xab2d58dd28ff0dc19b18ab2c634397b785a38c342a8f5065ade5f53f9dbffa1c";
|
|
9392
9433
|
for (let i = 0; i < pools.length; i++) {
|
|
9393
9434
|
const args = [
|
|
9394
9435
|
tx.object(pools[i]),
|
|
@@ -9450,6 +9491,8 @@ var _AggregatorClient = class _AggregatorClient {
|
|
|
9450
9491
|
const pureAmountIn = new import_bn6.default((_b = event.amount_in) != null ? _b : 0);
|
|
9451
9492
|
const feeAmount = new import_bn6.default((_c = event.fee_amount) != null ? _c : 0);
|
|
9452
9493
|
const amountIn = pureAmountIn.add(feeAmount);
|
|
9494
|
+
const cetusRouterV3PublishedAt = this.env === 0 /* Mainnet */ ? MAINNET_CETUS_V3_PUBLISHED_AT : TESTNET_CETUS_V3_PUBLISHED_AT;
|
|
9495
|
+
const aggregatorV3PublishedAt = this.env === 0 /* Mainnet */ ? AGGREGATOR_V3_CONFIG.DEFAULT_PUBLISHED_AT.Mainnet : AGGREGATOR_V3_CONFIG.DEFAULT_PUBLISHED_AT.Testnet;
|
|
9453
9496
|
const routeData = {
|
|
9454
9497
|
amountIn,
|
|
9455
9498
|
amountOut: new import_bn6.default((_d = event.amount_out) != null ? _d : 0),
|
|
@@ -9464,7 +9507,7 @@ var _AggregatorClient = class _AggregatorClient {
|
|
|
9464
9507
|
feeRate,
|
|
9465
9508
|
amountIn: amountIn.toString(),
|
|
9466
9509
|
amountOut: event.amount_out,
|
|
9467
|
-
publishedAt:
|
|
9510
|
+
publishedAt: cetusRouterV3PublishedAt,
|
|
9468
9511
|
extendedDetails: {
|
|
9469
9512
|
afterSqrtPrice: event.after_sqrt_price
|
|
9470
9513
|
}
|
|
@@ -9476,7 +9519,7 @@ var _AggregatorClient = class _AggregatorClient {
|
|
|
9476
9519
|
packages: /* @__PURE__ */ new Map([
|
|
9477
9520
|
[
|
|
9478
9521
|
PACKAGE_NAMES.AGGREGATOR_V3,
|
|
9479
|
-
|
|
9522
|
+
aggregatorV3PublishedAt
|
|
9480
9523
|
]
|
|
9481
9524
|
])
|
|
9482
9525
|
};
|
|
@@ -9629,7 +9672,6 @@ exports.CETUSDLMM = CETUSDLMM;
|
|
|
9629
9672
|
exports.CETUS_DEX = CETUS_DEX;
|
|
9630
9673
|
exports.CETUS_MODULE = CETUS_MODULE;
|
|
9631
9674
|
exports.CETUS_PUBLISHED_AT = CETUS_PUBLISHED_AT;
|
|
9632
|
-
exports.CETUS_V3_PUBLISHED_AT = CETUS_V3_PUBLISHED_AT;
|
|
9633
9675
|
exports.CHECK_COINS_THRESHOLD_FUNC = CHECK_COINS_THRESHOLD_FUNC;
|
|
9634
9676
|
exports.CLIENT_CONFIG = CLIENT_CONFIG;
|
|
9635
9677
|
exports.CLOCK_ADDRESS = CLOCK_ADDRESS;
|
|
@@ -9688,7 +9730,7 @@ exports.MAINNET_AFTERMATH_PROTOCOL_FEE_VAULT_ID = MAINNET_AFTERMATH_PROTOCOL_FEE
|
|
|
9688
9730
|
exports.MAINNET_AFTERMATH_REFERRAL_VAULT_ID = MAINNET_AFTERMATH_REFERRAL_VAULT_ID;
|
|
9689
9731
|
exports.MAINNET_AFTERMATH_REGISTRY_ID = MAINNET_AFTERMATH_REGISTRY_ID;
|
|
9690
9732
|
exports.MAINNET_AFTERMATH_TREASURY_ID = MAINNET_AFTERMATH_TREASURY_ID;
|
|
9691
|
-
exports.
|
|
9733
|
+
exports.MAINNET_CETUS_V3_PUBLISHED_AT = MAINNET_CETUS_V3_PUBLISHED_AT;
|
|
9692
9734
|
exports.MAINNET_FLOWX_AMM_CONTAINER_ID = MAINNET_FLOWX_AMM_CONTAINER_ID;
|
|
9693
9735
|
exports.METASTABLE = METASTABLE;
|
|
9694
9736
|
exports.MOMENTUM = MOMENTUM;
|
|
@@ -9722,7 +9764,7 @@ exports.TESTNET_AFTERMATH_PROTOCOL_FEE_VAULT_ID = TESTNET_AFTERMATH_PROTOCOL_FEE
|
|
|
9722
9764
|
exports.TESTNET_AFTERMATH_REFERRAL_VAULT_ID = TESTNET_AFTERMATH_REFERRAL_VAULT_ID;
|
|
9723
9765
|
exports.TESTNET_AFTERMATH_REGISTRY_ID = TESTNET_AFTERMATH_REGISTRY_ID;
|
|
9724
9766
|
exports.TESTNET_AFTERMATH_TREASURY_ID = TESTNET_AFTERMATH_TREASURY_ID;
|
|
9725
|
-
exports.
|
|
9767
|
+
exports.TESTNET_CETUS_V3_PUBLISHED_AT = TESTNET_CETUS_V3_PUBLISHED_AT;
|
|
9726
9768
|
exports.TESTNET_FLOWX_AMM_CONTAINER_ID = TESTNET_FLOWX_AMM_CONTAINER_ID;
|
|
9727
9769
|
exports.TRANSFER_ACCOUNT_CAP = TRANSFER_ACCOUNT_CAP;
|
|
9728
9770
|
exports.TRANSFER_OR_DESTORY_COIN_FUNC = TRANSFER_OR_DESTORY_COIN_FUNC;
|
package/dist/index.mjs
CHANGED
|
@@ -3359,9 +3359,8 @@ var SuiZeroCoinFn = "0x2::coin::zero";
|
|
|
3359
3359
|
var DEEPBOOK_PACKAGE_ID = "0x000000000000000000000000000000000000000000000000000000000000dee9";
|
|
3360
3360
|
var DEEPBOOK_PUBLISHED_AT = "0x000000000000000000000000000000000000000000000000000000000000dee9";
|
|
3361
3361
|
var CETUS_PUBLISHED_AT = "0x70968826ad1b4ba895753f634b0aea68d0672908ca1075a2abdf0fc9e0b2fc6a";
|
|
3362
|
-
var
|
|
3363
|
-
var
|
|
3364
|
-
var TESTNET_CETUS_GLOBAL_CONFIG_ID = "0x6f4149091a5aea0e818e7243a13adcfb403842d670b9a2089de058512620687a";
|
|
3362
|
+
var MAINNET_CETUS_V3_PUBLISHED_AT = "0xd7b0cfc33a3b46c0ae0e2584c44028385da11724d4c94ec5b21a78117c5c1ab9";
|
|
3363
|
+
var TESTNET_CETUS_V3_PUBLISHED_AT = "0x7a82ed4b00a8c68d751b6c0cbd4e989691daa4716a1cf4f875c2f9b28fb72f3a";
|
|
3365
3364
|
var MAINNET_FLOWX_AMM_CONTAINER_ID = "0xb65dcbf63fd3ad5d0ebfbf334780dc9f785eff38a4459e37ab08fa79576ee511";
|
|
3366
3365
|
var TESTNET_FLOWX_AMM_CONTAINER_ID = "";
|
|
3367
3366
|
var TURBOS_VERSIONED = "0xf1cf0e81048df168ebeb1b8030fad24b3e0b53ae827c25053fff0779c1445b6f";
|
|
@@ -3441,13 +3440,13 @@ var AGGREGATOR_V3_CONFIG = {
|
|
|
3441
3440
|
// 10%
|
|
3442
3441
|
MAX_AMOUNT_IN: U64_MAX,
|
|
3443
3442
|
DEFAULT_PUBLISHED_AT: {
|
|
3444
|
-
Mainnet: "
|
|
3445
|
-
Testnet: "
|
|
3443
|
+
Mainnet: "0xde5d696a79714ca5cb910b9aed99d41f67353abb00715ceaeb0663d57ee39640",
|
|
3444
|
+
Testnet: "0x61da681cf2af95cb214a71596b49e662290065536984ed7e06b47e701ef547e3"
|
|
3446
3445
|
}
|
|
3447
3446
|
};
|
|
3448
3447
|
|
|
3449
3448
|
// src/api.ts
|
|
3450
|
-
var SDK_VERSION =
|
|
3449
|
+
var SDK_VERSION = 1010403;
|
|
3451
3450
|
function parseRouterResponse(data, byAmountIn) {
|
|
3452
3451
|
let packages = /* @__PURE__ */ new Map();
|
|
3453
3452
|
if (data.packages) {
|
|
@@ -6098,11 +6097,8 @@ function CalculateAmountLimitByDecimal(expectAmount, byAmountIn, slippage) {
|
|
|
6098
6097
|
}
|
|
6099
6098
|
var CetusRouter = class {
|
|
6100
6099
|
constructor(env, partner) {
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
}
|
|
6104
|
-
this.globalConfig = env === 0 /* Mainnet */ ? "0xdaa46292632c3c4d8f31f23ea0f9b36a28ff3677e9684980e4438403a67a3d8f" : "0x9774e359588ead122af1c7e7f64e14ade261cfeecdb5d0eb4a5b3b4c8ab8bd3e";
|
|
6105
|
-
this.partner = partner != null ? partner : env === 0 /* Mainnet */ ? "0x639b5e433da31739e800cd085f356e64cae222966d0f1b11bd9dc76b322ff58b" : "0x1f5fa5c820f40d43fc47815ad06d95e40a1942ff72a732a92e8ef4aa8cde70a5";
|
|
6100
|
+
this.globalConfig = env === 0 /* Mainnet */ ? "0xdaa46292632c3c4d8f31f23ea0f9b36a28ff3677e9684980e4438403a67a3d8f" : "0xc6273f844b4bc258952c4e477697aa12c918c8e08106fac6b934811298c9820a";
|
|
6101
|
+
this.partner = partner != null ? partner : env === 0 /* Mainnet */ ? "0x639b5e433da31739e800cd085f356e64cae222966d0f1b11bd9dc76b322ff58b" : "0xfdc30896f88f74544fd507722d3bf52e46b06412ba8241ba0e854cbc65f8d85f";
|
|
6106
6102
|
}
|
|
6107
6103
|
// By amount in
|
|
6108
6104
|
swap(txb, flattenedPath, swapContext, _extends) {
|
|
@@ -6610,24 +6606,69 @@ var DeepbookV3Router = class {
|
|
|
6610
6606
|
}
|
|
6611
6607
|
swap(txb, flattenedPath, swapContext, _extends) {
|
|
6612
6608
|
const swapData = this.prepareSwapData(flattenedPath);
|
|
6609
|
+
if (swapData.needAddDeepPricePoint) {
|
|
6610
|
+
this.addDeepPricePoint(txb, swapData);
|
|
6611
|
+
}
|
|
6613
6612
|
this.executeSwapContract(txb, swapData, swapContext, _extends);
|
|
6614
6613
|
}
|
|
6615
6614
|
prepareSwapData(flattenedPath) {
|
|
6615
|
+
var _a, _b, _c, _d, _e;
|
|
6616
6616
|
if (flattenedPath.path.publishedAt == null) {
|
|
6617
6617
|
throw new Error("DeepBook V3 not set publishedAt");
|
|
6618
6618
|
}
|
|
6619
6619
|
const path = flattenedPath.path;
|
|
6620
6620
|
const [coinAType, coinBType] = path.direction ? [path.from, path.target] : [path.target, path.from];
|
|
6621
6621
|
const amountIn = flattenedPath.isLastUseOfIntermediateToken ? AGGREGATOR_V3_CONFIG.MAX_AMOUNT_IN : path.amountIn;
|
|
6622
|
+
const needAddDeepPricePoint = (_b = (_a = path.extendedDetails) == null ? void 0 : _a.deepbookv3_need_add_deep_price_point) != null ? _b : false;
|
|
6623
|
+
const referencePoolId = (_c = path.extendedDetails) == null ? void 0 : _c.deepbookv3_reference_pool_id;
|
|
6624
|
+
const referencePoolBaseType = (_d = path.extendedDetails) == null ? void 0 : _d.deepbookv3_reference_pool_base_type;
|
|
6625
|
+
const referencePoolQuoteType = (_e = path.extendedDetails) == null ? void 0 : _e.deepbookv3_reference_pool_quote_type;
|
|
6626
|
+
if (needAddDeepPricePoint) {
|
|
6627
|
+
if (!referencePoolId) {
|
|
6628
|
+
throw new Error(
|
|
6629
|
+
"DeepBook V3: deepbookv3_reference_pool_id is required when deepbookv3_need_add_deep_price_point is true"
|
|
6630
|
+
);
|
|
6631
|
+
}
|
|
6632
|
+
if (!referencePoolBaseType) {
|
|
6633
|
+
throw new Error(
|
|
6634
|
+
"DeepBook V3: reference_pool_base_type is required when deepbookv3_need_add_deep_price_point is true"
|
|
6635
|
+
);
|
|
6636
|
+
}
|
|
6637
|
+
if (!referencePoolQuoteType) {
|
|
6638
|
+
throw new Error(
|
|
6639
|
+
"DeepBook V3: reference_pool_quote_type is required when deepbookv3_need_add_deep_price_point is true"
|
|
6640
|
+
);
|
|
6641
|
+
}
|
|
6642
|
+
}
|
|
6622
6643
|
return {
|
|
6623
6644
|
coinAType,
|
|
6624
6645
|
coinBType,
|
|
6625
6646
|
direction: path.direction,
|
|
6626
6647
|
amountIn,
|
|
6627
6648
|
publishedAt: path.publishedAt,
|
|
6628
|
-
poolId: path.id
|
|
6649
|
+
poolId: path.id,
|
|
6650
|
+
needAddDeepPricePoint,
|
|
6651
|
+
referencePoolId,
|
|
6652
|
+
referencePoolBaseType,
|
|
6653
|
+
referencePoolQuoteType
|
|
6629
6654
|
};
|
|
6630
6655
|
}
|
|
6656
|
+
addDeepPricePoint(txb, swapData) {
|
|
6657
|
+
txb.moveCall({
|
|
6658
|
+
target: `${swapData.publishedAt}::deepbookv3::add_deep_price_point`,
|
|
6659
|
+
typeArguments: [
|
|
6660
|
+
swapData.coinAType,
|
|
6661
|
+
swapData.coinBType,
|
|
6662
|
+
swapData.referencePoolBaseType,
|
|
6663
|
+
swapData.referencePoolQuoteType
|
|
6664
|
+
],
|
|
6665
|
+
arguments: [
|
|
6666
|
+
txb.object(swapData.poolId),
|
|
6667
|
+
txb.object(swapData.referencePoolId),
|
|
6668
|
+
txb.object(SUI_CLOCK_OBJECT_ID)
|
|
6669
|
+
]
|
|
6670
|
+
});
|
|
6671
|
+
}
|
|
6631
6672
|
executeSwapContract(txb, swapData, swapContext, _extends) {
|
|
6632
6673
|
const deepCoin = (_extends == null ? void 0 : _extends.deepbookv3DeepFee) || txb.moveCall({
|
|
6633
6674
|
target: "0x2::coin::zero",
|
|
@@ -6815,7 +6856,7 @@ var ScallopRouter = class {
|
|
|
6815
6856
|
if (path.extendedDetails == null) {
|
|
6816
6857
|
throw new Error("Extended details not supported");
|
|
6817
6858
|
}
|
|
6818
|
-
const scallopScoinTreasury = path.extendedDetails.
|
|
6859
|
+
const scallopScoinTreasury = path.extendedDetails.scallop_scoin_treasury;
|
|
6819
6860
|
if (scallopScoinTreasury == null) {
|
|
6820
6861
|
throw new Error("Scallop scoin treasury not supported");
|
|
6821
6862
|
}
|
|
@@ -9382,7 +9423,7 @@ var _AggregatorClient = class _AggregatorClient {
|
|
|
9382
9423
|
const coinA = direction ? fromCoin : targetCoin;
|
|
9383
9424
|
const coinB = direction ? targetCoin : fromCoin;
|
|
9384
9425
|
const typeArguments = [coinA, coinB];
|
|
9385
|
-
const integratePublishedAt = this.env === 0 /* Mainnet */ ? "
|
|
9426
|
+
const integratePublishedAt = this.env === 0 /* Mainnet */ ? "0xfbb32ac0fa89a3cb0c56c745b688c6d2a53ac8e43447119ad822763997ffb9c3" : "0xab2d58dd28ff0dc19b18ab2c634397b785a38c342a8f5065ade5f53f9dbffa1c";
|
|
9386
9427
|
for (let i = 0; i < pools.length; i++) {
|
|
9387
9428
|
const args = [
|
|
9388
9429
|
tx.object(pools[i]),
|
|
@@ -9444,6 +9485,8 @@ var _AggregatorClient = class _AggregatorClient {
|
|
|
9444
9485
|
const pureAmountIn = new import_bn6.default((_b = event.amount_in) != null ? _b : 0);
|
|
9445
9486
|
const feeAmount = new import_bn6.default((_c = event.fee_amount) != null ? _c : 0);
|
|
9446
9487
|
const amountIn = pureAmountIn.add(feeAmount);
|
|
9488
|
+
const cetusRouterV3PublishedAt = this.env === 0 /* Mainnet */ ? MAINNET_CETUS_V3_PUBLISHED_AT : TESTNET_CETUS_V3_PUBLISHED_AT;
|
|
9489
|
+
const aggregatorV3PublishedAt = this.env === 0 /* Mainnet */ ? AGGREGATOR_V3_CONFIG.DEFAULT_PUBLISHED_AT.Mainnet : AGGREGATOR_V3_CONFIG.DEFAULT_PUBLISHED_AT.Testnet;
|
|
9447
9490
|
const routeData = {
|
|
9448
9491
|
amountIn,
|
|
9449
9492
|
amountOut: new import_bn6.default((_d = event.amount_out) != null ? _d : 0),
|
|
@@ -9458,7 +9501,7 @@ var _AggregatorClient = class _AggregatorClient {
|
|
|
9458
9501
|
feeRate,
|
|
9459
9502
|
amountIn: amountIn.toString(),
|
|
9460
9503
|
amountOut: event.amount_out,
|
|
9461
|
-
publishedAt:
|
|
9504
|
+
publishedAt: cetusRouterV3PublishedAt,
|
|
9462
9505
|
extendedDetails: {
|
|
9463
9506
|
afterSqrtPrice: event.after_sqrt_price
|
|
9464
9507
|
}
|
|
@@ -9470,7 +9513,7 @@ var _AggregatorClient = class _AggregatorClient {
|
|
|
9470
9513
|
packages: /* @__PURE__ */ new Map([
|
|
9471
9514
|
[
|
|
9472
9515
|
PACKAGE_NAMES.AGGREGATOR_V3,
|
|
9473
|
-
|
|
9516
|
+
aggregatorV3PublishedAt
|
|
9474
9517
|
]
|
|
9475
9518
|
])
|
|
9476
9519
|
};
|
|
@@ -9604,4 +9647,4 @@ decimal.js/decimal.mjs:
|
|
|
9604
9647
|
*)
|
|
9605
9648
|
*/
|
|
9606
9649
|
|
|
9607
|
-
export { AFSUI, AFTERMATH, AFTERMATH_AMM, AFTERMATH_MODULE, AGGREGATOR, AGGREGATOR_V3_CONFIG, ALL_DEXES, ALPHAFI, AggregatorClient, AggregatorConfig, AggregatorError, AggregatorServerErrorCode, BLUEFIN, BLUEMOVE, CETUS, CETUSDLMM, CETUS_DEX, CETUS_MODULE, CETUS_PUBLISHED_AT,
|
|
9650
|
+
export { AFSUI, AFTERMATH, AFTERMATH_AMM, AFTERMATH_MODULE, AGGREGATOR, AGGREGATOR_V3_CONFIG, ALL_DEXES, ALPHAFI, AggregatorClient, AggregatorConfig, AggregatorError, AggregatorServerErrorCode, BLUEFIN, BLUEMOVE, 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, 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, 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, exportToCSV, exportToJSON, extractAddressFromType, extractGasMetrics, extractStructTagFromType, extractTimestampFromDowngradeUuid6, fixSuiObjectId, formatGasMetrics, generateDowngradeUuid6, generateSimpleDowngradeUuid6, getAggregatorServerErrorMessage, getAggregatorV2Extend2PublishedAt, getAggregatorV2ExtendPublishedAt, getAggregatorV2PublishedAt, getAllProviders, getDeepbookV3Config, getDefaultSuiInputType, getMergeSwapResult, getOrCreateAccountCap, getProvidersExcluding, getProvidersIncluding, getRouterResult, isSortedSymbols, isValidDowngradeUuid6, mintZeroCoin, normalizeCoinType, parseAftermathFeeType, parseTurbosPoolFeeType, patchFixSuiObjectId, printTransaction, processEndpoint, processFlattenRoutes, restituteMsafeFastRouterSwapParams };
|