@hawksightco/hawk-sdk 1.3.200 → 1.3.202
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/src/classes/Transactions.d.ts +218 -18
- package/dist/src/classes/Transactions.d.ts.map +1 -1
- package/dist/src/classes/Transactions.js +1695 -263
- package/dist/src/classes/TxGenerator.d.ts +39 -7
- package/dist/src/classes/TxGenerator.d.ts.map +1 -1
- package/dist/src/classes/TxGenerator.js +189 -6
- package/dist/src/classes/TxGeneratorAutomations.d.ts +79 -1
- package/dist/src/classes/TxGeneratorAutomations.d.ts.map +1 -1
- package/dist/src/classes/TxGeneratorAutomations.js +288 -0
- package/dist/src/functions.js +1 -1
- package/dist/src/hsToMeteora.js +6 -6
- package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.d.ts +21 -2
- package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.d.ts.map +1 -1
- package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.js +147 -10
- package/dist/src/meteora/liquidityStrategy.d.ts +31 -0
- package/dist/src/meteora/liquidityStrategy.d.ts.map +1 -1
- package/dist/src/meteora/liquidityStrategy.js +76 -0
- package/dist/src/types.d.ts +100 -40
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +20 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as web3 from "@solana/web3.js";
|
|
2
2
|
import * as _client from "@hawksightco/swagger-client";
|
|
3
|
-
import { InitializeStorageTokenAccount, ClaimTokensFromSTA, MeteoraTxWithdraw, ResponseWithStatus, TransactionMetadata, OrcaWithdraw, OrcaDeposit, OrcaClosePosition, OrcaOpenPosition, OrcaClaimRewards, MeteoraClaimAll, MeteoraCreatePositionAndDepositPda, RaydiumOpenPosition, RaydiumClosePosition, RaydiumIncreaseLiquidity, RaydiumDecreaseLiquidity, OrcaSweepDust, CreateLimitTokenParams, CloseLimitTokenParams, TokenType, RaydiumWithdrawAndClosePosition, MeteoraCreatePoolAndPosition, MeteoraInitializeBinArrays, ClaimTokenFromPda,
|
|
3
|
+
import { InitializeStorageTokenAccount, ClaimTokensFromSTA, MeteoraTxWithdraw, ResponseWithStatus, TransactionMetadata, OrcaWithdraw, OrcaDeposit, OrcaClosePosition, OrcaOpenPosition, OrcaClaimRewards, MeteoraClaimAll, MeteoraCreatePositionAndDeposit, MeteoraCreatePositionAndDepositPda, RaydiumOpenPosition, RaydiumClosePosition, RaydiumIncreaseLiquidity, RaydiumDecreaseLiquidity, OrcaSweepDust, CreateLimitTokenParams, CloseLimitTokenParams, TokenType, RaydiumWithdrawAndClosePosition, MeteoraCreatePoolAndPosition, MeteoraInitializeBinArrays, ClaimTokenFromPda, MeteoraDeposit, MeteoraInitializeLargePosition, MeteoraDepositLargerPosition, MeteoraTxWithdrawLargerPosition } from "../types";
|
|
4
4
|
import { Client } from "./Client";
|
|
5
5
|
import { GeneralUtility } from "./GeneralUtility";
|
|
6
6
|
import BN from "bn.js";
|
|
@@ -109,6 +109,8 @@ export declare class TxGenerator {
|
|
|
109
109
|
/**
|
|
110
110
|
* Creates meteora instruction that creates new position and deposit.
|
|
111
111
|
*
|
|
112
|
+
* @deprecated Use meteoraCreatePositionAndDepositToLargePosition instead
|
|
113
|
+
*
|
|
112
114
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
113
115
|
* @param payer The public key of the payer for transaction fees.
|
|
114
116
|
* @param params Parameters required
|
|
@@ -119,6 +121,8 @@ export declare class TxGenerator {
|
|
|
119
121
|
* Creates meteora instruction that creates new position and deposit.
|
|
120
122
|
* - Supports larger positions
|
|
121
123
|
*
|
|
124
|
+
* @deprecated Use meteoraCreatePositionAndDepositToLargePosition instead
|
|
125
|
+
*
|
|
122
126
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
123
127
|
* @param payer The public key of the payer for transaction fees.
|
|
124
128
|
* @param params Parameters required
|
|
@@ -137,6 +141,8 @@ export declare class TxGenerator {
|
|
|
137
141
|
/**
|
|
138
142
|
* Creates meteora instruction that deposits to position.
|
|
139
143
|
*
|
|
144
|
+
* @deprecated Use meteoraDepositToLargePosition instead
|
|
145
|
+
*
|
|
140
146
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
141
147
|
* @param payer The public key of the payer for transaction fees.
|
|
142
148
|
* @param params Parameters required
|
|
@@ -147,6 +153,8 @@ export declare class TxGenerator {
|
|
|
147
153
|
* Creates meteora instruction that deposits to position.
|
|
148
154
|
* - Supports larger positions
|
|
149
155
|
*
|
|
156
|
+
* @deprecated Use meteoraDepositToLargePosition instead
|
|
157
|
+
*
|
|
150
158
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
151
159
|
* @param payer The public key of the payer for transaction fees.
|
|
152
160
|
* @param params Parameters required
|
|
@@ -156,6 +164,8 @@ export declare class TxGenerator {
|
|
|
156
164
|
/**
|
|
157
165
|
* Creates meteora instruction withdraws from a position.
|
|
158
166
|
*
|
|
167
|
+
* @deprecated Use meteoraWithdrawLargerPosition instead
|
|
168
|
+
*
|
|
159
169
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
160
170
|
* @param payer The public key of the payer for transaction fees.
|
|
161
171
|
* @param params Parameters required
|
|
@@ -182,6 +192,11 @@ export declare class TxGenerator {
|
|
|
182
192
|
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
183
193
|
*/
|
|
184
194
|
meteoraWithdrawLargerPosition(connection: web3.Connection, payer: string, params: MeteoraTxWithdrawLargerPosition): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
195
|
+
/**
|
|
196
|
+
* Withdraw liquidity from a large Meteora DLMM position (up to 1400 bins).
|
|
197
|
+
* For ≤149 bins: single tx. For ≥150 bins: multi-tx with chunked withdrawals.
|
|
198
|
+
*/
|
|
199
|
+
meteoraWithdrawLargePosition(connection: web3.Connection, payer: string, params: MeteoraTxWithdrawLargerPosition): Promise<ResponseWithStatus<TransactionMetadata[]>>;
|
|
185
200
|
/**
|
|
186
201
|
* Creates meteora instruction that claims fees and rewards.
|
|
187
202
|
*
|
|
@@ -191,6 +206,18 @@ export declare class TxGenerator {
|
|
|
191
206
|
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
192
207
|
*/
|
|
193
208
|
meteoraClaim(connection: web3.Connection, payer: string, params: _client.TxClaimBody): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
209
|
+
/**
|
|
210
|
+
* Claim fees and rewards from a large Meteora DLMM position (up to 1400 bins).
|
|
211
|
+
*
|
|
212
|
+
* For ≤149 bins, delegates to single-TX meteoraClaim.
|
|
213
|
+
* For ≥150 bins, chunks the bin range into ≤149-bin pieces, returning multiple TXs.
|
|
214
|
+
*
|
|
215
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
216
|
+
* @param payer The public key of the payer for transaction fees.
|
|
217
|
+
* @param params Parameters required
|
|
218
|
+
* @returns A ResponseWithStatus containing an array of TransactionMetadata.
|
|
219
|
+
*/
|
|
220
|
+
meteoraClaimLargePosition(connection: web3.Connection, payer: string, params: _client.TxClaimBody): Promise<ResponseWithStatus<TransactionMetadata[]>>;
|
|
194
221
|
/**
|
|
195
222
|
* Creates meteora instruction that claims fees and rewards.
|
|
196
223
|
*
|
|
@@ -229,15 +256,15 @@ export declare class TxGenerator {
|
|
|
229
256
|
meteoraInitializeBinArrays2(connection: web3.Connection, payer: string, params: MeteoraInitializeBinArrays): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
230
257
|
meteoraCreatePoolAndPosition(connection: web3.Connection, payer: string, params: MeteoraCreatePoolAndPosition): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
231
258
|
/**
|
|
232
|
-
* Creates meteora instruction that initializes a large position
|
|
233
|
-
*
|
|
259
|
+
* Creates meteora instruction that initializes a large position.
|
|
260
|
+
* Supports up to 1400 bins, splitting across multiple transactions if needed.
|
|
234
261
|
*
|
|
235
262
|
* @param connection - Solana connection
|
|
236
263
|
* @param payer - Public key of the payer for transaction fees.
|
|
237
264
|
* @param params - Parameters required
|
|
238
|
-
* @returns A ResponseWithStatus containing
|
|
265
|
+
* @returns A ResponseWithStatus containing an array of TransactionMetadata.
|
|
239
266
|
*/
|
|
240
|
-
meteoraInitializeLargePosition(connection: web3.Connection, payer: string, params: MeteoraInitializeLargePosition): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
267
|
+
meteoraInitializeLargePosition(connection: web3.Connection, payer: string, params: MeteoraInitializeLargePosition): Promise<ResponseWithStatus<TransactionMetadata[]>>;
|
|
241
268
|
/**
|
|
242
269
|
* Deposit liquidity to a large Meteora DLMM position.
|
|
243
270
|
* Generates a single rebalanceLiquidity instruction for the entire position range.
|
|
@@ -247,10 +274,15 @@ export declare class TxGenerator {
|
|
|
247
274
|
*
|
|
248
275
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
249
276
|
* @param payer The public key of the payer for transaction fees.
|
|
250
|
-
* @param params
|
|
277
|
+
* @param params MeteoraDeposit parameters
|
|
251
278
|
* @returns A ResponseWithStatus containing an array of TransactionMetadata.
|
|
252
279
|
*/
|
|
253
|
-
meteoraDepositToLargePosition(connection: web3.Connection, payer: string, params:
|
|
280
|
+
meteoraDepositToLargePosition(connection: web3.Connection, payer: string, params: MeteoraDeposit): Promise<ResponseWithStatus<TransactionMetadata[]>>;
|
|
281
|
+
/**
|
|
282
|
+
* Create a position and deposit liquidity for any bin count.
|
|
283
|
+
* For ≤149 bins: single tx. For ≥150 bins: multi-tx with init + deposit.
|
|
284
|
+
*/
|
|
285
|
+
meteoraCreatePositionAndDepositToLargePosition(connection: web3.Connection, payer: string, params: MeteoraCreatePositionAndDeposit): Promise<ResponseWithStatus<TransactionMetadata[]>>;
|
|
254
286
|
/**
|
|
255
287
|
* Deposit liquidity to a Meteora DLMM position (up to 70 bins) with optional position initialization.
|
|
256
288
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TxGenerator.d.ts","sourceRoot":"","sources":["../../../src/classes/TxGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC;AACvD,OAAO,EACL,6BAA6B,EAC7B,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EAInB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,kCAAkC,EAClC,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,aAAa,EACb,sBAAsB,EACtB,qBAAqB,EACrB,SAAS,EACT,+BAA+B,EAE/B,4BAA4B,EAC5B,0BAA0B,EAC1B,iBAAiB,EACjB,8BAA8B,EAC9B,
|
|
1
|
+
{"version":3,"file":"TxGenerator.d.ts","sourceRoot":"","sources":["../../../src/classes/TxGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC;AACvD,OAAO,EACL,6BAA6B,EAC7B,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EAInB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,+BAA+B,EAC/B,kCAAkC,EAClC,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,aAAa,EACb,sBAAsB,EACtB,qBAAqB,EACrB,SAAS,EACT,+BAA+B,EAE/B,4BAA4B,EAC5B,0BAA0B,EAC1B,iBAAiB,EACjB,cAAc,EACd,8BAA8B,EAC9B,4BAA4B,EAE5B,+BAA+B,EAChC,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAQlC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,MAAM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K,EAAE,MAAM,EACb,MAAM,EAAE,+BAA+B,GACtC,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAwC7C,wBAAwB,CAC5B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAwC7C,wBAAwB,CAC5B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;CAwCpD"}
|
|
@@ -372,6 +372,8 @@ class TxGenerator {
|
|
|
372
372
|
/**
|
|
373
373
|
* Creates meteora instruction that creates new position and deposit.
|
|
374
374
|
*
|
|
375
|
+
* @deprecated Use meteoraCreatePositionAndDepositToLargePosition instead
|
|
376
|
+
*
|
|
375
377
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
376
378
|
* @param payer The public key of the payer for transaction fees.
|
|
377
379
|
* @param params Parameters required
|
|
@@ -431,6 +433,8 @@ class TxGenerator {
|
|
|
431
433
|
* Creates meteora instruction that creates new position and deposit.
|
|
432
434
|
* - Supports larger positions
|
|
433
435
|
*
|
|
436
|
+
* @deprecated Use meteoraCreatePositionAndDepositToLargePosition instead
|
|
437
|
+
*
|
|
434
438
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
435
439
|
* @param payer The public key of the payer for transaction fees.
|
|
436
440
|
* @param params Parameters required
|
|
@@ -545,6 +549,8 @@ class TxGenerator {
|
|
|
545
549
|
/**
|
|
546
550
|
* Creates meteora instruction that deposits to position.
|
|
547
551
|
*
|
|
552
|
+
* @deprecated Use meteoraDepositToLargePosition instead
|
|
553
|
+
*
|
|
548
554
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
549
555
|
* @param payer The public key of the payer for transaction fees.
|
|
550
556
|
* @param params Parameters required
|
|
@@ -603,6 +609,8 @@ class TxGenerator {
|
|
|
603
609
|
* Creates meteora instruction that deposits to position.
|
|
604
610
|
* - Supports larger positions
|
|
605
611
|
*
|
|
612
|
+
* @deprecated Use meteoraDepositToLargePosition instead
|
|
613
|
+
*
|
|
606
614
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
607
615
|
* @param payer The public key of the payer for transaction fees.
|
|
608
616
|
* @param params Parameters required
|
|
@@ -660,6 +668,8 @@ class TxGenerator {
|
|
|
660
668
|
/**
|
|
661
669
|
* Creates meteora instruction withdraws from a position.
|
|
662
670
|
*
|
|
671
|
+
* @deprecated Use meteoraWithdrawLargerPosition instead
|
|
672
|
+
*
|
|
663
673
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
664
674
|
* @param payer The public key of the payer for transaction fees.
|
|
665
675
|
* @param params Parameters required
|
|
@@ -837,6 +847,66 @@ class TxGenerator {
|
|
|
837
847
|
}
|
|
838
848
|
});
|
|
839
849
|
}
|
|
850
|
+
/**
|
|
851
|
+
* Withdraw liquidity from a large Meteora DLMM position (up to 1400 bins).
|
|
852
|
+
* For ≤149 bins: single tx. For ≥150 bins: multi-tx with chunked withdrawals.
|
|
853
|
+
*/
|
|
854
|
+
meteoraWithdrawLargePosition(connection, payer, params) {
|
|
855
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
856
|
+
var _a;
|
|
857
|
+
// Initialize anchor
|
|
858
|
+
anchor_1.Anchor.initialize(connection);
|
|
859
|
+
try {
|
|
860
|
+
const results = yield Transactions_1.txgen.meteoraWithdrawLargePosition({
|
|
861
|
+
connection,
|
|
862
|
+
params: {
|
|
863
|
+
position: new web3.PublicKey(params.position),
|
|
864
|
+
userWallet: new web3.PublicKey(params.userWallet),
|
|
865
|
+
amountBps: new bn_js_1.default(params.amountBps),
|
|
866
|
+
shouldClaimAndClose: params.shouldClaimAndClose,
|
|
867
|
+
fastGeneration: params.fastGeneration
|
|
868
|
+
? {
|
|
869
|
+
pool: new web3.PublicKey(params.fastGeneration.pool),
|
|
870
|
+
lowerBinId: params.fastGeneration.lowerBinId,
|
|
871
|
+
upperBinId: params.fastGeneration.upperBinId,
|
|
872
|
+
}
|
|
873
|
+
: undefined,
|
|
874
|
+
useAta: params.useAta,
|
|
875
|
+
pdaTokenType: (_a = params.pdaTokenType) !== null && _a !== void 0 ? _a : types_1.TokenType.ATA,
|
|
876
|
+
},
|
|
877
|
+
});
|
|
878
|
+
const txMetadatas = [];
|
|
879
|
+
for (const result of results) {
|
|
880
|
+
const txMeta = yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result);
|
|
881
|
+
txMetadatas.push(txMeta);
|
|
882
|
+
}
|
|
883
|
+
return {
|
|
884
|
+
status: 200,
|
|
885
|
+
data: txMetadatas,
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
catch (e) {
|
|
889
|
+
if (e instanceof Error) {
|
|
890
|
+
return {
|
|
891
|
+
status: 400,
|
|
892
|
+
data: {
|
|
893
|
+
code: "custom",
|
|
894
|
+
message: e.message,
|
|
895
|
+
path: [],
|
|
896
|
+
},
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
return {
|
|
900
|
+
status: 400,
|
|
901
|
+
data: {
|
|
902
|
+
code: "custom",
|
|
903
|
+
message: e,
|
|
904
|
+
path: [],
|
|
905
|
+
},
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
});
|
|
909
|
+
}
|
|
840
910
|
/**
|
|
841
911
|
* Creates meteora instruction that claims fees and rewards.
|
|
842
912
|
*
|
|
@@ -894,6 +964,69 @@ class TxGenerator {
|
|
|
894
964
|
}
|
|
895
965
|
});
|
|
896
966
|
}
|
|
967
|
+
/**
|
|
968
|
+
* Claim fees and rewards from a large Meteora DLMM position (up to 1400 bins).
|
|
969
|
+
*
|
|
970
|
+
* For ≤149 bins, delegates to single-TX meteoraClaim.
|
|
971
|
+
* For ≥150 bins, chunks the bin range into ≤149-bin pieces, returning multiple TXs.
|
|
972
|
+
*
|
|
973
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
974
|
+
* @param payer The public key of the payer for transaction fees.
|
|
975
|
+
* @param params Parameters required
|
|
976
|
+
* @returns A ResponseWithStatus containing an array of TransactionMetadata.
|
|
977
|
+
*/
|
|
978
|
+
meteoraClaimLargePosition(connection, payer, params) {
|
|
979
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
980
|
+
var _a;
|
|
981
|
+
// Initialize anchor
|
|
982
|
+
anchor_1.Anchor.initialize(connection);
|
|
983
|
+
try {
|
|
984
|
+
const results = yield Transactions_1.txgen.meteoraClaimLargePosition({
|
|
985
|
+
connection,
|
|
986
|
+
params: {
|
|
987
|
+
position: new web3.PublicKey(params.position),
|
|
988
|
+
userWallet: new web3.PublicKey(params.userWallet),
|
|
989
|
+
fastGeneration: params.fastGeneration
|
|
990
|
+
? {
|
|
991
|
+
pool: new web3.PublicKey(params.fastGeneration.pool),
|
|
992
|
+
}
|
|
993
|
+
: undefined,
|
|
994
|
+
pdaTokenType: params.pdaTokenType,
|
|
995
|
+
},
|
|
996
|
+
});
|
|
997
|
+
const txMetadatas = [];
|
|
998
|
+
for (const result of results) {
|
|
999
|
+
const txMeta = yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result);
|
|
1000
|
+
txMetadatas.push(txMeta);
|
|
1001
|
+
}
|
|
1002
|
+
return {
|
|
1003
|
+
status: 200,
|
|
1004
|
+
data: txMetadatas,
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
catch (e) {
|
|
1008
|
+
if (e instanceof Error) {
|
|
1009
|
+
return {
|
|
1010
|
+
status: 400,
|
|
1011
|
+
data: {
|
|
1012
|
+
code: "custom",
|
|
1013
|
+
message: e.message,
|
|
1014
|
+
stack: (_a = e.stack) === null || _a === void 0 ? void 0 : _a.split('\n'),
|
|
1015
|
+
path: [],
|
|
1016
|
+
},
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
return {
|
|
1020
|
+
status: 400,
|
|
1021
|
+
data: {
|
|
1022
|
+
code: "custom",
|
|
1023
|
+
message: e,
|
|
1024
|
+
path: [],
|
|
1025
|
+
},
|
|
1026
|
+
};
|
|
1027
|
+
}
|
|
1028
|
+
});
|
|
1029
|
+
}
|
|
897
1030
|
/**
|
|
898
1031
|
* Creates meteora instruction that claims fees and rewards.
|
|
899
1032
|
*
|
|
@@ -1099,27 +1232,32 @@ class TxGenerator {
|
|
|
1099
1232
|
});
|
|
1100
1233
|
}
|
|
1101
1234
|
/**
|
|
1102
|
-
* Creates meteora instruction that initializes a large position
|
|
1103
|
-
*
|
|
1235
|
+
* Creates meteora instruction that initializes a large position.
|
|
1236
|
+
* Supports up to 1400 bins, splitting across multiple transactions if needed.
|
|
1104
1237
|
*
|
|
1105
1238
|
* @param connection - Solana connection
|
|
1106
1239
|
* @param payer - Public key of the payer for transaction fees.
|
|
1107
1240
|
* @param params - Parameters required
|
|
1108
|
-
* @returns A ResponseWithStatus containing
|
|
1241
|
+
* @returns A ResponseWithStatus containing an array of TransactionMetadata.
|
|
1109
1242
|
*/
|
|
1110
1243
|
meteoraInitializeLargePosition(connection, payer, params) {
|
|
1111
1244
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1112
1245
|
// Initialize anchor
|
|
1113
1246
|
anchor_1.Anchor.initialize(connection);
|
|
1114
1247
|
try {
|
|
1115
|
-
const
|
|
1248
|
+
const results = yield Transactions_1.txgen.meteoraInitializeLargePosition({
|
|
1116
1249
|
connection,
|
|
1117
1250
|
params,
|
|
1118
1251
|
fetch: undefined,
|
|
1119
1252
|
});
|
|
1253
|
+
const txMetadatas = [];
|
|
1254
|
+
for (const result of results) {
|
|
1255
|
+
const txMeta = yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result);
|
|
1256
|
+
txMetadatas.push(txMeta);
|
|
1257
|
+
}
|
|
1120
1258
|
return {
|
|
1121
1259
|
status: 200,
|
|
1122
|
-
data:
|
|
1260
|
+
data: txMetadatas,
|
|
1123
1261
|
};
|
|
1124
1262
|
}
|
|
1125
1263
|
catch (e) {
|
|
@@ -1153,7 +1291,7 @@ class TxGenerator {
|
|
|
1153
1291
|
*
|
|
1154
1292
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
1155
1293
|
* @param payer The public key of the payer for transaction fees.
|
|
1156
|
-
* @param params
|
|
1294
|
+
* @param params MeteoraDeposit parameters
|
|
1157
1295
|
* @returns A ResponseWithStatus containing an array of TransactionMetadata.
|
|
1158
1296
|
*/
|
|
1159
1297
|
meteoraDepositToLargePosition(connection, payer, params) {
|
|
@@ -1198,6 +1336,51 @@ class TxGenerator {
|
|
|
1198
1336
|
}
|
|
1199
1337
|
});
|
|
1200
1338
|
}
|
|
1339
|
+
/**
|
|
1340
|
+
* Create a position and deposit liquidity for any bin count.
|
|
1341
|
+
* For ≤149 bins: single tx. For ≥150 bins: multi-tx with init + deposit.
|
|
1342
|
+
*/
|
|
1343
|
+
meteoraCreatePositionAndDepositToLargePosition(connection, payer, params) {
|
|
1344
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1345
|
+
// Initialize anchor
|
|
1346
|
+
anchor_1.Anchor.initialize(connection);
|
|
1347
|
+
try {
|
|
1348
|
+
const results = yield Transactions_1.txgen.meteoraCreatePositionAndDepositToLargePosition({
|
|
1349
|
+
connection,
|
|
1350
|
+
params,
|
|
1351
|
+
});
|
|
1352
|
+
const txMetadatas = [];
|
|
1353
|
+
for (const result of results) {
|
|
1354
|
+
const txMeta = yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result);
|
|
1355
|
+
txMetadatas.push(txMeta);
|
|
1356
|
+
}
|
|
1357
|
+
return {
|
|
1358
|
+
status: 200,
|
|
1359
|
+
data: txMetadatas,
|
|
1360
|
+
};
|
|
1361
|
+
}
|
|
1362
|
+
catch (e) {
|
|
1363
|
+
if (e instanceof Error) {
|
|
1364
|
+
return {
|
|
1365
|
+
status: 400,
|
|
1366
|
+
data: {
|
|
1367
|
+
code: "custom",
|
|
1368
|
+
message: e.message,
|
|
1369
|
+
path: [],
|
|
1370
|
+
},
|
|
1371
|
+
};
|
|
1372
|
+
}
|
|
1373
|
+
return {
|
|
1374
|
+
status: 400,
|
|
1375
|
+
data: {
|
|
1376
|
+
code: "custom",
|
|
1377
|
+
message: e,
|
|
1378
|
+
path: [],
|
|
1379
|
+
},
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
});
|
|
1383
|
+
}
|
|
1201
1384
|
/**
|
|
1202
1385
|
* Deposit liquidity to a Meteora DLMM position (up to 70 bins) with optional position initialization.
|
|
1203
1386
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as web3 from "@solana/web3.js";
|
|
2
2
|
import * as _client from "@hawksightco/swagger-client";
|
|
3
|
-
import { MeteoraClose, MeteoraCompound, MeteoraRedeposit, MeteoraLimitCloseAutomation, MeteoraLimitCloseAutomation2, MeteoraRebalance, MeteoraRebalance2, MeteoraRebalance3, OpenAutomationIx, RelativeOpenAutomationIx, ResponseWithStatus, TransactionMetadata, MeteoraRebalanceForLargerPosition, LabeledInstructions } from "../types";
|
|
3
|
+
import { MeteoraClose, MeteoraCompound, MeteoraRedeposit, MeteoraLimitCloseAutomation, MeteoraLimitCloseAutomation2, MeteoraRebalance, MeteoraRebalance2, MeteoraRebalance3, OpenAutomationIx, RelativeOpenAutomationIx, ResponseWithStatus, TransactionMetadata, MeteoraRebalanceForLargerPosition, LabeledInstructions, MeteoraRebalanceLargePositionAutomation2, MeteoraReshapePositionAutomationParams } from "../types";
|
|
4
4
|
import { Client } from "./Client";
|
|
5
5
|
import { GeneralUtility } from "./GeneralUtility";
|
|
6
6
|
/**
|
|
@@ -38,6 +38,20 @@ export declare class TxGeneratorAutomations {
|
|
|
38
38
|
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
39
39
|
*/
|
|
40
40
|
meteoraCompoundIxs(connection: web3.Connection, payer: string, params: MeteoraCompound): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
41
|
+
/**
|
|
42
|
+
* Compound (claim + re-deposit) fees and rewards from a large Meteora DLMM position (up to 1400 bins).
|
|
43
|
+
*
|
|
44
|
+
* For ≤149 bins, delegates to single-TX compoundAutomationIx.
|
|
45
|
+
* For ≥150 bins, chunks claim and re-deposit into multiple TXs.
|
|
46
|
+
*
|
|
47
|
+
* NOTE: For hawksight devs only.
|
|
48
|
+
*
|
|
49
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
50
|
+
* @param payer The public key of the payer for transaction fees.
|
|
51
|
+
* @param params Parameters required
|
|
52
|
+
* @returns A ResponseWithStatus containing an array of TransactionMetadata.
|
|
53
|
+
*/
|
|
54
|
+
meteoraCompoundFromLargePositionIxs(connection: web3.Connection, payer: string, params: MeteoraCompound): Promise<ResponseWithStatus<TransactionMetadata[]>>;
|
|
41
55
|
/**
|
|
42
56
|
* Creates meteora redeposit instruction (withdraw liquidity, claim fees, and deposit back to same position)
|
|
43
57
|
*
|
|
@@ -52,6 +66,8 @@ export declare class TxGeneratorAutomations {
|
|
|
52
66
|
/**
|
|
53
67
|
* Creates meteora auto-claim instruction (claim fee, reward)
|
|
54
68
|
*
|
|
69
|
+
* @deprecated Use meteoraClaimFromLargePositionIxs instead
|
|
70
|
+
*
|
|
55
71
|
* NOTE: For hawksight devs only.
|
|
56
72
|
*
|
|
57
73
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
@@ -60,9 +76,25 @@ export declare class TxGeneratorAutomations {
|
|
|
60
76
|
* @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
|
|
61
77
|
*/
|
|
62
78
|
meteoraClaimIxs(connection: web3.Connection, payer: string, params: MeteoraCompound): Promise<ResponseWithStatus<TransactionMetadata>>;
|
|
79
|
+
/**
|
|
80
|
+
* Claims fees and rewards from a large Meteora DLMM position (up to 1400 bins).
|
|
81
|
+
*
|
|
82
|
+
* For ≤149 bins, delegates to single-TX claimAutomationIx.
|
|
83
|
+
* For ≥150 bins, chunks the bin range into ≤149-bin pieces, returning multiple TXs.
|
|
84
|
+
*
|
|
85
|
+
* NOTE: For hawksight devs only.
|
|
86
|
+
*
|
|
87
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
88
|
+
* @param payer The public key of the payer for transaction fees.
|
|
89
|
+
* @param params Parameters required
|
|
90
|
+
* @returns A ResponseWithStatus containing an array of TransactionMetadata.
|
|
91
|
+
*/
|
|
92
|
+
meteoraClaimFromLargePositionIxs(connection: web3.Connection, payer: string, params: MeteoraCompound): Promise<ResponseWithStatus<TransactionMetadata[]>>;
|
|
63
93
|
/**
|
|
64
94
|
* Creates meteora auto-rebalance instruction
|
|
65
95
|
*
|
|
96
|
+
* @deprecated Use meteoraRebalanceLargerPositionAutomation instead
|
|
97
|
+
*
|
|
66
98
|
* NOTE: For hawksight devs only.
|
|
67
99
|
*
|
|
68
100
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
@@ -74,6 +106,8 @@ export declare class TxGeneratorAutomations {
|
|
|
74
106
|
/**
|
|
75
107
|
* Creates meteora auto-rebalance instruction (uses new re-deposit instruction)
|
|
76
108
|
*
|
|
109
|
+
* @deprecated Use meteoraRebalanceLargerPositionAutomation instead
|
|
110
|
+
*
|
|
77
111
|
* NOTE: For hawksight devs only.
|
|
78
112
|
*
|
|
79
113
|
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
@@ -126,6 +160,50 @@ export declare class TxGeneratorAutomations {
|
|
|
126
160
|
* @returns A ResponseWithStatus containing an array of TransactionMetadata (1-2 transactions).
|
|
127
161
|
*/
|
|
128
162
|
meteoraRebalanceIxs3(connection: web3.Connection, payer: string, params: MeteoraRebalance3): Promise<ResponseWithStatus<LabeledInstructions>>;
|
|
163
|
+
/**
|
|
164
|
+
* Generates a single rebalanceLiquidityAutomation instruction for reshaping a Meteora DLMM position.
|
|
165
|
+
*
|
|
166
|
+
* This is a low-level building block that creates ONE instruction to:
|
|
167
|
+
* - Remove liquidity from specified bins (removeLiquidityParams)
|
|
168
|
+
* - Add liquidity to new bins (addLiquidityParams)
|
|
169
|
+
*
|
|
170
|
+
* Unlike meteoraRebalanceLargePositionAutomation2 which handles full position reshaping
|
|
171
|
+
* with chunking and multiple TXs, this function returns a single instruction that can
|
|
172
|
+
* be composed into custom transaction flows.
|
|
173
|
+
*
|
|
174
|
+
* NOTE: For hawksight devs only.
|
|
175
|
+
*
|
|
176
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
177
|
+
* @param params Reshape parameters including position, bin ranges, and liquidity params
|
|
178
|
+
* @returns A ResponseWithStatus containing LabeledInstructions with single 'rebalance_liquidity' instruction
|
|
179
|
+
*/
|
|
180
|
+
meteoraReshapePositionAutomation(connection: web3.Connection, params: MeteoraReshapePositionAutomationParams): Promise<ResponseWithStatus<LabeledInstructions>>;
|
|
181
|
+
/**
|
|
182
|
+
* Rebalances a large Meteora DLMM position (up to 1400 bins) using automation instructions.
|
|
183
|
+
*
|
|
184
|
+
* For ≤149 bins, delegates to meteoraRebalanceLargerPositionAutomation.
|
|
185
|
+
* For ≥150 bins, uses a chunked multi-TX approach (withdraw, init, deposit).
|
|
186
|
+
*
|
|
187
|
+
* NOTE: For hawksight devs only.
|
|
188
|
+
*
|
|
189
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
190
|
+
* @param payer The public key of the payer for transaction fees.
|
|
191
|
+
* @param params Parameters required
|
|
192
|
+
* @returns A ResponseWithStatus containing an array of TransactionMetadata.
|
|
193
|
+
*/
|
|
194
|
+
meteoraRebalanceLargePositionAutomation(connection: web3.Connection, payer: string, params: MeteoraRebalanceForLargerPosition): Promise<ResponseWithStatus<TransactionMetadata[]>>;
|
|
195
|
+
/**
|
|
196
|
+
* Reshape position: withdraw from old bins and deposit to new bins on the SAME position
|
|
197
|
+
* using Meteora's rebalance_liquidity instruction. No position close/create needed.
|
|
198
|
+
*
|
|
199
|
+
* NOTE: For hawksight devs only.
|
|
200
|
+
*
|
|
201
|
+
* @param connection The Solana web3 connection object for blockchain interactions.
|
|
202
|
+
* @param payer The public key of the payer for transaction fees.
|
|
203
|
+
* @param params Parameters required for reshape position
|
|
204
|
+
* @returns A ResponseWithStatus containing an array of TransactionMetadata.
|
|
205
|
+
*/
|
|
206
|
+
meteoraRebalanceLargePositionAutomation2(connection: web3.Connection, payer: string, params: MeteoraRebalanceLargePositionAutomation2): Promise<ResponseWithStatus<TransactionMetadata[]>>;
|
|
129
207
|
/**
|
|
130
208
|
* Creates meteora close limit instruction (combination of claim fees/rewards + remove liquidity + close position)
|
|
131
209
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TxGeneratorAutomations.d.ts","sourceRoot":"","sources":["../../../src/classes/TxGeneratorAutomations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,iCAAiC,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"TxGeneratorAutomations.d.ts","sourceRoot":"","sources":["../../../src/classes/TxGeneratorAutomations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,iCAAiC,EAAE,mBAAmB,EAAE,wCAAwC,EAAE,s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