@minswap/noodles-sdk 0.0.43 → 0.0.45

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.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 type { GetRoutesResult } from '@flowx-finance/sdk';
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 type { QuoteResponse } from '@bluefin-exchange/bluefin7k-aggregator-sdk';
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 type { RouterDataV3 } from '@cetusprotocol/aggregator-sdk';
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,34 @@ 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: BuildTxFromRawRouteParams & ({
159
+ sourceRoute: SourceAggregatorRoute.CETUS;
160
+ rawRoute: RouterDataV3;
161
+ } | {
162
+ sourceRoute: SourceAggregatorRoute.FLOWX;
163
+ rawRoute: GetRoutesResult<any, any>;
164
+ } | {
165
+ sourceRoute: SourceAggregatorRoute.SEVENK;
166
+ rawRoute: QuoteResponse;
167
+ })): MetaAggregator.BuildAggregatorSwapTransactionParam;
168
+ }
169
+
134
170
  /**
135
171
  * Main aggregator module that provides unified access to multiple DEX aggregators
136
172
  * Supports routing trades through Cetus, FlowX, Astros, Aftermath, and 7K Protocol
@@ -216,6 +252,52 @@ export declare class AggregatorModule implements IModule {
216
252
  } | null>;
217
253
  }
218
254
 
255
+ export declare enum AggregatorProtocol {
256
+ AFTERMATH_CPMM = "aftermath_cpmm",
257
+ AFTERMATH_LSD = "aftermath_lsd",
258
+ ALPHAFI_LSD = "alphafi_lsd",
259
+ BLASTFUN = "blastfun",
260
+ BLUEFIN_CLMM = "bluefin_clmm",
261
+ BLUEMOVE_CPMM = "bluemove_cpmm",
262
+ BOLT = "bolt",
263
+ CETUS_CLMM = "cetus_clmm",
264
+ CETUS_DLMM = "cetus_dlmm",
265
+ DEEPBOOK_V3 = "deepbook_v3",
266
+ DIP_CPMM = "dip_cpmm",
267
+ FLOWX_CPMM = "flowx_cpmm",
268
+ FLOWX_CLMM = "flowx_clmm",
269
+ FULLSAIL_CLMM = "fullsail_clmm",
270
+ FERRA_CLMM = "ferra_clmm",
271
+ FERRA_DLMM = "ferra_dlmm",
272
+ HAEDAL_CPMM = "haedal_cpmm",
273
+ HAEDAL_CPMM_V2 = "haedal_cpmm_v2",
274
+ HAEDAL_LSD = "haedal_lsd",
275
+ HAEDAL_LSD_WAL = "haedal_lsd_wal",
276
+ KRIYA_CLMM = "kriya_clmm",
277
+ KRIYA_CPMM = "kriya_cpmm",
278
+ MAGMA_ALMM = "magma_almm",
279
+ MAGMA_CLMM = "magma_clmm",
280
+ METASTABLE = "metastable",
281
+ MOMENTUM_CLMM = "momentum_clmm",
282
+ MOVEPUMP = "movepump",
283
+ OBRIC = "obric",
284
+ SCALLOP = "scallop",
285
+ SEVENK_CPMM = "sevenk_cpmm",
286
+ SEVENK_FUN = "sevenk_fun",
287
+ SPRINGSUI = "springsui",
288
+ SRM_CPMM = "srm_cpmm",
289
+ STEAMM_CPMM = "steamm_cpmm",
290
+ SUISWAP_CPMM = "suiswap_cpmm",
291
+ STEAMM_OMM = "steamm_omm",
292
+ STEAMM_OMM_V2 = "steamm_omm_v2",
293
+ TRADEPORT_CLMM = "tradeport_clmm",
294
+ TURBOS_CLMM = "turbos_clmm",
295
+ TURBOS_FUN = "turbos_fun",
296
+ VOLO = "volo"
297
+ }
298
+
299
+ export declare type AggregatorSwapParam = BaseAggregatorSwapParam & ExtendAggregatorSwapParam;
300
+
219
301
  export declare type AggregatorTradeRoute<T extends SupportedAggregator> = AllAggregatorTradeRoute[T];
220
302
 
221
303
  export declare type AllAggregatorTradeRoute = {
@@ -335,6 +417,21 @@ export declare type BalanceContent = {
335
417
 
336
418
  export declare const BASE_BPS = 10000;
337
419
 
420
+ export declare type BaseAggregatorSwapParam = {
421
+ poolId: string;
422
+ aToB: boolean;
423
+ coinAType: string;
424
+ coinBType: string;
425
+ amountIn: string;
426
+ packageId?: string;
427
+ };
428
+
429
+ export declare namespace Blastfun {
430
+ const MEMEZ_AV_OBJ_ID = "0x2319e3e76dfad73d8f4684bdbf42be4f32d8ce4521dd61becc8261dc918d82c0";
431
+ const MEMEZ_FUN_OBJ_ID = "0x943948644f06942b8b660ca541b10a05f6a7be23ce4069944a3665e7e698930d";
432
+ const IPX_TREASURY_STANDARD_OBJ_ID = "0x051e11b667659192917db94e5175fa066909d4dfc04d2663528f499c4afc6999";
433
+ }
434
+
338
435
  export declare namespace BlastFunConstants {
339
436
  const PACKAGE_ID_V4 = "0x7e6aa6e179466ab2814425a780b122575296d011119fa69d27f289f5a28814bd";
340
437
  const MEMEZ_AV_OBJECT_ID = "0x2319e3e76dfad73d8f4684bdbf42be4f32d8ce4521dd61becc8261dc918d82c0";
@@ -431,10 +528,22 @@ export declare namespace BlastFunSDKTransaction {
431
528
 
432
529
  export declare const BLUEFIN_PACKAGE_ID = "0x62412b7268c35f3808336aee57a52836501f40b8ba5d936f8ad275e672befd04";
433
530
 
531
+ export declare namespace BluefinClmm {
532
+ const GLOBAL_CONFIG_OBJ_ID = "0x03db251ba509a8d5d8777b6338836082335d93eecbdd09a11e190a1cff51c352";
533
+ }
534
+
434
535
  export declare namespace BluefinTx {
435
536
  export function transferOrDestroyZeroCoin(tx: Transaction, coinType: string, coin: TransactionArgument, address: string): void;
436
537
  }
437
538
 
539
+ export declare namespace BluemoveCpmm {
540
+ const DEX_INFO_OBJ_ID = "0x3f2d9f724f4a1ce5e71676448dc452be9a6243dac9c5b975a588c8c867066e92";
541
+ }
542
+
543
+ export declare namespace Bolt {
544
+ const ORACLE_OBJ_ID = "0xfa3975b98f3d0e3df18ed88ae6e69db31836b3f4212df02fae144b1e5a89ca8e";
545
+ }
546
+
438
547
  /** Sui package ID for the boosting protocol */
439
548
  export declare const BOOSTING_PACKAGE_ID = "0x25fa0eb553dd69fa6a8028f73a38f1df7f289fa88a58ed3d7dc5a5360155bb19";
440
549
 
@@ -543,6 +652,14 @@ export declare namespace Bps {
543
652
  export function assertOverflow(bps: number | string | bigint): bigint;
544
653
  }
545
654
 
655
+ export declare type BuildRouterSwapTxFunction = (params: BuildRouterSwapTxParam) => void;
656
+
657
+ export declare type BuildRouterSwapTxParam = {
658
+ txb: Transaction;
659
+ swapContext: TransactionObjectArgument;
660
+ pythInfoObjectIdMap: Map<PythPriceFeedId, PythInfoObjectId>;
661
+ } & AggregatorSwapParam;
662
+
546
663
  export declare type BuildSwapTxParams = CommonTxParams & {
547
664
  inputAmount: string;
548
665
  minAmountOut: string;
@@ -551,6 +668,11 @@ export declare type BuildSwapTxParams = CommonTxParams & {
551
668
  poolId: string;
552
669
  };
553
670
 
671
+ declare type BuildTxFromRawRouteParams = Omit<MetaAggregator.BuildAggregatorSwapTransactionParam, "tradePaths" | "coinInType" | "coinOutType" | "expectedAmountOut" | "minAmountOut"> & {
672
+ expectedAmountOut?: string;
673
+ minAmountOut?: string;
674
+ };
675
+
554
676
  export declare type BuildTxResult = {
555
677
  tx: Transaction;
556
678
  coinOut?: TransactionObjectArgument;
@@ -607,7 +729,9 @@ export declare class CetusAggregator {
607
729
  * @param params.coinOutType - Type/address of output token
608
730
  * @returns Promise resolving to router data with pricing and route information, or null if no route found
609
731
  */
610
- getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, }: GetTradeRouteRequest_5): Promise<RouterDataV3 | null>;
732
+ getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, supportedProtocols, }: GetTradeRouteRequest_5 & {
733
+ supportedProtocols?: string[];
734
+ }): Promise<RouterDataV3 | null>;
611
735
  /**
612
736
  * Builds a transaction for executing a trade route from Cetus aggregator
613
737
  * @param params - Transaction parameters
@@ -637,6 +761,30 @@ export declare type CetusAggregatorConfig = {
637
761
  cetusPartnerId?: string;
638
762
  };
639
763
 
764
+ export declare namespace CetusAggregatorConverter {
765
+ 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"];
766
+ const SUPPORTED_PROTOCOLS: string[];
767
+ export type SupportProtocol = (typeof SUPPORTED_PROTOCOL_CONSTANTS)[number];
768
+ const TO_META_AGGREGATOR_PATH_FN_MAP: Record<SupportProtocol, (route: Path) => MetaAggregatorPath>;
769
+ export function toMetaAggregatorPath(route: Path): MetaAggregatorPath;
770
+ export function toMetaAggregatorPaths(route: RouterDataV3): MetaAggregatorPath[];
771
+ export function toMetaAggregatorBuildTxParams(param: BuildTxFromRawRouteParams & {
772
+ rawRoute: RouterDataV3;
773
+ }): MetaAggregator.BuildAggregatorSwapTransactionParam;
774
+ {};
775
+ }
776
+
777
+ export declare namespace CetusClmm {
778
+ const GLOBAL_CONFIG = "0xdaa46292632c3c4d8f31f23ea0f9b36a28ff3677e9684980e4438403a67a3d8f";
779
+ }
780
+
781
+ export declare namespace CetusDlmm {
782
+ const GLOBAL_CONFIG_OBJ_ID = "0xf31b605d117f959b9730e8c07b08b856cb05143c5e81d5751c90d2979e82f599";
783
+ const VERSIONED_OBJ_ID = "0x05370b2d656612dd5759cbe80463de301e3b94a921dfc72dd9daa2ecdeb2d0a8";
784
+ }
785
+
786
+ export declare function checkIsSui(type: string): type is "0x2::sui::SUI" | "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI";
787
+
640
788
  export declare const CLOCK_OBJECT_ID = "0x0000000000000000000000000000000000000000000000000000000000000006";
641
789
 
642
790
  export declare interface CommonTxParams {
@@ -696,8 +844,19 @@ export declare class CurveModule implements IModule {
696
844
  getTradeTransaction(platform: SupportedBondingCurve, params: GetCurveTradeTransactionRequest): Promise<Uint8Array>;
697
845
  }
698
846
 
847
+ export declare namespace DeepbookV3 {
848
+ const GLOBAL_CONFIG = "0x699d455ab8c5e02075b4345ea1f91be55bf46064ae6026cc2528e701ce3ac135";
849
+ const DEEP_TYPE = "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP";
850
+ }
851
+
699
852
  export declare const DEFAULT_TRADE_FEE: TradeFeeOptions;
700
853
 
854
+ export declare function denormalizeTokenType(type: string): string;
855
+
856
+ export declare namespace DipCpmm {
857
+ const GLOBAL_OBJ_ID = "0x935229a3c32399e9fb207ec8461a54f56c6af5744c64442435ac217ab28f0d59";
858
+ }
859
+
701
860
  export declare type DraftTransaction = {
702
861
  readonly sender: string;
703
862
  readonly recipient: string;
@@ -736,6 +895,11 @@ export declare class DraftTransferTx {
736
895
  getTransactionStatus(txDigest: string): Promise<TransactionStatus>;
737
896
  }
738
897
 
898
+ declare enum Environment {
899
+ Prod = "prod",
900
+ Staging = "staging"
901
+ }
902
+
739
903
  export declare interface ExecutionResult {
740
904
  readonly success: boolean;
741
905
  readonly txDigest?: string;
@@ -743,6 +907,116 @@ export declare interface ExecutionResult {
743
907
  readonly error?: string;
744
908
  }
745
909
 
910
+ 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;
911
+
912
+ export declare type ExtendAggregatorSwapParam = {
913
+ protocol: AggregatorProtocol.AFTERMATH_CPMM;
914
+ coinLpType: string;
915
+ } | {
916
+ protocol: AggregatorProtocol.DEEPBOOK_V3;
917
+ deepFeeCoin?: TransactionObjectArgument;
918
+ } | {
919
+ protocol: AggregatorProtocol.FLOWX_CLMM;
920
+ poolFeeRate: string;
921
+ } | {
922
+ protocol: AggregatorProtocol.HAEDAL_CPMM;
923
+ pythPriceFeedIdA: PythPriceFeedId;
924
+ pythPriceFeedIdB: PythPriceFeedId;
925
+ } | {
926
+ protocol: AggregatorProtocol.HAEDAL_CPMM_V2;
927
+ pythPriceFeedIdBase: PythPriceFeedId;
928
+ } | ({
929
+ protocol: AggregatorProtocol.METASTABLE;
930
+ whitelistedAppId: string;
931
+ createCapPackageId: string;
932
+ createCapModule: string;
933
+ createCapAllTypeParams: boolean;
934
+ } & ({
935
+ metaCoin: Metastable.MetaCoinType.SUPER_SUI;
936
+ registryId: string;
937
+ } | {
938
+ metaCoin: Metastable.MetaCoinType.MUSD;
939
+ pythPriceFeedIdMeta: PythPriceFeedId;
940
+ } | {
941
+ metaCoin: Metastable.MetaCoinType.METH;
942
+ pythPriceFeedIdMeta: PythPriceFeedId;
943
+ pythPriceFeedIdEth: PythPriceFeedId;
944
+ })) | ({
945
+ protocol: AggregatorProtocol.OBRIC;
946
+ } & ({
947
+ pythPriceFeedIdA: PythPriceFeedId;
948
+ pythPriceFeedIdB: PythPriceFeedId;
949
+ } | {
950
+ priceInfoObjIdA: string;
951
+ priceInfoObjIdB: string;
952
+ })) | {
953
+ protocol: AggregatorProtocol.SCALLOP;
954
+ scoinTreasury: string;
955
+ } | {
956
+ protocol: AggregatorProtocol.SEVENK_CPMM;
957
+ coinLpType: string;
958
+ pythPriceFeedIdA: PythPriceFeedId;
959
+ pythPriceFeedIdB: PythPriceFeedId;
960
+ oracleConfigA: string;
961
+ oracleConfigB: string;
962
+ } | {
963
+ protocol: AggregatorProtocol.STEAMM_CPMM;
964
+ bankAId: string;
965
+ bankBId: string;
966
+ lendingMarketId: string;
967
+ lendingMarketType: string;
968
+ bCoinAType: string;
969
+ bCoinBType: string;
970
+ lpBCoinType: string;
971
+ } | {
972
+ protocol: AggregatorProtocol.STEAMM_OMM;
973
+ bankAId: string;
974
+ bankBId: string;
975
+ lendingMarketId: string;
976
+ lendingMarketType: string;
977
+ bCoinAType: string;
978
+ bCoinBType: string;
979
+ lpBCoinType: string;
980
+ pythPriceFeedIdA: PythPriceFeedId;
981
+ pythPriceFeedIdB: PythPriceFeedId;
982
+ oracleRegistryId: string;
983
+ oracleIndexA: string;
984
+ oracleIndexB: string;
985
+ } | {
986
+ protocol: AggregatorProtocol.STEAMM_OMM_V2;
987
+ bankAId: string;
988
+ bankBId: string;
989
+ lendingMarketId: string;
990
+ lendingMarketType: string;
991
+ bCoinAType: string;
992
+ bCoinBType: string;
993
+ lpBCoinType: string;
994
+ pythPriceFeedIdA: PythPriceFeedId;
995
+ pythPriceFeedIdB: PythPriceFeedId;
996
+ oracleRegistryId: string;
997
+ oracleIndexA: string;
998
+ oracleIndexB: string;
999
+ } | {
1000
+ protocol: AggregatorProtocol.TURBOS_CLMM;
1001
+ coinFeeType: string;
1002
+ } | {
1003
+ protocol: AggregatorProtocol.TRADEPORT_CLMM;
1004
+ poolFeeRate: string;
1005
+ } | {
1006
+ protocol: AggregatorProtocol.MOVEPUMP;
1007
+ expectedAmountOut: string;
1008
+ } | {
1009
+ protocol: Exclude<AggregatorProtocol, ExtendAggregatorProtocol>;
1010
+ };
1011
+
1012
+ export declare namespace FerraClmm {
1013
+ const FERRA_GLOBAL_CONFIG_ID = "0x2cd8382c19e6994f16df204e9b8cddd04bdc486c251de75ac66ac4e48e3e7081";
1014
+ }
1015
+
1016
+ export declare namespace FerraDlmm {
1017
+ const FERRA_GLOBAL_CONFIG_ID = "0x5c9dacf5a678ea15b8569d65960330307e23d429289ca380e665b1aa175ebeca";
1018
+ }
1019
+
746
1020
  export declare type FinalTradeRoute = {
747
1021
  coinIn: string;
748
1022
  coinOut: string;
@@ -781,7 +1055,9 @@ export declare class FlowXAggregator {
781
1055
  * @param params.coinOutType - Type/address of output token
782
1056
  * @returns Promise resolving to routes result with pricing and path information, or null if no route found
783
1057
  */
784
- getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, }: GetTradeRouteRequest_6): Promise<GetRoutesResult<Coin, Coin> | null>;
1058
+ getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, supportedProtocols, }: GetTradeRouteRequest_6 & {
1059
+ supportedProtocols?: Protocol[];
1060
+ }): Promise<GetRoutesResult<Coin, Coin> | null>;
785
1061
  /**
786
1062
  * Builds a transaction for executing a trade route from FlowX aggregator
787
1063
  * @param params - Transaction parameters
@@ -807,6 +1083,100 @@ export declare type FlowXAggregatorConfig = {
807
1083
  flowxApiKey?: string;
808
1084
  };
809
1085
 
1086
+ export declare namespace FlowXAggregatorConverter {
1087
+ export interface FlowXSwapRoute {
1088
+ pool: {
1089
+ id: string;
1090
+ };
1091
+ input: {
1092
+ coinType: string;
1093
+ };
1094
+ output: {
1095
+ coinType: string;
1096
+ };
1097
+ amountIn: {
1098
+ toString(): string;
1099
+ };
1100
+ amountOut: {
1101
+ toString(): string;
1102
+ };
1103
+ xForY?: boolean;
1104
+ protocol(): Protocol;
1105
+ poolFee?: number;
1106
+ lpCoinType?: string;
1107
+ oracles?: Array<{
1108
+ priceId: string;
1109
+ oracleIndex?: number;
1110
+ oracleId?: string;
1111
+ }>;
1112
+ xPriceId?: string;
1113
+ yPriceId?: string;
1114
+ poolStructTag?: string;
1115
+ bankXInfo?: {
1116
+ bankId: string;
1117
+ lendingMarketId: string;
1118
+ lendingMarketType: string;
1119
+ bTokenType: string;
1120
+ };
1121
+ quoterType?: "constant_product" | "oracle" | "oracle_v2";
1122
+ bankYInfo?: {
1123
+ bankId: string;
1124
+ bTokenType: string;
1125
+ };
1126
+ poolInfo?: {
1127
+ lpTokenType: string;
1128
+ };
1129
+ protocolConfig?: {
1130
+ oracleRegistryId?: string;
1131
+ mETHVault?: {
1132
+ metaCoinType: string;
1133
+ metaVaultIntegrationObjectId: string;
1134
+ metaVaultIntegrationPackageId: string;
1135
+ vaultId: string;
1136
+ };
1137
+ mUSDVault?: {
1138
+ metaCoinType: string;
1139
+ metaVaultIntegrationObjectId: string;
1140
+ metaVaultIntegrationPackageId: string;
1141
+ vaultId: string;
1142
+ };
1143
+ superSUIVault?: {
1144
+ defaultMetaVaultIntegrationObjectId: string;
1145
+ defaultMetaVaultIntegrationPackageId: string;
1146
+ exchangeRateRegistryObjectId: string;
1147
+ mappingMetaVaultIntegrationObjectId: Record<string, string>;
1148
+ mappingMetaVaultIntegrationPackageId: Record<string, string>;
1149
+ metaCoinType: string;
1150
+ vaultId: string;
1151
+ };
1152
+ };
1153
+ mappingMetaCoinType?: Record<string, string>;
1154
+ capacityCapCreators?: Record<string, unknown>;
1155
+ }
1156
+ export type UnsupportedDex = (typeof UNSUPPORTED_PROTOCOLS)[number];
1157
+ const UNSUPPORTED_PROTOCOLS: readonly [Protocol.HOP_FUN, Protocol.FLOWX_PMM, Protocol.DEEPBOOK, Protocol.IPX_TIDE, Protocol.METASTABLE];
1158
+ export type SupportedProtocol = Exclude<Protocol, UnsupportedDex>;
1159
+ const SUPPORTED_PROTOCOLS: SupportedProtocol[];
1160
+ const toMetaAggregatorBasePath: (swap: FlowXSwapRoute) => Omit<MetaAggregatorBasePath, "aToB">;
1161
+ const toMetaAggregatorPath: (swap: FlowXSwapRoute) => MetaAggregatorPath;
1162
+ export function toMetaAggregatorPaths<CInput extends Coin_2, COutput extends Coin_2>(routes: Route<CInput, COutput>[]): MetaAggregatorPath[];
1163
+ export function toMetaAggregatorBuildTxParams<CInput extends Coin_2, COutput extends Coin_2>(params: BuildTxFromRawRouteParams & {
1164
+ rawRoute: GetRoutesResult<CInput, COutput>;
1165
+ }): MetaAggregator.BuildAggregatorSwapTransactionParam;
1166
+ {};
1167
+ }
1168
+
1169
+ export declare namespace FlowxCpmm {
1170
+ const CONTAINER_OBJ_ID = "0xb65dcbf63fd3ad5d0ebfbf334780dc9f785eff38a4459e37ab08fa79576ee511";
1171
+ }
1172
+
1173
+ export declare namespace FullsailClmm {
1174
+ const GLOBAL_CONFIG_OBJ_ID = "0xe93baa80cb570b3a494cbf0621b2ba96bc993926d34dc92508c9446f9a05d615";
1175
+ const REWARDER_VAULT_OBJ_ID = "0xfb971d3a2fb98bde74e1c30ba15a3d8bef60a02789e59ae0b91660aeed3e64e1";
1176
+ const STATS_OBJ_ID = "0x6822a33d1d971e040c32f7cc74507010d1fe786f7d06ab89135083ddb07d2dc2";
1177
+ const PRICE_PROVIDER_OBJ_ID = "0x854b2d2c0381bb656ec962f8b443eb082654384cf97885359d1956c7d76e33c9";
1178
+ }
1179
+
810
1180
  export declare function getAmountAfterFee(amount: bigint | string, fee?: string | number): bigint;
811
1181
 
812
1182
  export declare const getCoinObjectIdsByAmount: (suiClient: SuiClient, address: string, amount: string, coinType: string) => Promise<{
@@ -1087,6 +1457,10 @@ declare type GetTransactionRequest_5 = {
1087
1457
  tradeFee?: TradeFeeOptions;
1088
1458
  };
1089
1459
 
1460
+ export declare namespace HaedalLsdWal {
1461
+ const VALIDATOR_ID = "0x7b3ba6de2ae58283f60d5b8dc04bb9e90e4796b3b2e0dea75569f491275242e7";
1462
+ }
1463
+
1090
1464
  export declare interface IModule {
1091
1465
  readonly sdk: NoodlesSdk;
1092
1466
  }
@@ -1097,14 +1471,96 @@ export declare interface IPayModule {
1097
1471
 
1098
1472
  export declare function isSuiCoinType(coinType: string): boolean;
1099
1473
 
1474
+ export declare namespace KriyaClmm {
1475
+ const VERSION_OBJ_ID = "0xf5145a7ac345ca8736cf8c76047d00d6d378f30e81be6f6eb557184d9de93c78";
1476
+ }
1477
+
1100
1478
  declare type LegacySuiClient = SuiClient;
1101
1479
 
1480
+ export declare namespace MagmaAlmm {
1481
+ const FACTORY_OBJ_ID = "0xedb456e93e423dd75a8ddebedd9974bb661195043027e32ce01649d6ccee74cf";
1482
+ const GLOBAL_CONFIG_OBJ_ID = "0x4c4e1402401f72c7d8533d0ed8d5f8949da363c7a3319ccef261ffe153d32f8a";
1483
+ }
1484
+
1485
+ export declare namespace MagmaClmm {
1486
+ const GLOBAL_CONFIG = "0x4c4e1402401f72c7d8533d0ed8d5f8949da363c7a3319ccef261ffe153d32f8a";
1487
+ }
1488
+
1102
1489
  export declare namespace MathUtils {
1103
1490
  export namespace U64 {
1104
1491
  export function mulDivUp(a: bigint, b: bigint, c: bigint): bigint;
1105
1492
  }
1106
1493
  }
1107
1494
 
1495
+ export declare namespace MetaAggregator {
1496
+ export type BuildAggregatorSwapTransactionParam = {
1497
+ tx: Transaction;
1498
+ coinInType: string;
1499
+ coinOutType: string;
1500
+ inputCoin: TransactionObjectArgument;
1501
+ expectedAmountOut: string;
1502
+ minAmountOut: string;
1503
+ aggregatorFeeRate: number;
1504
+ aggregatorFeeRecipient: string;
1505
+ partnerFeeRate?: number;
1506
+ partnerFeeRecipient?: string;
1507
+ tradePaths: MetaAggregatorPath[];
1508
+ pythConnections: SuiPriceServiceConnection[];
1509
+ pythClient: SuiPythClient;
1510
+ packageIdMap?: Map<AggregatorProtocol, string>;
1511
+ };
1512
+ export function buildAggregatorSwapTransaction(params: BuildAggregatorSwapTransactionParam): Promise<TransactionObjectArgument>;
1513
+ }
1514
+
1515
+ export declare type MetaAggregatorBasePath = {
1516
+ poolId: string;
1517
+ coinInType: string;
1518
+ coinOutType: string;
1519
+ aToB: boolean;
1520
+ amountIn: string;
1521
+ packageId?: string;
1522
+ };
1523
+
1524
+ export declare type MetaAggregatorPath = MetaAggregatorBasePath & ExtendAggregatorSwapParam;
1525
+
1526
+ export declare namespace Metastable {
1527
+ const UNIVERSAL_META_VAULT_INTEGRATION_PACKAGE_ID = "0xfd12517a9fc87c6a1f2357ad13b3421fb27a8bd7ca07d5fd5934ac35733baa47";
1528
+ export enum MetaCoinType {
1529
+ SUPER_SUI = "0x790f258062909e3a0ffc78b3c53ac2f62d7084c3bab95644bdeb05add7250001::super_sui::SUPER_SUI",
1530
+ MUSD = "0xe44df51c0b21a27ab915fa1fe2ca610cd3eaa6d9666fe5e62b988bf7f0bd8722::musd::MUSD",
1531
+ METH = "0xccd628c2334c5ed33e6c47d6c21bb664f8b6307b2ac32c2462a61f69a31ebcee::meth::METH"
1532
+ }
1533
+ const VERSION_OBJ_ID = "0x4696559327b35ff2ab26904e7426a1646312e9c836d5c6cff6709a5ccc30915c";
1534
+ export function createCap(params: {
1535
+ txb: Transaction;
1536
+ coinType: string;
1537
+ poolId: string;
1538
+ whitelistedAppId: string;
1539
+ createCapPackageId: string;
1540
+ createCapModule: string;
1541
+ createCapFunc: "create_deposit_cap" | "create_withdraw_cap";
1542
+ createCapAllTypeParams: boolean;
1543
+ pythInfoObjectIdMap: Map<PythPriceFeedId, PythInfoObjectId>;
1544
+ } & ({
1545
+ metaCoin: Metastable.MetaCoinType.SUPER_SUI;
1546
+ registryId: string;
1547
+ } | {
1548
+ metaCoin: Metastable.MetaCoinType.MUSD;
1549
+ pythPriceFeedIdMeta: PythPriceFeedId;
1550
+ } | {
1551
+ metaCoin: Metastable.MetaCoinType.METH;
1552
+ pythPriceFeedIdMeta: PythPriceFeedId;
1553
+ pythPriceFeedIdEth: PythPriceFeedId;
1554
+ })): TransactionObjectArgument;
1555
+ export function getCreateCapModule(metaCoin: MetaCoinType): string;
1556
+ export function isMetaCoinType(type: string): boolean;
1557
+ export function getCreateCapAllTypeParams(metaCoin: MetaCoinType, packageId: string): boolean;
1558
+ }
1559
+
1560
+ export declare namespace MomentumClmm {
1561
+ const VERSION_OBJ_ID = "0x2375a0b1ec12010aaea3b2545acfa2ad34cfbba03ce4b59f4c39e1e25eed1b2a";
1562
+ }
1563
+
1108
1564
  export declare namespace MoonbagsCalculation {
1109
1565
  export function getCurveAmountAfterBuy(params: GetCurveAmountAfterBuyParams, suiClient: SuiClient): Promise<bigint>;
1110
1566
  export function getSuiAmountAfterSell(params: GetSuiAmountAfterSellParams, suiClient: SuiClient): Promise<bigint>;
@@ -1195,25 +1651,44 @@ export declare type MoveObjectStruct<Content> = {
1195
1651
  fields: Content;
1196
1652
  };
1197
1653
 
1654
+ export declare namespace Movepump {
1655
+ const CONFIGURATION_OBJ_ID = "0xd746495d04a6119987c2b9334c5fefd7d8cff52a8a02a3ea4e3995b9a041ace4";
1656
+ }
1657
+
1198
1658
  export declare const NATIVE_USDC_TOKEN_TYPE = "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC";
1199
1659
 
1660
+ declare enum Network {
1661
+ Mainnet = "mainnet",
1662
+ Testnet = "testnet"
1663
+ }
1664
+
1200
1665
  export declare class NoodlesPaySdk {
1666
+ readonly network: Network;
1667
+ readonly env: Environment;
1201
1668
  private _suiClient;
1202
1669
  readonly boostingModule: BoostingModule;
1203
1670
  readonly subscriptionModule: SubscriptionModule;
1204
- constructor();
1671
+ constructor(network?: Network, env?: Environment);
1205
1672
  get suiClient(): SuiClient;
1206
1673
  }
1207
1674
 
1208
1675
  export declare class NoodlesSdk {
1676
+ readonly network: Network;
1677
+ readonly env: Environment;
1209
1678
  readonly options: SdkOptions;
1210
1679
  private _suiClient;
1211
1680
  readonly aggregatorModule: AggregatorModule;
1212
1681
  readonly curveModule: CurveModule;
1213
- constructor(options: SdkOptions);
1682
+ constructor(options: SdkOptions, network?: Network, env?: Environment);
1214
1683
  get suiClient(): SuiClient;
1215
1684
  }
1216
1685
 
1686
+ export declare function normalizeTokenType(type: string): string;
1687
+
1688
+ export declare namespace Obric {
1689
+ const STATE_OBJ_ID = "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8";
1690
+ }
1691
+
1217
1692
  /**
1218
1693
  * Parameters for paying boosting fees for a specific tier.
1219
1694
  */
@@ -1244,8 +1719,34 @@ export declare type PayBoostingWithAdminRequest = {
1244
1719
  currentTx?: Transaction;
1245
1720
  };
1246
1721
 
1247
- /** Payment coin type on SUI */
1248
- export declare const PAYMENT_COIN_TYPE = "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC";
1722
+ export declare type PythInfoObjectId = string;
1723
+
1724
+ export declare namespace PythPrice {
1725
+ const LAST_PACKAGE_ID = "0x8c36ea167c5e6da8c3d60b4fc897416105dcb986471bd81cfbfd38720a4487c0";
1726
+ export function newHolder(tx: Transaction): TransactionResult;
1727
+ export function getPrice(params: {
1728
+ txb: Transaction;
1729
+ coinOracleId: string;
1730
+ holder: TransactionResult;
1731
+ coinPriceId: string;
1732
+ }): void;
1733
+ }
1734
+
1735
+ export declare type PythPriceFeedId = string;
1736
+
1737
+ export declare namespace PythUtils {
1738
+ const PYTH_URLS: string[];
1739
+ const WORMHOLE_STATE_ID = "0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6eab944dd88919c";
1740
+ const PYTH_STATE_ID = "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8";
1741
+ export function newPythConnections(pythUrls?: string[]): SuiPriceServiceConnection[];
1742
+ export function newPthClient(suiClient?: SuiClient): SuiPythClient;
1743
+ export function updatePythPriceIDs(params: {
1744
+ priceFeedIds: PythPriceFeedId[];
1745
+ txb: Transaction;
1746
+ pythConnections: SuiPriceServiceConnection[];
1747
+ pythClient: SuiPythClient;
1748
+ }): Promise<Map<PythPriceFeedId, PythInfoObjectId>>;
1749
+ }
1249
1750
 
1250
1751
  /**
1251
1752
  * Parameters for removing a subscription plan (admin only).
@@ -1271,6 +1772,16 @@ export declare type RemoveTierRequest = {
1271
1772
  currentTx?: Transaction;
1272
1773
  };
1273
1774
 
1775
+ export declare namespace RouterUtils {
1776
+ const RouterSwapFunctionMap: Record<AggregatorProtocol, BuildRouterSwapTxFunction>;
1777
+ export function swap(param: BuildRouterSwapTxParam): void;
1778
+ }
1779
+
1780
+ export declare namespace Scallop {
1781
+ const VERSION_OBJ_ID = "0x07871c4b3c847a0f674510d4978d5cf6f960452795e8ff6f189fd2088a3f6ac7";
1782
+ const MARKET_OBJ_ID = "0xa757975255146dc9686aa823b7838b507f315d704f428cbadad2f4ea061939d9";
1783
+ }
1784
+
1274
1785
  export declare type SdkOptions = {
1275
1786
  tradeFee: TradeFeeOptions;
1276
1787
  /** Optional API key for Astros aggregator access */
@@ -1339,7 +1850,9 @@ export declare class SevenKAggregator {
1339
1850
  * @param params.coinOutType - Type/address of output token
1340
1851
  * @returns Promise resolving to quote response with pricing and route information, or null if no route found
1341
1852
  */
1342
- getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, }: GetTradeRouteRequest_2): Promise<QuoteResponse | null>;
1853
+ getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, supportedProtocols, }: GetTradeRouteRequest_2 & {
1854
+ supportedProtocols?: SourceDex[];
1855
+ }): Promise<QuoteResponse | null>;
1343
1856
  /**
1344
1857
  * Builds a transaction for executing a trade route from 7K Protocol
1345
1858
  * @param params - Transaction parameters
@@ -1365,10 +1878,53 @@ export declare type SevenKAggregatorConfig = {
1365
1878
  sevenKApiKey?: string;
1366
1879
  };
1367
1880
 
1881
+ export declare namespace SevenKAggregatorConverter {
1882
+ const UNSUPPORTED_PROTOCOLS: readonly ["bluefinx"];
1883
+ export type UnsupportedProtocol = (typeof UNSUPPORTED_PROTOCOLS)[number];
1884
+ export type SupportedProtocol = Exclude<SourceDex, UnsupportedProtocol>;
1885
+ const SUPPORTED_PROTOCOLS: SupportedProtocol[];
1886
+ export function toMetaAggregatorPath(swap: TxSorSwap): MetaAggregatorPath;
1887
+ export function toMetaAggregatorPaths(swaps: TxSorSwap[]): MetaAggregatorPath[];
1888
+ export function toMetaAggregatorBuildTxParams(param: BuildTxFromRawRouteParams & {
1889
+ rawRoute: QuoteResponse;
1890
+ }): MetaAggregator.BuildAggregatorSwapTransactionParam;
1891
+ {};
1892
+ }
1893
+
1894
+ export declare namespace SevenkCpmm {
1895
+ const ORACLE_HOLDER_OBJ_ID = "0x8c36ea167c5e6da8c3d60b4fc897416105dcb986471bd81cfbfd38720a4487c0";
1896
+ }
1897
+
1898
+ export declare namespace SevenkFun {
1899
+ const CONFIGURATION_OBJ_ID = "0xe79fff6c77d81f9a8efb729e25bf0037deec42518d40b978f274a4915d7e1ec9";
1900
+ }
1901
+
1902
+ declare enum SourceAggregatorRoute {
1903
+ CETUS = "CETUS",
1904
+ FLOWX = "FLOWX",
1905
+ SEVENK = "SEVENK"
1906
+ }
1907
+
1368
1908
  export declare function splitSuiCoinAfterFeeFromBuyTx(params: BuildSwapTxParams, suiClient: SuiClient): Promise<BuildTxResult>;
1369
1909
 
1370
1910
  export declare function splitSuiCoinAfterFeeFromSellTx(tx: Transaction, params: BuildSwapTxParams, suiCoin: TransactionObjectArgument): Promise<BuildTxResult>;
1371
1911
 
1912
+ export declare namespace SrmCpmm {
1913
+ const CONFIG_OBJ_ID = "0x881fd0a12ca4fa48991f5c27ba57d17f1ec147fa15f43b3cb760cc3bd7ba9402";
1914
+ }
1915
+
1916
+ export declare namespace Steamm {
1917
+ export namespace Oracle {
1918
+ const PACKAGE_ID = "0xe84b649199654d18c38e727212f5d8dacfc3cf78d60d0a7fc85fd589f280eb2b";
1919
+ export function getPythPrice(param: {
1920
+ txb: Transaction;
1921
+ oracleRegistryId: string;
1922
+ priceInfoId: string;
1923
+ oracleIndex: string;
1924
+ }): TransactionObjectArgument;
1925
+ }
1926
+ }
1927
+
1372
1928
  /**
1373
1929
  * Parameters for subscribing to a plan.
1374
1930
  */
@@ -1403,14 +1959,7 @@ export declare type SubscribePlanWithAdminRequest = {
1403
1959
  currentTx?: Transaction;
1404
1960
  };
1405
1961
 
1406
- /** Admin capability object ID for privileged operations */
1407
- export declare const SUBSCRIPTION_ADMIN_CAP_ID = "0xf375fcb3d95934143766cab2028ab49441fa04ef2ce27c08c01004c455bcbad4";
1408
-
1409
- /** Configuration object ID for subscription settings */
1410
- export declare const SUBSCRIPTION_CONFIG_ID = "0x3eb7bd15f61b7cc1a9fd36151e9c3d05aa37bfadb0a58c3a26a6c02c2e99f3ca";
1411
-
1412
- /** Sui package ID for the subscription protocol */
1413
- export declare const SUBSCRIPTION_PACKAGE_ID = "0x3dd678c250a667f1551bc4b9e35fd070896f4775dd2900d5cb2910d2aea0b068";
1962
+ export declare const SUBSCRIPTION_CONFIG: Record<Environment, SubscriptionPkgConfig>;
1414
1963
 
1415
1964
  /**
1416
1965
  * Complete subscription protocol configuration.
@@ -1542,6 +2091,13 @@ export declare class SubscriptionModule implements IPayModule {
1542
2091
  buildSetAcceptedPaymentTypeTx({ adminAddress, paymentCoinType, currentTx, }: SetAcceptedPaymentTypeRequest): Promise<Transaction>;
1543
2092
  }
1544
2093
 
2094
+ declare type SubscriptionPkgConfig = {
2095
+ packageId: string;
2096
+ configId: string;
2097
+ adminCapId: string;
2098
+ paymentCoinType: string;
2099
+ };
2100
+
1545
2101
  /**
1546
2102
  * Information about a specific subscription plan.
1547
2103
  */
@@ -1611,6 +2167,11 @@ export declare type TradePath = {
1611
2167
  amountOut: bigint;
1612
2168
  };
1613
2169
 
2170
+ export declare namespace TradeportClmm {
2171
+ const VERSIONED = "0x0309b66202e9aaf470081fffee7ffc0fbd50e3b7400d4f56fd06502e4dbbd676";
2172
+ const POOL_REGISTRY = "0xcd0a614c4cbbf173f59dee2602c43a1717f283215ed7a0bb1d55d786af16fbcd";
2173
+ }
2174
+
1614
2175
  export declare type TradeRoute = {
1615
2176
  coinIn: string;
1616
2177
  coinOut: string;
@@ -1621,6 +2182,14 @@ export declare type TradeRoute = {
1621
2182
 
1622
2183
  export declare type TransactionStatus = "success" | "failure" | "pending";
1623
2184
 
2185
+ export declare namespace TurbosClmm {
2186
+ const POOL_VERSIONED = "0xf1cf0e81048df168ebeb1b8030fad24b3e0b53ae827c25053fff0779c1445b6f";
2187
+ }
2188
+
2189
+ export declare namespace TurbosFun {
2190
+ const CONFIGURATION_OBJ_ID = "0xd86685fc3c3d989385b9311ef55bfc01653105670209ac4276ebb6c83d7df928";
2191
+ }
2192
+
1624
2193
  /**
1625
2194
  * Parameters for updating the fee receiver address (admin only).
1626
2195
  */
@@ -1705,4 +2274,12 @@ export declare type UpgradePlanRequest = {
1705
2274
 
1706
2275
  export declare const USDC_TOKEN_TYPE = "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN";
1707
2276
 
2277
+ export declare namespace Volo {
2278
+ const VOLO_CERT_METADATA_ID = "0x680cd26af32b2bde8d3361e804c53ec1d1cfe24c7f039eb7f549e8dfde389a60";
2279
+ }
2280
+
2281
+ export declare namespace Walrus {
2282
+ const STAKING_OBJ_ID = "0x10b9d30c28448939ce6c4d6c6e0ffce4a7f8a4ada8248bdad09ef8b70e4a3904";
2283
+ }
2284
+
1708
2285
  export { }