@minswap/noodles-sdk 0.0.44 → 0.0.46
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/982.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +591 -6
- package/dist/index.js +1 -1
- package/dist/pay.cjs +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
import { Coin } from '@flowx-finance/sdk';
|
|
2
|
+
import type { Coin as Coin_2 } from '@flowx-finance/sdk/src/core';
|
|
2
3
|
import type { CoinStruct } from '@mysten/sui/client';
|
|
3
|
-
import
|
|
4
|
+
import { GetRoutesResult } from '@flowx-finance/sdk';
|
|
4
5
|
import { MemezPumpSDK } from '@interest-protocol/memez-fun-sdk';
|
|
5
6
|
import type { MoveStruct } from '@mysten/sui/client';
|
|
7
|
+
import { Path } from '@cetusprotocol/aggregator-sdk';
|
|
8
|
+
import { Protocol } from '@flowx-finance/sdk';
|
|
6
9
|
import type { Quote } from '@naviprotocol/astros-aggregator-sdk';
|
|
7
|
-
import
|
|
10
|
+
import { QuoteResponse } from '@bluefin-exchange/bluefin7k-aggregator-sdk';
|
|
11
|
+
import type { Route } from '@flowx-finance/sdk/src/universal-router/entities';
|
|
8
12
|
import type { RouterCompleteTradeRoute } from 'aftermath-ts-sdk';
|
|
9
|
-
import
|
|
13
|
+
import { RouterDataV3 } from '@cetusprotocol/aggregator-sdk';
|
|
14
|
+
import { SourceDex } from '@bluefin-exchange/bluefin7k-aggregator-sdk';
|
|
10
15
|
import { SuiClient } from '@mysten/sui/client';
|
|
16
|
+
import { SuiPriceServiceConnection } from '@pythnetwork/pyth-sui-js';
|
|
17
|
+
import { SuiPythClient } from '@pythnetwork/pyth-sui-js';
|
|
11
18
|
import { Transaction } from '@mysten/sui/transactions';
|
|
12
19
|
import type { TransactionArgument } from '@mysten/sui/transactions';
|
|
13
20
|
import { TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
14
21
|
import { TransactionResult } from '@mysten/sui/transactions';
|
|
22
|
+
import type { TxSorSwap } from '@bluefin-exchange/bluefin7k-aggregator-sdk';
|
|
15
23
|
|
|
16
24
|
/**
|
|
17
25
|
* Adapter to make SuiClient v1.38 compatible with libraries expecting v1.34
|
|
@@ -131,6 +139,32 @@ export declare type AftermathAggregatorConfig = {
|
|
|
131
139
|
aftermathApiEndpoint?: string;
|
|
132
140
|
};
|
|
133
141
|
|
|
142
|
+
export declare namespace AftermathCpmm {
|
|
143
|
+
const POOL_REGISTRY_OBJ_ID = "0xfcc774493db2c45c79f688f88d28023a3e7d98e4ee9f48bbf5c7990f651577ae";
|
|
144
|
+
const PROTOCOL_FEE_VAULT_OBJ_ID = "0xf194d9b1bcad972e45a7dd67dd49b3ee1e3357a00a50850c52cd51bb450e13b4";
|
|
145
|
+
const TREASURY_OBJ_ID = "0x28e499dff5e864a2eafe476269a4f5035f1c16f338da7be18b103499abf271ce";
|
|
146
|
+
const INSURANCE_FUND_OBJ_ID = "0xf0c40d67b078000e18032334c3325c47b9ec9f3d9ae4128be820d54663d14e3b";
|
|
147
|
+
const REFERRAL_VAULT_OBJ_ID = "0x35d35b0e5b177593d8c3a801462485572fc30861e6ce96a55af6dc4730709278";
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export declare namespace AftermathLsd {
|
|
151
|
+
const STAKED_SUI_VAULT_OBJ_ID = "0x2f8f6d5da7f13ea37daa397724280483ed062769813b6f31e9788e59cc88994d";
|
|
152
|
+
const SAFE_TREASURY_OBJECT_ID = "0xeb685899830dd5837b47007809c76d91a098d52aabbf61e8ac467c59e5cc4610";
|
|
153
|
+
const REFERRAL_VAULT_OBJ_ID = "0x4ce9a19b594599536c53edb25d22532f82f18038dc8ef618afd00fbbfb9845ef";
|
|
154
|
+
const VALIDATOR_ADDRESS = "0xd30018ec3f5ff1a3c75656abf927a87d7f0529e6dc89c7ddd1bd27ecb05e3db2";
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export declare namespace AggregatorConverter {
|
|
158
|
+
export function toMetaAggregatorBuildTxParams(param: {
|
|
159
|
+
buildTxParam: BuildTxFromRawRouteParams;
|
|
160
|
+
rawRouteParam: RawRouteParams;
|
|
161
|
+
}): MetaAggregator.BuildAggregatorSwapTransactionParam;
|
|
162
|
+
export function buildTx(param: {
|
|
163
|
+
buildTxParam: BuildTxFromRawRouteParams;
|
|
164
|
+
rawRouteParam: RawRouteParams;
|
|
165
|
+
}): Promise<TransactionObjectArgument>;
|
|
166
|
+
}
|
|
167
|
+
|
|
134
168
|
/**
|
|
135
169
|
* Main aggregator module that provides unified access to multiple DEX aggregators
|
|
136
170
|
* Supports routing trades through Cetus, FlowX, Astros, Aftermath, and 7K Protocol
|
|
@@ -216,6 +250,52 @@ export declare class AggregatorModule implements IModule {
|
|
|
216
250
|
} | null>;
|
|
217
251
|
}
|
|
218
252
|
|
|
253
|
+
export declare enum AggregatorProtocol {
|
|
254
|
+
AFTERMATH_CPMM = "aftermath_cpmm",
|
|
255
|
+
AFTERMATH_LSD = "aftermath_lsd",
|
|
256
|
+
ALPHAFI_LSD = "alphafi_lsd",
|
|
257
|
+
BLASTFUN = "blastfun",
|
|
258
|
+
BLUEFIN_CLMM = "bluefin_clmm",
|
|
259
|
+
BLUEMOVE_CPMM = "bluemove_cpmm",
|
|
260
|
+
BOLT = "bolt",
|
|
261
|
+
CETUS_CLMM = "cetus_clmm",
|
|
262
|
+
CETUS_DLMM = "cetus_dlmm",
|
|
263
|
+
DEEPBOOK_V3 = "deepbook_v3",
|
|
264
|
+
DIP_CPMM = "dip_cpmm",
|
|
265
|
+
FLOWX_CPMM = "flowx_cpmm",
|
|
266
|
+
FLOWX_CLMM = "flowx_clmm",
|
|
267
|
+
FULLSAIL_CLMM = "fullsail_clmm",
|
|
268
|
+
FERRA_CLMM = "ferra_clmm",
|
|
269
|
+
FERRA_DLMM = "ferra_dlmm",
|
|
270
|
+
HAEDAL_CPMM = "haedal_cpmm",
|
|
271
|
+
HAEDAL_CPMM_V2 = "haedal_cpmm_v2",
|
|
272
|
+
HAEDAL_LSD = "haedal_lsd",
|
|
273
|
+
HAEDAL_LSD_WAL = "haedal_lsd_wal",
|
|
274
|
+
KRIYA_CLMM = "kriya_clmm",
|
|
275
|
+
KRIYA_CPMM = "kriya_cpmm",
|
|
276
|
+
MAGMA_ALMM = "magma_almm",
|
|
277
|
+
MAGMA_CLMM = "magma_clmm",
|
|
278
|
+
METASTABLE = "metastable",
|
|
279
|
+
MOMENTUM_CLMM = "momentum_clmm",
|
|
280
|
+
MOVEPUMP = "movepump",
|
|
281
|
+
OBRIC = "obric",
|
|
282
|
+
SCALLOP = "scallop",
|
|
283
|
+
SEVENK_CPMM = "sevenk_cpmm",
|
|
284
|
+
SEVENK_FUN = "sevenk_fun",
|
|
285
|
+
SPRINGSUI = "springsui",
|
|
286
|
+
SRM_CPMM = "srm_cpmm",
|
|
287
|
+
STEAMM_CPMM = "steamm_cpmm",
|
|
288
|
+
SUISWAP_CPMM = "suiswap_cpmm",
|
|
289
|
+
STEAMM_OMM = "steamm_omm",
|
|
290
|
+
STEAMM_OMM_V2 = "steamm_omm_v2",
|
|
291
|
+
TRADEPORT_CLMM = "tradeport_clmm",
|
|
292
|
+
TURBOS_CLMM = "turbos_clmm",
|
|
293
|
+
TURBOS_FUN = "turbos_fun",
|
|
294
|
+
VOLO = "volo"
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export declare type AggregatorSwapParam = BaseAggregatorSwapParam & ExtendAggregatorSwapParam;
|
|
298
|
+
|
|
219
299
|
export declare type AggregatorTradeRoute<T extends SupportedAggregator> = AllAggregatorTradeRoute[T];
|
|
220
300
|
|
|
221
301
|
export declare type AllAggregatorTradeRoute = {
|
|
@@ -335,6 +415,21 @@ export declare type BalanceContent = {
|
|
|
335
415
|
|
|
336
416
|
export declare const BASE_BPS = 10000;
|
|
337
417
|
|
|
418
|
+
export declare type BaseAggregatorSwapParam = {
|
|
419
|
+
poolId: string;
|
|
420
|
+
aToB: boolean;
|
|
421
|
+
coinAType: string;
|
|
422
|
+
coinBType: string;
|
|
423
|
+
amountIn: string;
|
|
424
|
+
packageId?: string;
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
export declare namespace Blastfun {
|
|
428
|
+
const MEMEZ_AV_OBJ_ID = "0x2319e3e76dfad73d8f4684bdbf42be4f32d8ce4521dd61becc8261dc918d82c0";
|
|
429
|
+
const MEMEZ_FUN_OBJ_ID = "0x943948644f06942b8b660ca541b10a05f6a7be23ce4069944a3665e7e698930d";
|
|
430
|
+
const IPX_TREASURY_STANDARD_OBJ_ID = "0x051e11b667659192917db94e5175fa066909d4dfc04d2663528f499c4afc6999";
|
|
431
|
+
}
|
|
432
|
+
|
|
338
433
|
export declare namespace BlastFunConstants {
|
|
339
434
|
const PACKAGE_ID_V4 = "0x7e6aa6e179466ab2814425a780b122575296d011119fa69d27f289f5a28814bd";
|
|
340
435
|
const MEMEZ_AV_OBJECT_ID = "0x2319e3e76dfad73d8f4684bdbf42be4f32d8ce4521dd61becc8261dc918d82c0";
|
|
@@ -431,10 +526,22 @@ export declare namespace BlastFunSDKTransaction {
|
|
|
431
526
|
|
|
432
527
|
export declare const BLUEFIN_PACKAGE_ID = "0x62412b7268c35f3808336aee57a52836501f40b8ba5d936f8ad275e672befd04";
|
|
433
528
|
|
|
529
|
+
export declare namespace BluefinClmm {
|
|
530
|
+
const GLOBAL_CONFIG_OBJ_ID = "0x03db251ba509a8d5d8777b6338836082335d93eecbdd09a11e190a1cff51c352";
|
|
531
|
+
}
|
|
532
|
+
|
|
434
533
|
export declare namespace BluefinTx {
|
|
435
534
|
export function transferOrDestroyZeroCoin(tx: Transaction, coinType: string, coin: TransactionArgument, address: string): void;
|
|
436
535
|
}
|
|
437
536
|
|
|
537
|
+
export declare namespace BluemoveCpmm {
|
|
538
|
+
const DEX_INFO_OBJ_ID = "0x3f2d9f724f4a1ce5e71676448dc452be9a6243dac9c5b975a588c8c867066e92";
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
export declare namespace Bolt {
|
|
542
|
+
const ORACLE_OBJ_ID = "0xfa3975b98f3d0e3df18ed88ae6e69db31836b3f4212df02fae144b1e5a89ca8e";
|
|
543
|
+
}
|
|
544
|
+
|
|
438
545
|
/** Sui package ID for the boosting protocol */
|
|
439
546
|
export declare const BOOSTING_PACKAGE_ID = "0x25fa0eb553dd69fa6a8028f73a38f1df7f289fa88a58ed3d7dc5a5360155bb19";
|
|
440
547
|
|
|
@@ -543,6 +650,14 @@ export declare namespace Bps {
|
|
|
543
650
|
export function assertOverflow(bps: number | string | bigint): bigint;
|
|
544
651
|
}
|
|
545
652
|
|
|
653
|
+
export declare type BuildRouterSwapTxFunction = (params: BuildRouterSwapTxParam) => void;
|
|
654
|
+
|
|
655
|
+
export declare type BuildRouterSwapTxParam = {
|
|
656
|
+
txb: Transaction;
|
|
657
|
+
swapContext: TransactionObjectArgument;
|
|
658
|
+
pythInfoObjectIdMap: Map<PythPriceFeedId, PythInfoObjectId>;
|
|
659
|
+
} & AggregatorSwapParam;
|
|
660
|
+
|
|
546
661
|
export declare type BuildSwapTxParams = CommonTxParams & {
|
|
547
662
|
inputAmount: string;
|
|
548
663
|
minAmountOut: string;
|
|
@@ -551,6 +666,20 @@ export declare type BuildSwapTxParams = CommonTxParams & {
|
|
|
551
666
|
poolId: string;
|
|
552
667
|
};
|
|
553
668
|
|
|
669
|
+
declare type BuildTxFromRawRouteParams = {
|
|
670
|
+
tx: Transaction;
|
|
671
|
+
inputCoin: TransactionObjectArgument;
|
|
672
|
+
expectedAmountOut?: string;
|
|
673
|
+
slippageBps?: number;
|
|
674
|
+
aggregatorFeeRate: number;
|
|
675
|
+
aggregatorFeeRecipient: string;
|
|
676
|
+
partnerFeeRate?: number;
|
|
677
|
+
partnerFeeRecipient?: string;
|
|
678
|
+
pythConnections?: SuiPriceServiceConnection[];
|
|
679
|
+
pythClient?: SuiPythClient;
|
|
680
|
+
packageIdMap?: Map<AggregatorProtocol, string>;
|
|
681
|
+
};
|
|
682
|
+
|
|
554
683
|
export declare type BuildTxResult = {
|
|
555
684
|
tx: Transaction;
|
|
556
685
|
coinOut?: TransactionObjectArgument;
|
|
@@ -607,7 +736,9 @@ export declare class CetusAggregator {
|
|
|
607
736
|
* @param params.coinOutType - Type/address of output token
|
|
608
737
|
* @returns Promise resolving to router data with pricing and route information, or null if no route found
|
|
609
738
|
*/
|
|
610
|
-
getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, }: GetTradeRouteRequest_5
|
|
739
|
+
getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, supportedProtocols, }: GetTradeRouteRequest_5 & {
|
|
740
|
+
supportedProtocols?: string[];
|
|
741
|
+
}): Promise<RouterDataV3 | null>;
|
|
611
742
|
/**
|
|
612
743
|
* Builds a transaction for executing a trade route from Cetus aggregator
|
|
613
744
|
* @param params - Transaction parameters
|
|
@@ -637,6 +768,28 @@ export declare type CetusAggregatorConfig = {
|
|
|
637
768
|
cetusPartnerId?: string;
|
|
638
769
|
};
|
|
639
770
|
|
|
771
|
+
export declare namespace CetusAggregatorConverter {
|
|
772
|
+
const SUPPORTED_PROTOCOL_CONSTANTS: readonly ["CETUS", "KRIYA", "FLOWX", "FLOWXV3", "KRIYAV3", "TURBOS", "AFTERMATH", "HAEDAL", "VOLO", "AFSUI", "BLUEMOVE", "DEEPBOOKV3", "SCALLOP", "SUILEND", "BLUEFIN", "HAEDALPMM", "ALPHAFI", "SPRINGSUI", "STEAMM", "METASTABLE", "OBRIC", "HAWAL", "STEAMM_OMM", "MOMENTUM", "STEAMM_OMM_V2", "MAGMA", "SEVENK", "HAEDALHMMV2", "FULLSAIL", "CETUSDLMM", "FERRADLMM", "FERRACLMM"];
|
|
773
|
+
const SUPPORTED_PROTOCOLS: string[];
|
|
774
|
+
export type SupportProtocol = (typeof SUPPORTED_PROTOCOL_CONSTANTS)[number];
|
|
775
|
+
const TO_META_AGGREGATOR_PATH_FN_MAP: Record<SupportProtocol, (route: Path) => MetaAggregatorPath>;
|
|
776
|
+
export function toMetaAggregatorPath(route: Path): MetaAggregatorPath;
|
|
777
|
+
export function toMetaAggregatorPaths(route: RouterDataV3): MetaAggregatorPath[];
|
|
778
|
+
export function convert(rawRoute: RouterDataV3): RouteConverterResult;
|
|
779
|
+
{};
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
export declare namespace CetusClmm {
|
|
783
|
+
const GLOBAL_CONFIG = "0xdaa46292632c3c4d8f31f23ea0f9b36a28ff3677e9684980e4438403a67a3d8f";
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
export declare namespace CetusDlmm {
|
|
787
|
+
const GLOBAL_CONFIG_OBJ_ID = "0xf31b605d117f959b9730e8c07b08b856cb05143c5e81d5751c90d2979e82f599";
|
|
788
|
+
const VERSIONED_OBJ_ID = "0x05370b2d656612dd5759cbe80463de301e3b94a921dfc72dd9daa2ecdeb2d0a8";
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
export declare function checkIsSui(type: string): type is "0x2::sui::SUI" | "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI";
|
|
792
|
+
|
|
640
793
|
export declare const CLOCK_OBJECT_ID = "0x0000000000000000000000000000000000000000000000000000000000000006";
|
|
641
794
|
|
|
642
795
|
export declare interface CommonTxParams {
|
|
@@ -696,8 +849,19 @@ export declare class CurveModule implements IModule {
|
|
|
696
849
|
getTradeTransaction(platform: SupportedBondingCurve, params: GetCurveTradeTransactionRequest): Promise<Uint8Array>;
|
|
697
850
|
}
|
|
698
851
|
|
|
852
|
+
export declare namespace DeepbookV3 {
|
|
853
|
+
const GLOBAL_CONFIG = "0x699d455ab8c5e02075b4345ea1f91be55bf46064ae6026cc2528e701ce3ac135";
|
|
854
|
+
const DEEP_TYPE = "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP";
|
|
855
|
+
}
|
|
856
|
+
|
|
699
857
|
export declare const DEFAULT_TRADE_FEE: TradeFeeOptions;
|
|
700
858
|
|
|
859
|
+
export declare function denormalizeTokenType(type: string): string;
|
|
860
|
+
|
|
861
|
+
export declare namespace DipCpmm {
|
|
862
|
+
const GLOBAL_OBJ_ID = "0x935229a3c32399e9fb207ec8461a54f56c6af5744c64442435ac217ab28f0d59";
|
|
863
|
+
}
|
|
864
|
+
|
|
701
865
|
export declare type DraftTransaction = {
|
|
702
866
|
readonly sender: string;
|
|
703
867
|
readonly recipient: string;
|
|
@@ -748,6 +912,116 @@ export declare interface ExecutionResult {
|
|
|
748
912
|
readonly error?: string;
|
|
749
913
|
}
|
|
750
914
|
|
|
915
|
+
export declare type ExtendAggregatorProtocol = AggregatorProtocol.AFTERMATH_CPMM | AggregatorProtocol.FLOWX_CLMM | AggregatorProtocol.HAEDAL_CPMM | AggregatorProtocol.HAEDAL_CPMM_V2 | AggregatorProtocol.OBRIC | AggregatorProtocol.SCALLOP | AggregatorProtocol.SEVENK_CPMM | AggregatorProtocol.STEAMM_CPMM | AggregatorProtocol.STEAMM_OMM | AggregatorProtocol.STEAMM_OMM_V2 | AggregatorProtocol.TURBOS_CLMM | AggregatorProtocol.METASTABLE | AggregatorProtocol.DEEPBOOK_V3 | AggregatorProtocol.TRADEPORT_CLMM | AggregatorProtocol.MOVEPUMP;
|
|
916
|
+
|
|
917
|
+
export declare type ExtendAggregatorSwapParam = {
|
|
918
|
+
protocol: AggregatorProtocol.AFTERMATH_CPMM;
|
|
919
|
+
coinLpType: string;
|
|
920
|
+
} | {
|
|
921
|
+
protocol: AggregatorProtocol.DEEPBOOK_V3;
|
|
922
|
+
deepFeeCoin?: TransactionObjectArgument;
|
|
923
|
+
} | {
|
|
924
|
+
protocol: AggregatorProtocol.FLOWX_CLMM;
|
|
925
|
+
poolFeeRate: string;
|
|
926
|
+
} | {
|
|
927
|
+
protocol: AggregatorProtocol.HAEDAL_CPMM;
|
|
928
|
+
pythPriceFeedIdA: PythPriceFeedId;
|
|
929
|
+
pythPriceFeedIdB: PythPriceFeedId;
|
|
930
|
+
} | {
|
|
931
|
+
protocol: AggregatorProtocol.HAEDAL_CPMM_V2;
|
|
932
|
+
pythPriceFeedIdBase: PythPriceFeedId;
|
|
933
|
+
} | ({
|
|
934
|
+
protocol: AggregatorProtocol.METASTABLE;
|
|
935
|
+
whitelistedAppId: string;
|
|
936
|
+
createCapPackageId: string;
|
|
937
|
+
createCapModule: string;
|
|
938
|
+
createCapAllTypeParams: boolean;
|
|
939
|
+
} & ({
|
|
940
|
+
metaCoin: Metastable.MetaCoinType.SUPER_SUI;
|
|
941
|
+
registryId: string;
|
|
942
|
+
} | {
|
|
943
|
+
metaCoin: Metastable.MetaCoinType.MUSD;
|
|
944
|
+
pythPriceFeedIdMeta: PythPriceFeedId;
|
|
945
|
+
} | {
|
|
946
|
+
metaCoin: Metastable.MetaCoinType.METH;
|
|
947
|
+
pythPriceFeedIdMeta: PythPriceFeedId;
|
|
948
|
+
pythPriceFeedIdEth: PythPriceFeedId;
|
|
949
|
+
})) | ({
|
|
950
|
+
protocol: AggregatorProtocol.OBRIC;
|
|
951
|
+
} & ({
|
|
952
|
+
pythPriceFeedIdA: PythPriceFeedId;
|
|
953
|
+
pythPriceFeedIdB: PythPriceFeedId;
|
|
954
|
+
} | {
|
|
955
|
+
priceInfoObjIdA: string;
|
|
956
|
+
priceInfoObjIdB: string;
|
|
957
|
+
})) | {
|
|
958
|
+
protocol: AggregatorProtocol.SCALLOP;
|
|
959
|
+
scoinTreasury: string;
|
|
960
|
+
} | {
|
|
961
|
+
protocol: AggregatorProtocol.SEVENK_CPMM;
|
|
962
|
+
coinLpType: string;
|
|
963
|
+
pythPriceFeedIdA: PythPriceFeedId;
|
|
964
|
+
pythPriceFeedIdB: PythPriceFeedId;
|
|
965
|
+
oracleConfigA: string;
|
|
966
|
+
oracleConfigB: string;
|
|
967
|
+
} | {
|
|
968
|
+
protocol: AggregatorProtocol.STEAMM_CPMM;
|
|
969
|
+
bankAId: string;
|
|
970
|
+
bankBId: string;
|
|
971
|
+
lendingMarketId: string;
|
|
972
|
+
lendingMarketType: string;
|
|
973
|
+
bCoinAType: string;
|
|
974
|
+
bCoinBType: string;
|
|
975
|
+
lpBCoinType: string;
|
|
976
|
+
} | {
|
|
977
|
+
protocol: AggregatorProtocol.STEAMM_OMM;
|
|
978
|
+
bankAId: string;
|
|
979
|
+
bankBId: string;
|
|
980
|
+
lendingMarketId: string;
|
|
981
|
+
lendingMarketType: string;
|
|
982
|
+
bCoinAType: string;
|
|
983
|
+
bCoinBType: string;
|
|
984
|
+
lpBCoinType: string;
|
|
985
|
+
pythPriceFeedIdA: PythPriceFeedId;
|
|
986
|
+
pythPriceFeedIdB: PythPriceFeedId;
|
|
987
|
+
oracleRegistryId: string;
|
|
988
|
+
oracleIndexA: string;
|
|
989
|
+
oracleIndexB: string;
|
|
990
|
+
} | {
|
|
991
|
+
protocol: AggregatorProtocol.STEAMM_OMM_V2;
|
|
992
|
+
bankAId: string;
|
|
993
|
+
bankBId: string;
|
|
994
|
+
lendingMarketId: string;
|
|
995
|
+
lendingMarketType: string;
|
|
996
|
+
bCoinAType: string;
|
|
997
|
+
bCoinBType: string;
|
|
998
|
+
lpBCoinType: string;
|
|
999
|
+
pythPriceFeedIdA: PythPriceFeedId;
|
|
1000
|
+
pythPriceFeedIdB: PythPriceFeedId;
|
|
1001
|
+
oracleRegistryId: string;
|
|
1002
|
+
oracleIndexA: string;
|
|
1003
|
+
oracleIndexB: string;
|
|
1004
|
+
} | {
|
|
1005
|
+
protocol: AggregatorProtocol.TURBOS_CLMM;
|
|
1006
|
+
coinFeeType: string;
|
|
1007
|
+
} | {
|
|
1008
|
+
protocol: AggregatorProtocol.TRADEPORT_CLMM;
|
|
1009
|
+
poolFeeRate: string;
|
|
1010
|
+
} | {
|
|
1011
|
+
protocol: AggregatorProtocol.MOVEPUMP;
|
|
1012
|
+
expectedAmountOut: string;
|
|
1013
|
+
} | {
|
|
1014
|
+
protocol: Exclude<AggregatorProtocol, ExtendAggregatorProtocol>;
|
|
1015
|
+
};
|
|
1016
|
+
|
|
1017
|
+
export declare namespace FerraClmm {
|
|
1018
|
+
const FERRA_GLOBAL_CONFIG_ID = "0x2cd8382c19e6994f16df204e9b8cddd04bdc486c251de75ac66ac4e48e3e7081";
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
export declare namespace FerraDlmm {
|
|
1022
|
+
const FERRA_GLOBAL_CONFIG_ID = "0x5c9dacf5a678ea15b8569d65960330307e23d429289ca380e665b1aa175ebeca";
|
|
1023
|
+
}
|
|
1024
|
+
|
|
751
1025
|
export declare type FinalTradeRoute = {
|
|
752
1026
|
coinIn: string;
|
|
753
1027
|
coinOut: string;
|
|
@@ -786,7 +1060,9 @@ export declare class FlowXAggregator {
|
|
|
786
1060
|
* @param params.coinOutType - Type/address of output token
|
|
787
1061
|
* @returns Promise resolving to routes result with pricing and path information, or null if no route found
|
|
788
1062
|
*/
|
|
789
|
-
getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, }: GetTradeRouteRequest_6
|
|
1063
|
+
getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, supportedProtocols, }: GetTradeRouteRequest_6 & {
|
|
1064
|
+
supportedProtocols?: Protocol[];
|
|
1065
|
+
}): Promise<GetRoutesResult<Coin, Coin> | null>;
|
|
790
1066
|
/**
|
|
791
1067
|
* Builds a transaction for executing a trade route from FlowX aggregator
|
|
792
1068
|
* @param params - Transaction parameters
|
|
@@ -812,6 +1088,98 @@ export declare type FlowXAggregatorConfig = {
|
|
|
812
1088
|
flowxApiKey?: string;
|
|
813
1089
|
};
|
|
814
1090
|
|
|
1091
|
+
export declare namespace FlowXAggregatorConverter {
|
|
1092
|
+
export interface FlowXSwapRoute {
|
|
1093
|
+
pool: {
|
|
1094
|
+
id: string;
|
|
1095
|
+
};
|
|
1096
|
+
input: {
|
|
1097
|
+
coinType: string;
|
|
1098
|
+
};
|
|
1099
|
+
output: {
|
|
1100
|
+
coinType: string;
|
|
1101
|
+
};
|
|
1102
|
+
amountIn: {
|
|
1103
|
+
toString(): string;
|
|
1104
|
+
};
|
|
1105
|
+
amountOut: {
|
|
1106
|
+
toString(): string;
|
|
1107
|
+
};
|
|
1108
|
+
xForY?: boolean;
|
|
1109
|
+
protocol(): Protocol;
|
|
1110
|
+
poolFee?: number;
|
|
1111
|
+
lpCoinType?: string;
|
|
1112
|
+
oracles?: Array<{
|
|
1113
|
+
priceId: string;
|
|
1114
|
+
oracleIndex?: number;
|
|
1115
|
+
oracleId?: string;
|
|
1116
|
+
}>;
|
|
1117
|
+
xPriceId?: string;
|
|
1118
|
+
yPriceId?: string;
|
|
1119
|
+
poolStructTag?: string;
|
|
1120
|
+
bankXInfo?: {
|
|
1121
|
+
bankId: string;
|
|
1122
|
+
lendingMarketId: string;
|
|
1123
|
+
lendingMarketType: string;
|
|
1124
|
+
bTokenType: string;
|
|
1125
|
+
};
|
|
1126
|
+
quoterType?: "constant_product" | "oracle" | "oracle_v2";
|
|
1127
|
+
bankYInfo?: {
|
|
1128
|
+
bankId: string;
|
|
1129
|
+
bTokenType: string;
|
|
1130
|
+
};
|
|
1131
|
+
poolInfo?: {
|
|
1132
|
+
lpTokenType: string;
|
|
1133
|
+
};
|
|
1134
|
+
protocolConfig?: {
|
|
1135
|
+
oracleRegistryId?: string;
|
|
1136
|
+
mETHVault?: {
|
|
1137
|
+
metaCoinType: string;
|
|
1138
|
+
metaVaultIntegrationObjectId: string;
|
|
1139
|
+
metaVaultIntegrationPackageId: string;
|
|
1140
|
+
vaultId: string;
|
|
1141
|
+
};
|
|
1142
|
+
mUSDVault?: {
|
|
1143
|
+
metaCoinType: string;
|
|
1144
|
+
metaVaultIntegrationObjectId: string;
|
|
1145
|
+
metaVaultIntegrationPackageId: string;
|
|
1146
|
+
vaultId: string;
|
|
1147
|
+
};
|
|
1148
|
+
superSUIVault?: {
|
|
1149
|
+
defaultMetaVaultIntegrationObjectId: string;
|
|
1150
|
+
defaultMetaVaultIntegrationPackageId: string;
|
|
1151
|
+
exchangeRateRegistryObjectId: string;
|
|
1152
|
+
mappingMetaVaultIntegrationObjectId: Record<string, string>;
|
|
1153
|
+
mappingMetaVaultIntegrationPackageId: Record<string, string>;
|
|
1154
|
+
metaCoinType: string;
|
|
1155
|
+
vaultId: string;
|
|
1156
|
+
};
|
|
1157
|
+
};
|
|
1158
|
+
mappingMetaCoinType?: Record<string, string>;
|
|
1159
|
+
capacityCapCreators?: Record<string, unknown>;
|
|
1160
|
+
}
|
|
1161
|
+
export type UnsupportedDex = (typeof UNSUPPORTED_PROTOCOLS)[number];
|
|
1162
|
+
const UNSUPPORTED_PROTOCOLS: readonly [Protocol.HOP_FUN, Protocol.FLOWX_PMM, Protocol.DEEPBOOK, Protocol.IPX_TIDE, Protocol.METASTABLE];
|
|
1163
|
+
export type SupportedProtocol = Exclude<Protocol, UnsupportedDex>;
|
|
1164
|
+
const SUPPORTED_PROTOCOLS: SupportedProtocol[];
|
|
1165
|
+
const toMetaAggregatorBasePath: (swap: FlowXSwapRoute) => Omit<MetaAggregatorBasePath, "aToB">;
|
|
1166
|
+
const toMetaAggregatorPath: (swap: FlowXSwapRoute) => MetaAggregatorPath;
|
|
1167
|
+
export function toMetaAggregatorPaths<CInput extends Coin_2, COutput extends Coin_2>(routes: Route<CInput, COutput>[]): MetaAggregatorPath[];
|
|
1168
|
+
export function convert<CInput extends Coin_2, COutput extends Coin_2>(rawRoute: GetRoutesResult<CInput, COutput>): RouteConverterResult;
|
|
1169
|
+
{};
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
export declare namespace FlowxCpmm {
|
|
1173
|
+
const CONTAINER_OBJ_ID = "0xb65dcbf63fd3ad5d0ebfbf334780dc9f785eff38a4459e37ab08fa79576ee511";
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
export declare namespace FullsailClmm {
|
|
1177
|
+
const GLOBAL_CONFIG_OBJ_ID = "0xe93baa80cb570b3a494cbf0621b2ba96bc993926d34dc92508c9446f9a05d615";
|
|
1178
|
+
const REWARDER_VAULT_OBJ_ID = "0xfb971d3a2fb98bde74e1c30ba15a3d8bef60a02789e59ae0b91660aeed3e64e1";
|
|
1179
|
+
const STATS_OBJ_ID = "0x6822a33d1d971e040c32f7cc74507010d1fe786f7d06ab89135083ddb07d2dc2";
|
|
1180
|
+
const PRICE_PROVIDER_OBJ_ID = "0x854b2d2c0381bb656ec962f8b443eb082654384cf97885359d1956c7d76e33c9";
|
|
1181
|
+
}
|
|
1182
|
+
|
|
815
1183
|
export declare function getAmountAfterFee(amount: bigint | string, fee?: string | number): bigint;
|
|
816
1184
|
|
|
817
1185
|
export declare const getCoinObjectIdsByAmount: (suiClient: SuiClient, address: string, amount: string, coinType: string) => Promise<{
|
|
@@ -1092,6 +1460,10 @@ declare type GetTransactionRequest_5 = {
|
|
|
1092
1460
|
tradeFee?: TradeFeeOptions;
|
|
1093
1461
|
};
|
|
1094
1462
|
|
|
1463
|
+
export declare namespace HaedalLsdWal {
|
|
1464
|
+
const VALIDATOR_ID = "0x7b3ba6de2ae58283f60d5b8dc04bb9e90e4796b3b2e0dea75569f491275242e7";
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1095
1467
|
export declare interface IModule {
|
|
1096
1468
|
readonly sdk: NoodlesSdk;
|
|
1097
1469
|
}
|
|
@@ -1102,14 +1474,96 @@ export declare interface IPayModule {
|
|
|
1102
1474
|
|
|
1103
1475
|
export declare function isSuiCoinType(coinType: string): boolean;
|
|
1104
1476
|
|
|
1477
|
+
export declare namespace KriyaClmm {
|
|
1478
|
+
const VERSION_OBJ_ID = "0xf5145a7ac345ca8736cf8c76047d00d6d378f30e81be6f6eb557184d9de93c78";
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1105
1481
|
declare type LegacySuiClient = SuiClient;
|
|
1106
1482
|
|
|
1483
|
+
export declare namespace MagmaAlmm {
|
|
1484
|
+
const FACTORY_OBJ_ID = "0xedb456e93e423dd75a8ddebedd9974bb661195043027e32ce01649d6ccee74cf";
|
|
1485
|
+
const GLOBAL_CONFIG_OBJ_ID = "0x4c4e1402401f72c7d8533d0ed8d5f8949da363c7a3319ccef261ffe153d32f8a";
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
export declare namespace MagmaClmm {
|
|
1489
|
+
const GLOBAL_CONFIG = "0x4c4e1402401f72c7d8533d0ed8d5f8949da363c7a3319ccef261ffe153d32f8a";
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1107
1492
|
export declare namespace MathUtils {
|
|
1108
1493
|
export namespace U64 {
|
|
1109
1494
|
export function mulDivUp(a: bigint, b: bigint, c: bigint): bigint;
|
|
1110
1495
|
}
|
|
1111
1496
|
}
|
|
1112
1497
|
|
|
1498
|
+
export declare namespace MetaAggregator {
|
|
1499
|
+
export type BuildAggregatorSwapTransactionParam = {
|
|
1500
|
+
tx: Transaction;
|
|
1501
|
+
coinInType: string;
|
|
1502
|
+
coinOutType: string;
|
|
1503
|
+
inputCoin: TransactionObjectArgument;
|
|
1504
|
+
expectedAmountOut: string;
|
|
1505
|
+
minAmountOut: string;
|
|
1506
|
+
aggregatorFeeRate: number;
|
|
1507
|
+
aggregatorFeeRecipient: string;
|
|
1508
|
+
partnerFeeRate?: number;
|
|
1509
|
+
partnerFeeRecipient?: string;
|
|
1510
|
+
tradePaths: MetaAggregatorPath[];
|
|
1511
|
+
pythConnections: SuiPriceServiceConnection[];
|
|
1512
|
+
pythClient: SuiPythClient;
|
|
1513
|
+
packageIdMap?: Map<AggregatorProtocol, string>;
|
|
1514
|
+
};
|
|
1515
|
+
export function buildAggregatorSwapTransaction(params: BuildAggregatorSwapTransactionParam): Promise<TransactionObjectArgument>;
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
export declare type MetaAggregatorBasePath = {
|
|
1519
|
+
poolId: string;
|
|
1520
|
+
coinInType: string;
|
|
1521
|
+
coinOutType: string;
|
|
1522
|
+
aToB: boolean;
|
|
1523
|
+
amountIn: string;
|
|
1524
|
+
packageId?: string;
|
|
1525
|
+
};
|
|
1526
|
+
|
|
1527
|
+
export declare type MetaAggregatorPath = MetaAggregatorBasePath & ExtendAggregatorSwapParam;
|
|
1528
|
+
|
|
1529
|
+
export declare namespace Metastable {
|
|
1530
|
+
const UNIVERSAL_META_VAULT_INTEGRATION_PACKAGE_ID = "0xfd12517a9fc87c6a1f2357ad13b3421fb27a8bd7ca07d5fd5934ac35733baa47";
|
|
1531
|
+
export enum MetaCoinType {
|
|
1532
|
+
SUPER_SUI = "0x790f258062909e3a0ffc78b3c53ac2f62d7084c3bab95644bdeb05add7250001::super_sui::SUPER_SUI",
|
|
1533
|
+
MUSD = "0xe44df51c0b21a27ab915fa1fe2ca610cd3eaa6d9666fe5e62b988bf7f0bd8722::musd::MUSD",
|
|
1534
|
+
METH = "0xccd628c2334c5ed33e6c47d6c21bb664f8b6307b2ac32c2462a61f69a31ebcee::meth::METH"
|
|
1535
|
+
}
|
|
1536
|
+
const VERSION_OBJ_ID = "0x4696559327b35ff2ab26904e7426a1646312e9c836d5c6cff6709a5ccc30915c";
|
|
1537
|
+
export function createCap(params: {
|
|
1538
|
+
txb: Transaction;
|
|
1539
|
+
coinType: string;
|
|
1540
|
+
poolId: string;
|
|
1541
|
+
whitelistedAppId: string;
|
|
1542
|
+
createCapPackageId: string;
|
|
1543
|
+
createCapModule: string;
|
|
1544
|
+
createCapFunc: "create_deposit_cap" | "create_withdraw_cap";
|
|
1545
|
+
createCapAllTypeParams: boolean;
|
|
1546
|
+
pythInfoObjectIdMap: Map<PythPriceFeedId, PythInfoObjectId>;
|
|
1547
|
+
} & ({
|
|
1548
|
+
metaCoin: Metastable.MetaCoinType.SUPER_SUI;
|
|
1549
|
+
registryId: string;
|
|
1550
|
+
} | {
|
|
1551
|
+
metaCoin: Metastable.MetaCoinType.MUSD;
|
|
1552
|
+
pythPriceFeedIdMeta: PythPriceFeedId;
|
|
1553
|
+
} | {
|
|
1554
|
+
metaCoin: Metastable.MetaCoinType.METH;
|
|
1555
|
+
pythPriceFeedIdMeta: PythPriceFeedId;
|
|
1556
|
+
pythPriceFeedIdEth: PythPriceFeedId;
|
|
1557
|
+
})): TransactionObjectArgument;
|
|
1558
|
+
export function getCreateCapModule(metaCoin: MetaCoinType): string;
|
|
1559
|
+
export function isMetaCoinType(type: string): boolean;
|
|
1560
|
+
export function getCreateCapAllTypeParams(metaCoin: MetaCoinType, packageId: string): boolean;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
export declare namespace MomentumClmm {
|
|
1564
|
+
const VERSION_OBJ_ID = "0x2375a0b1ec12010aaea3b2545acfa2ad34cfbba03ce4b59f4c39e1e25eed1b2a";
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1113
1567
|
export declare namespace MoonbagsCalculation {
|
|
1114
1568
|
export function getCurveAmountAfterBuy(params: GetCurveAmountAfterBuyParams, suiClient: SuiClient): Promise<bigint>;
|
|
1115
1569
|
export function getSuiAmountAfterSell(params: GetSuiAmountAfterSellParams, suiClient: SuiClient): Promise<bigint>;
|
|
@@ -1200,6 +1654,10 @@ export declare type MoveObjectStruct<Content> = {
|
|
|
1200
1654
|
fields: Content;
|
|
1201
1655
|
};
|
|
1202
1656
|
|
|
1657
|
+
export declare namespace Movepump {
|
|
1658
|
+
const CONFIGURATION_OBJ_ID = "0xd746495d04a6119987c2b9334c5fefd7d8cff52a8a02a3ea4e3995b9a041ace4";
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1203
1661
|
export declare const NATIVE_USDC_TOKEN_TYPE = "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC";
|
|
1204
1662
|
|
|
1205
1663
|
declare enum Network {
|
|
@@ -1228,6 +1686,12 @@ export declare class NoodlesSdk {
|
|
|
1228
1686
|
get suiClient(): SuiClient;
|
|
1229
1687
|
}
|
|
1230
1688
|
|
|
1689
|
+
export declare function normalizeTokenType(type: string): string;
|
|
1690
|
+
|
|
1691
|
+
export declare namespace Obric {
|
|
1692
|
+
const STATE_OBJ_ID = "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8";
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1231
1695
|
/**
|
|
1232
1696
|
* Parameters for paying boosting fees for a specific tier.
|
|
1233
1697
|
*/
|
|
@@ -1258,6 +1722,46 @@ export declare type PayBoostingWithAdminRequest = {
|
|
|
1258
1722
|
currentTx?: Transaction;
|
|
1259
1723
|
};
|
|
1260
1724
|
|
|
1725
|
+
export declare type PythInfoObjectId = string;
|
|
1726
|
+
|
|
1727
|
+
export declare namespace PythPrice {
|
|
1728
|
+
const LAST_PACKAGE_ID = "0x8c36ea167c5e6da8c3d60b4fc897416105dcb986471bd81cfbfd38720a4487c0";
|
|
1729
|
+
export function newHolder(tx: Transaction): TransactionResult;
|
|
1730
|
+
export function getPrice(params: {
|
|
1731
|
+
txb: Transaction;
|
|
1732
|
+
coinOracleId: string;
|
|
1733
|
+
holder: TransactionResult;
|
|
1734
|
+
coinPriceId: string;
|
|
1735
|
+
}): void;
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
export declare type PythPriceFeedId = string;
|
|
1739
|
+
|
|
1740
|
+
export declare namespace PythUtils {
|
|
1741
|
+
const PYTH_URLS: string[];
|
|
1742
|
+
const WORMHOLE_STATE_ID = "0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6eab944dd88919c";
|
|
1743
|
+
const PYTH_STATE_ID = "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8";
|
|
1744
|
+
export function newPythConnections(pythUrls?: string[]): SuiPriceServiceConnection[];
|
|
1745
|
+
export function newPythClient(suiClient?: SuiClient): SuiPythClient;
|
|
1746
|
+
export function updatePythPriceIDs(params: {
|
|
1747
|
+
priceFeedIds: PythPriceFeedId[];
|
|
1748
|
+
txb: Transaction;
|
|
1749
|
+
pythConnections: SuiPriceServiceConnection[];
|
|
1750
|
+
pythClient: SuiPythClient;
|
|
1751
|
+
}): Promise<Map<PythPriceFeedId, PythInfoObjectId>>;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
declare type RawRouteParams = {
|
|
1755
|
+
sourceRoute: SourceAggregatorRoute.CETUS;
|
|
1756
|
+
rawRoute: RouterDataV3;
|
|
1757
|
+
} | {
|
|
1758
|
+
sourceRoute: SourceAggregatorRoute.FLOWX;
|
|
1759
|
+
rawRoute: GetRoutesResult<any, any>;
|
|
1760
|
+
} | {
|
|
1761
|
+
sourceRoute: SourceAggregatorRoute.SEVENK;
|
|
1762
|
+
rawRoute: QuoteResponse;
|
|
1763
|
+
};
|
|
1764
|
+
|
|
1261
1765
|
/**
|
|
1262
1766
|
* Parameters for removing a subscription plan (admin only).
|
|
1263
1767
|
*/
|
|
@@ -1282,6 +1786,23 @@ export declare type RemoveTierRequest = {
|
|
|
1282
1786
|
currentTx?: Transaction;
|
|
1283
1787
|
};
|
|
1284
1788
|
|
|
1789
|
+
declare type RouteConverterResult = {
|
|
1790
|
+
coinInType: string;
|
|
1791
|
+
coinOutType: string;
|
|
1792
|
+
expectedAmountOut: string;
|
|
1793
|
+
tradePaths: MetaAggregatorPath[];
|
|
1794
|
+
};
|
|
1795
|
+
|
|
1796
|
+
export declare namespace RouterUtils {
|
|
1797
|
+
const RouterSwapFunctionMap: Record<AggregatorProtocol, BuildRouterSwapTxFunction>;
|
|
1798
|
+
export function swap(param: BuildRouterSwapTxParam): void;
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
export declare namespace Scallop {
|
|
1802
|
+
const VERSION_OBJ_ID = "0x07871c4b3c847a0f674510d4978d5cf6f960452795e8ff6f189fd2088a3f6ac7";
|
|
1803
|
+
const MARKET_OBJ_ID = "0xa757975255146dc9686aa823b7838b507f315d704f428cbadad2f4ea061939d9";
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1285
1806
|
export declare type SdkOptions = {
|
|
1286
1807
|
tradeFee: TradeFeeOptions;
|
|
1287
1808
|
/** Optional API key for Astros aggregator access */
|
|
@@ -1350,7 +1871,9 @@ export declare class SevenKAggregator {
|
|
|
1350
1871
|
* @param params.coinOutType - Type/address of output token
|
|
1351
1872
|
* @returns Promise resolving to quote response with pricing and route information, or null if no route found
|
|
1352
1873
|
*/
|
|
1353
|
-
getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, }: GetTradeRouteRequest_2
|
|
1874
|
+
getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, supportedProtocols, }: GetTradeRouteRequest_2 & {
|
|
1875
|
+
supportedProtocols?: SourceDex[];
|
|
1876
|
+
}): Promise<QuoteResponse | null>;
|
|
1354
1877
|
/**
|
|
1355
1878
|
* Builds a transaction for executing a trade route from 7K Protocol
|
|
1356
1879
|
* @param params - Transaction parameters
|
|
@@ -1376,10 +1899,51 @@ export declare type SevenKAggregatorConfig = {
|
|
|
1376
1899
|
sevenKApiKey?: string;
|
|
1377
1900
|
};
|
|
1378
1901
|
|
|
1902
|
+
export declare namespace SevenKAggregatorConverter {
|
|
1903
|
+
const UNSUPPORTED_PROTOCOLS: readonly ["bluefinx"];
|
|
1904
|
+
export type UnsupportedProtocol = (typeof UNSUPPORTED_PROTOCOLS)[number];
|
|
1905
|
+
export type SupportedProtocol = Exclude<SourceDex, UnsupportedProtocol>;
|
|
1906
|
+
const SUPPORTED_PROTOCOLS: SupportedProtocol[];
|
|
1907
|
+
export function toMetaAggregatorPath(swap: TxSorSwap): MetaAggregatorPath;
|
|
1908
|
+
export function toMetaAggregatorPaths(swaps: TxSorSwap[]): MetaAggregatorPath[];
|
|
1909
|
+
export function convert(rawRoute: QuoteResponse): RouteConverterResult;
|
|
1910
|
+
{};
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
export declare namespace SevenkCpmm {
|
|
1914
|
+
const ORACLE_HOLDER_OBJ_ID = "0x8c36ea167c5e6da8c3d60b4fc897416105dcb986471bd81cfbfd38720a4487c0";
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
export declare namespace SevenkFun {
|
|
1918
|
+
const CONFIGURATION_OBJ_ID = "0xe79fff6c77d81f9a8efb729e25bf0037deec42518d40b978f274a4915d7e1ec9";
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
declare enum SourceAggregatorRoute {
|
|
1922
|
+
CETUS = "CETUS",
|
|
1923
|
+
FLOWX = "FLOWX",
|
|
1924
|
+
SEVENK = "SEVENK"
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1379
1927
|
export declare function splitSuiCoinAfterFeeFromBuyTx(params: BuildSwapTxParams, suiClient: SuiClient): Promise<BuildTxResult>;
|
|
1380
1928
|
|
|
1381
1929
|
export declare function splitSuiCoinAfterFeeFromSellTx(tx: Transaction, params: BuildSwapTxParams, suiCoin: TransactionObjectArgument): Promise<BuildTxResult>;
|
|
1382
1930
|
|
|
1931
|
+
export declare namespace SrmCpmm {
|
|
1932
|
+
const CONFIG_OBJ_ID = "0x881fd0a12ca4fa48991f5c27ba57d17f1ec147fa15f43b3cb760cc3bd7ba9402";
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
export declare namespace Steamm {
|
|
1936
|
+
export namespace Oracle {
|
|
1937
|
+
const PACKAGE_ID = "0xe84b649199654d18c38e727212f5d8dacfc3cf78d60d0a7fc85fd589f280eb2b";
|
|
1938
|
+
export function getPythPrice(param: {
|
|
1939
|
+
txb: Transaction;
|
|
1940
|
+
oracleRegistryId: string;
|
|
1941
|
+
priceInfoId: string;
|
|
1942
|
+
oracleIndex: string;
|
|
1943
|
+
}): TransactionObjectArgument;
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1383
1947
|
/**
|
|
1384
1948
|
* Parameters for subscribing to a plan.
|
|
1385
1949
|
*/
|
|
@@ -1622,6 +2186,11 @@ export declare type TradePath = {
|
|
|
1622
2186
|
amountOut: bigint;
|
|
1623
2187
|
};
|
|
1624
2188
|
|
|
2189
|
+
export declare namespace TradeportClmm {
|
|
2190
|
+
const VERSIONED = "0x0309b66202e9aaf470081fffee7ffc0fbd50e3b7400d4f56fd06502e4dbbd676";
|
|
2191
|
+
const POOL_REGISTRY = "0xcd0a614c4cbbf173f59dee2602c43a1717f283215ed7a0bb1d55d786af16fbcd";
|
|
2192
|
+
}
|
|
2193
|
+
|
|
1625
2194
|
export declare type TradeRoute = {
|
|
1626
2195
|
coinIn: string;
|
|
1627
2196
|
coinOut: string;
|
|
@@ -1632,6 +2201,14 @@ export declare type TradeRoute = {
|
|
|
1632
2201
|
|
|
1633
2202
|
export declare type TransactionStatus = "success" | "failure" | "pending";
|
|
1634
2203
|
|
|
2204
|
+
export declare namespace TurbosClmm {
|
|
2205
|
+
const POOL_VERSIONED = "0xf1cf0e81048df168ebeb1b8030fad24b3e0b53ae827c25053fff0779c1445b6f";
|
|
2206
|
+
}
|
|
2207
|
+
|
|
2208
|
+
export declare namespace TurbosFun {
|
|
2209
|
+
const CONFIGURATION_OBJ_ID = "0xd86685fc3c3d989385b9311ef55bfc01653105670209ac4276ebb6c83d7df928";
|
|
2210
|
+
}
|
|
2211
|
+
|
|
1635
2212
|
/**
|
|
1636
2213
|
* Parameters for updating the fee receiver address (admin only).
|
|
1637
2214
|
*/
|
|
@@ -1716,4 +2293,12 @@ export declare type UpgradePlanRequest = {
|
|
|
1716
2293
|
|
|
1717
2294
|
export declare const USDC_TOKEN_TYPE = "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN";
|
|
1718
2295
|
|
|
2296
|
+
export declare namespace Volo {
|
|
2297
|
+
const VOLO_CERT_METADATA_ID = "0x680cd26af32b2bde8d3361e804c53ec1d1cfe24c7f039eb7f549e8dfde389a60";
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
export declare namespace Walrus {
|
|
2301
|
+
const STAKING_OBJ_ID = "0x10b9d30c28448939ce6c4d6c6e0ffce4a7f8a4ada8248bdad09ef8b70e4a3904";
|
|
2302
|
+
}
|
|
2303
|
+
|
|
1719
2304
|
export { }
|