@cetusprotocol/dlmm-sdk 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts DELETED
@@ -1,1117 +0,0 @@
1
- import { CoinPairType, TableHandle, IModule, PaginationArgs, DataPage, PageQuery, SdkWrapper, BaseSdkOptions, Package } from '@cetusprotocol/common-sdk';
2
- import { TransactionObjectArgument, Transaction } from '@mysten/sui/transactions';
3
- import Decimal from 'decimal.js';
4
- import { SuiEvent, SuiObjectResponse, DevInspectResults, SuiTransactionBlockResponse } from '@mysten/sui/client';
5
- import BN from 'bn.js';
6
-
7
- type DlmmConfigs = {
8
- registry_id: string;
9
- pools_id: string;
10
- partners_id: string;
11
- global_config_id: string;
12
- versioned_id: string;
13
- admin_cap_id: string;
14
- };
15
- type BinStepConfig = {
16
- bin_step: number;
17
- base_factor: number;
18
- filter_period: number;
19
- decay_period: number;
20
- reduction_factor: number;
21
- variable_fee_control: string;
22
- max_volatility_accumulator: string;
23
- protocol_fee_rate: string;
24
- };
25
- type BinManager = {
26
- bin_step: number;
27
- bin_manager_handle: string;
28
- size: string;
29
- };
30
- type VariableParameters = {
31
- volatility_accumulator: string;
32
- volatility_reference: string;
33
- index_reference: number;
34
- last_update_timestamp: string;
35
- bin_step_config: BinStepConfig;
36
- };
37
- type Reward = {
38
- reward_coin: string;
39
- emissions_per_second: string;
40
- emissions_per_day: string;
41
- period_emission_rates: TableHandle;
42
- };
43
- type RewardManager = {
44
- is_public: boolean;
45
- vault: TableHandle;
46
- rewards: Reward[];
47
- emergency_reward_pause: boolean;
48
- last_updated_time: string;
49
- };
50
- type PositionManager = {
51
- bin_step: number;
52
- position_index: number;
53
- position_handle: string;
54
- size: number;
55
- };
56
- type DlmmBasePool = {
57
- id: string;
58
- bin_step: number;
59
- } & CoinPairType;
60
- type PoolPermissions = {
61
- disable_add: boolean;
62
- disable_remove: boolean;
63
- disable_swap: boolean;
64
- disable_collect_fee: boolean;
65
- disable_collect_reward: boolean;
66
- disable_add_reward: boolean;
67
- };
68
- type DlmmPool = {
69
- pool_type: string;
70
- index: number;
71
- bin_manager: BinManager;
72
- variable_parameters: VariableParameters;
73
- active_id: number;
74
- permissions: PoolPermissions;
75
- balance_a: string;
76
- balance_b: string;
77
- base_fee_rate: string;
78
- protocol_fee_a: string;
79
- protocol_fee_b: string;
80
- url: string;
81
- reward_manager: RewardManager;
82
- position_manager: PositionManager;
83
- } & DlmmBasePool;
84
- type DlmmPosition = {
85
- id: string;
86
- pool_id: string;
87
- index: number;
88
- description: string;
89
- uri: string;
90
- liquidity_shares: string[];
91
- lower_bin_id: number;
92
- upper_bin_id: number;
93
- name: string;
94
- } & CoinPairType;
95
- type BinWeight = {
96
- bin_id: number;
97
- weight: number;
98
- };
99
- type BinAmount = {
100
- bin_id: number;
101
- amount_a: string;
102
- amount_b: string;
103
- liquidity?: string;
104
- price_per_lamport: string;
105
- };
106
- type BinLiquidityInfo = {
107
- bins: BinAmount[];
108
- amount_a: string;
109
- amount_b: string;
110
- };
111
- declare enum StrategyType {
112
- Spot = 0,
113
- Curve = 1,
114
- BidAsk = 2
115
- }
116
- type ClosePositionOption = {
117
- pool_id: string;
118
- position_id: string;
119
- reward_coins: string[];
120
- } & CoinPairType;
121
- type BaseCreatePoolOption = {
122
- bin_step: number;
123
- base_factor: number;
124
- url?: string;
125
- } & CoinPairType;
126
- type BaseCreatePoolAndAddOption = {
127
- bin_infos: BinLiquidityInfo;
128
- strategy_type: StrategyType;
129
- use_bin_infos?: boolean;
130
- } & BaseCreatePoolOption;
131
- type CreatePoolAndAddOption = {
132
- active_id: number;
133
- lower_bin_id: number;
134
- upper_bin_id: number;
135
- } & BaseCreatePoolAndAddOption;
136
- type CreatePoolOption = {
137
- active_id: number;
138
- } & BaseCreatePoolOption;
139
- type CreatePoolAndAddWithPriceOption = {
140
- pool_id: string;
141
- price_base_coin: 'coin_a' | 'coin_b';
142
- price: string;
143
- lower_price: string;
144
- upper_price: string;
145
- strategy_type: StrategyType;
146
- decimals_a: number;
147
- decimals_b: number;
148
- } & BaseCreatePoolAndAddOption;
149
- type BaseAddLiquidityOption = {
150
- pool_id: string | TransactionObjectArgument;
151
- bin_infos: BinLiquidityInfo;
152
- strategy_type: StrategyType;
153
- max_price_slippage: number;
154
- active_id: number;
155
- bin_step: number;
156
- /**
157
- * Controls whether to use pre-calculated bin_infos or let the contract calculate based on strategy_type.
158
- * - true: Use bin_infos to add liquidity to each bin
159
- * - false: Pass strategy_type to contract for automatic liquidity distribution calculation
160
- */
161
- use_bin_infos?: boolean;
162
- coin_object_id_a?: TransactionObjectArgument;
163
- coin_object_id_b?: TransactionObjectArgument;
164
- } & CoinPairType;
165
- type BaseCalculateAddLiquidityOption = {
166
- pool_id?: string;
167
- active_id: number;
168
- bin_step: number;
169
- lower_bin_id: number;
170
- upper_bin_id: number;
171
- active_bin_of_pool?: BinAmount;
172
- strategy_type: StrategyType;
173
- };
174
- type CalculateAddLiquidityOption = {
175
- amount_a: string;
176
- amount_b: string;
177
- } & BaseCalculateAddLiquidityOption;
178
- type CalculateAddLiquidityAutoFillOption = {
179
- coin_amount: string;
180
- fix_amount_a: boolean;
181
- } & BaseCalculateAddLiquidityOption;
182
- type AddLiquidityOption = BaseAddLiquidityOption & {
183
- position_id: string;
184
- collect_fee: boolean;
185
- reward_coins: string[];
186
- };
187
- type OpenAndAddLiquidityOption = BaseAddLiquidityOption & {
188
- lower_bin_id: number;
189
- upper_bin_id: number;
190
- };
191
- type OpenAndAddLiquidityWithPriceOption = BaseAddLiquidityOption & {
192
- price_base_coin: 'coin_a' | 'coin_b';
193
- price: string;
194
- lower_price: string;
195
- upper_price: string;
196
- active_bin_of_pool?: BinAmount;
197
- strategy_type: StrategyType;
198
- decimals_a: number;
199
- decimals_b: number;
200
- max_price_slippage: number;
201
- };
202
- type OpenPositionOption = {
203
- pool_id: string;
204
- lower_bin_id: number;
205
- upper_bin_id: number;
206
- } & CoinPairType;
207
- type CalculateRemoveLiquidityBothOption = {
208
- bins: BinAmount[];
209
- active_id: number;
210
- fix_amount_a: boolean;
211
- coin_amount: string;
212
- };
213
- type CalculateRemoveLiquidityOnlyOption = {
214
- bins: BinAmount[];
215
- active_id: number;
216
- is_only_a: boolean;
217
- coin_amount: string;
218
- };
219
- type RemoveLiquidityOption = {
220
- pool_id: string;
221
- position_id: string;
222
- active_id: number;
223
- bin_step: number;
224
- bin_infos: BinLiquidityInfo;
225
- slippage: number;
226
- reward_coins: string[];
227
- collect_fee: boolean;
228
- remove_percent?: number;
229
- } & CoinPairType;
230
- type CollectRewardOption = {
231
- pool_id: string;
232
- position_id: string;
233
- reward_coins: string[];
234
- } & CoinPairType;
235
- type CollectFeeOption = {
236
- pool_id: string;
237
- position_id: string;
238
- } & CoinPairType;
239
- type CollectRewardAndFeeOption = {
240
- pool_id: string;
241
- position_id: string;
242
- reward_coins: string[];
243
- } & CoinPairType;
244
- type BinSwap = {
245
- bin_id: number;
246
- in_amount: string;
247
- out_amount: string;
248
- fee: string;
249
- var_fee_rate: string;
250
- };
251
- type PreSwapQuote = {
252
- pool_id: string;
253
- a2b: boolean;
254
- in_amount: string;
255
- out_amount: string;
256
- ref_fee_amount: string;
257
- fee_amount: string;
258
- partner: string;
259
- from_coin_type: string;
260
- to_coin_type: string;
261
- bin_swaps: BinSwap[];
262
- };
263
- type PreSwapOption = {
264
- pool_id: string;
265
- a2b: boolean;
266
- by_amount_in: boolean;
267
- in_amount: string;
268
- } & CoinPairType;
269
- type SwapOption = {
270
- quote_obj: PreSwapQuote;
271
- by_amount_in: boolean;
272
- partner?: string;
273
- slippage: number;
274
- } & CoinPairType;
275
- type PositionFee = {
276
- position_id: string;
277
- fee_owned_a: string;
278
- fee_owned_b: string;
279
- };
280
- type RewardInfo = {
281
- coin_type: string;
282
- reward_owned: string;
283
- };
284
- type PositionReward = {
285
- position_id: string;
286
- rewards: RewardInfo[];
287
- };
288
- type CreatePartnerOption = {
289
- name: string;
290
- ref_fee_rate: number;
291
- start_time: number;
292
- end_time: number;
293
- recipient: string;
294
- };
295
- type UpdateRefFeeRateOption = {
296
- partner_id: string;
297
- ref_fee_rate: number;
298
- };
299
- type UpdateTimeRangeOption = {
300
- partner_id: string;
301
- start_time: number;
302
- end_time: number;
303
- };
304
- type ClaimRefFeeOption = {
305
- partner_id: string;
306
- partner_cap_id?: string;
307
- fee_coin_types: string[];
308
- };
309
- type Partner = {
310
- id: string;
311
- name: string;
312
- ref_fee_rate: number;
313
- start_time: number;
314
- end_time: number;
315
- balances: TableHandle;
316
- type: string;
317
- };
318
- type PoolTransactionInfo = {
319
- index: string;
320
- tx: string;
321
- sender: string;
322
- type: string;
323
- block_time: string;
324
- parsed_json: any;
325
- };
326
- type AddRewardOption = {
327
- pool_id: string;
328
- reward_coin_type: string;
329
- reward_amount: string;
330
- start_time_seconds?: number;
331
- end_time_seconds: number;
332
- } & CoinPairType;
333
- type InitRewardOption = {
334
- pool_id: string;
335
- reward_coin_types: string[];
336
- } & CoinPairType;
337
- type RewardWhiteListOption = {
338
- reward_coin_types: string[];
339
- type: 'add' | 'remove';
340
- };
341
- type RewardAccessOption = {
342
- pool_id: string;
343
- type: 'to_public' | 'to_private';
344
- } & CoinPairType;
345
- type ValidateActiveIdSlippageOption = {
346
- pool_id: string | TransactionObjectArgument;
347
- active_id: number;
348
- bin_step: number;
349
- max_price_slippage: number;
350
- } & CoinPairType;
351
- type DlmmGlobalConfig = {
352
- id: string;
353
- acl: TableHandle;
354
- allowed_list: TableHandle;
355
- denied_list: TableHandle;
356
- bin_steps: TableHandle;
357
- reward_white_list: string[];
358
- blocked_position: TableHandle;
359
- blocked_user: TableHandle;
360
- min_reward_duration: number;
361
- non_manager_initialize_reward_cap: number;
362
- reward_public: boolean;
363
- };
364
- type UpdatePositionFeeAndRewardsOption = {
365
- pool_id: string;
366
- position_id: string;
367
- } & CoinPairType;
368
- type RewardPeriodEmission = {
369
- emissions_per_second: string;
370
- emissions_per_day: string;
371
- emissions_per: string;
372
- time: string;
373
- visualized_time: string;
374
- };
375
- type RewardPeriodEmissionFormat = {
376
- emissions_per_second: string;
377
- emissions_per_day: string;
378
- time: string;
379
- visualized_time: string;
380
- };
381
- type GetPoolBinInfoOption = {
382
- pool_id: string;
383
- } & CoinPairType;
384
- type GetTotalFeeRateOption = {
385
- pool_id: string;
386
- } & CoinPairType;
387
- type FeeRate = {
388
- base_fee_rate: string;
389
- var_fee_rate: string;
390
- total_fee_rate: string;
391
- };
392
- type WeightsOptions = {
393
- strategy_type: StrategyType;
394
- active_id: number;
395
- bin_step: number;
396
- lower_bin_id: number;
397
- upper_bin_id: number;
398
- total_amount_a: string;
399
- total_amount_b: string;
400
- active_bin_of_pool?: BinAmount;
401
- };
402
- type WeightsInfo = {
403
- total_weight_a: Decimal;
404
- total_weight_b: Decimal;
405
- weights: Decimal[];
406
- weight_per_prices: Decimal[];
407
- active_weight_a: Decimal;
408
- active_weight_b: Decimal;
409
- } & WeightsOptions;
410
- type GetBinInfoOption = {
411
- bin_manager_handle: string;
412
- bin_id: number;
413
- bin_step: number;
414
- };
415
- type GetBinInfoResult = {
416
- bin_manager_handle: string;
417
- bin_id: number;
418
- bin_step: number;
419
- } & BinAmount;
420
-
421
- declare class PoolModule implements IModule<CetusDlmmSDK> {
422
- protected _sdk: CetusDlmmSDK;
423
- constructor(sdk: CetusDlmmSDK);
424
- get sdk(): CetusDlmmSDK;
425
- getPoolAddress(coin_type_a: string, coin_type_b: string, bin_step: number, base_factor: number): Promise<string | undefined>;
426
- /**
427
- * Get the list of DLMM base pools
428
- * @param pagination_args - The pagination arguments
429
- * @returns The list of DLMM base pools
430
- */
431
- getBasePoolList(pagination_args?: PaginationArgs, force_refresh?: boolean): Promise<DataPage<DlmmBasePool>>;
432
- /**
433
- * Get the list of DLMM pools
434
- * @param pagination_args - The pagination arguments
435
- * @returns The list of DLMM pools
436
- */
437
- getPools(pagination_args?: PaginationArgs, force_refresh?: boolean): Promise<DataPage<DlmmPool>>;
438
- /**
439
- * Get the bin info by bin id
440
- * @param bin_manager_handle - The bin manager handle
441
- * @param bin_id - The bin id
442
- * @param bin_step - The bin step
443
- * @param force_refresh - Whether to force a refresh of the cache
444
- * @returns The bin info
445
- */
446
- getBinInfo(bin_manager_handle: string, bin_id: number, bin_step: number, force_refresh?: boolean): Promise<BinAmount>;
447
- getBinInfoList(options: GetBinInfoOption[]): Promise<GetBinInfoResult[]>;
448
- getTotalFeeRate(option: GetTotalFeeRateOption): Promise<FeeRate>;
449
- getPoolBinInfo(option: GetPoolBinInfoOption): Promise<BinAmount[]>;
450
- getPoolTransactionList({ pool_id, pagination_args, order, full_rpc_url, }: {
451
- pool_id: string;
452
- full_rpc_url?: string;
453
- pagination_args: PageQuery;
454
- order?: 'ascending' | 'descending' | null | undefined;
455
- }): Promise<DataPage<PoolTransactionInfo>>;
456
- /**
457
- * Get the bin info by range (TODO: need to optimize this method)
458
- * @param bin_manager_handle - The bin manager handle
459
- * @param lower_bin_id - The lower bin id
460
- * @param upper_bin_id - The upper bin id
461
- * @param bin_step - The bin step
462
- * @returns The bin info by range
463
- */
464
- getRangeBinInfo(bin_manager_handle: string, lower_bin_id: number, upper_bin_id: number, bin_step: number): Promise<BinAmount[]>;
465
- /**
466
- * Get the list of DLMM pools by assign pool ids
467
- * @param assign_pool_ids - The assign pool ids
468
- * @returns The list of DLMM pools
469
- */
470
- getAssignPoolList(assign_pool_ids: string[]): Promise<DlmmPool[]>;
471
- /**
472
- * Get a DLMM pool by its object ID.
473
- * @param {string} pool_id The object ID of the pool to get.
474
- * @param {true} force_refresh Whether to force a refresh of the cache.
475
- * @returns {Promise<DlmmPool>} A promise that resolves to a DlmmPool object.
476
- */
477
- getPool(pool_id: string, force_refresh?: boolean): Promise<DlmmPool>;
478
- /**
479
- * Create a pool and add liquidity with a given price
480
- * @param option - The option for creating a pool and adding liquidity with a given price
481
- * @returns The transaction for creating a pool and adding liquidity with a given price
482
- */
483
- createPoolAndAddWithPricePayload(option: CreatePoolAndAddWithPriceOption): Promise<Transaction>;
484
- /**
485
- * Create a pool
486
- * @param option - The option for creating a pool
487
- * @param tx - The transaction object
488
- * @returns The transaction object
489
- */
490
- createPoolPayload(option: CreatePoolOption, tx: Transaction): TransactionObjectArgument;
491
- /**
492
- * Create a pool and add liquidity
493
- * @param option - The option for creating a pool and adding liquidity
494
- * @returns The transaction for creating a pool and adding liquidity
495
- */
496
- createPoolAndAddLiquidityPayload(option: CreatePoolAndAddOption): Transaction;
497
- }
498
-
499
- declare class PositionModule implements IModule<CetusDlmmSDK> {
500
- protected _sdk: CetusDlmmSDK;
501
- constructor(sdk: CetusDlmmSDK);
502
- get sdk(): CetusDlmmSDK;
503
- buildPositionType(): string;
504
- getOwnerPositionList(owner: string): Promise<DlmmPosition[]>;
505
- getPosition(position_id: string): Promise<DlmmPosition>;
506
- /**
507
- * Collect fee
508
- * @param option - The option for collecting fee
509
- * @param tx - The transaction object
510
- * @returns The transaction object
511
- */
512
- collectFeePayload(option: CollectFeeOption, tx?: Transaction): Transaction;
513
- /**
514
- * Update the fee and rewards of the position
515
- * @param option - The option for updating the fee and rewards of the position
516
- * @param tx - The transaction object
517
- * @returns The transaction object
518
- */
519
- updatePositionFeeAndRewards(option: UpdatePositionFeeAndRewardsOption, tx: Transaction): Transaction;
520
- /**
521
- * Collect reward
522
- * @param options - The option for collecting reward
523
- * @param tx - The transaction object
524
- * @returns The transaction object
525
- */
526
- collectRewardPayload(options: CollectRewardOption[], tx?: Transaction): Transaction;
527
- collectRewardAndFeePayload(options: CollectRewardAndFeeOption[], tx?: Transaction): Transaction;
528
- /**
529
- * Validate the active id slippage
530
- * @param options - The option for validating the active id slippage
531
- * @param tx - The transaction object
532
- * @returns The transaction object
533
- */
534
- validateActiveIdSlippage(options: ValidateActiveIdSlippageOption, tx: Transaction): Transaction;
535
- /**
536
- * Close a position
537
- * @param option - The option for closing a position
538
- * @returns The transaction object
539
- */
540
- closePositionPayload(option: ClosePositionOption, tx?: Transaction): Transaction;
541
- /**
542
- * Close a position without transferring the coins to the sender
543
- * @param option - The option for closing a position
544
- * @param tx
545
- * @returns The transaction object
546
- */
547
- closePositionNoTransferPayload(option: ClosePositionOption, tx: Transaction): {
548
- coin_a_obj: TransactionObjectArgument;
549
- coin_b_obj: TransactionObjectArgument;
550
- };
551
- /**
552
- * Get the amounts in the active bin if in range
553
- * @param bin_manager_handle - The bin manager handle
554
- * @param lower_bin_id - The lower bin id
555
- * @param upper_bin_id - The upper bin id
556
- * @param active_id - The active id
557
- * @returns The amounts in the active bin if in range
558
- */
559
- getActiveBinIfInRange(bin_manager_handle: string, lower_bin_id: number, upper_bin_id: number, active_id: number, bin_step: number, force_refresh?: boolean): Promise<BinAmount | undefined>;
560
- /**
561
- * Calculate the result of removing liquidity
562
- * @param option - The option for calculating the result of removing liquidity
563
- * @returns The result of removing liquidity
564
- */
565
- calculateRemoveLiquidityInfo(option: CalculateRemoveLiquidityBothOption | CalculateRemoveLiquidityOnlyOption): BinLiquidityInfo;
566
- /**
567
- * Calculate the result of adding liquidity
568
- * @param option - The option for calculating the result of adding liquidity
569
- * @returns The result of adding liquidity
570
- */
571
- calculateAddLiquidityInfo(option: CalculateAddLiquidityOption | CalculateAddLiquidityAutoFillOption): Promise<BinLiquidityInfo>;
572
- /**
573
- * Remove liquidity
574
- * @param option - The option for removing liquidity
575
- * @returns The transaction
576
- */
577
- removeLiquidityPayload(option: RemoveLiquidityOption): Transaction;
578
- removeLiquidityNoTransferPayload(option: RemoveLiquidityOption, tx: Transaction): {
579
- coin_a_obj: TransactionObjectArgument;
580
- coin_b_obj: TransactionObjectArgument;
581
- };
582
- /**
583
- * Add liquidity with price
584
- * @param option - The option for adding liquidity with price
585
- * @returns The transaction
586
- */
587
- addLiquidityWithPricePayload(option: OpenAndAddLiquidityWithPriceOption): Promise<Transaction>;
588
- /**
589
- * Add liquidity
590
- * @param option - The option for adding liquidity
591
- * @returns The transaction object
592
- */
593
- addLiquidityPayload(option: AddLiquidityOption | OpenAndAddLiquidityOption, tx?: Transaction): Transaction;
594
- private addLiquidityStrategyInternal;
595
- private addLiquidityInternal;
596
- /**
597
- * Fetch the fee and reward of the position
598
- * @param options - The option for fetching the fee and reward of the position
599
- * @returns The fee and reward of the position
600
- */
601
- fetchPositionFeeAndReward(options: CollectRewardAndFeeOption[]): Promise<{
602
- feeData: Record<string, PositionFee>;
603
- rewardData: Record<string, PositionReward>;
604
- }>;
605
- }
606
-
607
- declare class SwapModule implements IModule<CetusDlmmSDK> {
608
- protected _sdk: CetusDlmmSDK;
609
- constructor(sdk: CetusDlmmSDK);
610
- get sdk(): CetusDlmmSDK;
611
- preSwapQuote(option: PreSwapOption): Promise<PreSwapQuote>;
612
- swapPayload(option: SwapOption): Transaction;
613
- }
614
-
615
- declare class PartnerModule implements IModule<CetusDlmmSDK> {
616
- protected _sdk: CetusDlmmSDK;
617
- constructor(sdk: CetusDlmmSDK);
618
- get sdk(): CetusDlmmSDK;
619
- /**
620
- * Get a list of partners.
621
- * @returns {Promise<Partner[]>} A promise that resolves to an array of Partner objects.
622
- */
623
- getPartnerList(): Promise<Partner[]>;
624
- /**
625
- * Get the partner cap ID for a given owner and partner ID.
626
- * @param owner - The owner of the partner.
627
- * @param partner_id - The ID of the partner.
628
- * @returns A promise that resolves to the partner cap ID or undefined if not found.
629
- */
630
- getPartnerCapId(owner: string, partner_id: string): Promise<string>;
631
- /**
632
- * Get the balance of a partner
633
- * @param partner_balance_handle - The handle of the partner balance
634
- * @returns A promise that resolves to an array of { coin_type: string; balance: string } objects.
635
- */
636
- getPartnerBalance(partner_balance_handle: string): Promise<{
637
- coin_type: string;
638
- balance: string;
639
- }[]>;
640
- /**
641
- * Get a partner by its object ID.
642
- * @param {string} partner_id The object ID of the partner to get.
643
- * @returns {Promise<Partner>} A promise that resolves to a Partner object.
644
- */
645
- getPartner(partner_id: string): Promise<Partner>;
646
- /**
647
- * Update the ref fee rate of a partner
648
- * @param option - The option for updating the ref fee rate
649
- * @returns The transaction for updating the ref fee rate
650
- */
651
- updateRefFeeRatePayload(option: UpdateRefFeeRateOption, tx?: Transaction): Transaction;
652
- /**
653
- * Create a claim ref fee payload
654
- * @param option - The option for claiming ref fee
655
- * @returns The transaction for claiming ref fee
656
- */
657
- claimRefFeePayload(option: ClaimRefFeeOption): Promise<Transaction>;
658
- updateTimeRangePayload(option: UpdateTimeRangeOption, tx?: Transaction): Transaction;
659
- /**
660
- * Create a partner
661
- * @param option - The option for creating a partner
662
- * @returns The transaction for creating a partner
663
- */
664
- createPartnerPayload(option: CreatePartnerOption): Transaction;
665
- }
666
-
667
- declare class RewardModule implements IModule<CetusDlmmSDK> {
668
- protected _sdk: CetusDlmmSDK;
669
- constructor(sdk: CetusDlmmSDK);
670
- get sdk(): CetusDlmmSDK;
671
- getRewardPeriodEmission(period_emission_handle: string, curr_emission_per_second: string, last_updated_time: number): Promise<RewardPeriodEmission[]>;
672
- /**
673
- * Add reward to a pool
674
- * @param options - The options for adding reward
675
- * @returns The transaction for adding reward
676
- */
677
- addRewardPayload(option: AddRewardOption, tx?: Transaction): Transaction;
678
- /**
679
- * Initialize reward for a pool
680
- * @param option - The option for initializing reward
681
- * @param tx - The transaction to add the reward to
682
- * @returns The transaction for initializing reward
683
- */
684
- initRewardPayload(option: InitRewardOption, tx?: Transaction): Transaction;
685
- /**
686
- * Build the payload for making reward public or private
687
- * @param option - The option for making reward public or private
688
- * @param tx - The transaction to make the reward public or private
689
- * @returns The transaction for making reward public or private
690
- */
691
- buildRewardAccessPayload(option: RewardAccessOption, tx?: Transaction): Transaction;
692
- }
693
-
694
- declare class ConfigModule implements IModule<CetusDlmmSDK> {
695
- protected _sdk: CetusDlmmSDK;
696
- constructor(sdk: CetusDlmmSDK);
697
- get sdk(): CetusDlmmSDK;
698
- /**
699
- * Build the payload for adding or removing reward white list
700
- * @param option - The option for adding or removing reward white list
701
- * @param tx - The transaction to add the reward white list to
702
- * @returns The transaction for adding or removing reward white list
703
- */
704
- buildRewardWhiteListPayload(option: RewardWhiteListOption, tx?: Transaction): Transaction;
705
- getBinStepConfigList(bin_steps_handle: string): Promise<BinStepConfig[]>;
706
- /**
707
- * Get the list of bin step configs
708
- * @returns The list of bin step configs
709
- */
710
- getDlmmGlobalConfig(): Promise<DlmmGlobalConfig>;
711
- /**
712
- * Fetch the configs of the dlmm SDK
713
- * @returns The configs of the dlmm
714
- */
715
- fetchDlmmSdkConfigs(): Promise<DlmmConfigs>;
716
- }
717
-
718
- /**
719
- * Represents options and configurations for an SDK.
720
- */
721
- interface SdkOptions extends BaseSdkOptions {
722
- dlmm_pool: Package<DlmmConfigs>;
723
- dlmm_router: Package;
724
- faucet?: Package;
725
- }
726
- /**
727
- * The entry class of CetusDcaSDK, which is almost responsible for all interactions with dca.
728
- */
729
- declare class CetusDlmmSDK extends SdkWrapper<SdkOptions> {
730
- protected _pool: PoolModule;
731
- protected _position: PositionModule;
732
- protected _swap: SwapModule;
733
- protected _partner: PartnerModule;
734
- protected _reward: RewardModule;
735
- protected _config: ConfigModule;
736
- constructor(options: SdkOptions);
737
- get Pool(): PoolModule;
738
- get Position(): PositionModule;
739
- get Swap(): SwapModule;
740
- get Partner(): PartnerModule;
741
- get Reward(): RewardModule;
742
- get Config(): ConfigModule;
743
- /**
744
- * Static factory method to initialize the SDK
745
- * @param options SDK initialization options
746
- * @returns An instance of CetusBurnDK
747
- */
748
- static createSDK(options: BaseSdkOptions): CetusDlmmSDK;
749
- /**
750
- * Create a custom SDK instance with the given options
751
- * @param options The options for the SDK
752
- * @returns An instance of CetusBurnSDK
753
- */
754
- static createCustomSDK<T extends BaseSdkOptions>(options: T & SdkOptions): CetusDlmmSDK;
755
- }
756
-
757
- /**
758
- * Parse the DLMM base pool data
759
- * @param data - The DLMM base pool data
760
- * @returns The DLMM base pool
761
- */
762
- declare function parseDlmmBasePool(data: SuiEvent): DlmmBasePool;
763
- /**
764
- * Parse the DLMM pool data
765
- * @param data - The DLMM pool data
766
- * @returns The DLMM pool
767
- */
768
- declare function parseDlmmPool(data: SuiObjectResponse): DlmmPool;
769
- declare function parsePartner(data: SuiObjectResponse): Partner;
770
- declare function parseDlmmPosition(data: SuiObjectResponse): DlmmPosition;
771
- declare function parseLiquidityShares(liquidity_shares: string[], bin_step: number, lower_bin_id: number, active_bin: BinAmount): BinLiquidityInfo;
772
- declare function parseBinInfoList(res: DevInspectResults): BinAmount[];
773
- declare function parseBinInfo(fields: any): BinAmount;
774
- declare function parsedDlmmPosFeeData(simulate_res: DevInspectResults): Record<string, PositionFee>;
775
- declare function parsedDlmmPosRewardData(simulate_res: DevInspectResults): Record<string, PositionReward>;
776
- declare function parsedSwapQuoteData(simulate_res: DevInspectResults, a2b: boolean): PreSwapQuote | undefined;
777
- declare function parseStrategyType(strategy_type: StrategyType): number;
778
- declare const poolFilterEvenTypes: string[];
779
- declare function parsePoolTransactionInfo(data: SuiTransactionBlockResponse, txIndex: number, package_id: string, pool_id: string): PoolTransactionInfo[];
780
- declare function generateRewardSchedule(baseTime: number, maxIntervals: number, timeInterval: number): number[];
781
- declare function parseRewardPeriodEmission(periodEmissionList: RewardPeriodEmission[], startTimeInSeconds: number, endTimeInSeconds: number, durationSeconds: number): RewardPeriodEmissionFormat[];
782
- declare function parseCurrentRewardPeriodEmission(periodEmissionList: RewardPeriodEmission[]): RewardPeriodEmission | undefined;
783
- declare function safeMulAmount(amount: Decimal, rate: Decimal): Decimal;
784
- declare function safeAmount(amount: Decimal): Decimal;
785
- declare function getRouterModule(strategy_type: StrategyType): "spot" | "curve" | "bid_ask";
786
- declare function buildPoolKey(coin_type_a: string, coin_type_b: string, bin_step: number, base_factor: number): string;
787
-
788
- declare const SCALE_OFFSET = 64;
789
- declare const ONE: BN;
790
- declare class BinUtils {
791
- /**
792
- * Split bins into multiple smaller positions based on MAX_BIN_PER_POSITION
793
- * @param bins - The bins to split
794
- * @param lower_bin_id - The lower bin id
795
- * @param upper_bin_id - The upper bin id
796
- * @returns Array of bin info objects for each position
797
- */
798
- static splitBinLiquidityInfo(liquidity_bins: BinLiquidityInfo, lower_bin_id: number, upper_bin_id: number): BinLiquidityInfo[];
799
- /**
800
- * Process bins by rate
801
- * @param bins - The bins to be processed
802
- * @param rate - The rate to be applied
803
- * @returns The processed bins
804
- */
805
- static processBinsByRate(bins: BinAmount[], rate: string): BinLiquidityInfo;
806
- /**
807
- * Calculate the amount of token A and token B to be removed from a bin
808
- * @param bin - The bin information
809
- * @param remove_liquidity - The amount of liquidity to be removed
810
- * @returns The amount of token A and token B to be removed
811
- */
812
- static calculateOutByShare(bin: BinAmount, remove_liquidity: string): {
813
- amount_a: string;
814
- amount_b: string;
815
- };
816
- /**
817
- * Get the number of positions in a range of bin ids
818
- * @param lower_bin_id - The lower bin id
819
- * @param upper_bin_id - The upper bin id
820
- * @returns The number of positions
821
- */
822
- static getPositionCount(lower_bin_id: number, upper_bin_id: number): number;
823
- /**
824
- * Calculate the amount of liquidity following the constant sum formula `L = price * x + y`
825
- * @param amount_a
826
- * @param amount_b
827
- * @param qPrice Price is in Q64x64
828
- * @returns
829
- */
830
- static getLiquidity(amount_a: string, amount_b: string, qPrice: string): string;
831
- /**
832
- * Calculate amount_a from liquidity when all liquidity is in token A
833
- * @param liquidity - The liquidity amount
834
- * @param qPrice - Price in Q64x64 format
835
- * @returns The amount of token A
836
- */
837
- static getAmountAFromLiquidity(liquidity: string, qPrice: string): string;
838
- /**
839
- * Calculate amount_b from liquidity when all liquidity is in token B
840
- * @param liquidity - The liquidity amount
841
- * @returns The amount of token B
842
- */
843
- static getAmountBFromLiquidity(liquidity: string): string;
844
- /**
845
- * Calculate amounts from liquidity using the same logic as Move code
846
- * @param amount_a - Current amount of token A in the bin
847
- * @param amount_b - Current amount of token B in the bin
848
- * @param delta_liquidity - The liquidity delta to calculate amounts for
849
- * @param liquidity_supply - Total liquidity supply in the bin
850
- * @returns [amount_a_out, amount_b_out]
851
- */
852
- static getAmountsFromLiquidity(amount_a: string, amount_b: string, delta_liquidity: string, liquidity_supply: string): [string, string];
853
- /**
854
- * Get the price of a bin by bin id
855
- * @param bin_id - The bin id
856
- * @param bin_step - The bin step
857
- * @param decimal_a - The decimal of the token a
858
- * @param decimal_b - The decimal of the token b
859
- * @returns The price of the bin
860
- */
861
- static getPriceFromBinId(bin_id: number, bin_step: number, decimal_a: number, decimal_b: number): string;
862
- /**
863
- * Get the price per lamport of a bin by bin id
864
- * @param bin_id - The bin id
865
- * @param bin_step - The bin step
866
- * @returns The price per lamport of the bin
867
- */
868
- static getPricePerLamportFromBinId(bin_id: number, bin_step: number): string;
869
- /**
870
- * Get the bin id from a price
871
- * @param price - The price
872
- * @param binStep - The bin step
873
- * @param min - Whether to use the minimum or maximum bin id
874
- * @param decimal_a - The decimal of the token a
875
- * @param decimal_b - The decimal of the token b
876
- * @returns The bin id
877
- */
878
- static getBinIdFromPrice(price: string, binStep: number, min: boolean, decimal_a: number, decimal_b: number): number;
879
- /**
880
- * Get the bin id from a price per lamport
881
- * @param pricePerLamport - The price per lamport
882
- * @param binStep - The bin step
883
- * @param min - Whether to use the minimum or maximum bin id
884
- * @returns The bin id
885
- */
886
- static getBinIdFromLamportPrice(pricePerLamport: string, binStep: number, min: boolean): number;
887
- /**
888
- * Get the price per lamport
889
- * @param decimal_a - The decimal of the token a
890
- * @param decimal_b - The decimal of the token b
891
- * @param price - The price
892
- * @returns The price per lamport
893
- */
894
- static getPricePerLamport(decimal_a: number, decimal_b: number, price: string): string;
895
- /**
896
- * Convert price per lamport back to original price
897
- * @param decimal_a - The decimal of the token a
898
- * @param decimal_b - The decimal of the token b
899
- * @param pricePerLamport - The price per lamport
900
- * @returns The original price
901
- */
902
- static getPriceFromLamport(decimal_a: number, decimal_b: number, pricePerLamport: string): string;
903
- /**
904
- * Get the reverse price
905
- * @param price - The price
906
- * @returns The reverse price
907
- */
908
- static getReversePrice(price: string): string;
909
- /**
910
- * Get the price of a bin by bin id
911
- * @param binId - The bin id
912
- * @param binStep - The bin step
913
- * @returns The price of the bin
914
- */
915
- static getQPriceFromId(binId: number, binStep: number): string;
916
- /**
917
- * Convert QPrice (Q64x64 format) to actual price
918
- * @param qPrice - The price in Q64x64 format
919
- * @returns The actual price
920
- */
921
- static getPricePerLamportFromQPrice(qPrice: string): string;
922
- static pow(base: BN, exp: BN): BN;
923
- /**
924
- * Converts a bin ID to a score by adding the bin bound and validating the range
925
- * @param binId - The bin ID to convert
926
- * @returns The calculated bin score
927
- * @throws Error if the bin ID is invalid
928
- */
929
- static binScore(binId: number): string;
930
- /**
931
- * Converts a score back to bin ID by subtracting the bin bound
932
- * @param score - The score to convert
933
- * @returns The calculated bin ID
934
- * @throws Error if the score is invalid
935
- */
936
- static scoreToBinId(score: string): number;
937
- /**
938
- * Resolves the bin position from a score.
939
- *
940
- * @param score - The score to resolve
941
- * @returns Tuple of [group index, offset in group]
942
- */
943
- static resolveBinPosition(score: string): [string, number];
944
- static findMinMaxBinId(binStep: number): {
945
- minBinId: number;
946
- maxBinId: number;
947
- };
948
- static getBinShift(active_id: number, bin_step: number, max_price_slippage: number): number;
949
- }
950
-
951
- declare class WeightUtils {
952
- static toWeight(options: WeightsOptions): WeightsInfo;
953
- static toWeightSpotBalanced(min_bin_id: number, max_bin_id: number): BinWeight[];
954
- static toWeightDescendingOrder(min_bin_id: number, max_bin_id: number): BinWeight[];
955
- static toWeightAscendingOrder(min_bin_id: number, max_bin_id: number): BinWeight[];
956
- static toWeightCurve(min_bin_id: number, max_bin_id: number, active_id: number): BinWeight[];
957
- static toWeightBidAsk(min_bin_id: number, max_bin_id: number, active_id: number): BinWeight[];
958
- /**
959
- * Distribute totalAmount to all bid side bins according to given distributions.
960
- * @param active_id - active bin id
961
- * @param amount_b - total amount of coin b to be distributed
962
- * @param distributions - weight distribution of each bin
963
- * @returns array of {binId, amount} where amount is the amount of coin b in each bin
964
- */
965
- static toAmountBidSide(active_id: number, amount_b: string, bin_step: number, distributions: BinWeight[], contain_active_bin?: boolean): BinLiquidityInfo;
966
- /**
967
- * Distribute totalAmount to all ask side bins according to given distributions.
968
- * @param active_id active bin id
969
- * @param amount_a total amount of coin a to be distributed
970
- * @param distributions weight distribution of each bin
971
- * @returns array of {binId, amount} where amount is the amount of coin a in each bin
972
- */
973
- static toAmountAskSide(active_id: number, bin_step: number, amount_a: string, distributions: BinWeight[], contain_active_bin?: boolean): BinLiquidityInfo;
974
- /**
975
- * Distributes the given amounts of tokens X and Y to both bid and ask side bins
976
- * based on the provided weight distributions.
977
- *
978
- * @param activeId - The id of the active bin.
979
- * @param binStep - The step interval between bin ids.
980
- * @param amountX - Total amount of token X to distribute.
981
- * @param amountY - Total amount of token Y to distribute.
982
- * @param amountXInActiveBin - Amount of token X already in the active bin.
983
- * @param amountYInActiveBin - Amount of token Y already in the active bin.
984
- * @param distributions - Array of bins with their respective weight distributions.
985
- * @param mintX - Mint information for token X. Get from DLMM instance.
986
- * @param mintY - Mint information for token Y. Get from DLMM instance.
987
- * @param clock - Clock instance. Get from DLMM instance.
988
- * @returns An array of objects containing binId, amountX, and amountY for each bin.
989
- */
990
- static toAmountBothSide(active_id: number, bin_step: number, amount_a: string, amount_b: string, amount_a_in_active_bin: string, amount_b_in_active_bin: string, distributions: BinWeight[]): BinLiquidityInfo;
991
- /**
992
- * Distributes the given amount of coin B to both bid and ask side bins
993
- * based on the provided weight distributions.
994
- *
995
- * @param active_id - The id of the active bin.
996
- * @param bin_step - The step interval between bin ids.
997
- * @param amount_a - Total amount of coin A to distribute.
998
- * @param amount_a_in_active_bin - Amount of coin A already in the active bin.
999
- * @param amount_b_in_active_bin - Amount of coin B already in the active bin.
1000
- * @param distributions - Array of bins with their respective weight distributions.
1001
- * @returns An array of objects containing binId, amountA, and amountB for each bin.
1002
- */
1003
- static autoFillCoinByWeight(active_id: number, bin_step: number, amount: string, fix_amount_a: boolean, amount_a_in_active_bin: string, amount_b_in_active_bin: string, distributions: BinWeight[]): BinLiquidityInfo;
1004
- static calculateActiveWeights(amount_a_in_active_id: string, amount_b_in_active_id: string, active_bin_price: string, base_weight: Decimal): {
1005
- active_weight_a: Decimal;
1006
- active_weight_b: Decimal;
1007
- };
1008
- static calculateTotalWeights(bin_step: number, distributions: BinWeight[], active_id: number, activeBin?: BinWeight, amount_a_in_active_bin?: string, amount_b_in_active_bin?: string, is_only_amount?: 'a' | 'b'): {
1009
- totalWeightA: Decimal;
1010
- totalWeightB: Decimal;
1011
- activeWeightA: Decimal;
1012
- activeWeightB: Decimal;
1013
- };
1014
- }
1015
-
1016
- declare class StrategyUtils {
1017
- static toAmountsByWeights(weights_info: WeightsInfo): BinLiquidityInfo;
1018
- /**
1019
- * Given a strategy type and amounts of X and Y, returns the distribution of liquidity.
1020
- * @param active_id The bin id of the active bin.
1021
- * @param bin_step The step size of each bin.
1022
- * @param min_bin_id The min bin id.
1023
- * @param max_bin_id The max bin id.
1024
- * @param amount_a The amount of X token to deposit.
1025
- * @param amount_b The amount of Y token to deposit.
1026
- * @param amount_a_in_active_bin The amount of X token in the active bin.
1027
- * @param amount_b_in_active_bin The amount of Y token in the active bin.
1028
- * @param strategy_type The strategy type.
1029
- * @returns The distribution of liquidity.
1030
- */
1031
- static toAmountsBothSideByStrategy(active_id: number, bin_step: number, min_bin_id: number, max_bin_id: number, amount_a: string, amount_b: string, strategy_type: StrategyType, active_bin_of_pool?: BinAmount): BinLiquidityInfo;
1032
- static autoFillCoinByStrategy(active_id: number, bin_step: number, amount: string, fix_amount_a: boolean, min_bin_id: number, max_bin_id: number, strategy_type: StrategyType, active_bin_of_pool?: BinAmount): BinLiquidityInfo;
1033
- static autoFillCoinByStrategyV2(active_id: number, bin_step: number, amount: string, fix_amount_a: boolean, min_bin_id: number, max_bin_id: number, strategy_type: StrategyType, active_bin_of_pool?: BinAmount): BinLiquidityInfo;
1034
- }
1035
-
1036
- declare class FeeUtils {
1037
- static getVariableFee(variableParameters: VariableParameters): string;
1038
- static calculateCompositionFee(amount: string, total_fee_rate: string): string;
1039
- static calculateProtocolFee(fee_amount: string, protocol_fee_rate: string): string;
1040
- static getProtocolFees(fee_a: string, fee_b: string, protocol_fee_rate: string): {
1041
- protocol_fee_a: string;
1042
- protocol_fee_b: string;
1043
- };
1044
- static getCompositionFees(active_bin: BinAmount, used_bin: BinAmount, variableParameters: VariableParameters): {
1045
- fees_a: string;
1046
- fees_b: string;
1047
- };
1048
- }
1049
-
1050
- type IlmInputOptions = {
1051
- curvature: number;
1052
- initial_price: number;
1053
- max_price: number;
1054
- bin_step: number;
1055
- total_supply: number;
1056
- pool_share_percentage: number;
1057
- config: {
1058
- price_curve_points_num: number;
1059
- liquidity_distribution_num: number;
1060
- tokens_table_num: number;
1061
- price_table_num: number;
1062
- };
1063
- };
1064
- type Axis = {
1065
- x: number;
1066
- y: number;
1067
- };
1068
- type TokenTable = {
1069
- withdrawn: number;
1070
- price: number;
1071
- usdc_in_pool: number;
1072
- };
1073
- type IlmInputResult = {
1074
- price_curve: {
1075
- data: Axis[];
1076
- min_y: number;
1077
- max_y: number;
1078
- };
1079
- liquidity_curve: {
1080
- data: Axis[];
1081
- min_y: number;
1082
- max_y: number;
1083
- };
1084
- dlmm_bins: {
1085
- data: Axis[];
1086
- min_y: number;
1087
- max_y: number;
1088
- };
1089
- tokens_table: TokenTable[];
1090
- price_table: TokenTable[];
1091
- initial_fdv: number;
1092
- final_fdv: number;
1093
- usdc_in_pool: number;
1094
- };
1095
-
1096
- declare class IlmUtils {
1097
- static calculateIlm(options: IlmInputOptions): IlmInputResult;
1098
- }
1099
-
1100
- declare const MAX_BIN_PER_POSITION = 1000;
1101
- declare const MIN_BIN_ID = -443636;
1102
- declare const MAX_BIN_ID = 443636;
1103
- declare const BASIS_POINT_MAX = 10000;
1104
- declare const DEFAULT_MAX_WEIGHT = 2000;
1105
- declare const DEFAULT_MIN_WEIGHT = 200;
1106
- declare const BIN_BOUND = 443636n;
1107
- declare const MAX_FEE_RATE = 100000000;
1108
- declare const FEE_PRECISION = 1000000000;
1109
- declare const BASIS_POINT = 10000;
1110
- declare const REWARD_PERIOD: number;
1111
- declare const REWARD_PERIOD_START_AT = 1747627200;
1112
-
1113
- declare const dlmmMainnet: SdkOptions;
1114
-
1115
- declare const dlmmTestnet: SdkOptions;
1116
-
1117
- export { type AddLiquidityOption, type AddRewardOption, type Axis, BASIS_POINT, BASIS_POINT_MAX, BIN_BOUND, type BaseAddLiquidityOption, type BaseCalculateAddLiquidityOption, type BaseCreatePoolAndAddOption, type BaseCreatePoolOption, type BinAmount, type BinLiquidityInfo, type BinManager, type BinStepConfig, type BinSwap, BinUtils, type BinWeight, type CalculateAddLiquidityAutoFillOption, type CalculateAddLiquidityOption, type CalculateRemoveLiquidityBothOption, type CalculateRemoveLiquidityOnlyOption, CetusDlmmSDK, type ClaimRefFeeOption, type ClosePositionOption, type CollectFeeOption, type CollectRewardAndFeeOption, type CollectRewardOption, type CreatePartnerOption, type CreatePoolAndAddOption, type CreatePoolAndAddWithPriceOption, type CreatePoolOption, DEFAULT_MAX_WEIGHT, DEFAULT_MIN_WEIGHT, type DlmmBasePool, type DlmmConfigs, type DlmmGlobalConfig, type DlmmPool, type DlmmPosition, FEE_PRECISION, type FeeRate, FeeUtils, type GetBinInfoOption, type GetBinInfoResult, type GetPoolBinInfoOption, type GetTotalFeeRateOption, type IlmInputOptions, type IlmInputResult, IlmUtils, type InitRewardOption, MAX_BIN_ID, MAX_BIN_PER_POSITION, MAX_FEE_RATE, MIN_BIN_ID, ONE, type OpenAndAddLiquidityOption, type OpenAndAddLiquidityWithPriceOption, type OpenPositionOption, type Partner, PoolModule, type PoolPermissions, type PoolTransactionInfo, type PositionFee, type PositionManager, type PositionReward, type PreSwapOption, type PreSwapQuote, REWARD_PERIOD, REWARD_PERIOD_START_AT, type RemoveLiquidityOption, type Reward, type RewardAccessOption, type RewardInfo, type RewardManager, type RewardPeriodEmission, type RewardPeriodEmissionFormat, type RewardWhiteListOption, SCALE_OFFSET, type SdkOptions, StrategyType, StrategyUtils, type SwapOption, type TokenTable, type UpdatePositionFeeAndRewardsOption, type UpdateRefFeeRateOption, type UpdateTimeRangeOption, type ValidateActiveIdSlippageOption, type VariableParameters, WeightUtils, type WeightsInfo, type WeightsOptions, buildPoolKey, CetusDlmmSDK as default, dlmmMainnet, dlmmTestnet, generateRewardSchedule, getRouterModule, parseBinInfo, parseBinInfoList, parseCurrentRewardPeriodEmission, parseDlmmBasePool, parseDlmmPool, parseDlmmPosition, parseLiquidityShares, parsePartner, parsePoolTransactionInfo, parseRewardPeriodEmission, parseStrategyType, parsedDlmmPosFeeData, parsedDlmmPosRewardData, parsedSwapQuoteData, poolFilterEvenTypes, safeAmount, safeMulAmount };