@hawksightco/hawk-sdk 1.3.180 → 1.3.181

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.
@@ -1,5 +1,5 @@
1
1
  import * as web3 from '@solana/web3.js';
2
- import { MeteoraClaim, MeteoraClaimAll, MeteoraClose, MeteoraCompound, MeteoraRedeposit, MeteoraCreatePositionAndDeposit, MeteoraCreatePositionAndDepositPda, MeteoraDeposit, MeteoraInitializeBinArrays, MeteoraRebalance, MeteoraWithdraw, Register, TxgenParams, InitializeStorageTokenAccount, MeteoraLimitCloseAutomation, MeteoraLimitCloseAutomation2, OrcaOpenPosition, OrcaClosePosition, OrcaDeposit, OrcaWithdraw, OrcaSweepDust, OrcaClaimRewards, TransactionMetadataResponse, MeteoraRebalance2, ClaimTokensFromSTA, RaydiumClosePosition, OpenAutomationIx, RelativeOpenAutomationIx, RaydiumWithdrawAndClosePosition, MeteoraCreatePoolAndPosition, ClaimTokenFromPda, MeteoraInitializeLargePosition, MeteoraDepositToLargePosition, MeteoraDepositLargerPosition, MeteoraWithdrawLargerPosition } from '../types';
2
+ import { MeteoraClaim, MeteoraClaimAll, MeteoraClose, MeteoraCompound, MeteoraRedeposit, MeteoraCreatePositionAndDeposit, MeteoraCreatePositionAndDepositPda, MeteoraDeposit, MeteoraInitializeBinArrays, MeteoraRebalance, MeteoraWithdraw, Register, TxgenParams, InitializeStorageTokenAccount, MeteoraLimitCloseAutomation, MeteoraLimitCloseAutomation2, OrcaOpenPosition, OrcaClosePosition, OrcaDeposit, OrcaWithdraw, OrcaSweepDust, OrcaClaimRewards, TransactionMetadataResponse, MeteoraRebalance2, ClaimTokensFromSTA, RaydiumClosePosition, OpenAutomationIx, RelativeOpenAutomationIx, RaydiumWithdrawAndClosePosition, MeteoraCreatePoolAndPosition, ClaimTokenFromPda, MeteoraInitializeLargePosition, MeteoraDepositToLargePosition, MeteoraDepositLargerPosition, MeteoraWithdrawLargerPosition, MeteoraRebalanceForLargerPosition } from '../types';
3
3
  import { RaydiumIncreaseLiquidity, RaydiumOpenPosition, RaydiumDecreaseLiquidity } from '../types';
4
4
  import { GeneralUtility } from './GeneralUtility';
5
5
  import { MultiTransaction } from './MultiTransaction';
@@ -205,6 +205,49 @@ export declare class Transactions {
205
205
  claimAutomationIx({ connection, params, }: TxgenParams<MeteoraCompound>): Promise<TransactionMetadataResponse>;
206
206
  rebalanceAutomationIx({ connection, params, }: TxgenParams<MeteoraRebalance>): Promise<TransactionMetadataResponse>;
207
207
  rebalanceAutomationIx2({ connection, params, }: TxgenParams<MeteoraRebalance2>): Promise<TransactionMetadataResponse>;
208
+ /**
209
+ * Rebalance a Meteora DLMM position with support for larger positions.
210
+ *
211
+ * This is a backwards-compatible implementation of the rebalance operation that handles
212
+ * positions of any size. The method automatically splits operations into 2-dimensional
213
+ * instruction arrays (where each dimension represents a transaction) when dealing with
214
+ * large bin arrays that would exceed single transaction limits.
215
+ *
216
+ * This rebalance method performs the following steps:
217
+ * 1. Removes liquidity from the current position (supports larger bin ranges, not limited to 70-bin chunks, max 149-bin)
218
+ * 2. Claims fees from the current position
219
+ * 3. Claims rewards from the current position (if any)
220
+ * 4. Closes the current position
221
+ * 5. Initializes a new position
222
+ * 6. Extends the new position length if needed (for larger positions)
223
+ * 7. Adds liquidity to the new position using deposit automation
224
+ *
225
+ * Key benefits:
226
+ * - Backwards-compatible with existing rebalance implementations
227
+ * - Supports large bin arrays through automatic transaction splitting into multiple transactions
228
+ * - Does NOT depend on Meteora SDK
229
+ * - Handles positions that exceed single transaction size limits
230
+ * - Uses increasePositionLengthAutomation for larger new positions
231
+ *
232
+ * @param connection The Solana web3 connection object for blockchain interactions.
233
+ * @param params Parameters required for rebalance (same as MeteoraRebalance)
234
+ * @returns A TransactionMetadataResponse containing the transaction metadata
235
+ */
236
+ /**
237
+ * Rebalance a Meteora DLMM position to a new bin range (supports up to 149 bins).
238
+ *
239
+ * This method chunks the rebalance into multiple transactions:
240
+ * - TX 1: Remove liquidity + claim fees + claim rewards + close position
241
+ * - TX 2: Initialize new position + extend position (if > 70 bins)
242
+ * - TX 3: Initialize bin array + add liquidity (if > 70 bins)
243
+ *
244
+ * For positions <= 70 bins, TX 2 and TX 3 are combined into a single transaction.
245
+ *
246
+ * @param connection - Solana connection
247
+ * @param params - MeteoraRebalance parameters
248
+ * @returns Array of TransactionMetadataResponse for each transaction
249
+ */
250
+ rebalanceLargerPositionAutomation({ connection, params, }: TxgenParams<MeteoraRebalanceForLargerPosition>): Promise<TransactionMetadataResponse[]>;
208
251
  openAutomationIx({ connection, params, }: TxgenParams<OpenAutomationIx>): Promise<TransactionMetadataResponse>;
209
252
  relativeOpenAutomationIx({ connection, params, }: TxgenParams<RelativeOpenAutomationIx>): Promise<TransactionMetadataResponse>;
210
253
  closeAutomationIx({ connection, params }: TxgenParams<MeteoraClose>): Promise<TransactionMetadataResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"Transactions.d.ts","sourceRoot":"","sources":["../../../src/classes/Transactions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAqBxC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,+BAA+B,EAC/B,kCAAkC,EAClC,cAAc,EACd,0BAA0B,EAC1B,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,WAAW,EACX,6BAA6B,EAC7B,2BAA2B,EAC3B,4BAA4B,EAC5B,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EAEpB,gBAAgB,EAChB,wBAAwB,EACxB,+BAA+B,EAC/B,4BAA4B,EAC5B,iBAAiB,EAEjB,8BAA8B,EAC9B,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAwClB,OAAO,EAEL,w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GhF;AAED,eAAO,MAAM,KAAK,cAA6B,CAAC"}
1
+ {"version":3,"file":"Transactions.d.ts","sourceRoot":"","sources":["../../../src/classes/Transactions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAqBxC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,+BAA+B,EAC/B,kCAAkC,EAClC,cAAc,EACd,0BAA0B,EAC1B,gBAAgB,EAChB,eAAe,EACf,QAAQ,EACR,WAAW,EACX,6BAA6B,EAC7B,2BAA2B,EAC3B,4BAA4B,EAC5B,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EAEpB,gBAAgB,EAChB,wBAAwB,EACxB,+BAA+B,EAC/B,4BAA4B,EAC5B,iBAAiB,EAEjB,8BAA8B,EAC9B,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC7B,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAyClB,OAAO,EAEL,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAKlB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAqBxD,qBAAa,YAAY;IACvB;;OAEG;IACH,OAAO;IAKP;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAe;IAEtC;;OAEG;IACI,EAAE,EAAE,iBAAiB,CAAC;IAE7B;;OAEG;IACH,OAAO,CAAC,OAAO,CAAmB;IAElC;;;;OAIG;IACH,MAAM,CAAC,WAAW,IAAI,YAAY;IAOlC;;;;;;OAMG;IACH,eAAe,CACb,UAAU,EAAE,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;OAOG;IACG,eAAe,CAAC,EACpB,UAAU,EACV,MAAM,GACP,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAqOnE;;;;;;;OAOG;IACG,gBAAgB,CAAC,EACrB,UAAU,EACV,MAAM,GACP,EAAE,WAAW,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAuJvE;;;;;;OAMG;IACG,mBAAmB,CAAC,EACxB,UAAU,EACV,MAAM,GACP,EAAE,WAAW,CAAC,mBAAmB,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAgI1E;;;;;;;OAOG;IACG,+BAA+B,CAAC,EACpC,UAAU,EACV,MAAM,GACP,EAAE,WAAW,CAAC,+BAA+B,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAkItF;;;;;;OAMG;IACG,oBAAoB,CAAC,EACzB,UAAU,EACV,MAAM,GACP,EAAE,WAAW,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAwB3E;;;;;;OAMG;IACG,wBAAwB,CAAC,EAC7B,UAAU,EACV,MAAM,GACP,EAAE,WAAW,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAyG/E;;;;;;OAMG;IACG,wBAAwB,CAAC,EAC7B,UAAU,EACV,MAAM,GACP,EAAE,WAAW,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAiGhF;AAED,eAAO,MAAM,KAAK,cAA6B,CAAC"}
@@ -1358,6 +1358,305 @@ class Transactions {
1358
1358
  }
1359
1359
  });
1360
1360
  }
1361
+ /**
1362
+ * Rebalance a Meteora DLMM position with support for larger positions.
1363
+ *
1364
+ * This is a backwards-compatible implementation of the rebalance operation that handles
1365
+ * positions of any size. The method automatically splits operations into 2-dimensional
1366
+ * instruction arrays (where each dimension represents a transaction) when dealing with
1367
+ * large bin arrays that would exceed single transaction limits.
1368
+ *
1369
+ * This rebalance method performs the following steps:
1370
+ * 1. Removes liquidity from the current position (supports larger bin ranges, not limited to 70-bin chunks, max 149-bin)
1371
+ * 2. Claims fees from the current position
1372
+ * 3. Claims rewards from the current position (if any)
1373
+ * 4. Closes the current position
1374
+ * 5. Initializes a new position
1375
+ * 6. Extends the new position length if needed (for larger positions)
1376
+ * 7. Adds liquidity to the new position using deposit automation
1377
+ *
1378
+ * Key benefits:
1379
+ * - Backwards-compatible with existing rebalance implementations
1380
+ * - Supports large bin arrays through automatic transaction splitting into multiple transactions
1381
+ * - Does NOT depend on Meteora SDK
1382
+ * - Handles positions that exceed single transaction size limits
1383
+ * - Uses increasePositionLengthAutomation for larger new positions
1384
+ *
1385
+ * @param connection The Solana web3 connection object for blockchain interactions.
1386
+ * @param params Parameters required for rebalance (same as MeteoraRebalance)
1387
+ * @returns A TransactionMetadataResponse containing the transaction metadata
1388
+ */
1389
+ /**
1390
+ * Rebalance a Meteora DLMM position to a new bin range (supports up to 149 bins).
1391
+ *
1392
+ * This method chunks the rebalance into multiple transactions:
1393
+ * - TX 1: Remove liquidity + claim fees + claim rewards + close position
1394
+ * - TX 2: Initialize new position + extend position (if > 70 bins)
1395
+ * - TX 3: Initialize bin array + add liquidity (if > 70 bins)
1396
+ *
1397
+ * For positions <= 70 bins, TX 2 and TX 3 are combined into a single transaction.
1398
+ *
1399
+ * @param connection - Solana connection
1400
+ * @param params - MeteoraRebalance parameters
1401
+ * @returns Array of TransactionMetadataResponse for each transaction
1402
+ */
1403
+ rebalanceLargerPositionAutomation(_a) {
1404
+ return __awaiter(this, arguments, void 0, function* ({ connection, params, }) {
1405
+ // Current theoretical limit (149-bin)
1406
+ const MAX_POSITION_WIDTH = 149;
1407
+ try {
1408
+ // First fetch the position to get the lbPair (pool) address
1409
+ const program = yield meteora_1.MeteoraDLMM.program(connection);
1410
+ const positionData = yield program.account.positionV2.fetch(params.currentPosition);
1411
+ if (!positionData || !positionData.lbPair) {
1412
+ throw new Error(`Invalid position data: ${params.currentPosition.toString()}`);
1413
+ }
1414
+ const lbPair = positionData.lbPair;
1415
+ // Get pool data using MeteoraDLMM.create with the correct pool address
1416
+ const dlmmPool = yield meteora_1.MeteoraDLMM.create(connection, lbPair, this.ix);
1417
+ // Get position info from the pool's user positions
1418
+ const userPda = (0, functions_1.generateUserPda)(params.userWallet);
1419
+ const { userPositions } = yield dlmmPool.getPositionsByUserAndLbPair(userPda);
1420
+ const userPosition = userPositions.find(pos => pos.publicKey.equals(params.currentPosition));
1421
+ if (!userPosition) {
1422
+ throw new Error(`Position ${params.currentPosition.toString()} not found`);
1423
+ }
1424
+ const lbPairState = dlmmPool.dlmm.lbPair;
1425
+ const currentLowerBinId = userPosition.positionData.lowerBinId;
1426
+ const currentUpperBinId = userPosition.positionData.upperBinId;
1427
+ const tokenXMint = lbPairState.tokenXMint;
1428
+ const tokenYMint = lbPairState.tokenYMint;
1429
+ const rewardInfos = lbPairState.rewardInfos;
1430
+ // Get token programs for each mint
1431
+ const tokenProgramMap = yield (0, functions_1.getTokenProgramMapForMints)(connection, [tokenXMint, tokenYMint]);
1432
+ const tokenXProgram = tokenProgramMap[tokenXMint.toString()];
1433
+ const tokenYProgram = tokenProgramMap[tokenYMint.toString()];
1434
+ // Get position width
1435
+ const newPositionWidth = params.width;
1436
+ // Validate position width does not exceed n-bins
1437
+ if (newPositionWidth > MAX_POSITION_WIDTH) {
1438
+ throw new Error(`Position width ${newPositionWidth} exceeds maximum allowed ${MAX_POSITION_WIDTH} bins.`);
1439
+ }
1440
+ // Fetch remainingAccountsInfo for Token2022 transfer hooks (if any)
1441
+ const remainingAccountsInfo = yield (0, functions_1.fetchRemainingAccountsInfo)(connection, tokenXMint, tokenYMint, tokenXProgram, tokenYProgram);
1442
+ // Whether to compound during rebalance, or nope.
1443
+ const pdaTokenTypeForClaimables = params.useAta ? types_1.TokenType.ATA : types_1.TokenType.STA;
1444
+ const transactions = [];
1445
+ // =========================================================================
1446
+ // Group 1 consists of remove liquidity, claim fees/rewards, close position,
1447
+ // init position, and an optional extend position
1448
+ //
1449
+ // Group 2 consists of init bin arrays and add liquidity
1450
+ // Positions less than or equal to 70 bins are combined into a single
1451
+ // transaction if pool has no rewards. Otherwise, we need to split the
1452
+ // transaction when bins > 50.
1453
+ // =========================================================================
1454
+ const group1Ixs = [];
1455
+ const group2Ixs = [];
1456
+ // Remove liquidity from current position
1457
+ const removeLiquidityIx = yield this.ix.meteoraDlmm.removeLiquidityByRange2Automation({
1458
+ connection,
1459
+ userWallet: params.userWallet,
1460
+ lbPair,
1461
+ position: params.currentPosition,
1462
+ tokenXMint,
1463
+ tokenYMint,
1464
+ tokenXProgram,
1465
+ tokenYProgram,
1466
+ fromBinId: currentLowerBinId,
1467
+ toBinId: currentUpperBinId,
1468
+ bpsToRemove: 10000, // 100%
1469
+ pdaTokenType: types_1.TokenType.ATA,
1470
+ remainingAccountsInfo,
1471
+ });
1472
+ group1Ixs.push(removeLiquidityIx);
1473
+ // Claim fees from current position
1474
+ const claimFeeIx = yield this.ix.meteoraDlmm.claimFee2Automation(connection, {
1475
+ userWallet: params.userWallet,
1476
+ lbPair,
1477
+ position: params.currentPosition,
1478
+ tokenMintX: tokenXMint,
1479
+ tokenMintY: tokenYMint,
1480
+ tokenProgramX: tokenXProgram,
1481
+ tokenProgramY: tokenYProgram,
1482
+ lowerBinId: currentLowerBinId,
1483
+ upperBinId: currentUpperBinId,
1484
+ pdaTokenType: pdaTokenTypeForClaimables,
1485
+ remainingAccountsInfo,
1486
+ });
1487
+ group1Ixs.push(claimFeeIx);
1488
+ // Claim rewards from current position (if any)
1489
+ let withRewards = false;
1490
+ for (let rewardIndex = 0; rewardIndex < 2; rewardIndex++) {
1491
+ const rewardInfo = rewardInfos[rewardIndex];
1492
+ // Skip if reward is not initialized (mint is default/zero pubkey)
1493
+ if (!rewardInfo || rewardInfo.mint.equals(web3.PublicKey.default)) {
1494
+ continue;
1495
+ }
1496
+ withRewards = true;
1497
+ // Get reward token program and fetch remainingAccountsInfo for the reward mint
1498
+ const rewardTokenProgramMap = yield (0, functions_1.getTokenProgramMapForMints)(connection, [rewardInfo.mint]);
1499
+ const rewardTokenProgram = rewardTokenProgramMap[rewardInfo.mint.toString()];
1500
+ // Fetch transfer hook accounts specifically for the reward mint (not tokenX/tokenY)
1501
+ const rewardRemainingAccountsInfo = yield (0, functions_1.fetchRemainingAccountsInfoForReward)(connection, rewardInfo.mint, rewardTokenProgram);
1502
+ const claimRewardIx = yield this.ix.meteoraDlmm.claimReward2Automation(connection, {
1503
+ userWallet: params.userWallet,
1504
+ lbPair,
1505
+ position: params.currentPosition,
1506
+ rewardIndex,
1507
+ rewardMint: rewardInfo.mint,
1508
+ rewardVault: rewardInfo.vault,
1509
+ tokenProgram: rewardTokenProgram,
1510
+ lowerBinId: currentLowerBinId,
1511
+ upperBinId: currentUpperBinId,
1512
+ pdaTokenType: types_1.TokenType.STA, // Always use STA for rewards
1513
+ remainingAccountsInfo: rewardRemainingAccountsInfo,
1514
+ });
1515
+ group1Ixs.push(claimRewardIx);
1516
+ }
1517
+ // Close the current position
1518
+ const closePositionIx = yield this.ix.meteoraDlmm.closePosition2Automation({
1519
+ connection,
1520
+ userWallet: params.userWallet,
1521
+ position: params.currentPosition,
1522
+ lbPair,
1523
+ });
1524
+ group1Ixs.push(closePositionIx);
1525
+ // =========================================================================
1526
+ // TX 2: Initialize new position + extend position (if needed)
1527
+ // TX 3: Initialize bin array + add liquidity
1528
+ //
1529
+ // If position width <= 70 bins, combine TX 2 and TX 3 into single TX
1530
+ // =========================================================================
1531
+ // Initialize new position (max 70 bins initial)
1532
+ const initialWidth = Math.min(70, newPositionWidth);
1533
+ const initPositionIx = yield this.ix.meteoraDlmm.initializePositionRelativeAutomation(connection, {
1534
+ userWallet: params.userWallet,
1535
+ lbPair,
1536
+ position: params.newPosition,
1537
+ relativeLowerBinId: params.relativeLowerBin,
1538
+ width: initialWidth,
1539
+ });
1540
+ group1Ixs.push(initPositionIx);
1541
+ // Extend position length if needed (for larger positions)
1542
+ let currentPositionRelativeUpperBinId = params.relativeLowerBin + initialWidth - 1;
1543
+ const relativeUpperBinId = params.relativeLowerBin + params.width - 1;
1544
+ while (currentPositionRelativeUpperBinId < relativeUpperBinId) {
1545
+ // Calculate how many bins to add (max 91 at a time for increasePositionLength)
1546
+ const remainingBins = relativeUpperBinId - currentPositionRelativeUpperBinId;
1547
+ const binsToAdd = Math.min(91, remainingBins);
1548
+ const increasePositionLengthIx = yield this.ix.meteoraDlmm.increasePositionLengthAutomation({
1549
+ connection,
1550
+ userWallet: params.userWallet,
1551
+ lbPair,
1552
+ position: params.newPosition,
1553
+ lengthToAdd: binsToAdd,
1554
+ side: types_1.MeteoraPositionSide.Upper, // Always extend to the right
1555
+ });
1556
+ group2Ixs.push(increasePositionLengthIx);
1557
+ currentPositionRelativeUpperBinId += binsToAdd;
1558
+ }
1559
+ const { binId: activeId } = yield dlmmPool.dlmm.getActiveBin();
1560
+ const lowerBinId = activeId + params.relativeLowerBin;
1561
+ const upperBinId = activeId + relativeUpperBinId;
1562
+ // Initialize bin arrays for the new position range
1563
+ const initBinArraysIx = yield this.ix.meteoraDlmm.meteoraDlmmInitializeBinArray({
1564
+ connection,
1565
+ userWallet: params.userWallet,
1566
+ lbPair,
1567
+ lowerBinId,
1568
+ upperBinId,
1569
+ });
1570
+ group2Ixs.push(initBinArraysIx);
1571
+ // Add liquidity using the new instruction generator
1572
+ // Note: The position will be created in the preceding TX2 transactions
1573
+ // strategyParametersMinBinId and strategyParametersMaxBinId must be ABSOLUTE bin IDs
1574
+ // (same as what the position's lowerBinId/upperBinId will be after TX2)
1575
+ const addLiquidityIx = yield this.ix.meteoraDlmm.meteoraDlmmDepositRelativeAutomation({
1576
+ connection,
1577
+ userWallet: params.userWallet,
1578
+ lbPair,
1579
+ position: params.newPosition,
1580
+ tokenXMint,
1581
+ tokenYMint,
1582
+ tokenXProgram,
1583
+ tokenYProgram,
1584
+ activeId,
1585
+ relativeBinRange: {
1586
+ lowerRange: params.relativeLowerBin,
1587
+ upperRange: relativeUpperBinId,
1588
+ },
1589
+ strategyType: types_3.StrategyTypeMap[params.distribution],
1590
+ pdaTokenType: types_1.TokenType.ATA,
1591
+ remainingAccountsInfo,
1592
+ });
1593
+ group2Ixs.push(addLiquidityIx);
1594
+ if (withRewards === false) {
1595
+ if (newPositionWidth <= 70) {
1596
+ transactions.push(yield (0, functions_1.createTransactionMeta)({
1597
+ payer: params.userWallet,
1598
+ description: 'Automation IX: Meteora Rebalance: Remove liquidity, claim fees/rewards, close position + Initialize position + add liquidity',
1599
+ addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
1600
+ mainInstructions: [...group1Ixs, ...group2Ixs],
1601
+ }));
1602
+ }
1603
+ else {
1604
+ // Only 2 transactions: TX1 and TX2
1605
+ transactions.push(yield (0, functions_1.createTransactionMeta)({
1606
+ payer: params.userWallet,
1607
+ description: 'Automation IX: Meteora Rebalance: Remove liquidity, claim fees/rewards, close position + Initialize position + add liquidity',
1608
+ addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
1609
+ mainInstructions: group1Ixs,
1610
+ }));
1611
+ // Combine TX 2 and TX 3: init position + init bin arrays + add liquidity in single TX
1612
+ transactions.push(yield (0, functions_1.createTransactionMeta)({
1613
+ payer: params.userWallet,
1614
+ description: 'Automation IX: Meteora Rebalance TX2 - Initialize position + add liquidity',
1615
+ addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
1616
+ mainInstructions: group2Ixs,
1617
+ }));
1618
+ }
1619
+ }
1620
+ if (withRewards === true) {
1621
+ if (newPositionWidth <= 50) {
1622
+ // Combine TX 2 and TX 3: init position + init bin arrays + add liquidity in single TX
1623
+ transactions.push(yield (0, functions_1.createTransactionMeta)({
1624
+ payer: params.userWallet,
1625
+ description: 'Automation IX: Meteora Rebalance: Remove liquidity, claim fees/rewards, close position + Initialize position + add liquidity',
1626
+ addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
1627
+ mainInstructions: [...group1Ixs, ...group2Ixs],
1628
+ }));
1629
+ }
1630
+ else {
1631
+ // 2 transactions: TX1, TX2, and TX3
1632
+ transactions.push(yield (0, functions_1.createTransactionMeta)({
1633
+ payer: params.userWallet,
1634
+ description: 'Automation IX: Meteora Rebalance: Remove liquidity, claim fees/rewards, close position + Initialize position + add liquidity, Initialize + extend position',
1635
+ addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
1636
+ mainInstructions: group1Ixs,
1637
+ }));
1638
+ // Separate TX 2 and TX 3 for larger positions
1639
+ transactions.push(yield (0, functions_1.createTransactionMeta)({
1640
+ payer: params.userWallet,
1641
+ description: 'Automation IX: Meteora Rebalance TX2 - Initialize bin arrays + add liquidity',
1642
+ addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
1643
+ mainInstructions: group2Ixs,
1644
+ }));
1645
+ }
1646
+ }
1647
+ return transactions;
1648
+ }
1649
+ catch (error) {
1650
+ console.error('=== REBALANCE LARGER POSITION AUTOMATION ERROR ===');
1651
+ console.error('Error type:', error instanceof Error ? error.constructor.name : typeof error);
1652
+ console.error('Error message:', error instanceof Error ? error.message : String(error));
1653
+ console.error('Error stack:', error instanceof Error ? error.stack : 'No stack trace');
1654
+ console.error('Full error object:', error);
1655
+ console.error('=== END ERROR LOG ===');
1656
+ throw error;
1657
+ }
1658
+ });
1659
+ }
1361
1660
  openAutomationIx(_a) {
1362
1661
  return __awaiter(this, arguments, void 0, function* ({ connection, params, }) {
1363
1662
  const dlmmPool = yield meteora_1.MeteoraDLMM.create(connection, params.pool, this.ix);
@@ -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, OpenAutomationIx, RelativeOpenAutomationIx, ResponseWithStatus, TransactionMetadata } from "../types";
3
+ import { MeteoraClose, MeteoraCompound, MeteoraRedeposit, MeteoraLimitCloseAutomation, MeteoraLimitCloseAutomation2, MeteoraRebalance, MeteoraRebalance2, OpenAutomationIx, RelativeOpenAutomationIx, ResponseWithStatus, TransactionMetadata, MeteoraRebalanceForLargerPosition } from "../types";
4
4
  import { Client } from "./Client";
5
5
  import { GeneralUtility } from "./GeneralUtility";
6
6
  /**
@@ -82,6 +82,36 @@ export declare class TxGeneratorAutomations {
82
82
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
83
83
  */
84
84
  meteoraRebalanceIxs2(connection: web3.Connection, payer: string, params: MeteoraRebalance2): Promise<ResponseWithStatus<TransactionMetadata>>;
85
+ /**
86
+ * Creates meteora rebalance instruction with support for larger positions.
87
+ *
88
+ * This is a backwards-compatible implementation of the rebalance operation that handles
89
+ * positions of any size. The instruction generator automatically splits operations into
90
+ * 2-dimensional instruction arrays (where each dimension represents a transaction) when
91
+ * dealing with large bin arrays that would exceed single transaction limits.
92
+ *
93
+ * This rebalance method:
94
+ * Chunks the rebalance into multiple transactions:
95
+ * - TX 1: Remove liquidity + claim fees + claim rewards + close position
96
+ * - TX 2: Initialize new position + extend position (if > 70 bins)
97
+ * - TX 3: Initialize bin array + add liquidity (if > 70 bins)
98
+ *
99
+ * For positions <= 70 bins, TX 2 and TX 3 are combined into a single transaction.
100
+ *
101
+ * Key benefits:
102
+ * - Supports positions up to 149 bins (hard limit)
103
+ * - Does NOT depend on Meteora SDK
104
+ * - Uses increasePositionLengthAutomation for larger new positions
105
+ * - Properly chunks operations into separate transactions
106
+ *
107
+ * NOTE: For hawksight devs only.
108
+ *
109
+ * @param connection The Solana web3 connection object for blockchain interactions.
110
+ * @param payer The public key of the payer for transaction fees.
111
+ * @param params Parameters required
112
+ * @returns A ResponseWithStatus containing an array of TransactionMetadata (2-3 transactions).
113
+ */
114
+ meteoraRebalanceLargerPositionAutomation(connection: web3.Connection, payer: string, params: MeteoraRebalanceForLargerPosition): Promise<ResponseWithStatus<TransactionMetadata[]>>;
85
115
  /**
86
116
  * Creates meteora close limit instruction (combination of claim fees/rewards + remove liquidity + close position)
87
117
  *
@@ -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,EAAmC,2BAA2B,EAAE,4BAA4B,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,mBAAmB,EAAoD,MAAM,UAAU,CAAC;AACnV,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD;;;;;;GAMG;AACH,qBAAa,sBAAsB;IAkB/B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAjBjC;;OAEG;IACH,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC;IAE/C;;OAEG;IACH,SAAS,CAAC,cAAc,EAAE,MAAM,CAAC;IAEjC;;;;OAIG;gBAEgB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc;IAMjD;;;;;;;;;OASG;IACG,kBAAkB,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAiC/I;;;;;;;;;OASG;IACG,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAiCjJ;;;;;;;;;OASG;IACG,eAAe,CAAC,UA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EAAE,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAiCzI;;;;;;;;;OASG;IACG,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAyC5I;;;;;;;;;OASG;IACG,sBAAsB,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;CAwC7J"}
@@ -293,6 +293,79 @@ class TxGeneratorAutomations {
293
293
  }
294
294
  });
295
295
  }
296
+ /**
297
+ * Creates meteora rebalance instruction with support for larger positions.
298
+ *
299
+ * This is a backwards-compatible implementation of the rebalance operation that handles
300
+ * positions of any size. The instruction generator automatically splits operations into
301
+ * 2-dimensional instruction arrays (where each dimension represents a transaction) when
302
+ * dealing with large bin arrays that would exceed single transaction limits.
303
+ *
304
+ * This rebalance method:
305
+ * Chunks the rebalance into multiple transactions:
306
+ * - TX 1: Remove liquidity + claim fees + claim rewards + close position
307
+ * - TX 2: Initialize new position + extend position (if > 70 bins)
308
+ * - TX 3: Initialize bin array + add liquidity (if > 70 bins)
309
+ *
310
+ * For positions <= 70 bins, TX 2 and TX 3 are combined into a single transaction.
311
+ *
312
+ * Key benefits:
313
+ * - Supports positions up to 149 bins (hard limit)
314
+ * - Does NOT depend on Meteora SDK
315
+ * - Uses increasePositionLengthAutomation for larger new positions
316
+ * - Properly chunks operations into separate transactions
317
+ *
318
+ * NOTE: For hawksight devs only.
319
+ *
320
+ * @param connection The Solana web3 connection object for blockchain interactions.
321
+ * @param payer The public key of the payer for transaction fees.
322
+ * @param params Parameters required
323
+ * @returns A ResponseWithStatus containing an array of TransactionMetadata (2-3 transactions).
324
+ */
325
+ meteoraRebalanceLargerPositionAutomation(connection, payer, params) {
326
+ return __awaiter(this, void 0, void 0, function* () {
327
+ var _a;
328
+ // Initialize anchor
329
+ anchor_1.Anchor.initialize(connection);
330
+ try {
331
+ const results = yield Transactions_1.txgen.rebalanceLargerPositionAutomation({
332
+ connection,
333
+ params,
334
+ fetch: undefined,
335
+ });
336
+ const txMetadatas = [];
337
+ for (const result of results) {
338
+ const txMeta = yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result);
339
+ txMetadatas.push(txMeta);
340
+ }
341
+ return {
342
+ status: 200,
343
+ data: txMetadatas,
344
+ };
345
+ }
346
+ catch (e) {
347
+ if (e instanceof Error) {
348
+ return {
349
+ status: 400,
350
+ data: {
351
+ code: "custom",
352
+ message: e.message,
353
+ stack: (_a = e.stack) === null || _a === void 0 ? void 0 : _a.split('\n'),
354
+ path: [],
355
+ },
356
+ };
357
+ }
358
+ return {
359
+ status: 400,
360
+ data: {
361
+ code: "custom",
362
+ message: e,
363
+ path: [],
364
+ },
365
+ };
366
+ }
367
+ });
368
+ }
296
369
  /**
297
370
  * Creates meteora close limit instruction (combination of claim fees/rewards + remove liquidity + close position)
298
371
  *
@@ -405,22 +405,16 @@ export declare function generateHawksightFeeAccounts(tokenXMint: web3.PublicKey,
405
405
  ownerFeeX: web3.PublicKey;
406
406
  ownerFeeY: web3.PublicKey;
407
407
  };
408
+ export declare function fetchRemainingAccountsInfo(connection: web3.Connection, tokenXMint: web3.PublicKey, tokenYMint: web3.PublicKey, tokenXProgram: web3.PublicKey, tokenYProgram: web3.PublicKey): Promise<RemainingAccountsInfo>;
408
409
  /**
409
- * Fetch RemainingAccountsInfo for Token2022 tokens with transfer hooks.
410
- *
411
- * This function checks if the provided token mints have transfer hook extensions
412
- * and fetches the required extra account metas if they do.
413
- *
414
- * For standard SPL tokens or Token2022 tokens without transfer hooks, returns
415
- * empty slices and accounts (which is the default/no-op case).
410
+ * Fetches remainingAccountsInfo for a reward mint's transfer hook (Token2022).
411
+ * Used for claim_reward2 instructions where we only need transfer hooks for the reward token.
416
412
  *
417
413
  * @param connection - Solana connection
418
- * @param tokenXMint - Token X mint address
419
- * @param tokenYMint - Token Y mint address
420
- * @param tokenXProgram - Token X program (TOKEN_PROGRAM_ID or TOKEN_2022_PROGRAM_ID)
421
- * @param tokenYProgram - Token Y program (TOKEN_PROGRAM_ID or TOKEN_2022_PROGRAM_ID)
422
- * @returns RemainingAccountsInfo with slices and accounts for transfer hooks
414
+ * @param rewardMint - The reward token mint
415
+ * @param rewardTokenProgram - The token program for the reward mint
416
+ * @returns RemainingAccountsInfo with transfer hook accounts for the reward token
423
417
  */
424
- export declare function fetchRemainingAccountsInfo(connection: web3.Connection, tokenXMint: web3.PublicKey, tokenYMint: web3.PublicKey, tokenXProgram: web3.PublicKey, tokenYProgram: web3.PublicKey): Promise<RemainingAccountsInfo>;
418
+ export declare function fetchRemainingAccountsInfoForReward(connection: web3.Connection, rewardMint: web3.PublicKey, rewardTokenProgram: web3.PublicKey): Promise<RemainingAccountsInfo>;
425
419
  export {};
426
420
  //# sourceMappingURL=functions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/functions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,gBAAgB,EAChB,yBAAyB,EACzB,6BAA6B,EAC7B,WAAW,EACX,mBAAmB,EACnB,SAAS,EAET,YAAY,EACZ,qBAAqB,EAGtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAe1D,OAAO,EAAE,MAAM,OAAO,CAAC;AAMvB,OAAO,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvE,eAAO,MAAM,eAAe,gCAAgC,CAAC;AAE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