@hawksightco/hawk-sdk 1.3.263 → 1.3.265

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.
Files changed (181) hide show
  1. package/package.json +1 -1
  2. package/dist/src/addresses.d.ts +0 -37
  3. package/dist/src/addresses.d.ts.map +0 -1
  4. package/dist/src/addresses.js +0 -84
  5. package/dist/src/anchor.d.ts +0 -22
  6. package/dist/src/anchor.d.ts.map +0 -1
  7. package/dist/src/anchor.js +0 -121
  8. package/dist/src/classes/AltStorage.d.ts +0 -29
  9. package/dist/src/classes/AltStorage.d.ts.map +0 -1
  10. package/dist/src/classes/AltStorage.js +0 -58
  11. package/dist/src/classes/Atomicity.d.ts +0 -34
  12. package/dist/src/classes/Atomicity.d.ts.map +0 -1
  13. package/dist/src/classes/Atomicity.js +0 -110
  14. package/dist/src/classes/Client.d.ts +0 -35
  15. package/dist/src/classes/Client.d.ts.map +0 -1
  16. package/dist/src/classes/Client.js +0 -66
  17. package/dist/src/classes/CombineTransactions.d.ts +0 -11
  18. package/dist/src/classes/CombineTransactions.d.ts.map +0 -1
  19. package/dist/src/classes/CombineTransactions.js +0 -58
  20. package/dist/src/classes/CreateTxMetadata.d.ts +0 -100
  21. package/dist/src/classes/CreateTxMetadata.d.ts.map +0 -1
  22. package/dist/src/classes/CreateTxMetadata.js +0 -415
  23. package/dist/src/classes/General.d.ts +0 -87
  24. package/dist/src/classes/General.d.ts.map +0 -1
  25. package/dist/src/classes/General.js +0 -176
  26. package/dist/src/classes/GeneralUtility.d.ts +0 -79
  27. package/dist/src/classes/GeneralUtility.d.ts.map +0 -1
  28. package/dist/src/classes/GeneralUtility.js +0 -121
  29. package/dist/src/classes/HawkAPI.d.ts +0 -122
  30. package/dist/src/classes/HawkAPI.d.ts.map +0 -1
  31. package/dist/src/classes/HawkAPI.js +0 -169
  32. package/dist/src/classes/Health.d.ts +0 -29
  33. package/dist/src/classes/Health.d.ts.map +0 -1
  34. package/dist/src/classes/Health.js +0 -48
  35. package/dist/src/classes/JupiterAlts.d.ts +0 -37
  36. package/dist/src/classes/JupiterAlts.d.ts.map +0 -1
  37. package/dist/src/classes/JupiterAlts.js +0 -114
  38. package/dist/src/classes/JupiterSwap.d.ts +0 -21
  39. package/dist/src/classes/JupiterSwap.d.ts.map +0 -1
  40. package/dist/src/classes/JupiterSwap.js +0 -40
  41. package/dist/src/classes/Logging.d.ts +0 -13
  42. package/dist/src/classes/Logging.d.ts.map +0 -1
  43. package/dist/src/classes/Logging.js +0 -50
  44. package/dist/src/classes/MultiTransaction.d.ts +0 -75
  45. package/dist/src/classes/MultiTransaction.d.ts.map +0 -1
  46. package/dist/src/classes/MultiTransaction.js +0 -296
  47. package/dist/src/classes/RaydiumSDK.d.ts +0 -67
  48. package/dist/src/classes/RaydiumSDK.d.ts.map +0 -1
  49. package/dist/src/classes/RaydiumSDK.js +0 -206
  50. package/dist/src/classes/Search.d.ts +0 -100
  51. package/dist/src/classes/Search.d.ts.map +0 -1
  52. package/dist/src/classes/Search.js +0 -216
  53. package/dist/src/classes/SimpleIxGenerator.d.ts +0 -57
  54. package/dist/src/classes/SimpleIxGenerator.d.ts.map +0 -1
  55. package/dist/src/classes/SimpleIxGenerator.js +0 -62
  56. package/dist/src/classes/SimplePdaGenerator.d.ts +0 -28
  57. package/dist/src/classes/SimplePdaGenerator.d.ts.map +0 -1
  58. package/dist/src/classes/SimplePdaGenerator.js +0 -33
  59. package/dist/src/classes/Transaction.d.ts +0 -229
  60. package/dist/src/classes/Transaction.d.ts.map +0 -1
  61. package/dist/src/classes/Transaction.js +0 -643
  62. package/dist/src/classes/Transaction2.d.ts +0 -107
  63. package/dist/src/classes/Transaction2.d.ts.map +0 -1
  64. package/dist/src/classes/Transaction2.js +0 -249
  65. package/dist/src/classes/Transaction3.d.ts +0 -165
  66. package/dist/src/classes/Transaction3.d.ts.map +0 -1
  67. package/dist/src/classes/Transaction3.js +0 -416
  68. package/dist/src/classes/TransactionBatchExecute.d.ts +0 -163
  69. package/dist/src/classes/TransactionBatchExecute.d.ts.map +0 -1
  70. package/dist/src/classes/TransactionBatchExecute.js +0 -466
  71. package/dist/src/classes/TransactionBatchExecute2.d.ts +0 -99
  72. package/dist/src/classes/TransactionBatchExecute2.d.ts.map +0 -1
  73. package/dist/src/classes/TransactionBatchExecute2.js +0 -357
  74. package/dist/src/classes/Transactions.d.ts +0 -586
  75. package/dist/src/classes/Transactions.d.ts.map +0 -1
  76. package/dist/src/classes/Transactions.js +0 -7656
  77. package/dist/src/classes/TxGenerator.d.ts +0 -350
  78. package/dist/src/classes/TxGenerator.d.ts.map +0 -1
  79. package/dist/src/classes/TxGenerator.js +0 -1957
  80. package/dist/src/classes/TxGeneratorAutomations.d.ts +0 -186
  81. package/dist/src/classes/TxGeneratorAutomations.d.ts.map +0 -1
  82. package/dist/src/classes/TxGeneratorAutomations.js +0 -897
  83. package/dist/src/classes/Util.d.ts +0 -87
  84. package/dist/src/classes/Util.d.ts.map +0 -1
  85. package/dist/src/classes/Util.js +0 -148
  86. package/dist/src/classes/account-cache/AccountCache.d.ts +0 -54
  87. package/dist/src/classes/account-cache/AccountCache.d.ts.map +0 -1
  88. package/dist/src/classes/account-cache/AccountCache.js +0 -143
  89. package/dist/src/classes/account-cache/MintCache.d.ts +0 -33
  90. package/dist/src/classes/account-cache/MintCache.d.ts.map +0 -1
  91. package/dist/src/classes/account-cache/MintCache.js +0 -47
  92. package/dist/src/classes/account-cache/TokenCache.d.ts +0 -33
  93. package/dist/src/classes/account-cache/TokenCache.d.ts.map +0 -1
  94. package/dist/src/classes/account-cache/TokenCache.js +0 -47
  95. package/dist/src/errors.d.ts +0 -13
  96. package/dist/src/errors.d.ts.map +0 -1
  97. package/dist/src/errors.js +0 -96
  98. package/dist/src/functions.d.ts +0 -514
  99. package/dist/src/functions.d.ts.map +0 -1
  100. package/dist/src/functions.js +0 -1636
  101. package/dist/src/hawksight.d.ts +0 -53
  102. package/dist/src/hawksight.d.ts.map +0 -1
  103. package/dist/src/hawksight.js +0 -328
  104. package/dist/src/hsToMeteora.d.ts +0 -31
  105. package/dist/src/hsToMeteora.d.ts.map +0 -1
  106. package/dist/src/hsToMeteora.js +0 -3175
  107. package/dist/src/idl/iyf-extension-idl.d.ts +0 -14583
  108. package/dist/src/idl/iyf-extension-idl.d.ts.map +0 -1
  109. package/dist/src/idl/iyf-extension-idl.js +0 -14578
  110. package/dist/src/idl/iyf-extension-wrapper.d.ts +0 -112
  111. package/dist/src/idl/iyf-extension-wrapper.d.ts.map +0 -1
  112. package/dist/src/idl/iyf-extension-wrapper.js +0 -2
  113. package/dist/src/idl/iyf-main-idl.d.ts +0 -11329
  114. package/dist/src/idl/iyf-main-idl.d.ts.map +0 -1
  115. package/dist/src/idl/iyf-main-idl.js +0 -11324
  116. package/dist/src/idl/iyf-main-wrapper.d.ts +0 -112
  117. package/dist/src/idl/iyf-main-wrapper.d.ts.map +0 -1
  118. package/dist/src/idl/iyf-main-wrapper.js +0 -2
  119. package/dist/src/idl/jupiter-idl.d.ts +0 -3063
  120. package/dist/src/idl/jupiter-idl.d.ts.map +0 -1
  121. package/dist/src/idl/jupiter-idl.js +0 -3061
  122. package/dist/src/idl/meteora-idl.d.ts +0 -7371
  123. package/dist/src/idl/meteora-idl.d.ts.map +0 -1
  124. package/dist/src/idl/meteora-idl.js +0 -7372
  125. package/dist/src/idl/orca-idl.d.ts +0 -3833
  126. package/dist/src/idl/orca-idl.d.ts.map +0 -1
  127. package/dist/src/idl/orca-idl.js +0 -3834
  128. package/dist/src/idl/raydium-idl.d.ts +0 -3054
  129. package/dist/src/idl/raydium-idl.d.ts.map +0 -1
  130. package/dist/src/idl/raydium-idl.js +0 -3055
  131. package/dist/src/index.d.ts +0 -9
  132. package/dist/src/index.d.ts.map +0 -1
  133. package/dist/src/index.js +0 -31
  134. package/dist/src/ixGenerator/IyfExtensionIxGenerator.d.ts +0 -126
  135. package/dist/src/ixGenerator/IyfExtensionIxGenerator.d.ts.map +0 -1
  136. package/dist/src/ixGenerator/IyfExtensionIxGenerator.js +0 -467
  137. package/dist/src/ixGenerator/IyfMainIxGenerator.d.ts +0 -330
  138. package/dist/src/ixGenerator/IyfMainIxGenerator.d.ts.map +0 -1
  139. package/dist/src/ixGenerator/IyfMainIxGenerator.js +0 -1239
  140. package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.d.ts +0 -685
  141. package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.d.ts.map +0 -1
  142. package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.js +0 -3005
  143. package/dist/src/ixGenerator/OrcaIxGenerator.d.ts +0 -119
  144. package/dist/src/ixGenerator/OrcaIxGenerator.d.ts.map +0 -1
  145. package/dist/src/ixGenerator/OrcaIxGenerator.js +0 -438
  146. package/dist/src/ixGenerator/RaydiumIxGenerator.d.ts +0 -99
  147. package/dist/src/ixGenerator/RaydiumIxGenerator.d.ts.map +0 -1
  148. package/dist/src/ixGenerator/RaydiumIxGenerator.js +0 -558
  149. package/dist/src/ixGenerator/UtilIxGenerator.d.ts +0 -20
  150. package/dist/src/ixGenerator/UtilIxGenerator.d.ts.map +0 -1
  151. package/dist/src/ixGenerator/UtilIxGenerator.js +0 -25
  152. package/dist/src/meteora/index.d.ts +0 -2
  153. package/dist/src/meteora/index.d.ts.map +0 -1
  154. package/dist/src/meteora/index.js +0 -17
  155. package/dist/src/meteora/liquidityStrategy.d.ts +0 -408
  156. package/dist/src/meteora/liquidityStrategy.d.ts.map +0 -1
  157. package/dist/src/meteora/liquidityStrategy.js +0 -1325
  158. package/dist/src/meteora.d.ts +0 -669
  159. package/dist/src/meteora.d.ts.map +0 -1
  160. package/dist/src/meteora.js +0 -1932
  161. package/dist/src/orca.d.ts +0 -57
  162. package/dist/src/orca.d.ts.map +0 -1
  163. package/dist/src/orca.js +0 -123
  164. package/dist/src/pdaGenerator/HawksightPdaGenerator.d.ts +0 -29
  165. package/dist/src/pdaGenerator/HawksightPdaGenerator.d.ts.map +0 -1
  166. package/dist/src/pdaGenerator/HawksightPdaGenerator.js +0 -75
  167. package/dist/src/pdaGenerator/MeteoraPdaGenerator.d.ts +0 -76
  168. package/dist/src/pdaGenerator/MeteoraPdaGenerator.d.ts.map +0 -1
  169. package/dist/src/pdaGenerator/MeteoraPdaGenerator.js +0 -166
  170. package/dist/src/pdaGenerator/OrcaPdaGenerator.d.ts +0 -23
  171. package/dist/src/pdaGenerator/OrcaPdaGenerator.d.ts.map +0 -1
  172. package/dist/src/pdaGenerator/OrcaPdaGenerator.js +0 -68
  173. package/dist/src/pdaGenerator/RaydiumPdaGenerator.d.ts +0 -49
  174. package/dist/src/pdaGenerator/RaydiumPdaGenerator.d.ts.map +0 -1
  175. package/dist/src/pdaGenerator/RaydiumPdaGenerator.js +0 -114
  176. package/dist/src/pdaGenerator/UtilPdaGenerator.d.ts +0 -8
  177. package/dist/src/pdaGenerator/UtilPdaGenerator.d.ts.map +0 -1
  178. package/dist/src/pdaGenerator/UtilPdaGenerator.js +0 -51
  179. package/dist/src/types.d.ts +0 -1100
  180. package/dist/src/types.d.ts.map +0 -1
  181. package/dist/src/types.js +0 -95
@@ -1,669 +0,0 @@
1
- import DLMM, { ClmmProgram, LbPosition, PositionV2, Position, LbPair } from '@meteora-ag/dlmm';
2
- import BN from "bn.js";
3
- import * as web3 from "@solana/web3.js";
4
- import { LabeledInstruction, MeteoraToHawksightFn, MeteoraToHawksightFnLabeled, StrategyType, TokenType } from './types';
5
- import { SimpleIxGenerator } from './classes/SimpleIxGenerator';
6
- export declare class MeteoraDLMM {
7
- readonly dlmm: DLMM;
8
- readonly ix: SimpleIxGenerator;
9
- private constructor();
10
- readonly pubkey: web3.PublicKey;
11
- private static _program;
12
- private static _instance;
13
- private static _poolAddress;
14
- private static _connection;
15
- static create(connection: web3.Connection, poolAddress: web3.PublicKey, ix: SimpleIxGenerator): Promise<MeteoraDLMM>;
16
- /**
17
- * Meteora DLMM Program
18
- *
19
- * @param connection
20
- */
21
- static program(connection: web3.Connection): Promise<ClmmProgram>;
22
- getXYAmountDistribution(distribution: "SPOT" | "CURVE" | "BID-ASK", activeBin: {
23
- binId: number;
24
- price: string;
25
- }, lowerRange: number, upperRange: number): {
26
- binId: number;
27
- xAmountBpsOfTotal: BN;
28
- yAmountBpsOfTotal: BN;
29
- }[];
30
- getActiveBin(): Promise<import("@meteora-ag/dlmm").BinLiquidity>;
31
- getPositionsByUserAndLbPair(userPubKey: web3.PublicKey): Promise<{
32
- activeBin: import("@meteora-ag/dlmm").BinLiquidity;
33
- userPositions: Array<LbPosition>;
34
- }>;
35
- /**
36
- * Initializes a position and adds liquidity to the specified strategy, with various steps including
37
- * handling wrapped SOL tokens, depositing tokens, adding liquidity, and handling dust withdrawals.
38
- *
39
- * @param {web3.PublicKey} userWallet - The public key of the user's wallet executing the transaction.
40
- * @param {web3.PublicKey} payer - The public key of the transaction payer.
41
- * @param {Object} params - The parameters for initializing the position and adding liquidity.
42
- * @param {web3.PublicKey} params.positionPubKey - The public key of the position to be initialized.
43
- * @param {BN} params.totalXAmount - The total amount of X tokens to be used for liquidity.
44
- * @param {BN} params.totalYAmount - The total amount of Y tokens to be used for liquidity.
45
- * @param {Object} params.strategy - The strategy details for adding liquidity.
46
- * @param {number} params.strategy.maxBinId - The maximum bin ID for the strategy.
47
- * @param {number} params.strategy.minBinId - The minimum bin ID for the strategy.
48
- * @param {StrategyType} params.strategy.strategyType - The type of strategy to be applied.
49
- * @param {web3.PublicKey} params.user - The public key of the user executing the transaction.
50
- * @param {number} [params.slippage] - Optional slippage tolerance for the transaction.
51
- *
52
- * @returns {Promise<web3.TransactionInstruction[]>} - A promise that resolves to an array of transaction instructions.
53
- *
54
- * @throws {Error} - Throws an error if input token(s) do not exist on the blockchain.
55
- */
56
- initializePositionAndAddLiquidityByStrategy(connection: web3.Connection, userWallet: web3.PublicKey, payer: web3.PublicKey, params: {
57
- positionPubKey: web3.PublicKey;
58
- totalXAmount: BN;
59
- totalYAmount: BN;
60
- strategy: {
61
- maxBinId: number;
62
- minBinId: number;
63
- strategyType: StrategyType;
64
- };
65
- user: web3.PublicKey;
66
- slippage?: number;
67
- skipInputTokenCheck?: boolean;
68
- opt?: {
69
- pdaTokenType?: TokenType;
70
- withAmount?: {
71
- userTokenXAmount: BN | null;
72
- userTokenYAmount: BN | null;
73
- };
74
- fuelAccount?: boolean;
75
- };
76
- }, meteoraToHawksight: MeteoraToHawksightFn): Promise<InitializePositionAndAddLiquidityByStrategyBuilder>;
77
- /**
78
- * Initializes a position and adds liquidity to the specified strategy, with various steps including
79
- * handling wrapped SOL tokens, depositing tokens, adding liquidity, and handling dust withdrawals.
80
- *
81
- * @param {web3.PublicKey} userWallet - The public key of the user's wallet executing the transaction.
82
- * @param {web3.PublicKey} payer - The public key of the transaction payer.
83
- * @param {Object} params - The parameters for initializing the position and adding liquidity.
84
- * @param {web3.PublicKey} params.positionPubKey - The public key of the position to be initialized.
85
- * @param {BN} params.totalXAmount - The total amount of X tokens to be used for liquidity.
86
- * @param {BN} params.totalYAmount - The total amount of Y tokens to be used for liquidity.
87
- * @param {Object} params.strategy - The strategy details for adding liquidity.
88
- * @param {number} params.strategy.maxBinId - The maximum bin ID for the strategy.
89
- * @param {number} params.strategy.minBinId - The minimum bin ID for the strategy.
90
- * @param {StrategyType} params.strategy.strategyType - The type of strategy to be applied.
91
- * @param {web3.PublicKey} params.user - The public key of the user executing the transaction.
92
- * @param {number} [params.slippage] - Optional slippage tolerance for the transaction.
93
- *
94
- * @returns {Promise<web3.TransactionInstruction[]>} - A promise that resolves to an array of transaction instructions.
95
- *
96
- * @throws {Error} - Throws an error if input token(s) do not exist on the blockchain.
97
- */
98
- initializePositionAndAddLiquidityByStrategyLabeled(connection: web3.Connection, userWallet: web3.PublicKey, payer: web3.PublicKey, params: {
99
- positionPubKey: web3.PublicKey;
100
- totalXAmount: BN;
101
- totalYAmount: BN;
102
- strategy: {
103
- maxBinId: number;
104
- minBinId: number;
105
- strategyType: StrategyType;
106
- };
107
- user: web3.PublicKey;
108
- slippage?: number;
109
- skipInputTokenCheck?: boolean;
110
- opt?: {
111
- pdaTokenType?: TokenType;
112
- withAmount?: {
113
- userTokenXAmount: BN | null;
114
- userTokenYAmount: BN | null;
115
- };
116
- fuelAccount?: boolean;
117
- };
118
- }, meteoraToHawksight: MeteoraToHawksightFnLabeled): Promise<InitializePositionAndAddLiquidityByStrategyBuilderLabeled>;
119
- /**
120
- * Initializes a position and adds liquidity to the specified strategy, with various steps including
121
- * handling wrapped SOL tokens, depositing tokens, adding liquidity, and handling dust withdrawals.
122
- *
123
- * @param {web3.PublicKey} userWallet - The public key of the user's wallet executing the transaction.
124
- * @param {web3.PublicKey} payer - The public key of the transaction payer.
125
- * @param {Object} params - The parameters for initializing the position and adding liquidity.
126
- * @param {web3.PublicKey} params.positionPubKey - The public key of the position to be initialized.
127
- * @param {BN} params.totalXAmount - The total amount of X tokens to be used for liquidity.
128
- * @param {BN} params.totalYAmount - The total amount of Y tokens to be used for liquidity.
129
- * @param {Object} params.strategy - The strategy details for adding liquidity.
130
- * @param {number} params.strategy.maxBinId - The maximum bin ID for the strategy.
131
- * @param {number} params.strategy.minBinId - The minimum bin ID for the strategy.
132
- * @param {StrategyType} params.strategy.strategyType - The type of strategy to be applied.
133
- * @param {web3.PublicKey} params.user - The public key of the user executing the transaction.
134
- * @param {number} [params.slippage] - Optional slippage tolerance for the transaction.
135
- *
136
- * @returns {Promise<web3.TransactionInstruction[]>} - A promise that resolves to an array of transaction instructions.
137
- *
138
- * @throws {Error} - Throws an error if input token(s) do not exist on the blockchain.
139
- */
140
- initializePositionAndAddLiquidityByStrategyPda(connection: web3.Connection, userWallet: web3.PublicKey, payer: web3.PublicKey, params: {
141
- positionPubKey: web3.PublicKey;
142
- totalXAmount: BN;
143
- totalYAmount: BN;
144
- strategy: {
145
- maxBinId: number;
146
- minBinId: number;
147
- strategyType: StrategyType;
148
- };
149
- user: web3.PublicKey;
150
- slippage?: number;
151
- skipInputTokenCheck?: boolean;
152
- pdaTokenType?: TokenType;
153
- }, meteoraToHawksight: MeteoraToHawksightFn): Promise<InitializePositionAndAddLiquidityByStrategyPdaBuilder>;
154
- /**
155
- * Adds liquidity to an existing position according to a specified strategy.
156
- *
157
- * This method involves multiple steps including checking for token existence, handling wrapped SOL (wSOL), depositing tokens,
158
- * adding liquidity, and handling dust withdrawals. It ensures that all necessary preparations and operations are performed
159
- * to add liquidity based on the provided strategy.
160
- *
161
- * @param {web3.PublicKey} userWallet - The public key of the user's wallet executing the transaction.
162
- * @param {web3.PublicKey} payer - The public key of the transaction payer.
163
- * @param {Object} params - The parameters for adding liquidity to the position.
164
- * @param {web3.PublicKey} params.positionPubKey - The public key of the position to add liquidity to.
165
- * @param {BN} params.totalXAmount - The total amount of X tokens to be used for liquidity.
166
- * @param {BN} params.totalYAmount - The total amount of Y tokens to be used for liquidity.
167
- * @param {Object} params.strategy - The strategy details for adding liquidity.
168
- * @param {number} params.strategy.maxBinId - The maximum bin ID for the strategy.
169
- * @param {number} params.strategy.minBinId - The minimum bin ID for the strategy.
170
- * @param {StrategyType} params.strategy.strategyType - The type of strategy to be applied.
171
- * @param {web3.PublicKey} params.user - The public key of the user executing the transaction.
172
- *
173
- * @returns {Promise<web3.TransactionInstruction[]>} - A promise that resolves to an array of transaction instructions.
174
- *
175
- * @throws {Error} - Throws an error if input token(s) do not exist on the blockchain.
176
- */
177
- addLiquidityByStrategy(connection: web3.Connection, userWallet: web3.PublicKey, payer: web3.PublicKey, params: {
178
- positionPubKey: web3.PublicKey;
179
- totalXAmount: BN;
180
- totalYAmount: BN;
181
- strategy: {
182
- maxBinId: number;
183
- minBinId: number;
184
- strategyType: StrategyType;
185
- };
186
- user: web3.PublicKey;
187
- slippage?: number;
188
- skipInputTokenCheck: boolean;
189
- pdaTokenType?: TokenType;
190
- }, meteoraToHawksight: MeteoraToHawksightFn): Promise<AddLiquidityByStrategyBuilder>;
191
- /**
192
- * Removes liquidity from an existing position.
193
- *
194
- * This method communicates with the DLMM (Dynamic Liquidity Market Maker) to remove liquidity
195
- * from a specified trading position. It filters the transaction instructions to include only those
196
- * relevant to the Meteora DLMM program.
197
- *
198
- * @param {web3.PublicKey} userWallet - The public key of the user's wallet executing the transaction.
199
- * @param {web3.PublicKey} payer - The public key of the transaction payer.
200
- * @param {Object} params - The parameters for removing liquidity from the position.
201
- * @param {web3.PublicKey} params.user - The public key of the user executing the transaction.
202
- * @param {web3.PublicKey} params.position - The public key of the position from which liquidity is being removed.
203
- * @param {number[]} params.binIds - An array of bin IDs indicating which bins to remove liquidity from.
204
- * @param {BN} params.bps - The basis points (in BN) indicating the proportion of liquidity to remove.
205
- * @param {boolean} [params.shouldClaimAndClose] - Optional flag to indicate whether the position should be claimed and closed after removing liquidity.
206
- *
207
- * @returns {Promise<web3.TransactionInstruction[]>} - A promise that resolves to an array of transaction instructions relevant to the Meteora DLMM program.
208
- */
209
- removeLiquidity(connection: web3.Connection, userWallet: web3.PublicKey, payer: web3.PublicKey, params: {
210
- user: web3.PublicKey;
211
- position: web3.PublicKey;
212
- fromBinId: number;
213
- toBinId: number;
214
- bps: BN;
215
- shouldClaimAndClose?: boolean;
216
- pdaTokenType?: TokenType;
217
- fuelAccount?: boolean;
218
- rewardClaimMode?: 'default' | 'automation';
219
- }, meteoraToHawksight: MeteoraToHawksightFn): Promise<RemoveLiquidityBuilder>;
220
- /**
221
- * Removes liquidity from an existing position to the user pda.
222
- *
223
- * This method communicates with the DLMM (Dynamic Liquidity Market Maker) to remove liquidity
224
- * from a specified trading position. It filters the transaction instructions to include only those
225
- * relevant to the Meteora DLMM program.
226
- *
227
- * @param {web3.PublicKey} userWallet - The public key of the user's wallet executing the transaction.
228
- * @param {web3.PublicKey} payer - The public key of the transaction payer.
229
- * @param {Object} params - The parameters for removing liquidity from the position.
230
- * @param {web3.PublicKey} params.user - The public key of the user executing the transaction.
231
- * @param {web3.PublicKey} params.position - The public key of the position from which liquidity is being removed.
232
- * @param {number[]} params.binIds - An array of bin IDs indicating which bins to remove liquidity from.
233
- * @param {BN} params.bps - The basis points (in BN) indicating the proportion of liquidity to remove.
234
- * @param {boolean} [params.shouldClaimAndClose] - Optional flag to indicate whether the position should be claimed and closed after removing liquidity.
235
- *
236
- * @returns {Promise<web3.TransactionInstruction[]>} - A promise that resolves to an array of transaction instructions relevant to the Meteora DLMM program.
237
- */
238
- removeLiquidityPda(connection: web3.Connection, userWallet: web3.PublicKey, payer: web3.PublicKey, params: {
239
- user: web3.PublicKey;
240
- position: web3.PublicKey;
241
- fromBinId: number;
242
- toBinId: number;
243
- bps: BN;
244
- shouldClaimAndClose?: boolean;
245
- pdaTokenType?: TokenType;
246
- }, meteoraToHawksight: MeteoraToHawksightFn): Promise<RemoveLiquidityPdaBuilder>;
247
- /**
248
- * Claims all rewards for a specified position.
249
- *
250
- * This method communicates with the DLMM (Dynamic Liquidity Market Maker) to claim all rewards
251
- * for a given position. It filters the transaction instructions to include only those relevant
252
- * to the Meteora DLMM program. The method returns a `ClaimAllRewardsByPositionBuilder` object
253
- * which provides a structured way to build the necessary transaction instructions for the reward
254
- * claiming process.
255
- *
256
- * @param {web3.PublicKey} userWallet - The public key of the user's wallet executing the transaction.
257
- * @param {web3.PublicKey} payer - The public key of the transaction payer.
258
- * @param {Object} params - The parameters for claiming rewards.
259
- * @param {web3.PublicKey} params.owner - The public key of the owner of the position.
260
- * @param {LbPosition} params.position - The position object representing the liquidity position.
261
- * @param {Function} meteoraToHawksight - A function to convert Meteora instructions to Hawksight instructions.
262
- *
263
- * @returns {Promise<ClaimAllRewardsByPositionBuilder>} - A promise that resolves to a `ClaimAllRewardsByPositionBuilder` object.
264
- */
265
- claimAllRewardsByPosition(connection: web3.Connection, userWallet: web3.PublicKey, payer: web3.PublicKey, params: {
266
- owner: web3.PublicKey;
267
- position: LbPosition;
268
- }, meteoraToHawksight: MeteoraToHawksightFn): Promise<ClaimAllRewardsByPositionBuilder>;
269
- /**
270
- * Closes a specified liquidity position.
271
- *
272
- * This method communicates with the DLMM (Dynamic Liquidity Market Maker) to close a given liquidity
273
- * position. It filters the transaction instructions to include only those relevant to the Meteora DLMM program.
274
- *
275
- * @param {Object} params - The parameters for closing the position.
276
- * @param {web3.PublicKey} params.owner - The public key of the owner of the position.
277
- * @param {LbPosition} params.position - The position object representing the liquidity position.
278
- *
279
- * @returns {Promise<web3.TransactionInstruction[]>} - A promise that resolves to an array of transaction instructions relevant to the Meteora DLMM program.
280
- */
281
- closePosition(userWallet: web3.PublicKey, params: {
282
- owner: web3.PublicKey;
283
- position: LbPosition;
284
- }, meteoraToHawksight: MeteoraToHawksightFn): Promise<web3.TransactionInstruction[]>;
285
- }
286
- /**
287
- * Meteora functions / transaction generators that we re-written for performance improvement purposes
288
- */
289
- export declare class MeteoraFunctions {
290
- private readonly ix;
291
- constructor(ix: SimpleIxGenerator);
292
- /**
293
- * Position cache (v1)
294
- */
295
- readonly positions_v1: Record<string, Position>;
296
- /**
297
- * Position cache (v2)
298
- */
299
- readonly positions_v2: Record<string, PositionV2>;
300
- /**
301
- * Pool cache
302
- */
303
- readonly pools: Record<string, LbPair>;
304
- /**
305
- * Claims all rewards for a specified position.
306
- *
307
- * This method communicates with the DLMM (Dynamic Liquidity Market Maker) to claim all rewards
308
- * for a given position. It filters the transaction instructions to include only those relevant
309
- * to the Meteora DLMM program. The method returns a `ClaimAllRewardsByPositionBuilder` object
310
- * which provides a structured way to build the necessary transaction instructions for the reward
311
- * claiming process.
312
- *
313
- * @param {web3.PublicKey} userWallet - The public key of the user's wallet executing the transaction.
314
- * @param {web3.PublicKey} payer - The public key of the transaction payer.
315
- * @param {Object} params - The parameters for claiming rewards.
316
- * @param {web3.PublicKey} params.owner - The public key of the owner of the position.
317
- * @param {LbPosition} params.position - The position object representing the liquidity position.
318
- * @param {Function} meteoraToHawksight - A function to convert Meteora instructions to Hawksight instructions.
319
- *
320
- * @returns {Promise<ClaimAllRewardsByPositionBuilder>} - A promise that resolves to a `ClaimAllRewardsByPositionBuilder` object.
321
- */
322
- claimAllRewardsByPosition(connection: web3.Connection, userWallet: web3.PublicKey, payer: web3.PublicKey, params: {
323
- owner: web3.PublicKey;
324
- lbPair: web3.PublicKey;
325
- position: web3.PublicKey;
326
- pdaTokenType: TokenType;
327
- }, meteoraToHawksight: MeteoraToHawksightFn): Promise<ClaimAllRewardsByPositionBuilder>;
328
- constants(program: ClmmProgram): {
329
- MAX_BIN_ARRAY_SIZE: BN;
330
- MAX_BIN_PER_POSITION: BN;
331
- BIN_ARRAY_BITMAP_SIZE: BN;
332
- EXTENSION_BINARRAY_BITMAP_SIZE: BN;
333
- };
334
- static findMeteoraTickArrayIndices(minBinId: number, maxBinId: number): BN[];
335
- static findMeteoraTickArrays(lbPair: web3.PublicKey, minBinId: number, maxBinId: number): web3.PublicKey[];
336
- deriveReserve(token: web3.PublicKey, lbPair: web3.PublicKey): web3.PublicKey;
337
- static deriveBinArray(lbPair: web3.PublicKey, index: BN): web3.PublicKey;
338
- static binIdToBinArrayIndex(MAX_BIN_ARRAY_SIZE: BN, binId: BN): BN;
339
- getPositionAndLbPair(connection: web3.Connection, lbPair: web3.PublicKey, position: web3.PublicKey): Promise<{
340
- lbPairAccount: any;
341
- positionAccount: any;
342
- constants: any;
343
- }>;
344
- /**
345
- * Returns all position of user
346
- *
347
- * @param connection
348
- * @param userPda
349
- */
350
- getAllUserPosition(connection: web3.Connection, userPda: web3.PublicKey): Promise<web3.PublicKey[]>;
351
- getPositions(dlmm: DLMM, positions: web3.PublicKey[]): Promise<[{
352
- lbPair: web3.PublicKey;
353
- owner: web3.PublicKey;
354
- liquidityShares: BN[];
355
- rewardInfos: {
356
- rewardPerTokenCompletes: BN[];
357
- rewardPendings: BN[];
358
- }[];
359
- feeInfos: {
360
- feeXPerTokenComplete: BN;
361
- feeYPerTokenComplete: BN;
362
- feeXPending: BN;
363
- feeYPending: BN;
364
- }[];
365
- lowerBinId: number;
366
- upperBinId: number;
367
- lastUpdatedAt: BN;
368
- totalClaimedFeeXAmount: BN;
369
- totalClaimedFeeYAmount: BN;
370
- totalClaimedRewards: BN[];
371
- operator: web3.PublicKey;
372
- lockReleasePoint: BN;
373
- padding0: number;
374
- feeOwner: web3.PublicKey;
375
- reserved: number[];
376
- }, LbPosition][]>;
377
- /**
378
- * Generate instruction that claims all fees and rewards by user
379
- *
380
- * @param connection
381
- * @param lbPair
382
- * @param positions
383
- * @param userPda
384
- * @returns
385
- */
386
- claimFeeAndRewardIxs2(connection: web3.Connection, positions: web3.PublicKey[], userWallet: web3.PublicKey, userPda: web3.PublicKey, meteoraToHawksight: MeteoraToHawksightFn, lbPair?: web3.PublicKey): Promise<ClaimAllRewardsByPositionBuilder>;
387
- claimFee2AndReward2Ixs(connection: web3.Connection, lbPair: web3.PublicKey, position: web3.PublicKey, userPda: web3.PublicKey, tokenProgramX: web3.PublicKey, tokenProgramY: web3.PublicKey): Promise<web3.TransactionInstruction[]>;
388
- claimFee2Ix(lbPair: web3.PublicKey, position: web3.PublicKey, userPda: web3.PublicKey, tokenProgramX: web3.PublicKey, tokenProgramY: web3.PublicKey, getPositionAndLbPairResult: {
389
- lbPairAccount: any;
390
- positionAccount: any;
391
- constants: any;
392
- }): web3.TransactionInstruction;
393
- claimReward2Ixs(lbPair: web3.PublicKey, position: web3.PublicKey, userPda: web3.PublicKey, getPositionAndLbPairResult: {
394
- lbPairAccount: any;
395
- positionAccount: any;
396
- constants: any;
397
- }): web3.TransactionInstruction[];
398
- }
399
- /**
400
- * A builder class for constructing transaction instructions to claim all rewards by position.
401
- *
402
- * This class provides a structured way to build the necessary transaction instructions for claiming
403
- * rewards, removing liquidity, and managing wrapped SOL (wSOL) accounts.
404
- */
405
- export declare class ClaimAllRewardsByPositionBuilder {
406
- readonly createAtaIxs: web3.TransactionInstruction[];
407
- readonly mainIxs: web3.TransactionInstruction[];
408
- readonly withdrawMultipleTokenIx: web3.TransactionInstruction;
409
- readonly unwrapWsolIxs: web3.TransactionInstruction[];
410
- /**
411
- * Constructs an instance of the ClaimAllRewardsByPositionBuilder class.
412
- *
413
- * @param {web3.TransactionInstruction[]} createAtaIxs - Instructions to create associated token accounts (ATAs) prior to withdrawal.
414
- * @param {web3.TransactionInstruction[]} mainIxs - Main instructions for claiming fees and/or rewards.
415
- * @param {web3.TransactionInstruction} withdrawMultipleTokenIx - Instruction to withdraw multiple tokens to the user wallet.
416
- * @param {web3.TransactionInstruction[]} unwrapWsolIxs - Instructions to close wSOL accounts, if any.
417
- */
418
- constructor(createAtaIxs: web3.TransactionInstruction[], mainIxs: web3.TransactionInstruction[], withdrawMultipleTokenIx: web3.TransactionInstruction, unwrapWsolIxs: web3.TransactionInstruction[]);
419
- /**
420
- * Builds the default sequence of transaction instructions for claiming all rewards by position.
421
- *
422
- * This method returns an array of transaction instructions that includes:
423
- * - Initializing ATAs prior to withdrawal
424
- * - Claiming fees and/or rewards
425
- * - Withdrawing tokens to the user wallet
426
- * - Closing wSOL accounts, if any
427
- *
428
- * @returns {web3.TransactionInstruction[]} - An array of transaction instructions in the required order.
429
- */
430
- default(): web3.TransactionInstruction[];
431
- /**
432
- * Replaces claim fee token ixs into storage token account
433
- */
434
- replaceClaimFeeTokenToSTA(): void;
435
- /**
436
- * Replaces reward token into storage token account for ALL reward claim instructions.
437
- * DLMM pools can have up to 2 reward farms, so we need to handle multiple reward claims.
438
- */
439
- replaceClaimRewardToSTA(): void;
440
- }
441
- /**
442
- * A builder class for constructing transaction instructions to add liquidity according to a specified strategy.
443
- *
444
- * This class provides a structured way to build the necessary transaction instructions for adding liquidity to a position
445
- * based on a strategy, handling operations such as wrapping SOL, depositing tokens, adding liquidity, refunding dust, and
446
- * managing wrapped SOL (wSOL) accounts.
447
- */
448
- export declare class AddLiquidityByStrategyBuilder {
449
- readonly wrapSolIxs: web3.TransactionInstruction[];
450
- readonly depositToPdaIxs: web3.TransactionInstruction;
451
- readonly mainIxs: web3.TransactionInstruction[];
452
- readonly refundDustIxs: web3.TransactionInstruction;
453
- readonly unwrapWsolIxs: web3.TransactionInstruction[];
454
- /**
455
- * Constructs an instance of the AddLiquidityByStrategyBuilder class.
456
- *
457
- * @param {web3.TransactionInstruction[]} wrapSolIxs - Instructions to wrap SOL to wSOL if needed.
458
- * @param {web3.TransactionInstruction} depositToPdaIxs - Instruction to deposit X and Y tokens to the UserPDA.
459
- * @param {web3.TransactionInstruction[]} mainIxs - Main instructions for adding liquidity by strategy.
460
- * @param {web3.TransactionInstruction} refundDustIxs - Instruction to refund dust tokens to the user wallet.
461
- * @param {web3.TransactionInstruction[]} unwrapWsolIxs - Instructions to unwrap wSOL to SOL if any.
462
- */
463
- constructor(wrapSolIxs: web3.TransactionInstruction[], depositToPdaIxs: web3.TransactionInstruction, mainIxs: web3.TransactionInstruction[], refundDustIxs: web3.TransactionInstruction, unwrapWsolIxs: web3.TransactionInstruction[]);
464
- /**
465
- * Builds the default sequence of transaction instructions for adding liquidity by strategy.
466
- *
467
- * This method returns an array of transaction instructions that includes:
468
- * - Initializing wSOL token accounts if needed
469
- * - Depositing X and Y tokens to the UserPDA
470
- * - Adding liquidity according to the strategy
471
- * - Refunding dust tokens to the user wallet
472
- * - Closing wSOL accounts if any
473
- *
474
- * @returns {web3.TransactionInstruction[]} - An array of transaction instructions in the required order.
475
- */
476
- default(): web3.TransactionInstruction[];
477
- }
478
- /**
479
- * A builder class for constructing transaction instructions to remove liquidity from a position.
480
- *
481
- * This class provides a structured way to build the necessary transaction instructions for removing liquidity
482
- * from a position, handling operations such as creating associated token accounts (ATAs), claiming rewards,
483
- * withdrawing tokens, and managing wrapped SOL (wSOL) accounts.
484
- */
485
- export declare class RemoveLiquidityBuilder {
486
- readonly createAtaIxs: web3.TransactionInstruction[];
487
- readonly mainIxs: web3.TransactionInstruction[];
488
- readonly withdrawMultipleTokenIx: web3.TransactionInstruction;
489
- readonly unwrapWsolIxs: web3.TransactionInstruction[];
490
- /**
491
- * Constructs an instance of the RemoveLiquidityBuilder class.
492
- *
493
- * @param {web3.TransactionInstruction[]} createAtaIxs - Instructions to create associated token accounts (ATAs) prior to withdrawal.
494
- * @param {web3.TransactionInstruction[]} mainIxs - Main instructions for claiming fees/rewards, removing liquidity, and possibly closing the position.
495
- * @param {web3.TransactionInstruction} withdrawMultipleTokenIx - Instruction to withdraw multiple tokens to the user wallet.
496
- * @param {web3.TransactionInstruction[]} unwrapWsolIxs - Instructions to close wSOL accounts, if any.
497
- */
498
- constructor(createAtaIxs: web3.TransactionInstruction[], mainIxs: web3.TransactionInstruction[], withdrawMultipleTokenIx: web3.TransactionInstruction, unwrapWsolIxs: web3.TransactionInstruction[]);
499
- /**
500
- * Builds the default sequence of transaction instructions for removing liquidity from a position.
501
- *
502
- * This method returns an array of transaction instructions that includes:
503
- * - Initializing associated token accounts (ATAs) prior to withdrawal
504
- * - Claiming fees and/or rewards, removing liquidity, and possibly closing the position
505
- * - Withdrawing tokens to the user wallet
506
- * - Closing wSOL accounts, if any
507
- *
508
- * @returns {web3.TransactionInstruction[]} - An array of transaction instructions in the required order.
509
- */
510
- default(): web3.TransactionInstruction[];
511
- /**
512
- * Replaces claim fee token ixs into storage token account
513
- */
514
- replaceClaimFeeTokenToSTA(): void;
515
- /**
516
- * Replaces reward token into storage token account for ALL reward claim instructions.
517
- * DLMM pools can have up to 2 reward farms, so we need to handle multiple reward claims.
518
- */
519
- replaceClaimRewardToSTA(): void;
520
- /**
521
- * Replaces claim fee token ixs into associated token account
522
- */
523
- replaceClaimFeeTokenToATA(): void;
524
- /**
525
- * Replaces reward token into associated token account for ALL reward claim instructions.
526
- * DLMM pools can have up to 2 reward farms, so we need to handle multiple reward claims.
527
- */
528
- replaceClaimRewardToATA(): void;
529
- }
530
- /**
531
- * A builder class for constructing transaction instructions to remove liquidity from a position to the pda.
532
- *
533
- * This class provides a structured way to build the necessary transaction instructions for removing liquidity
534
- * from a position, handling operations such as creating associated token accounts (ATAs), claiming rewards,
535
- * withdrawing tokens, and managing wrapped SOL (wSOL) accounts.
536
- */
537
- export declare class RemoveLiquidityPdaBuilder {
538
- readonly mainIxs: web3.TransactionInstruction[];
539
- /**
540
- * Constructs an instance of the RemoveLiquidityBuilder class.
541
- *
542
- * @param {web3.TransactionInstruction[]} createAtaIxs - Instructions to create associated token accounts (ATAs) prior to withdrawal.
543
- * @param {web3.TransactionInstruction[]} mainIxs - Main instructions for claiming fees/rewards, removing liquidity, and possibly closing the position.
544
- * @param {web3.TransactionInstruction[]} unwrapWsolIxs - Instructions to close wSOL accounts, if any.
545
- */
546
- constructor(mainIxs: web3.TransactionInstruction[]);
547
- /**
548
- * Builds the default sequence of transaction instructions for removing liquidity from a position.
549
- *
550
- * This method returns an array of transaction instructions that includes:
551
- * - Initializing associated token accounts (ATAs) prior to withdrawal
552
- * - Claiming fees and/or rewards, removing liquidity, and possibly closing the position
553
- * - Withdrawing tokens to the user wallet
554
- * - Closing wSOL accounts, if any
555
- *
556
- * @returns {web3.TransactionInstruction[]} - An array of transaction instructions in the required order.
557
- */
558
- default(): web3.TransactionInstruction[];
559
- /**
560
- * Replaces claim fee token ixs into storage token account
561
- */
562
- replaceClaimFeeTokenToSTA(): void;
563
- /**
564
- * Replaces reward token into storage token account for ALL reward claim instructions.
565
- * DLMM pools can have up to 2 reward farms, so we need to handle multiple reward claims.
566
- */
567
- replaceClaimRewardToSTA(): void;
568
- }
569
- /**
570
- * A builder class for constructing transaction instructions to remove liquidity from a position.
571
- *
572
- * This class provides a structured way to build the necessary transaction instructions for removing liquidity
573
- * from a position, handling operations such as creating associated token accounts (ATAs), claiming rewards,
574
- * withdrawing tokens, and managing wrapped SOL (wSOL) accounts.
575
- */
576
- export declare class InitializePositionAndAddLiquidityByStrategyBuilder {
577
- readonly wrapSolIxs: web3.TransactionInstruction[];
578
- readonly depositToPdaIxs: web3.TransactionInstruction;
579
- readonly mainIxs: web3.TransactionInstruction[];
580
- readonly refundDustIxs: web3.TransactionInstruction;
581
- readonly unwrapWsolIxs: web3.TransactionInstruction[];
582
- /**
583
- * Constructs an instance of the InitializePositionAndAddLiquidityByStrategyBuilder class.
584
- *
585
- * @param {web3.TransactionInstruction[]} wrapSolIxs - Instructions to wrap SOL to wSOL if needed.
586
- * @param {web3.TransactionInstruction} depositToPdaIxs - Instruction to deposit X and Y tokens to the UserPDA.
587
- * @param {web3.TransactionInstruction[]} mainIxs - Main instructions for adding liquidity by strategy.
588
- * @param {web3.TransactionInstruction} refundDustIxs - Instruction to refund dust tokens to the user wallet.
589
- * @param {web3.TransactionInstruction[]} unwrapWsolIxs - Instructions to unwrap wSOL to SOL if any.
590
- */
591
- constructor(wrapSolIxs: web3.TransactionInstruction[], depositToPdaIxs: web3.TransactionInstruction, mainIxs: web3.TransactionInstruction[], refundDustIxs: web3.TransactionInstruction, unwrapWsolIxs: web3.TransactionInstruction[]);
592
- /**
593
- * Builds the default sequence of transaction instructions for removing liquidity from a position.
594
- *
595
- * This method returns an array of transaction instructions that includes:
596
- * - Initializing associated token accounts (ATAs) prior to withdrawal
597
- * - Claiming fees and/or rewards, removing liquidity, and possibly closing the position
598
- * - Withdrawing tokens to the user wallet
599
- * - Closing wSOL accounts, if any
600
- *
601
- * @returns {web3.TransactionInstruction[]} - An array of transaction instructions in the required order.
602
- */
603
- default(): web3.TransactionInstruction[];
604
- }
605
- /**
606
- * A builder class for constructing transaction instructions to remove liquidity from a position.
607
- *
608
- * This class provides a structured way to build the necessary transaction instructions for removing liquidity
609
- * from a position, handling operations such as creating associated token accounts (ATAs), claiming rewards,
610
- * withdrawing tokens, and managing wrapped SOL (wSOL) accounts.
611
- */
612
- export declare class InitializePositionAndAddLiquidityByStrategyBuilderLabeled {
613
- readonly wrapSolIxs: LabeledInstruction[];
614
- readonly depositToPdaIxs: LabeledInstruction;
615
- readonly mainIxs: LabeledInstruction[];
616
- readonly refundDustIxs: LabeledInstruction;
617
- readonly unwrapWsolIxs: LabeledInstruction[];
618
- /**
619
- * Constructs an instance of the InitializePositionAndAddLiquidityByStrategyBuilderLabeled class.
620
- *
621
- * @param {LabeledInstruction[]} wrapSolIxs - Instructions to wrap SOL to wSOL if needed.
622
- * @param {LabeledInstruction} depositToPdaIxs - Instruction to deposit X and Y tokens to the UserPDA.
623
- * @param {LabeledInstruction[]} mainIxs - Main instructions for adding liquidity by strategy.
624
- * @param {LabeledInstruction} refundDustIxs - Instruction to refund dust tokens to the user wallet.
625
- * @param {LabeledInstruction[]} unwrapWsolIxs - Instructions to unwrap wSOL to SOL if any.
626
- */
627
- constructor(wrapSolIxs: LabeledInstruction[], depositToPdaIxs: LabeledInstruction, mainIxs: LabeledInstruction[], refundDustIxs: LabeledInstruction, unwrapWsolIxs: LabeledInstruction[]);
628
- /**
629
- * Builds the default sequence of transaction instructions for removing liquidity from a position.
630
- *
631
- * This method returns an array of transaction instructions that includes:
632
- * - Initializing associated token accounts (ATAs) prior to withdrawal
633
- * - Claiming fees and/or rewards, removing liquidity, and possibly closing the position
634
- * - Withdrawing tokens to the user wallet
635
- * - Closing wSOL accounts, if any
636
- *
637
- * @returns {LabeledInstruction[]} - An array of transaction instructions in the required order.
638
- */
639
- default(): LabeledInstruction[];
640
- }
641
- /**
642
- * A builder class for constructing transaction instructions to remove liquidity from a position.
643
- *
644
- * This class provides a structured way to build the necessary transaction instructions for removing liquidity
645
- * from a position, handling operations such as creating associated token accounts (ATAs), claiming rewards,
646
- * withdrawing tokens, and managing wrapped SOL (wSOL) accounts.
647
- */
648
- export declare class InitializePositionAndAddLiquidityByStrategyPdaBuilder {
649
- readonly mainIxs: web3.TransactionInstruction[];
650
- /**
651
- * Constructs an instance of the InitializePositionAndAddLiquidityByStrategyBuilder class.
652
- *
653
- * @param {web3.TransactionInstruction[]} mainIxs - Main instructions for adding liquidity by strategy.
654
- */
655
- constructor(mainIxs: web3.TransactionInstruction[]);
656
- /**
657
- * Builds the default sequence of transaction instructions for removing liquidity from a position.
658
- *
659
- * This method returns an array of transaction instructions that includes:
660
- * - Initializing associated token accounts (ATAs) prior to withdrawal
661
- * - Claiming fees and/or rewards, removing liquidity, and possibly closing the position
662
- * - Withdrawing tokens to the user wallet
663
- * - Closing wSOL accounts, if any
664
- *
665
- * @returns {web3.TransactionInstruction[]} - An array of transaction instructions in the required order.
666
- */
667
- default(): web3.TransactionInstruction[];
668
- }
669
- //# sourceMappingURL=meteora.d.ts.map