@cetusprotocol/aggregator-sdk 1.6.0 → 1.6.2
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/README.md +88 -10
- package/dist/index.cjs +271 -40
- package/dist/index.d.cts +52 -30
- package/dist/index.d.ts +52 -30
- package/dist/index.js +271 -41
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -15,45 +15,25 @@ interface FindRouterParams {
|
|
|
15
15
|
splitFactor?: number;
|
|
16
16
|
splitCount?: number;
|
|
17
17
|
providers?: string[];
|
|
18
|
+
pythAvailabilityCheckInterval?: number;
|
|
18
19
|
liquidityChanges?: PreSwapLpChangeParams[];
|
|
19
20
|
}
|
|
20
21
|
interface MergeSwapFromCoin {
|
|
21
22
|
coinType: string;
|
|
22
23
|
amount: BN | string | number | bigint;
|
|
23
24
|
}
|
|
24
|
-
interface MergeSwapFromCoin {
|
|
25
|
-
coinType: string;
|
|
26
|
-
amount: BN | string | number | bigint;
|
|
27
|
-
}
|
|
28
|
-
interface MergeSwapParams {
|
|
29
|
-
target: string;
|
|
30
|
-
byAmountIn: boolean;
|
|
31
|
-
depth?: number;
|
|
32
|
-
providers?: string[];
|
|
33
|
-
froms: MergeSwapFromCoin[];
|
|
34
|
-
}
|
|
35
25
|
interface MergeSwapParams {
|
|
36
26
|
target: string;
|
|
37
27
|
byAmountIn: boolean;
|
|
38
28
|
depth?: number;
|
|
39
29
|
providers?: string[];
|
|
30
|
+
pythAvailabilityCheckInterval?: number;
|
|
40
31
|
froms: MergeSwapFromCoin[];
|
|
41
32
|
}
|
|
42
33
|
interface MergeSwapInputCoin {
|
|
43
34
|
coinType: string;
|
|
44
35
|
coin: TransactionObjectArgument;
|
|
45
36
|
}
|
|
46
|
-
interface MergeSwapInputCoin {
|
|
47
|
-
coinType: string;
|
|
48
|
-
coin: TransactionObjectArgument;
|
|
49
|
-
}
|
|
50
|
-
interface BuildMergeSwapParams {
|
|
51
|
-
router: MergeSwapRouterData;
|
|
52
|
-
inputCoins: MergeSwapInputCoin[];
|
|
53
|
-
slippage: number;
|
|
54
|
-
txb: Transaction;
|
|
55
|
-
partner?: string;
|
|
56
|
-
}
|
|
57
37
|
interface BuildMergeSwapParams {
|
|
58
38
|
router: MergeSwapRouterData;
|
|
59
39
|
inputCoins: MergeSwapInputCoin[];
|
|
@@ -67,13 +47,7 @@ interface BuildFastMergeSwapParams {
|
|
|
67
47
|
txb: Transaction;
|
|
68
48
|
partner?: string;
|
|
69
49
|
payDeepFeeAmount?: number;
|
|
70
|
-
|
|
71
|
-
interface BuildFastMergeSwapParams {
|
|
72
|
-
router: MergeSwapRouterData;
|
|
73
|
-
slippage: number;
|
|
74
|
-
txb: Transaction;
|
|
75
|
-
partner?: string;
|
|
76
|
-
payDeepFeeAmount?: number;
|
|
50
|
+
sponsored?: boolean;
|
|
77
51
|
}
|
|
78
52
|
interface PreSwapLpChangeParams {
|
|
79
53
|
poolID: string;
|
|
@@ -305,9 +279,19 @@ interface PriceTableInfo {
|
|
|
305
279
|
id: ObjectId;
|
|
306
280
|
fieldType: string;
|
|
307
281
|
}
|
|
282
|
+
interface PythAvailabilitySnapshot {
|
|
283
|
+
checked: boolean;
|
|
284
|
+
availableUrls: string[];
|
|
285
|
+
unavailableUrls: string[];
|
|
286
|
+
}
|
|
287
|
+
interface PythAvailabilityOptions {
|
|
288
|
+
timeout?: number;
|
|
289
|
+
isAvailableStatus?: (status: number) => boolean;
|
|
290
|
+
}
|
|
308
291
|
declare class PythAdapter {
|
|
309
292
|
private client;
|
|
310
293
|
private hermesClients;
|
|
294
|
+
private hermesUrls;
|
|
311
295
|
private pythStateId;
|
|
312
296
|
private wormholeStateId;
|
|
313
297
|
private pythPackageId;
|
|
@@ -316,6 +300,9 @@ declare class PythAdapter {
|
|
|
316
300
|
private priceFeedObjectIdCache;
|
|
317
301
|
private baseUpdateFee;
|
|
318
302
|
constructor(client: SuiGrpcClient, pythStateId: ObjectId, wormholeStateId: ObjectId, hermesUrls: string[]);
|
|
303
|
+
getHermesUrls(): string[];
|
|
304
|
+
checkHermesAvailability({ timeout, isAvailableStatus, }?: PythAvailabilityOptions): Promise<PythAvailabilitySnapshot>;
|
|
305
|
+
isHermesAvailable(options?: PythAvailabilityOptions): Promise<boolean>;
|
|
319
306
|
getPriceFeedsUpdateData(priceIDs: string[]): Promise<Buffer[]>;
|
|
320
307
|
getBaseUpdateFee(): Promise<number>;
|
|
321
308
|
getPackageId(objectId: ObjectId): Promise<string>;
|
|
@@ -368,6 +355,7 @@ declare const MAGMAPROPAMM = "MAGMAPROPAMM";
|
|
|
368
355
|
declare const HAEDALPROPAMM = "HAEDALPROPAMM";
|
|
369
356
|
declare const DEFAULT_ENDPOINT = "https://api-sui.cetus.zone/router_v3";
|
|
370
357
|
declare const ALL_DEXES: string[];
|
|
358
|
+
declare const PYTH_ORACLE_BASED_DEXES: string[];
|
|
371
359
|
type BuildRouterSwapParamsV3 = {
|
|
372
360
|
router: RouterDataV3;
|
|
373
361
|
inputCoin: TransactionObjectArgument;
|
|
@@ -386,6 +374,19 @@ type BuildFastRouterSwapParamsV3 = {
|
|
|
386
374
|
cetusDlmmPartner?: string;
|
|
387
375
|
refreshAllCoins?: boolean;
|
|
388
376
|
payDeepFeeAmount?: number;
|
|
377
|
+
sponsored?: boolean;
|
|
378
|
+
};
|
|
379
|
+
type BuildSponsoredTransactionParams = {
|
|
380
|
+
txKindBytes: Uint8Array | string;
|
|
381
|
+
sender: string;
|
|
382
|
+
sponsor: string;
|
|
383
|
+
sponsorCoins: {
|
|
384
|
+
objectId: string;
|
|
385
|
+
version: string | number;
|
|
386
|
+
digest: string;
|
|
387
|
+
}[];
|
|
388
|
+
gasBudget?: number | bigint | string;
|
|
389
|
+
gasPrice?: number | bigint | string;
|
|
389
390
|
};
|
|
390
391
|
interface SwapInPoolsParams {
|
|
391
392
|
from: string;
|
|
@@ -422,6 +423,7 @@ type AggregatorClientParams = {
|
|
|
422
423
|
overlayFeeRate?: number;
|
|
423
424
|
overlayFeeReceiver?: string;
|
|
424
425
|
cetusDlmmPartner?: string;
|
|
426
|
+
pythAvailabilityCheckInterval?: number;
|
|
425
427
|
};
|
|
426
428
|
declare class AggregatorClient {
|
|
427
429
|
endpoint: string;
|
|
@@ -434,6 +436,10 @@ declare class AggregatorClient {
|
|
|
434
436
|
protected overlayFeeReceiver: string;
|
|
435
437
|
protected partner?: string;
|
|
436
438
|
protected cetusDlmmPartner?: string;
|
|
439
|
+
private pythAvailabilityCheckInterval?;
|
|
440
|
+
private pythAvailabilityCheckedAt?;
|
|
441
|
+
private pythAvailable?;
|
|
442
|
+
private pythAvailabilityPromise?;
|
|
437
443
|
private static readonly CONFIG;
|
|
438
444
|
constructor(params: AggregatorClientParams);
|
|
439
445
|
deepbookv3DeepFeeType(): string;
|
|
@@ -441,6 +447,8 @@ declare class AggregatorClient {
|
|
|
441
447
|
getOneCoinUsedToMerge(coinType: string): Promise<string | null>;
|
|
442
448
|
findRouters(params: FindRouterParams): Promise<RouterDataV3 | null>;
|
|
443
449
|
findMergeSwapRouters(params: MergeSwapParams): Promise<MergeSwapRouterData | null>;
|
|
450
|
+
private filterProvidersByPythAvailability;
|
|
451
|
+
private getPythAvailability;
|
|
444
452
|
executeFlexibleInputSwap(txb: Transaction, inputCoin: TransactionObjectArgument, routerData: RouterDataV3, expectedAmountOut: string, amountLimit: string, pythPriceIDs: Map<string, string>, partner?: string, deepbookv3DeepFee?: TransactionObjectArgument, packages?: Map<string, string>): Promise<void>;
|
|
445
453
|
newDexRouterV3(provider: string, pythPriceIDs: Map<string, string>, partner?: string, cetusDlmmPartner?: string): DexRouter;
|
|
446
454
|
expectInputSwapV3(txb: Transaction, inputCoin: TransactionObjectArgument, routerData: RouterDataV3, expectAmountOut: string, amountOutLimit: string, pythPriceIDs: Map<string, string>, partner?: string, cetusDlmmPartner?: string): TransactionObjectArgument;
|
|
@@ -463,6 +471,7 @@ declare class AggregatorClient {
|
|
|
463
471
|
maxAmountIn: BN;
|
|
464
472
|
}): Promise<TransactionObjectArgument>;
|
|
465
473
|
fastRouterSwap(params: BuildFastRouterSwapParamsV3): Promise<void>;
|
|
474
|
+
private deliverTargetCoin;
|
|
466
475
|
mergeSwap(params: BuildMergeSwapParams): Promise<TransactionObjectArgument>;
|
|
467
476
|
fastMergeSwap(params: BuildFastMergeSwapParams): Promise<void>;
|
|
468
477
|
fixableRouterSwapV3(params: BuildRouterSwapParamsV3): Promise<TransactionObjectArgument>;
|
|
@@ -477,6 +486,19 @@ declare class AggregatorClient {
|
|
|
477
486
|
events: true;
|
|
478
487
|
balanceChanges: true;
|
|
479
488
|
}>>;
|
|
489
|
+
buildTransactionKind(txb: Transaction, sender?: string): Promise<Uint8Array>;
|
|
490
|
+
buildSponsoredTransaction(params: BuildSponsoredTransactionParams): Transaction;
|
|
491
|
+
buildTransactionBytes(txb: Transaction): Promise<Uint8Array>;
|
|
492
|
+
executeWithSignatures(bytes: Uint8Array, signatures: string[]): Promise<_mysten_sui_client.SuiClientTypes.TransactionResult<{
|
|
493
|
+
effects: true;
|
|
494
|
+
events: true;
|
|
495
|
+
balanceChanges: true;
|
|
496
|
+
}>>;
|
|
497
|
+
signAndExecuteSponsoredTransaction(txb: Transaction, userSigner: Signer, sponsorSigner: Signer): Promise<_mysten_sui_client.SuiClientTypes.TransactionResult<{
|
|
498
|
+
effects: true;
|
|
499
|
+
events: true;
|
|
500
|
+
balanceChanges: true;
|
|
501
|
+
}>>;
|
|
480
502
|
}
|
|
481
503
|
|
|
482
504
|
/**
|
|
@@ -1177,4 +1199,4 @@ declare class CoinUtils {
|
|
|
1177
1199
|
static calculateTotalBalance(coins: CoinAsset[]): bigint;
|
|
1178
1200
|
}
|
|
1179
1201
|
|
|
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 };
|
|
1202
|
+
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, type BuildSponsoredTransactionParams, 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_ORACLE_BASED_DEXES, 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
|
@@ -15,45 +15,25 @@ interface FindRouterParams {
|
|
|
15
15
|
splitFactor?: number;
|
|
16
16
|
splitCount?: number;
|
|
17
17
|
providers?: string[];
|
|
18
|
+
pythAvailabilityCheckInterval?: number;
|
|
18
19
|
liquidityChanges?: PreSwapLpChangeParams[];
|
|
19
20
|
}
|
|
20
21
|
interface MergeSwapFromCoin {
|
|
21
22
|
coinType: string;
|
|
22
23
|
amount: BN | string | number | bigint;
|
|
23
24
|
}
|
|
24
|
-
interface MergeSwapFromCoin {
|
|
25
|
-
coinType: string;
|
|
26
|
-
amount: BN | string | number | bigint;
|
|
27
|
-
}
|
|
28
|
-
interface MergeSwapParams {
|
|
29
|
-
target: string;
|
|
30
|
-
byAmountIn: boolean;
|
|
31
|
-
depth?: number;
|
|
32
|
-
providers?: string[];
|
|
33
|
-
froms: MergeSwapFromCoin[];
|
|
34
|
-
}
|
|
35
25
|
interface MergeSwapParams {
|
|
36
26
|
target: string;
|
|
37
27
|
byAmountIn: boolean;
|
|
38
28
|
depth?: number;
|
|
39
29
|
providers?: string[];
|
|
30
|
+
pythAvailabilityCheckInterval?: number;
|
|
40
31
|
froms: MergeSwapFromCoin[];
|
|
41
32
|
}
|
|
42
33
|
interface MergeSwapInputCoin {
|
|
43
34
|
coinType: string;
|
|
44
35
|
coin: TransactionObjectArgument;
|
|
45
36
|
}
|
|
46
|
-
interface MergeSwapInputCoin {
|
|
47
|
-
coinType: string;
|
|
48
|
-
coin: TransactionObjectArgument;
|
|
49
|
-
}
|
|
50
|
-
interface BuildMergeSwapParams {
|
|
51
|
-
router: MergeSwapRouterData;
|
|
52
|
-
inputCoins: MergeSwapInputCoin[];
|
|
53
|
-
slippage: number;
|
|
54
|
-
txb: Transaction;
|
|
55
|
-
partner?: string;
|
|
56
|
-
}
|
|
57
37
|
interface BuildMergeSwapParams {
|
|
58
38
|
router: MergeSwapRouterData;
|
|
59
39
|
inputCoins: MergeSwapInputCoin[];
|
|
@@ -67,13 +47,7 @@ interface BuildFastMergeSwapParams {
|
|
|
67
47
|
txb: Transaction;
|
|
68
48
|
partner?: string;
|
|
69
49
|
payDeepFeeAmount?: number;
|
|
70
|
-
|
|
71
|
-
interface BuildFastMergeSwapParams {
|
|
72
|
-
router: MergeSwapRouterData;
|
|
73
|
-
slippage: number;
|
|
74
|
-
txb: Transaction;
|
|
75
|
-
partner?: string;
|
|
76
|
-
payDeepFeeAmount?: number;
|
|
50
|
+
sponsored?: boolean;
|
|
77
51
|
}
|
|
78
52
|
interface PreSwapLpChangeParams {
|
|
79
53
|
poolID: string;
|
|
@@ -305,9 +279,19 @@ interface PriceTableInfo {
|
|
|
305
279
|
id: ObjectId;
|
|
306
280
|
fieldType: string;
|
|
307
281
|
}
|
|
282
|
+
interface PythAvailabilitySnapshot {
|
|
283
|
+
checked: boolean;
|
|
284
|
+
availableUrls: string[];
|
|
285
|
+
unavailableUrls: string[];
|
|
286
|
+
}
|
|
287
|
+
interface PythAvailabilityOptions {
|
|
288
|
+
timeout?: number;
|
|
289
|
+
isAvailableStatus?: (status: number) => boolean;
|
|
290
|
+
}
|
|
308
291
|
declare class PythAdapter {
|
|
309
292
|
private client;
|
|
310
293
|
private hermesClients;
|
|
294
|
+
private hermesUrls;
|
|
311
295
|
private pythStateId;
|
|
312
296
|
private wormholeStateId;
|
|
313
297
|
private pythPackageId;
|
|
@@ -316,6 +300,9 @@ declare class PythAdapter {
|
|
|
316
300
|
private priceFeedObjectIdCache;
|
|
317
301
|
private baseUpdateFee;
|
|
318
302
|
constructor(client: SuiGrpcClient, pythStateId: ObjectId, wormholeStateId: ObjectId, hermesUrls: string[]);
|
|
303
|
+
getHermesUrls(): string[];
|
|
304
|
+
checkHermesAvailability({ timeout, isAvailableStatus, }?: PythAvailabilityOptions): Promise<PythAvailabilitySnapshot>;
|
|
305
|
+
isHermesAvailable(options?: PythAvailabilityOptions): Promise<boolean>;
|
|
319
306
|
getPriceFeedsUpdateData(priceIDs: string[]): Promise<Buffer[]>;
|
|
320
307
|
getBaseUpdateFee(): Promise<number>;
|
|
321
308
|
getPackageId(objectId: ObjectId): Promise<string>;
|
|
@@ -368,6 +355,7 @@ declare const MAGMAPROPAMM = "MAGMAPROPAMM";
|
|
|
368
355
|
declare const HAEDALPROPAMM = "HAEDALPROPAMM";
|
|
369
356
|
declare const DEFAULT_ENDPOINT = "https://api-sui.cetus.zone/router_v3";
|
|
370
357
|
declare const ALL_DEXES: string[];
|
|
358
|
+
declare const PYTH_ORACLE_BASED_DEXES: string[];
|
|
371
359
|
type BuildRouterSwapParamsV3 = {
|
|
372
360
|
router: RouterDataV3;
|
|
373
361
|
inputCoin: TransactionObjectArgument;
|
|
@@ -386,6 +374,19 @@ type BuildFastRouterSwapParamsV3 = {
|
|
|
386
374
|
cetusDlmmPartner?: string;
|
|
387
375
|
refreshAllCoins?: boolean;
|
|
388
376
|
payDeepFeeAmount?: number;
|
|
377
|
+
sponsored?: boolean;
|
|
378
|
+
};
|
|
379
|
+
type BuildSponsoredTransactionParams = {
|
|
380
|
+
txKindBytes: Uint8Array | string;
|
|
381
|
+
sender: string;
|
|
382
|
+
sponsor: string;
|
|
383
|
+
sponsorCoins: {
|
|
384
|
+
objectId: string;
|
|
385
|
+
version: string | number;
|
|
386
|
+
digest: string;
|
|
387
|
+
}[];
|
|
388
|
+
gasBudget?: number | bigint | string;
|
|
389
|
+
gasPrice?: number | bigint | string;
|
|
389
390
|
};
|
|
390
391
|
interface SwapInPoolsParams {
|
|
391
392
|
from: string;
|
|
@@ -422,6 +423,7 @@ type AggregatorClientParams = {
|
|
|
422
423
|
overlayFeeRate?: number;
|
|
423
424
|
overlayFeeReceiver?: string;
|
|
424
425
|
cetusDlmmPartner?: string;
|
|
426
|
+
pythAvailabilityCheckInterval?: number;
|
|
425
427
|
};
|
|
426
428
|
declare class AggregatorClient {
|
|
427
429
|
endpoint: string;
|
|
@@ -434,6 +436,10 @@ declare class AggregatorClient {
|
|
|
434
436
|
protected overlayFeeReceiver: string;
|
|
435
437
|
protected partner?: string;
|
|
436
438
|
protected cetusDlmmPartner?: string;
|
|
439
|
+
private pythAvailabilityCheckInterval?;
|
|
440
|
+
private pythAvailabilityCheckedAt?;
|
|
441
|
+
private pythAvailable?;
|
|
442
|
+
private pythAvailabilityPromise?;
|
|
437
443
|
private static readonly CONFIG;
|
|
438
444
|
constructor(params: AggregatorClientParams);
|
|
439
445
|
deepbookv3DeepFeeType(): string;
|
|
@@ -441,6 +447,8 @@ declare class AggregatorClient {
|
|
|
441
447
|
getOneCoinUsedToMerge(coinType: string): Promise<string | null>;
|
|
442
448
|
findRouters(params: FindRouterParams): Promise<RouterDataV3 | null>;
|
|
443
449
|
findMergeSwapRouters(params: MergeSwapParams): Promise<MergeSwapRouterData | null>;
|
|
450
|
+
private filterProvidersByPythAvailability;
|
|
451
|
+
private getPythAvailability;
|
|
444
452
|
executeFlexibleInputSwap(txb: Transaction, inputCoin: TransactionObjectArgument, routerData: RouterDataV3, expectedAmountOut: string, amountLimit: string, pythPriceIDs: Map<string, string>, partner?: string, deepbookv3DeepFee?: TransactionObjectArgument, packages?: Map<string, string>): Promise<void>;
|
|
445
453
|
newDexRouterV3(provider: string, pythPriceIDs: Map<string, string>, partner?: string, cetusDlmmPartner?: string): DexRouter;
|
|
446
454
|
expectInputSwapV3(txb: Transaction, inputCoin: TransactionObjectArgument, routerData: RouterDataV3, expectAmountOut: string, amountOutLimit: string, pythPriceIDs: Map<string, string>, partner?: string, cetusDlmmPartner?: string): TransactionObjectArgument;
|
|
@@ -463,6 +471,7 @@ declare class AggregatorClient {
|
|
|
463
471
|
maxAmountIn: BN;
|
|
464
472
|
}): Promise<TransactionObjectArgument>;
|
|
465
473
|
fastRouterSwap(params: BuildFastRouterSwapParamsV3): Promise<void>;
|
|
474
|
+
private deliverTargetCoin;
|
|
466
475
|
mergeSwap(params: BuildMergeSwapParams): Promise<TransactionObjectArgument>;
|
|
467
476
|
fastMergeSwap(params: BuildFastMergeSwapParams): Promise<void>;
|
|
468
477
|
fixableRouterSwapV3(params: BuildRouterSwapParamsV3): Promise<TransactionObjectArgument>;
|
|
@@ -477,6 +486,19 @@ declare class AggregatorClient {
|
|
|
477
486
|
events: true;
|
|
478
487
|
balanceChanges: true;
|
|
479
488
|
}>>;
|
|
489
|
+
buildTransactionKind(txb: Transaction, sender?: string): Promise<Uint8Array>;
|
|
490
|
+
buildSponsoredTransaction(params: BuildSponsoredTransactionParams): Transaction;
|
|
491
|
+
buildTransactionBytes(txb: Transaction): Promise<Uint8Array>;
|
|
492
|
+
executeWithSignatures(bytes: Uint8Array, signatures: string[]): Promise<_mysten_sui_client.SuiClientTypes.TransactionResult<{
|
|
493
|
+
effects: true;
|
|
494
|
+
events: true;
|
|
495
|
+
balanceChanges: true;
|
|
496
|
+
}>>;
|
|
497
|
+
signAndExecuteSponsoredTransaction(txb: Transaction, userSigner: Signer, sponsorSigner: Signer): Promise<_mysten_sui_client.SuiClientTypes.TransactionResult<{
|
|
498
|
+
effects: true;
|
|
499
|
+
events: true;
|
|
500
|
+
balanceChanges: true;
|
|
501
|
+
}>>;
|
|
480
502
|
}
|
|
481
503
|
|
|
482
504
|
/**
|
|
@@ -1177,4 +1199,4 @@ declare class CoinUtils {
|
|
|
1177
1199
|
static calculateTotalBalance(coins: CoinAsset[]): bigint;
|
|
1178
1200
|
}
|
|
1179
1201
|
|
|
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 };
|
|
1202
|
+
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, type BuildSponsoredTransactionParams, 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_ORACLE_BASED_DEXES, 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 };
|