@minswap/noodles-sdk 0.1.2-beta.0 → 0.2.0

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
@@ -5,7 +5,6 @@ import type { MemezPumpSDK } from '@interest-protocol/memez-fun-sdk';
5
5
  import { Path } from '@cetusprotocol/aggregator-sdk';
6
6
  import type { PreSwapLpChangeParams } from '@cetusprotocol/aggregator-sdk';
7
7
  import { Protocol } from '@flowx-finance/sdk';
8
- import { Quote } from '@naviprotocol/astros-aggregator-sdk';
9
8
  import { QuoteResponse } from '@bluefin-exchange/bluefin7k-aggregator-sdk';
10
9
  import type { Route } from '@flowx-finance/sdk/src/universal-router/entities';
11
10
  import type { RouterCompleteTradeRoute } from 'aftermath-ts-sdk';
@@ -67,30 +66,13 @@ export declare type AddTierRequest = {
67
66
  currentTx?: Transaction;
68
67
  };
69
68
 
70
- /** Admin capability object ID for privileged operations */
71
69
  export declare const ADMIN_CAP_ID = "0x13d101f44a0710a5475bec5f492a87b80e03d92d1cf540f26096f65850b23d26";
72
70
 
73
- /**
74
- * Aftermath DEX aggregator client for routing trades across multiple pools
75
- */
76
71
  export declare class AftermathAggregator {
77
- /** Configuration settings for the aggregator */
78
72
  private _config;
79
- /** Aftermath SDK client instance (lazy-loaded on first use) */
80
73
  private _aftermathClient;
81
- /** Sui blockchain client */
82
74
  private _suiClient;
83
- /**
84
- * Creates a new AftermathAggregator instance
85
- * @param config - Aggregator configuration including optional API settings
86
- * @param suiClient - Sui client for blockchain interactions
87
- */
88
75
  constructor(config: AftermathAggregatorConfig, suiClient: SuiJsonRpcClient);
89
- /**
90
- * Lazy-loads and returns the Aftermath client, initializing it on first use
91
- * Handles authentication if API key is provided in config
92
- * @returns Promise resolving to initialized Aftermath client
93
- */
94
76
  private aftermathClient;
95
77
  /**
96
78
  * Finds the optimal trade route for swapping tokens
@@ -116,15 +98,10 @@ export declare namespace AftermathAggregator {
116
98
  export function toCommonTradeRoutes(tradeRoute: RouterCompleteTradeRoute): FinalTradeRoute | null;
117
99
  }
118
100
 
119
- /**
120
- * Configuration options for the Aftermath aggregator
121
- */
122
101
  export declare type AftermathAggregatorConfig = {
123
- /** Default trade fee settings applied to each trade */
124
102
  defaultTradeFee: TradeFeeOptions;
125
- /** Optional API key for authenticated Aftermath API access */
126
103
  aftermathApiKey?: string;
127
- /** Optional custom Aftermath API endpoint (defaults to MAINNET if not provided) */
104
+ /** Defaults to the MAINNET endpoint when omitted. */
128
105
  aftermathApiEndpoint?: string;
129
106
  };
130
107
 
@@ -155,36 +132,18 @@ export declare namespace AggregatorConverter {
155
132
  }
156
133
 
157
134
  /**
158
- * Main aggregator module that provides unified access to multiple DEX aggregators
159
- * Supports routing trades through Cetus, FlowX, Astros, Aftermath, and 7K Protocol
135
+ * Unified access to the supported DEX aggregators (Cetus, FlowX, Aftermath, 7K).
160
136
  */
161
137
  export declare class AggregatorModule implements IModule {
162
- /** Reference to the main Noodles SDK instance */
163
138
  readonly sdk: NoodlesSdk;
164
- /** Astros/Navi Protocol aggregator instance */
165
- private _astrosAggregator;
166
- /** Aftermath Finance aggregator instance */
167
139
  private _aftermathAggregator;
168
- /** 7K Protocol aggregator instance */
169
140
  private _sevenkAggregator;
170
- /** Cetus Protocol aggregator instance */
171
141
  private _cetusAggregator;
172
- /** FlowX Finance aggregator instance */
173
142
  private _flowXAggregator;
174
- /**
175
- * Creates a new AggregatorModule instance with all supported aggregators
176
- * @param sdk - The main Noodles SDK instance containing configuration
177
- */
178
143
  constructor(sdk: NoodlesSdk);
179
- /** Gets the Astros/Navi Protocol aggregator instance */
180
- get astrosAggregator(): AstrosAggregator;
181
- /** Gets the Aftermath Finance aggregator instance */
182
144
  get aftermathAggregator(): AftermathAggregator;
183
- /** Gets the 7K Protocol aggregator instance */
184
145
  get sevenkAggregator(): SevenKAggregator;
185
- /** Gets the Cetus Protocol aggregator instance */
186
146
  get cetusAggregator(): CetusAggregator;
187
- /** Gets the FlowX Finance aggregator instance */
188
147
  get flowXAggregator(): FlowXAggregator;
189
148
  /**
190
149
  * Finds the optimal trade route using the specified aggregator
@@ -290,111 +249,10 @@ export declare type AggregatorTradeRoute<T extends SupportedAggregator> = AllAgg
290
249
  export declare type AllAggregatorTradeRoute = {
291
250
  [SupportedAggregator.FLOWX]: GetRoutesResult<Coin, Coin>;
292
251
  [SupportedAggregator.CETUS]: RouterDataV3;
293
- [SupportedAggregator.ASTROS]: Quote;
294
252
  [SupportedAggregator.AFTERMATH]: RouterCompleteTradeRoute;
295
253
  [SupportedAggregator.SEVENK]: QuoteResponse;
296
254
  };
297
255
 
298
- /**
299
- * Astros DEX aggregator client for routing trades across multiple pools
300
- * Provides access to liquidity aggregation from various DEX protocols
301
- */
302
- export declare class AstrosAggregator {
303
- /** Configuration settings for the aggregator */
304
- private _config;
305
- /** Sui blockchain client */
306
- private _suiClient;
307
- /**
308
- * Creates a new AstrosAggregator instance
309
- * @param config - Aggregator configuration including optional fee settings
310
- * @param suiClient - Sui client for blockchain interactions
311
- */
312
- constructor(config: AstrosAggregatorConfig, suiClient: SuiJsonRpcClient);
313
- /**
314
- * Finds the optimal trade route for swapping tokens using Astros aggregator
315
- * @param params - Trade route parameters
316
- * @param params.coinInAmount - Amount of input token to swap
317
- * @param params.coinInType - Type/address of input token
318
- * @param params.coinOutType - Type/address of output token
319
- * @returns Promise resolving to quote with pricing and route information, or null if no route found
320
- */
321
- getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, }: GetTradeRouteRequest_4): Promise<Quote | null>;
322
- /**
323
- * Merges multiple coin objects into a single coin for trading
324
- * Optimizes coin usage by merging smaller coins into larger ones
325
- * @param txb - Transaction builder instance
326
- * @param coins - Array of coin objects to merge
327
- * @param amount - Required amount for the trade
328
- * @returns Transaction object reference for the merged coin
329
- */
330
- private returnMergedCoins;
331
- /**
332
- * Builds a transaction for executing a trade route from Astros aggregator
333
- * @param params - Transaction parameters
334
- * @param params.completeRoute - Complete quote from getTradeRoute() (aliased as quote)
335
- * @param params.walletAddress - Address of the wallet executing the trade
336
- * @param params.slippage - Maximum acceptable slippage (e.g., 0.01 for 1%)
337
- * @returns Promise resolving to built transaction bytes ready for signing and execution
338
- */
339
- getTransaction({ completeRoute: quote, walletAddress, slippage, tradeFee, }: GetTransactionRequest_3): Promise<Uint8Array>;
340
- }
341
-
342
- export declare namespace AstrosAggregator {
343
- export function toCommonTradeRoutes(tradeRoute: Quote, coinInType: string, coinOutType: string): FinalTradeRoute | null;
344
- }
345
-
346
- /**
347
- * Configuration options for the Astros aggregator
348
- */
349
- export declare type AstrosAggregatorConfig = {
350
- /** Default trade fee settings applied to each trade */
351
- defaultTradeFee: TradeFeeOptions;
352
- /** Optional API key for Astros aggregator access */
353
- astrosApiKey?: string;
354
- };
355
-
356
- /**
357
- * Individual trade path within a route
358
- */
359
- export declare type AstrosTradePath = {
360
- /** Unique identifier for the path */
361
- id: string;
362
- /** Type of the trade path */
363
- type: string;
364
- /** Liquidity provider name */
365
- provider: string;
366
- /** Source token type */
367
- from: string;
368
- /** Target token type */
369
- target: string;
370
- /** Direction flag for A to B trade */
371
- a2b: boolean;
372
- /** Trade direction */
373
- direction: boolean;
374
- /** Fee rate for this path */
375
- fee_rate: number;
376
- /** Lot size for the trade */
377
- lot_size: number;
378
- /** Input amount for this path */
379
- amount_in: number;
380
- /** Output amount for this path */
381
- amount_out: number;
382
- };
383
-
384
- /**
385
- * Trade route information from Astros aggregator
386
- */
387
- export declare type AstrosTradeRoute = {
388
- /** Array of trade paths in the route */
389
- path: AstrosTradePath[];
390
- /** Total input amount */
391
- amount_in: number;
392
- /** Total output amount */
393
- amount_out: number;
394
- /** Initial price for the trade */
395
- initial_price: number;
396
- };
397
-
398
256
  export declare type BalanceContent = {
399
257
  balance: string;
400
258
  id: {
@@ -544,7 +402,6 @@ export declare namespace Bolt {
544
402
  const ORACLE_OBJ_ID = "0xfa3975b98f3d0e3df18ed88ae6e69db31836b3f4212df02fae144b1e5a89ca8e";
545
403
  }
546
404
 
547
- /** Sui package ID for the boosting protocol */
548
405
  export declare const BOOSTING_PACKAGE_ID = "0x25fa0eb553dd69fa6a8028f73a38f1df7f289fa88a58ed3d7dc5a5360155bb19";
549
406
 
550
407
  /**
@@ -569,13 +426,7 @@ export declare type BoostingConfig = {
569
426
  * - Updating fee receiver settings
570
427
  */
571
428
  export declare class BoostingModule implements IPayModule {
572
- /** Reference to the main SDK instance */
573
429
  sdk: NoodlesPaySdk;
574
- /**
575
- * Creates a new BoostingModule instance.
576
- *
577
- * @param sdk - The main Noodles Pay SDK instance
578
- */
579
430
  constructor(sdk: NoodlesPaySdk);
580
431
  /**
581
432
  * Retrieves the current boosting configuration from the blockchain.
@@ -705,31 +556,12 @@ export declare type BuyMoreCUPlanRequest = {
705
556
  currentTx?: Transaction;
706
557
  };
707
558
 
708
- /**
709
- * Cetus DEX aggregator client for routing trades across multiple pools
710
- * Cetus is a concentrated liquidity protocol that provides efficient trading
711
- */
712
559
  export declare class CetusAggregator {
713
- /** Configuration settings for the aggregator */
714
560
  private _config;
715
- /** Sui blockchain client */
716
561
  private _suiClient;
717
- /** Cetus aggregator client instance (lazy-loaded) */
718
562
  private _cetusClient;
719
563
  private getCetusClientConfig;
720
- /**
721
- * Creates a new CetusAggregator instance
722
- * @param config - Aggregator configuration including fee settings and optional API credentials
723
- * @param suiClient - Sui client for blockchain interactions
724
- */
725
564
  constructor(config: CetusAggregatorConfig, suiClient: SuiGrpcClient);
726
- /**
727
- * Lazy-loads and returns the Cetus aggregator client, initializing it on first use
728
- * Configures the client with overlay fees, API credentials, and partner information
729
- * @param walletAddress - Optional wallet address for signing transactions
730
- * @param tradeFee - Optional custom trade fee settings for this client instance
731
- * @returns Initialized Cetus AggregatorClient instance
732
- */
733
565
  private cetusClient;
734
566
  /**
735
567
  * Finds the optimal trade route for swapping tokens using Cetus aggregator
@@ -740,7 +572,7 @@ export declare class CetusAggregator {
740
572
  * @param params.metaAggregator - If true, only meta-supported protocols are used and no extra overlay fee is applied
741
573
  * @returns Promise resolving to router data with pricing and route information, or null if no route found
742
574
  */
743
- getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, metaAggregator, supportedProtocols, }: GetTradeRouteRequest_5 & {
575
+ getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, metaAggregator, supportedProtocols, }: GetTradeRouteRequest_4 & {
744
576
  supportedProtocols?: string[];
745
577
  }): Promise<RouterDataV3 | null>;
746
578
  /**
@@ -751,24 +583,17 @@ export declare class CetusAggregator {
751
583
  * @param params.slippage - Maximum acceptable slippage (e.g., 0.01 for 1%)
752
584
  * @returns Promise resolving to built transaction bytes ready for signing and execution
753
585
  */
754
- getTransaction({ completeRoute: routers, walletAddress, slippage, tradeFee, metaAggregator, }: GetTransactionRequest_4): Promise<Uint8Array>;
586
+ getTransaction({ completeRoute: routers, walletAddress, slippage, tradeFee, metaAggregator, }: GetTransactionRequest_3): Promise<Uint8Array>;
755
587
  }
756
588
 
757
589
  export declare namespace CetusAggregator {
758
590
  export function toCommonTradeRoutes(tradeRoute: RouterDataV3, coinInType: string, coinOutType: string): FinalTradeRoute | null;
759
591
  }
760
592
 
761
- /**
762
- * Configuration options for the Cetus aggregator
763
- */
764
593
  export declare type CetusAggregatorConfig = {
765
- /** Default trade fee settings applied to each trade */
766
594
  defaultTradeFee: TradeFeeOptions;
767
- /** Optional API key for Cetus aggregator access */
768
595
  cetusApiKey?: string;
769
- /** Optional custom Cetus API endpoint */
770
596
  cetusApiEndpoint?: string;
771
- /** Optional partner ID for Cetus integration */
772
597
  cetusPartnerId?: string;
773
598
  };
774
599
 
@@ -862,7 +687,6 @@ export declare interface CommonTxParams {
862
687
  isSponsored?: boolean;
863
688
  }
864
689
 
865
- /** Configuration object ID for boosting settings */
866
690
  export declare const CONFIG_ID = "0x8b1a8ac6e34688cd8f8f8e5fefa9d5fb9e1ff74d2f132f8e208ae5ac9cc530bb";
867
691
 
868
692
  export declare class CurveModule implements IModule {
@@ -896,30 +720,9 @@ export declare type DraftTransaction = {
896
720
  export declare class DraftTransferTx {
897
721
  private readonly suiClient;
898
722
  constructor(suiClient: SuiGrpcClient);
899
- /**
900
- * Validates private key against expected sender address
901
- * @private
902
- */
903
723
  private validatePrivateKey;
904
- /**
905
- * Creates a draft transaction for SUI transfer
906
- * @param params - Transfer parameters
907
- * @returns Draft transaction object with encoded transaction data
908
- * @throws {Error} If validation fails or transaction building fails
909
- */
910
724
  createDraft(sender: string, recipient: string, amountMIST: bigint): Promise<DraftTransaction>;
911
- /**
912
- * Executes a draft transaction on the Sui network
913
- * @param draftTx - Draft transaction to execute
914
- * @param privateKey - Sender's private key
915
- * @returns Execution result with success status and transaction details
916
- */
917
725
  execute(draftTx: DraftTransaction, privateKey: string): Promise<ExecutionResult>;
918
- /**
919
- * Verifies the status of a transaction on the Sui network
920
- * @param txDigest - Transaction digest to check
921
- * @returns Transaction status: 'success', 'failure', or 'pending'
922
- */
923
726
  getTransactionStatus(txDigest: string): Promise<TransactionStatus>;
924
727
  }
925
728
 
@@ -1053,27 +856,10 @@ export declare type FinalTradeRoute = {
1053
856
  routes: TradeRoute[];
1054
857
  };
1055
858
 
1056
- /**
1057
- * FlowX DEX aggregator client for routing trades across multiple pools
1058
- * FlowX provides liquidity aggregation and optimized routing for Sui ecosystem
1059
- */
1060
859
  export declare class FlowXAggregator {
1061
- /** Configuration settings for the aggregator */
1062
860
  private _config;
1063
- /** Sui blockchain client */
1064
861
  private _suiClient;
1065
- /**
1066
- * Creates a new FlowXAggregator instance
1067
- * @param config - Aggregator configuration including fee settings and optional API key
1068
- * @param suiClient - Sui client for blockchain interactions
1069
- */
1070
862
  constructor(config: FlowXAggregatorConfig, suiClient: SuiGrpcClient);
1071
- /**
1072
- * Creates a commission configuration for FlowX trades
1073
- * @param coinInType - Type/address of the input coin for commission calculation
1074
- * @param tradeFee - Optional custom trade fee settings for this commission
1075
- * @returns Commission instance configured with fee recipient, percentage, and coin type
1076
- */
1077
863
  private getCommission;
1078
864
  /**
1079
865
  * Finds the optimal trade route for swapping tokens using FlowX aggregator
@@ -1084,7 +870,7 @@ export declare class FlowXAggregator {
1084
870
  * @param params.metaAggregator - If true, only meta-supported DEXs are used and no extra commission is applied
1085
871
  * @returns Promise resolving to routes result with pricing and path information, or null if no route found
1086
872
  */
1087
- getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, metaAggregator, supportedProtocols, }: GetTradeRouteRequest_6 & {
873
+ getTradeRoute({ coinInAmount, coinInType, coinOutType, tradeFee, metaAggregator, supportedProtocols, }: GetTradeRouteRequest_5 & {
1088
874
  supportedProtocols?: Protocol[];
1089
875
  }): Promise<GetRoutesResult<Coin, Coin> | null>;
1090
876
  /**
@@ -1095,20 +881,15 @@ export declare class FlowXAggregator {
1095
881
  * @param params.slippage - Maximum acceptable slippage (e.g., 0.01 for 1%)
1096
882
  * @returns Promise resolving to built transaction bytes ready for signing and execution
1097
883
  */
1098
- getTransaction({ walletAddress, completeRoute, slippage, tradeFee, metaAggregator, }: GetTransactionRequest_5): Promise<Uint8Array>;
884
+ getTransaction({ walletAddress, completeRoute, slippage, tradeFee, metaAggregator, }: GetTransactionRequest_4): Promise<Uint8Array>;
1099
885
  }
1100
886
 
1101
887
  export declare namespace FlowXAggregator {
1102
888
  export function toCommonTradeRoutes(tradeRoute: GetRoutesResult<Coin, Coin>): FinalTradeRoute | null;
1103
889
  }
1104
890
 
1105
- /**
1106
- * Configuration options for the FlowX aggregator
1107
- */
1108
891
  export declare type FlowXAggregatorConfig = {
1109
- /** Default trade fee settings applied to each trade */
1110
892
  defaultTradeFee: TradeFeeOptions;
1111
- /** Optional API key for FlowX aggregator access */
1112
893
  flowxApiKey?: string;
1113
894
  };
1114
895
 
@@ -1314,226 +1095,133 @@ export declare type GetSuiAmountAfterSellParams = {
1314
1095
  frontendFee?: number | string;
1315
1096
  };
1316
1097
 
1317
- /**
1318
- * Request parameters for getting a trade route from an aggregator
1319
- */
1320
1098
  export declare type GetTradeRouteRequest = {
1321
- /** Amount of input coin to trade (in smallest unit) */
1099
+ /** Input amount in the coin's smallest unit (base-units, not decimals) */
1322
1100
  coinInAmount: bigint;
1323
- /** Type/address of the input coin */
1324
1101
  coinInType: string;
1325
- /** Type/address of the output coin */
1326
1102
  coinOutType: string;
1327
- /** Custom trade fee for this request, if not provided, the default trade fee will be applied */
1103
+ /** Overrides the SDK's default trade fee for this request */
1328
1104
  tradeFee?: TradeFeeOptions;
1329
- /** If true, only meta-supported aggregators/protocols will be used without extra aggregator fees */
1105
+ /** Restrict to meta-supported aggregators, charging no extra aggregator fee */
1330
1106
  metaAggregator?: boolean;
1331
1107
  };
1332
1108
 
1333
- /**
1334
- * Request parameters for getting a trade route
1335
- */
1336
1109
  declare type GetTradeRouteRequest_2 = {
1337
- /** Amount of input coin to trade (in smallest unit) */
1110
+ /** coinInAmount is in the input coin's smallest unit (base units, not decimals). */
1338
1111
  coinInAmount: bigint;
1339
- /** Type/address of the input coin */
1340
1112
  coinInType: string;
1341
- /** Type/address of the output coin */
1342
1113
  coinOutType: string;
1343
- /** Custom trade fee for this request, if not provided, the default trade fee will be applied */
1114
+ /** Overrides defaultTradeFee for this request only. */
1344
1115
  tradeFee?: TradeFeeOptions;
1345
- /** If true, only meta-supported DEXs will be used and no extra commission should be applied */
1116
+ /** When true, restrict to meta-supported DEXs and charge no commission (the meta-aggregator adds its own overlay fee). */
1346
1117
  metaAggregator?: boolean;
1347
1118
  };
1348
1119
 
1349
- /**
1350
- * Request parameters for getting a trade route
1351
- */
1352
1120
  declare type GetTradeRouteRequest_3 = {
1353
- /** Amount of input coin to trade (in smallest unit) */
1121
+ /** coinInAmount is in the input coin's smallest unit (base units, not decimals). */
1354
1122
  coinInAmount: bigint;
1355
- /** Type/address of the input coin */
1356
1123
  coinInType: string;
1357
- /** Type/address of the output coin */
1358
1124
  coinOutType: string;
1359
- /** Custom trade fee for this request, if not provided, the default trade fee will be applied */
1125
+ /** Overrides defaultTradeFee for this request only. */
1360
1126
  tradeFee?: TradeFeeOptions;
1361
1127
  };
1362
1128
 
1363
- /**
1364
- * Request parameters for getting a trade route
1365
- */
1366
1129
  declare type GetTradeRouteRequest_4 = {
1367
- /** Amount of input coin to trade (in smallest unit) */
1368
- coinInAmount: bigint;
1369
- /** Type/address of the input coin */
1370
- coinInType: string;
1371
- /** Type/address of the output coin */
1372
- coinOutType: string;
1373
- /** Custom trade fee for this request, if not provided, the default trade fee will be applied */
1374
- tradeFee?: TradeFeeOptions;
1375
- };
1376
-
1377
- /**
1378
- * Request parameters for getting a trade route
1379
- */
1380
- declare type GetTradeRouteRequest_5 = {
1381
- /** Amount of input coin to trade (in smallest unit) */
1130
+ /** coinInAmount is in the input coin's smallest unit (base units, not decimals). */
1382
1131
  coinInAmount: bigint;
1383
- /** Type/address of the input coin */
1384
1132
  coinInType: string;
1385
- /** Type/address of the output coin */
1386
1133
  coinOutType: string;
1387
- /** Custom trade fee for this request, if not provided, the default trade fee will be applied */
1134
+ /** Overrides defaultTradeFee for this request only. */
1388
1135
  tradeFee?: TradeFeeOptions;
1389
- /** If true, only some supported protocols will be used */
1136
+ /** When true, restrict to meta-supported protocols and add no overlay fee (the meta-aggregator owns the fee). */
1390
1137
  metaAggregator?: boolean;
1391
1138
  };
1392
1139
 
1393
- /**
1394
- * Request parameters for getting a trade route
1395
- */
1396
- declare type GetTradeRouteRequest_6 = {
1397
- /** Amount of input coin to trade (in smallest unit) */
1140
+ declare type GetTradeRouteRequest_5 = {
1141
+ /** coinInAmount is in the input coin's smallest unit (base units, not decimals). */
1398
1142
  coinInAmount: bigint;
1399
- /** Type/address of the input coin */
1400
1143
  coinInType: string;
1401
- /** Type/address of the output coin */
1402
1144
  coinOutType: string;
1403
- /** Custom trade fee for this request, if not provided, the default trade fee will be applied */
1145
+ /** Overrides defaultTradeFee for this request only. */
1404
1146
  tradeFee?: TradeFeeOptions;
1405
- /** If true, only some supported DEXs will be used */
1147
+ /** When true, restrict to meta-supported DEXs and charge no commission (the meta-aggregator owns the fee). */
1406
1148
  metaAggregator?: boolean;
1407
1149
  };
1408
1150
 
1409
- /**
1410
- * Response from getting a trade route, containing both standardized and raw route data
1411
- */
1412
1151
  export declare type GetTradeRouteResponse = {
1413
- /** The standardized trade route information across all aggregators */
1414
1152
  route: FinalTradeRoute;
1415
- /** The raw route response from the specific aggregator (format varies by aggregator) */
1153
+ /** Raw aggregator response; shape varies per aggregator, passed back to build the tx */
1416
1154
  aggregatorRoute: any;
1417
1155
  };
1418
1156
 
1419
1157
  export declare type GetTradeTransactionRequest = {
1420
- /** Amount of input coin to trade (in smallest unit) */
1158
+ /** Input amount in the coin's smallest unit (base-units, not decimals) */
1421
1159
  coinInAmount: bigint;
1422
- /** Type/address of the input coin */
1423
1160
  coinInType: string;
1424
- /** Type/address of the output coin */
1425
1161
  coinOutType: string;
1426
- /** Wallet address that will execute the transaction */
1427
1162
  walletAddress: string;
1428
- /** Slippage tolerance as decimal (e.g., 0.01 for 1%) */
1163
+ /** Slippage tolerance as decimal (e.g. 0.01 for 1%) */
1429
1164
  slippage: number;
1430
- /** Custom trade fee for this request, if not provided, the default trade fee will be applied */
1165
+ /** Overrides the SDK's default trade fee for this request */
1431
1166
  tradeFee?: TradeFeeOptions;
1432
- /** If true, only meta-supported aggregators/protocols will be used without extra aggregator fees */
1167
+ /** Restrict to meta-supported aggregators, charging no extra aggregator fee */
1433
1168
  metaAggregator?: boolean;
1434
- /** The bonding curve Pool ID */
1435
1169
  poolId: string;
1436
1170
  };
1437
1171
 
1438
- /**
1439
- * Response from getting both route and transaction, containing route info and built transaction
1440
- */
1441
1172
  export declare type GetTradeTransactionResponse = {
1442
- /** The standardized trade route information */
1443
1173
  route: FinalTradeRoute;
1444
- /** The raw route response from the aggregator */
1445
1174
  aggregatorRoute: any;
1446
- /** The built transaction bytes ready for signing and execution */
1175
+ /** Built transaction bytes ready for signing and execution */
1447
1176
  transaction: Uint8Array;
1448
1177
  };
1449
1178
 
1450
- /**
1451
- * Request parameters for building a transaction from an existing route
1452
- */
1453
1179
  export declare type GetTransactionByRouteRequest = {
1454
- /** Wallet address that will execute the transaction */
1455
1180
  walletAddress: string;
1456
- /** Complete trade route from aggregator router (raw aggregator response) */
1181
+ /** Raw aggregator response from a prior getTradeRoute call */
1457
1182
  completeRoute: any;
1458
- /** Slippage tolerance as decimal (e.g., 0.01 for 1%) */
1183
+ /** Slippage tolerance as decimal (e.g. 0.01 for 1%) */
1459
1184
  slippage: number;
1460
- /** Custom trade fee for this request, if not provided, the default trade fee will be applied */
1185
+ /** Overrides the SDK's default trade fee for this request */
1461
1186
  tradeFee?: TradeFeeOptions;
1462
- /** If true, no extra aggregator fee will be applied for Cetus, FlowX, and 7K routes */
1187
+ /** Skip the extra aggregator fee on Cetus, FlowX, and 7K routes */
1463
1188
  metaAggregator?: boolean;
1464
1189
  };
1465
1190
 
1466
- /**
1467
- * Request parameters for getting a transaction
1468
- */
1469
1191
  declare type GetTransactionRequest = {
1470
- /** Wallet address that will execute the transaction */
1471
1192
  walletAddress: string;
1472
- /** Complete quote response from 7K Protocol */
1473
1193
  completeRoute: QuoteResponse;
1474
- /** Slippage tolerance (e.g., 0.01 for 1%) */
1194
+ /** Slippage tolerance as a fraction, e.g. 0.01 for 1%. */
1475
1195
  slippage: number;
1476
- /** Custom trade fee for this request, if not provided, the default trade fee will be applied */
1477
1196
  tradeFee?: TradeFeeOptions;
1478
- /** If true, no extra commission should be applied */
1197
+ /** When true, charge no commission (the meta-aggregator owns the fee). */
1479
1198
  metaAggregator?: boolean;
1480
1199
  };
1481
1200
 
1482
- /**
1483
- * Request parameters for getting a transaction
1484
- */
1485
1201
  declare type GetTransactionRequest_2 = {
1486
- /** Wallet address that will execute the transaction */
1487
1202
  walletAddress: string;
1488
- /** Complete trade route from Aftermath router */
1489
1203
  completeRoute: RouterCompleteTradeRoute;
1490
- /** Slippage tolerance (e.g., 0.01 for 1%) */
1204
+ /** Slippage tolerance as a fraction, e.g. 0.01 for 1%. */
1491
1205
  slippage: number;
1492
1206
  };
1493
1207
 
1494
- /**
1495
- * Request parameters for getting a transaction
1496
- */
1497
1208
  declare type GetTransactionRequest_3 = {
1498
- /** Wallet address that will execute the transaction */
1499
- walletAddress: string;
1500
- /** Complete quote from Astros aggregator */
1501
- completeRoute: Quote;
1502
- /** Slippage tolerance (e.g., 0.01 for 1%) */
1503
- slippage: number;
1504
- /** Custom trade fee for this request, if not provided, the default trade fee will be applied */
1505
- tradeFee?: TradeFeeOptions;
1506
- };
1507
-
1508
- /**
1509
- * Request parameters for getting a transaction
1510
- */
1511
- declare type GetTransactionRequest_4 = {
1512
- /** Wallet address that will execute the transaction */
1513
1209
  walletAddress: string;
1514
- /** Complete router data from Cetus aggregator */
1515
1210
  completeRoute: RouterDataV3;
1516
- /** Slippage tolerance (e.g., 0.01 for 1%) */
1211
+ /** Slippage tolerance as a fraction, e.g. 0.01 for 1%. */
1517
1212
  slippage: number;
1518
- /** Custom trade fee for this request, if not provided, the default trade fee will be applied */
1519
1213
  tradeFee?: TradeFeeOptions;
1520
- /** If true, no extra overlay fee should be applied */
1214
+ /** When true, add no overlay fee (the meta-aggregator owns the fee). */
1521
1215
  metaAggregator?: boolean;
1522
1216
  };
1523
1217
 
1524
- /**
1525
- * Request parameters for getting a transaction
1526
- */
1527
- declare type GetTransactionRequest_5 = {
1528
- /** Wallet address that will execute the transaction */
1218
+ declare type GetTransactionRequest_4 = {
1529
1219
  walletAddress: string;
1530
- /** Complete routes result from FlowX aggregator */
1531
1220
  completeRoute: GetRoutesResult<Coin, Coin>;
1532
- /** Slippage tolerance (e.g., 0.01 for 1%) */
1221
+ /** Slippage tolerance as a fraction, e.g. 0.01 for 1%. */
1533
1222
  slippage: number;
1534
- /** Custom trade fee for this request, if not provided, the default trade fee will be applied */
1535
1223
  tradeFee?: TradeFeeOptions;
1536
- /** If true, no extra commission should be applied */
1224
+ /** When true, charge no commission (the meta-aggregator owns the fee). */
1537
1225
  metaAggregator?: boolean;
1538
1226
  };
1539
1227
 
@@ -2018,8 +1706,20 @@ export declare namespace Scallop {
2018
1706
  const MARKET_OBJ_ID = "0xa757975255146dc9686aa823b7838b507f315d704f428cbadad2f4ea061939d9";
2019
1707
  }
2020
1708
 
1709
+ /**
1710
+ * Sui clients used by the SDK.
1711
+ *
1712
+ * `grpc` is required. `jsonRpc` is optional — when omitted, the SDK creates a
1713
+ * default JSON-RPC client against the public Sui fullnode for the SDK network.
1714
+ * (JSON-RPC is still required by third-party SDKs such as Aftermath and Pyth.)
1715
+ */
1716
+ export declare type SdkClients = {
1717
+ grpc: SuiGrpcClient;
1718
+ jsonRpc?: SuiJsonRpcClient;
1719
+ };
1720
+
2021
1721
  export declare type SdkOptions = {
2022
- clients: SuiClients;
1722
+ clients: SdkClients;
2023
1723
  tradeFee: TradeFeeOptions;
2024
1724
  /** Optional API key for Astros aggregator access */
2025
1725
  astrosApiKey?: string;
@@ -2064,20 +1764,9 @@ export declare type SetPausedRequest = {
2064
1764
  currentTx?: Transaction;
2065
1765
  };
2066
1766
 
2067
- /**
2068
- * 7K Protocol DEX aggregator client for routing trades across multiple pools
2069
- * 7K Protocol aggregates liquidity from various DEXs to find optimal trade routes
2070
- */
2071
1767
  export declare class SevenKAggregator {
2072
- /** Configuration settings for the aggregator */
2073
1768
  private _config;
2074
- /** Sui blockchain client */
2075
1769
  private _suiClient;
2076
- /**
2077
- * Creates a new SevenKAggregator instance
2078
- * @param config - Aggregator configuration including fee settings and optional API key
2079
- * @param suiClient - Sui client for blockchain interactions
2080
- */
2081
1770
  constructor(config: SevenKAggregatorConfig, suiClient: SuiGrpcClient);
2082
1771
  /**
2083
1772
  * Finds the optimal trade route for swapping tokens using 7K Protocol
@@ -2106,13 +1795,8 @@ export declare namespace SevenKAggregator {
2106
1795
  export function toCommonTradeRoutes(tradeRouteResponse: QuoteResponse): FinalTradeRoute | null;
2107
1796
  }
2108
1797
 
2109
- /**
2110
- * Configuration options for the 7K Protocol aggregator
2111
- */
2112
1798
  export declare type SevenKAggregatorConfig = {
2113
- /** Default trade fee settings applied to each trade */
2114
1799
  defaultTradeFee: TradeFeeOptions;
2115
- /** Optional API key for 7K Protocol access */
2116
1800
  sevenKApiKey?: string;
2117
1801
  };
2118
1802
 
@@ -2230,13 +1914,7 @@ export declare type SubscriptionConfig = {
2230
1914
  * - Updating fee receiver wallet and pause settings
2231
1915
  */
2232
1916
  export declare class SubscriptionModule implements IPayModule {
2233
- /** Reference to the main SDK instance */
2234
1917
  sdk: NoodlesPaySdk;
2235
- /**
2236
- * Creates a new SubscriptionModule instance.
2237
- *
2238
- * @param sdk - The main Noodles Pay SDK instance
2239
- */
2240
1918
  constructor(sdk: NoodlesPaySdk);
2241
1919
  /**
2242
1920
  * Retrieves the current subscription configuration from the blockchain.
@@ -2247,7 +1925,8 @@ export declare class SubscriptionModule implements IPayModule {
2247
1925
  getConfig(): Promise<SubscriptionConfig>;
2248
1926
  /**
2249
1927
  * Builds a transaction for subscribing to a plan.
2250
- * The payment amount is determined by the plan configuration.
1928
+ * The payment amount is determined by the plan configuration (plan.price charged for
1929
+ * every month in the plan's interval).
2251
1930
  *
2252
1931
  * @param request - Subscription request parameters
2253
1932
  * @reference order_id generated from your backend to identify the purchase
@@ -2257,6 +1936,7 @@ export declare class SubscriptionModule implements IPayModule {
2257
1936
  buildSubscribeCyclePlanTx({ walletAddress, planId, reference, paymentCoinType, currentTx, }: SubscribePlanRequest): Promise<Transaction>;
2258
1937
  /**
2259
1938
  * Builds a transaction for buying additional compute units (CU) for CUAddOn plans.
1939
+ * Tops up compute units for an arbitrary paidAmount.
2260
1940
  *
2261
1941
  * @param request - Buy more CU request parameters
2262
1942
  * @reference order_id generated from your backend to identify the purchase
@@ -2358,8 +2038,12 @@ export declare const SUI_ADDRESS_ZERO = "0x0000000000000000000000000000000000000
2358
2038
 
2359
2039
  export declare const SUI_FULL_TYPE = "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI";
2360
2040
 
2041
+ export declare const SUI_GRAPHQL_URL = "https://graphql.mainnet.sui.io/graphql";
2042
+
2361
2043
  export declare const SUI_METADATA_OBJECT_ID = "0x9258181f5ceac8dbffb7030890243caed69a9599d2886d957a9cb7656af3bdb3";
2362
2044
 
2045
+ export declare const SUI_RPC_URL = "https://fullnode.mainnet.sui.io:443";
2046
+
2363
2047
  export declare const SUI_TYPE = "0x2::sui::SUI";
2364
2048
 
2365
2049
  export declare type SuiClient = SuiGrpcClient;
@@ -2378,7 +2062,6 @@ export { SuiJsonRpcClient }
2378
2062
  export declare type SuiNetwork = SuiClientTypes.Network;
2379
2063
 
2380
2064
  export declare enum SupportedAggregator {
2381
- ASTROS = "ASTROS",
2382
2065
  AFTERMATH = "AFTERMATH",
2383
2066
  SEVENK = "7K",
2384
2067
  CETUS = "CETUS",
@@ -2406,13 +2089,9 @@ export declare type TierInfo = {
2406
2089
 
2407
2090
  export declare const timeout: <T = any>(fn: () => Promise<T>, timeout: number, msg?: string) => Promise<T>;
2408
2091
 
2409
- /**
2410
- * Configuration options for trade fees applied to aggregator transactions
2411
- */
2412
2092
  export declare type TradeFeeOptions = {
2413
- /** Trade fee percentage as a decimal (e.g., 0.01 for 1%, 0.003 for 0.3%) */
2093
+ /** Decimal fraction, not bps: 0.01 = 1%, 0.003 = 0.3% */
2414
2094
  tradeFeePercent: number;
2415
- /** Address that will receive the trade fees */
2416
2095
  tradeFeeRecipientAddress: string;
2417
2096
  };
2418
2097