@meteora-ag/dlmm 1.3.14-sam.0 → 1.3.17-rc.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,7 @@ import { PublicKey, TransactionInstruction, Connection, Transaction, Cluster } f
5
5
  import Decimal from 'decimal.js';
6
6
 
7
7
  type LbClmm = {
8
- "version": "0.8.2";
8
+ "version": "0.8.6";
9
9
  "name": "lb_clmm";
10
10
  "constants": [
11
11
  {
@@ -93,6 +93,16 @@ type LbClmm = {
93
93
  };
94
94
  "value": "15";
95
95
  },
96
+ {
97
+ "name": "ILM_PROTOCOL_SHARE";
98
+ "type": "u16";
99
+ "value": "2000";
100
+ },
101
+ {
102
+ "name": "PROTOCOL_SHARE";
103
+ "type": "u16";
104
+ "value": "500";
105
+ },
96
106
  {
97
107
  "name": "MAX_BIN_STEP";
98
108
  "type": "u16";
@@ -108,6 +118,11 @@ type LbClmm = {
108
118
  "type": "u128";
109
119
  "value": "100_000";
110
120
  },
121
+ {
122
+ "name": "MINIMUM_LIQUIDITY";
123
+ "type": "u128";
124
+ "value": "1_000_000";
125
+ },
111
126
  {
112
127
  "name": "BIN_ARRAY";
113
128
  "type": "bytes";
@@ -365,7 +380,7 @@ type LbClmm = {
365
380
  "isSigner": false;
366
381
  },
367
382
  {
368
- "name": "rent";
383
+ "name": "userTokenY";
369
384
  "isMut": false;
370
385
  "isSigner": false;
371
386
  },
@@ -1944,7 +1959,7 @@ type LbClmm = {
1944
1959
  "args": [];
1945
1960
  },
1946
1961
  {
1947
- "name": "updateFeeParameters";
1962
+ "name": "updateBaseFeeParameters";
1948
1963
  "accounts": [
1949
1964
  {
1950
1965
  "name": "lbPair";
@@ -1971,7 +1986,40 @@ type LbClmm = {
1971
1986
  {
1972
1987
  "name": "feeParameter";
1973
1988
  "type": {
1974
- "defined": "FeeParameter";
1989
+ "defined": "BaseFeeParameter";
1990
+ };
1991
+ }
1992
+ ];
1993
+ },
1994
+ {
1995
+ "name": "updateDynamicFeeParameters";
1996
+ "accounts": [
1997
+ {
1998
+ "name": "lbPair";
1999
+ "isMut": true;
2000
+ "isSigner": false;
2001
+ },
2002
+ {
2003
+ "name": "admin";
2004
+ "isMut": false;
2005
+ "isSigner": true;
2006
+ },
2007
+ {
2008
+ "name": "eventAuthority";
2009
+ "isMut": false;
2010
+ "isSigner": false;
2011
+ },
2012
+ {
2013
+ "name": "program";
2014
+ "isMut": false;
2015
+ "isSigner": false;
2016
+ }
2017
+ ];
2018
+ "args": [
2019
+ {
2020
+ "name": "feeParameter";
2021
+ "type": {
2022
+ "defined": "DynamicFeeParameter";
1975
2023
  };
1976
2024
  }
1977
2025
  ];
@@ -2154,7 +2202,7 @@ type LbClmm = {
2154
2202
  "args": [];
2155
2203
  },
2156
2204
  {
2157
- "name": "togglePairStatus";
2205
+ "name": "setPairStatus";
2158
2206
  "accounts": [
2159
2207
  {
2160
2208
  "name": "lbPair";
@@ -2167,7 +2215,12 @@ type LbClmm = {
2167
2215
  "isSigner": true;
2168
2216
  }
2169
2217
  ];
2170
- "args": [];
2218
+ "args": [
2219
+ {
2220
+ "name": "status";
2221
+ "type": "u8";
2222
+ }
2223
+ ];
2171
2224
  },
2172
2225
  {
2173
2226
  "name": "migratePosition";
@@ -2603,6 +2656,27 @@ type LbClmm = {
2603
2656
  "type": "publicKey";
2604
2657
  }
2605
2658
  ];
2659
+ },
2660
+ {
2661
+ "name": "setPairStatusPermissionless";
2662
+ "accounts": [
2663
+ {
2664
+ "name": "lbPair";
2665
+ "isMut": true;
2666
+ "isSigner": false;
2667
+ },
2668
+ {
2669
+ "name": "creator";
2670
+ "isMut": false;
2671
+ "isSigner": true;
2672
+ }
2673
+ ];
2674
+ "args": [
2675
+ {
2676
+ "name": "status";
2677
+ "type": "u8";
2678
+ }
2679
+ ];
2606
2680
  }
2607
2681
  ];
2608
2682
  "accounts": [
@@ -2794,9 +2868,9 @@ type LbClmm = {
2794
2868
  "type": "u8";
2795
2869
  },
2796
2870
  {
2797
- "name": "padding0";
2871
+ "name": "creatorPoolOnOffControl";
2798
2872
  "docs": [
2799
- "padding 0"
2873
+ "Allow pool creator to enable/disable pool with restricted validation. Only applicable for customizable permissionless pair type."
2800
2874
  ];
2801
2875
  "type": "u8";
2802
2876
  },
@@ -3428,7 +3502,7 @@ type LbClmm = {
3428
3502
  };
3429
3503
  },
3430
3504
  {
3431
- "name": "FeeParameter";
3505
+ "name": "BaseFeeParameter";
3432
3506
  "type": {
3433
3507
  "kind": "struct";
3434
3508
  "fields": [
@@ -3449,6 +3523,49 @@ type LbClmm = {
3449
3523
  ];
3450
3524
  };
3451
3525
  },
3526
+ {
3527
+ "name": "DynamicFeeParameter";
3528
+ "type": {
3529
+ "kind": "struct";
3530
+ "fields": [
3531
+ {
3532
+ "name": "filterPeriod";
3533
+ "docs": [
3534
+ "Filter period determine high frequency trading time window."
3535
+ ];
3536
+ "type": "u16";
3537
+ },
3538
+ {
3539
+ "name": "decayPeriod";
3540
+ "docs": [
3541
+ "Decay period determine when the volatile fee start decay / decrease."
3542
+ ];
3543
+ "type": "u16";
3544
+ },
3545
+ {
3546
+ "name": "reductionFactor";
3547
+ "docs": [
3548
+ "Reduction factor controls the volatile fee rate decrement rate."
3549
+ ];
3550
+ "type": "u16";
3551
+ },
3552
+ {
3553
+ "name": "variableFeeControl";
3554
+ "docs": [
3555
+ "Used to scale the variable fee component depending on the dynamic of the market"
3556
+ ];
3557
+ "type": "u32";
3558
+ },
3559
+ {
3560
+ "name": "maxVolatilityAccumulator";
3561
+ "docs": [
3562
+ "Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."
3563
+ ];
3564
+ "type": "u32";
3565
+ }
3566
+ ];
3567
+ };
3568
+ },
3452
3569
  {
3453
3570
  "name": "LiquidityParameterByStrategyOneSide";
3454
3571
  "type": {
@@ -3831,6 +3948,13 @@ type LbClmm = {
3831
3948
  "option": "u64";
3832
3949
  };
3833
3950
  },
3951
+ {
3952
+ "name": "creatorPoolOnOffControl";
3953
+ "docs": [
3954
+ "Pool creator have permission to enable/disable pool with restricted program validation. Only applicable for customizable permissionless pool."
3955
+ ];
3956
+ "type": "bool";
3957
+ },
3834
3958
  {
3835
3959
  "name": "padding";
3836
3960
  "docs": [
@@ -3839,7 +3963,7 @@ type LbClmm = {
3839
3963
  "type": {
3840
3964
  "array": [
3841
3965
  "u8",
3842
- 64
3966
+ 63
3843
3967
  ];
3844
3968
  };
3845
3969
  }
@@ -4814,6 +4938,41 @@ type LbClmm = {
4814
4938
  }
4815
4939
  ];
4816
4940
  },
4941
+ {
4942
+ "name": "DynamicFeeParameterUpdate";
4943
+ "fields": [
4944
+ {
4945
+ "name": "lbPair";
4946
+ "type": "publicKey";
4947
+ "index": false;
4948
+ },
4949
+ {
4950
+ "name": "filterPeriod";
4951
+ "type": "u16";
4952
+ "index": false;
4953
+ },
4954
+ {
4955
+ "name": "decayPeriod";
4956
+ "type": "u16";
4957
+ "index": false;
4958
+ },
4959
+ {
4960
+ "name": "reductionFactor";
4961
+ "type": "u16";
4962
+ "index": false;
4963
+ },
4964
+ {
4965
+ "name": "variableFeeControl";
4966
+ "type": "u32";
4967
+ "index": false;
4968
+ },
4969
+ {
4970
+ "name": "maxVolatilityAccumulator";
4971
+ "type": "u32";
4972
+ "index": false;
4973
+ }
4974
+ ];
4975
+ },
4817
4976
  {
4818
4977
  "name": "IncreaseObservation";
4819
4978
  "fields": [
@@ -5250,6 +5409,21 @@ type LbClmm = {
5250
5409
  "code": 6065;
5251
5410
  "name": "AlreadyPassPreActivationSwapPoint";
5252
5411
  "msg": "Already pass pre-activation swap point";
5412
+ },
5413
+ {
5414
+ "code": 6066;
5415
+ "name": "InvalidStatus";
5416
+ "msg": "Invalid status";
5417
+ },
5418
+ {
5419
+ "code": 6067;
5420
+ "name": "ExceededMaxOracleLength";
5421
+ "msg": "Exceed max oracle length";
5422
+ },
5423
+ {
5424
+ "code": 6068;
5425
+ "name": "InvalidMinimumLiquidity";
5426
+ "msg": "Invalid minimum liquidity";
5253
5427
  }
5254
5428
  ];
5255
5429
  };
@@ -5334,15 +5508,6 @@ declare enum PairType {
5334
5508
  Permissioned = 1
5335
5509
  }
5336
5510
  declare const Strategy: {
5337
- SpotOneSide: {
5338
- spotOneSide: {};
5339
- };
5340
- CurveOneSide: {
5341
- curveOneSide: {};
5342
- };
5343
- BidAskOneSide: {
5344
- bidAskOneSide: {};
5345
- };
5346
5511
  SpotBalanced: {
5347
5512
  spotBalanced: {};
5348
5513
  };
@@ -5363,15 +5528,12 @@ declare const Strategy: {
5363
5528
  };
5364
5529
  };
5365
5530
  declare enum StrategyType {
5366
- SpotOneSide = 0,
5367
- CurveOneSide = 1,
5368
- BidAskOneSide = 2,
5369
- SpotImBalanced = 3,
5370
- CurveImBalanced = 4,
5371
- BidAskImBalanced = 5,
5372
- SpotBalanced = 6,
5373
- CurveBalanced = 7,
5374
- BidAskBalanced = 8
5531
+ SpotImBalanced = 0,
5532
+ CurveImBalanced = 1,
5533
+ BidAskImBalanced = 2,
5534
+ SpotBalanced = 3,
5535
+ CurveBalanced = 4,
5536
+ BidAskBalanced = 5
5375
5537
  }
5376
5538
  declare enum ActivationType {
5377
5539
  Slot = 0,
@@ -5554,6 +5716,7 @@ declare enum BitmapType {
5554
5716
  U512 = 1
5555
5717
  }
5556
5718
  interface SeedLiquidityResponse {
5719
+ sendPositionOwnerTokenProveIxs: TransactionInstruction[];
5557
5720
  initializeBinArraysAndPositionIxs: TransactionInstruction[][];
5558
5721
  addLiquidityIxs: TransactionInstruction[][];
5559
5722
  }
@@ -5569,6 +5732,16 @@ declare enum PairStatus {
5569
5732
  Enabled = 0,
5570
5733
  Disabled = 1
5571
5734
  }
5735
+ interface PairLockInfo {
5736
+ positions: Array<PositionLockInfo>;
5737
+ }
5738
+ interface PositionLockInfo {
5739
+ positionAddress: PublicKey;
5740
+ owner: PublicKey;
5741
+ tokenXAmount: string;
5742
+ tokenYAmount: string;
5743
+ lockReleasePoint: number;
5744
+ }
5572
5745
 
5573
5746
  type Opt = {
5574
5747
  cluster?: Cluster | "localhost";
@@ -5641,18 +5814,34 @@ declare class DLMM {
5641
5814
  * Pair account, and the value is an object of PositionInfo
5642
5815
  */
5643
5816
  static getAllLbPairPositionsByUser(connection: Connection, userPubKey: PublicKey, opt?: Opt): Promise<Map<string, PositionInfo>>;
5644
- static migratePosition(connection: Connection, positions: PublicKey[], newPositions: PublicKey[], walletPubkey: PublicKey, opt?: Opt): Promise<Transaction[]>;
5645
5817
  static getPricePerLamport(tokenXDecimal: number, tokenYDecimal: number, price: number): string;
5646
5818
  static getBinIdFromPrice(price: string | number | Decimal, binStep: number, min: boolean): number;
5819
+ /**
5820
+ * The function `getLbPairLockInfo` retrieves all pair positions that has locked liquidity.
5821
+ * @param {number} [lockDurationOpt] - An optional value indicating the minimum position lock duration that the function should return.
5822
+ * Depending on the lbPair activationType, the param should be a number of seconds or a number of slots.
5823
+ * @returns The function `getLbPairLockInfo` returns a `Promise` that resolves to a `PairLockInfo`
5824
+ * object. The `PairLockInfo` object contains an array of `PositionLockInfo` objects.
5825
+ */
5826
+ getLbPairLockInfo(lockDurationOpt?: number): Promise<PairLockInfo>;
5647
5827
  /** Public methods */
5648
5828
  static createPermissionLbPair(connection: Connection, binStep: BN, tokenX: PublicKey, tokenY: PublicKey, activeId: BN, baseKey: PublicKey, creatorKey: PublicKey, feeBps: BN, activationType: ActivationType, opt?: Opt): Promise<Transaction>;
5649
- static createCustomizablePermissionlessLbPair(connection: Connection, binStep: BN, tokenX: PublicKey, tokenY: PublicKey, activeId: BN, feeBps: BN, activationType: ActivationType, hasAlphaVault: boolean, creatorKey: PublicKey, activationPoint?: BN, opt?: Opt): Promise<Transaction>;
5829
+ static createCustomizablePermissionlessLbPair(connection: Connection, binStep: BN, tokenX: PublicKey, tokenY: PublicKey, activeId: BN, feeBps: BN, activationType: ActivationType, hasAlphaVault: boolean, creatorKey: PublicKey, activationPoint?: BN, creatorPoolOnOffControl?: boolean, opt?: Opt): Promise<Transaction>;
5650
5830
  static createLbPair(connection: Connection, funder: PublicKey, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, presetParameter: PublicKey, activeId: BN, opt?: Opt): Promise<Transaction>;
5651
5831
  /**
5652
5832
  * The function `refetchStates` retrieves and updates various states and data related to bin arrays
5653
5833
  * and lb pairs.
5654
5834
  */
5655
5835
  refetchStates(): Promise<void>;
5836
+ /**
5837
+ * Set the status of a permissionless LB pair to either enabled or disabled. This require pool field `creator_pool_on_off_control` to be true and type `CustomizablePermissionless`.
5838
+ * Pool creator can enable/disable the pair anytime before the pool is opened / activated. Once the pool activation time is passed, the pool creator can only enable the pair.
5839
+ * Useful for token launches which do not have fixed activation time.
5840
+ * @param enable If true, the pair will be enabled. If false, the pair will be disabled.
5841
+ * @param creator The public key of the pool creator.
5842
+ * @returns a Promise that resolves to the transaction.
5843
+ */
5844
+ setPairStatusPermissionless(enable: boolean, creator: PublicKey): Promise<Transaction>;
5656
5845
  /**
5657
5846
  * The function `getBinArrays` returns an array of `BinArrayAccount` objects
5658
5847
  * @returns a Promise that resolves to an array of BinArrayAccount objects.
@@ -5795,6 +5984,19 @@ declare class DLMM {
5795
5984
  maxBinId: number;
5796
5985
  user: PublicKey;
5797
5986
  }): Promise<Transaction>;
5987
+ /**
5988
+ * The function `getPosition` retrieves position information for a given public key and processes it
5989
+ * using various data to return a `LbPosition` object.
5990
+ * @param {PublicKey} positionPubKey - The `getPosition` function you provided is an asynchronous
5991
+ * function that fetches position information based on a given public key. Here's a breakdown of the
5992
+ * parameters used in the function:
5993
+ * @returns The `getPosition` function returns a Promise that resolves to an object of type
5994
+ * `LbPosition`. The object contains the following properties:
5995
+ * - `publicKey`: The public key of the position account
5996
+ * - `positionData`: Position Object
5997
+ * - `version`: The version of the position (in this case, `Position.V2`)
5998
+ */
5999
+ getPosition(positionPubKey: PublicKey): Promise<LbPosition>;
5798
6000
  /**
5799
6001
  * The function `initializePositionAndAddLiquidityByStrategy` function is used to initializes a position and adds liquidity
5800
6002
  * @param {TInitializePositionAndAddLiquidityParamsByStrategy}
@@ -5882,6 +6084,7 @@ declare class DLMM {
5882
6084
  * - `outAmount`: Amount of lamport to swap out
5883
6085
  * - `swapForY`: Swap token X to Y when it is true, else reversed.
5884
6086
  * - `allowedSlippage`: Allowed slippage for the swap. Expressed in BPS. To convert from slippage percentage to BPS unit: SLIPPAGE_PERCENTAGE * 100
6087
+ * - `maxExtraBinArrays`: Maximum number of extra binArrays to return
5885
6088
  * @returns {SwapQuote}
5886
6089
  * - `inAmount`: Amount of lamport to swap in
5887
6090
  * - `outAmount`: Amount of lamport to swap out
@@ -5892,7 +6095,7 @@ declare class DLMM {
5892
6095
  * @throws {DlmmSdkError}
5893
6096
  *
5894
6097
  */
5895
- swapQuoteExactOut(outAmount: BN, swapForY: boolean, allowedSlippage: BN, binArrays: BinArrayAccount[]): SwapQuoteExactOut;
6098
+ swapQuoteExactOut(outAmount: BN, swapForY: boolean, allowedSlippage: BN, binArrays: BinArrayAccount[], maxExtraBinArrays?: number): SwapQuoteExactOut;
5896
6099
  /**
5897
6100
  * The `swapQuote` function returns a quote for a swap
5898
6101
  * @param
@@ -5901,6 +6104,7 @@ declare class DLMM {
5901
6104
  * - `allowedSlippage`: Allowed slippage for the swap. Expressed in BPS. To convert from slippage percentage to BPS unit: SLIPPAGE_PERCENTAGE * 100
5902
6105
  * - `binArrays`: binArrays for swapQuote.
5903
6106
  * - `isPartialFill`: Flag to check whether the the swapQuote is partial fill, default = false.
6107
+ * - `maxExtraBinArrays`: Maximum number of extra binArrays to return
5904
6108
  * @returns {SwapQuote}
5905
6109
  * - `consumedInAmount`: Amount of lamport to swap in
5906
6110
  * - `outAmount`: Amount of lamport to swap out
@@ -5911,7 +6115,7 @@ declare class DLMM {
5911
6115
  * - `binArraysPubkey`: Array of bin arrays involved in the swap
5912
6116
  * @throws {DlmmSdkError}
5913
6117
  */
5914
- swapQuote(inAmount: BN, swapForY: boolean, allowedSlippage: BN, binArrays: BinArrayAccount[], isPartialFill?: boolean): SwapQuote;
6118
+ swapQuote(inAmount: BN, swapForY: boolean, allowedSlippage: BN, binArrays: BinArrayAccount[], isPartialFill?: boolean, maxExtraBinArrays?: number): SwapQuote;
5915
6119
  swapExactOut({ inToken, outToken, outAmount, maxInAmount, lbPair, user, binArraysPubkey, }: SwapExactOutParams): Promise<Transaction>;
5916
6120
  /**
5917
6121
  * Returns a transaction to be signed and sent by user performing swap.
@@ -5963,6 +6167,7 @@ declare class DLMM {
5963
6167
  positions: LbPosition[];
5964
6168
  }): Promise<Transaction[]>;
5965
6169
  setActivationPoint(activationPoint: BN): Promise<Transaction>;
6170
+ setPairStatus(enabled: boolean): Promise<Transaction>;
5966
6171
  /**
5967
6172
  * The function `claimSwapFee` is used to claim swap fees for a specific position owned by a specific owner.
5968
6173
  * @param
@@ -6005,9 +6210,14 @@ declare class DLMM {
6005
6210
  * - `minPrice`: Start price in UI format
6006
6211
  * - `maxPrice`: End price in UI format
6007
6212
  * - `base`: Base key
6213
+ * - `txPayer`: Account rental fee payer
6214
+ * - `feeOwner`: Fee owner key. Default to position owner
6215
+ * - `operator`: Operator key
6216
+ * - `lockReleasePoint`: Timelock. Point (slot/timestamp) the position can withdraw the liquidity,
6217
+ * - `shouldSeedPositionOwner` (optional): Whether to send 1 lamport amount of token X to the position owner to prove ownership.
6008
6218
  * @returns {Promise<SeedLiquidityResponse>}
6009
6219
  */
6010
- seedLiquidity(owner: PublicKey, seedAmount: BN, curvature: number, minPrice: number, maxPrice: number, base: PublicKey): Promise<SeedLiquidityResponse>;
6220
+ seedLiquidity(owner: PublicKey, seedAmount: BN, curvature: number, minPrice: number, maxPrice: number, base: PublicKey, payer: PublicKey, feeOwner: PublicKey, operator: PublicKey, lockReleasePoint: BN, shouldSeedPositionOwner?: boolean): Promise<SeedLiquidityResponse>;
6011
6221
  /**
6012
6222
  * The `seedLiquidity` function create multiple grouped instructions. The grouped instructions will be either [initialize bin array + initialize position instructions] or [deposit instruction] combination.
6013
6223
  * @param
@@ -6239,10 +6449,6 @@ declare function autoFillXByWeight(activeId: number, binStep: number, amountY: B
6239
6449
  weight: number;
6240
6450
  }[]): BN;
6241
6451
 
6242
- declare function toAmountsOneSideByStrategy(activeId: number, binStep: number, minBinId: number, maxBinId: number, amount: BN, strategyType: StrategyType, depositForY: boolean): {
6243
- binId: number;
6244
- amount: BN;
6245
- }[];
6246
6452
  declare function toAmountsBothSideByStrategy(activeId: number, binStep: number, minBinId: number, maxBinId: number, amountX: BN, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, strategyType: StrategyType): {
6247
6453
  binId: number;
6248
6454
  amountX: BN;
@@ -6251,58 +6457,10 @@ declare function toAmountsBothSideByStrategy(activeId: number, binStep: number,
6251
6457
  declare function autoFillYByStrategy(activeId: number, binStep: number, amountX: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, minBinId: number, maxBinId: number, strategyType: StrategyType): BN;
6252
6458
  declare function autoFillXByStrategy(activeId: number, binStep: number, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, minBinId: number, maxBinId: number, strategyType: StrategyType): BN;
6253
6459
  declare function toStrategyParameters({ maxBinId, minBinId, strategyType, singleSidedX, }: StrategyParameters): {
6254
- minBinId: number;
6255
- maxBinId: number;
6256
- strategyType: {
6257
- spotOneSide: {};
6258
- curveOneSide?: undefined;
6259
- bidAskOneSide?: undefined;
6260
- spotBalanced?: undefined;
6261
- curveBalanced?: undefined;
6262
- bidAskBalanced?: undefined;
6263
- spotImBalanced?: undefined;
6264
- curveImBalanced?: undefined;
6265
- bidAskImBalanced?: undefined;
6266
- };
6267
- parameteres: number[];
6268
- } | {
6269
- minBinId: number;
6270
- maxBinId: number;
6271
- strategyType: {
6272
- curveOneSide: {};
6273
- spotOneSide?: undefined;
6274
- bidAskOneSide?: undefined;
6275
- spotBalanced?: undefined;
6276
- curveBalanced?: undefined;
6277
- bidAskBalanced?: undefined;
6278
- spotImBalanced?: undefined;
6279
- curveImBalanced?: undefined;
6280
- bidAskImBalanced?: undefined;
6281
- };
6282
- parameteres: number[];
6283
- } | {
6284
- minBinId: number;
6285
- maxBinId: number;
6286
- strategyType: {
6287
- bidAskOneSide: {};
6288
- spotOneSide?: undefined;
6289
- curveOneSide?: undefined;
6290
- spotBalanced?: undefined;
6291
- curveBalanced?: undefined;
6292
- bidAskBalanced?: undefined;
6293
- spotImBalanced?: undefined;
6294
- curveImBalanced?: undefined;
6295
- bidAskImBalanced?: undefined;
6296
- };
6297
- parameteres: number[];
6298
- } | {
6299
6460
  minBinId: number;
6300
6461
  maxBinId: number;
6301
6462
  strategyType: {
6302
6463
  spotBalanced: {};
6303
- spotOneSide?: undefined;
6304
- curveOneSide?: undefined;
6305
- bidAskOneSide?: undefined;
6306
6464
  curveBalanced?: undefined;
6307
6465
  bidAskBalanced?: undefined;
6308
6466
  spotImBalanced?: undefined;
@@ -6315,9 +6473,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
6315
6473
  maxBinId: number;
6316
6474
  strategyType: {
6317
6475
  curveBalanced: {};
6318
- spotOneSide?: undefined;
6319
- curveOneSide?: undefined;
6320
- bidAskOneSide?: undefined;
6321
6476
  spotBalanced?: undefined;
6322
6477
  bidAskBalanced?: undefined;
6323
6478
  spotImBalanced?: undefined;
@@ -6330,9 +6485,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
6330
6485
  maxBinId: number;
6331
6486
  strategyType: {
6332
6487
  bidAskBalanced: {};
6333
- spotOneSide?: undefined;
6334
- curveOneSide?: undefined;
6335
- bidAskOneSide?: undefined;
6336
6488
  spotBalanced?: undefined;
6337
6489
  curveBalanced?: undefined;
6338
6490
  spotImBalanced?: undefined;
@@ -6345,9 +6497,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
6345
6497
  maxBinId: number;
6346
6498
  strategyType: {
6347
6499
  spotImBalanced: {};
6348
- spotOneSide?: undefined;
6349
- curveOneSide?: undefined;
6350
- bidAskOneSide?: undefined;
6351
6500
  spotBalanced?: undefined;
6352
6501
  curveBalanced?: undefined;
6353
6502
  bidAskBalanced?: undefined;
@@ -6360,9 +6509,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
6360
6509
  maxBinId: number;
6361
6510
  strategyType: {
6362
6511
  curveImBalanced: {};
6363
- spotOneSide?: undefined;
6364
- curveOneSide?: undefined;
6365
- bidAskOneSide?: undefined;
6366
6512
  spotBalanced?: undefined;
6367
6513
  curveBalanced?: undefined;
6368
6514
  bidAskBalanced?: undefined;
@@ -6375,9 +6521,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
6375
6521
  maxBinId: number;
6376
6522
  strategyType: {
6377
6523
  bidAskImBalanced: {};
6378
- spotOneSide?: undefined;
6379
- curveOneSide?: undefined;
6380
- bidAskOneSide?: undefined;
6381
6524
  spotBalanced?: undefined;
6382
6525
  curveBalanced?: undefined;
6383
6526
  bidAskBalanced?: undefined;
@@ -6432,7 +6575,7 @@ declare function chunkedFetchMultiplePoolAccount(program: ClmmProgram, pks: Publ
6432
6575
  requireBaseFactorSeed: number;
6433
6576
  baseFactorSeed: number[];
6434
6577
  activationType: number;
6435
- padding0: number;
6578
+ creatorPoolOnOffControl: number;
6436
6579
  tokenXMint: PublicKey;
6437
6580
  tokenYMint: PublicKey;
6438
6581
  reserveX: PublicKey;
@@ -6505,7 +6648,7 @@ declare class DLMMError extends Error {
6505
6648
  errorMessage: string;
6506
6649
  constructor(error: object | Codes);
6507
6650
  }
6508
- type ErrorName = "SWAP_QUOTE_INSUFFICIENT_LIQUIDITY";
6651
+ type ErrorName = "SWAP_QUOTE_INSUFFICIENT_LIQUIDITY" | "INVALID_MAX_EXTRA_BIN_ARRAYS";
6509
6652
  declare class DlmmSdkError extends Error {
6510
6653
  name: ErrorName;
6511
6654
  message: string;
@@ -6545,5 +6688,6 @@ declare const MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX = 26;
6545
6688
  declare const MAX_BIN_PER_TX = 69;
6546
6689
  declare const MAX_ACTIVE_BIN_SLIPPAGE = 3;
6547
6690
  declare const ILM_BASE: PublicKey;
6691
+ declare const MAX_EXTRA_BIN_ARRAYS = 3;
6548
6692
 
6549
- export { ADMIN, ActivationType, BASIS_POINT_MAX, BIN_ARRAY_BITMAP_SIZE, BIN_ARRAY_FEE, Bin, BinAndAmount, BinArray, BinArrayAccount, BinArrayBitmapExtension, BinArrayBitmapExtensionAccount, BinLiquidity, BinLiquidityDistribution, BinLiquidityReduction, BitmapType, ClmmProgram, Clock, ClockLayout, CompressedBinDepositAmount, CompressedBinDepositAmounts, DLMMError, DlmmSdkError, EXTENSION_BINARRAY_BITMAP_SIZE, EmissionRate, FEE_PRECISION, FeeInfo, GetOrCreateATAResponse, IAccountsCache, IDL, ILM_BASE, InitCustomizablePermissionlessPairIx, InitPermissionPairIx, LBCLMM_PROGRAM_IDS, LMRewards, LbClmm, LbPair, LbPairAccount, LbPosition, LiquidityOneSideParameter, LiquidityParameter, LiquidityParameterByStrategy, LiquidityParameterByStrategyOneSide, LiquidityParameterByWeight, MAX_ACTIVE_BIN_SLIPPAGE, MAX_BIN_ARRAY_SIZE, MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX, MAX_BIN_PER_POSITION, MAX_BIN_PER_TX, MAX_CLAIM_ALL_ALLOWED, MAX_FEE_RATE, Network, POSITION_FEE, PRECISION, PairStatus, PairType, Position, PositionBinData, PositionData, PositionInfo, PositionV2, PositionVersion, ProgramStrategyParameter, ProgramStrategyType, SCALE, SCALE_OFFSET, SIMULATION_USER, SeedLiquidityResponse, Strategy, StrategyParameters, StrategyType, SwapExactOutParams, SwapFee, SwapParams, SwapQuote, SwapQuoteExactOut, SwapWithPriceImpactParams, TInitializePositionAndAddLiquidityParams, TInitializePositionAndAddLiquidityParamsByStrategy, TQuoteCreatePositionParams, TokenReserve, autoFillXByStrategy, autoFillXByWeight, autoFillYByStrategy, autoFillYByWeight, binIdToBinArrayIndex, calculateBidAskDistribution, calculateNormalDistribution, calculateSpotDistribution, chunkedFetchMultipleBinArrayBitmapExtensionAccount, chunkedFetchMultiplePoolAccount, chunkedGetMultipleAccountInfos, chunks, computeFee, computeFeeFromAmount, computeProtocolFee, DLMM as default, deriveBinArray, deriveBinArrayBitmapExtension, deriveCustomizablePermissionlessLbPair, deriveLbPair, deriveLbPair2, deriveOracle, derivePermissionLbPair, derivePosition, derivePresetParameter, derivePresetParameter2, deriveReserve, enumerateBins, findNextBinArrayIndexWithLiquidity, findNextBinArrayWithLiquidity, fromWeightDistributionToAmount, fromWeightDistributionToAmountOneSide, getBaseFee, getBinArrayLowerUpperBinId, getBinArraysRequiredByPositionRange, getBinFromBinArray, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getOrCreateATAInstruction, getOutAmount, getPriceOfBinByBinId, getTokenBalance, getTokenDecimals, getTokensMintFromPoolAddress, getTotalFee, getVariableFee, isBinIdWithinBinArray, isOverflowDefaultBinArrayBitmap, parseLogs, range, sParameters, swapExactInQuoteAtBin, swapExactOutQuoteAtBin, toAmountAskSide, toAmountBidSide, toAmountBothSide, toAmountsBothSideByStrategy, toAmountsOneSideByStrategy, toStrategyParameters, toWeightDistribution, unwrapSOLInstruction, vParameters, wrapSOLInstruction };
6693
+ export { ADMIN, ActivationType, BASIS_POINT_MAX, BIN_ARRAY_BITMAP_SIZE, BIN_ARRAY_FEE, Bin, BinAndAmount, BinArray, BinArrayAccount, BinArrayBitmapExtension, BinArrayBitmapExtensionAccount, BinLiquidity, BinLiquidityDistribution, BinLiquidityReduction, BitmapType, ClmmProgram, Clock, ClockLayout, CompressedBinDepositAmount, CompressedBinDepositAmounts, DLMMError, DlmmSdkError, EXTENSION_BINARRAY_BITMAP_SIZE, EmissionRate, FEE_PRECISION, FeeInfo, GetOrCreateATAResponse, IAccountsCache, IDL, ILM_BASE, InitCustomizablePermissionlessPairIx, InitPermissionPairIx, LBCLMM_PROGRAM_IDS, LMRewards, LbClmm, LbPair, LbPairAccount, LbPosition, LiquidityOneSideParameter, LiquidityParameter, LiquidityParameterByStrategy, LiquidityParameterByStrategyOneSide, LiquidityParameterByWeight, MAX_ACTIVE_BIN_SLIPPAGE, MAX_BIN_ARRAY_SIZE, MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX, MAX_BIN_PER_POSITION, MAX_BIN_PER_TX, MAX_CLAIM_ALL_ALLOWED, MAX_EXTRA_BIN_ARRAYS, MAX_FEE_RATE, Network, POSITION_FEE, PRECISION, PairLockInfo, PairStatus, PairType, Position, PositionBinData, PositionData, PositionInfo, PositionLockInfo, PositionV2, PositionVersion, ProgramStrategyParameter, ProgramStrategyType, SCALE, SCALE_OFFSET, SIMULATION_USER, SeedLiquidityResponse, Strategy, StrategyParameters, StrategyType, SwapExactOutParams, SwapFee, SwapParams, SwapQuote, SwapQuoteExactOut, SwapWithPriceImpactParams, TInitializePositionAndAddLiquidityParams, TInitializePositionAndAddLiquidityParamsByStrategy, TQuoteCreatePositionParams, TokenReserve, autoFillXByStrategy, autoFillXByWeight, autoFillYByStrategy, autoFillYByWeight, binIdToBinArrayIndex, calculateBidAskDistribution, calculateNormalDistribution, calculateSpotDistribution, chunkedFetchMultipleBinArrayBitmapExtensionAccount, chunkedFetchMultiplePoolAccount, chunkedGetMultipleAccountInfos, chunks, computeFee, computeFeeFromAmount, computeProtocolFee, DLMM as default, deriveBinArray, deriveBinArrayBitmapExtension, deriveCustomizablePermissionlessLbPair, deriveLbPair, deriveLbPair2, deriveOracle, derivePermissionLbPair, derivePosition, derivePresetParameter, derivePresetParameter2, deriveReserve, enumerateBins, findNextBinArrayIndexWithLiquidity, findNextBinArrayWithLiquidity, fromWeightDistributionToAmount, fromWeightDistributionToAmountOneSide, getBaseFee, getBinArrayLowerUpperBinId, getBinArraysRequiredByPositionRange, getBinFromBinArray, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getOrCreateATAInstruction, getOutAmount, getPriceOfBinByBinId, getTokenBalance, getTokenDecimals, getTokensMintFromPoolAddress, getTotalFee, getVariableFee, isBinIdWithinBinArray, isOverflowDefaultBinArrayBitmap, parseLogs, range, sParameters, swapExactInQuoteAtBin, swapExactOutQuoteAtBin, toAmountAskSide, toAmountBidSide, toAmountBothSide, toAmountsBothSideByStrategy, toStrategyParameters, toWeightDistribution, unwrapSOLInstruction, vParameters, wrapSOLInstruction };