@hawksightco/hawk-sdk 1.3.180 → 1.3.182

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 (38) hide show
  1. package/dist/src/addresses.d.ts +2 -0
  2. package/dist/src/addresses.d.ts.map +1 -1
  3. package/dist/src/addresses.js +4 -1
  4. package/dist/src/classes/SimpleIxGenerator.d.ts +7 -0
  5. package/dist/src/classes/SimpleIxGenerator.d.ts.map +1 -1
  6. package/dist/src/classes/SimpleIxGenerator.js +7 -0
  7. package/dist/src/classes/SimplePdaGenerator.d.ts +7 -2
  8. package/dist/src/classes/SimplePdaGenerator.d.ts.map +1 -1
  9. package/dist/src/classes/SimplePdaGenerator.js +7 -2
  10. package/dist/src/classes/Transactions.d.ts +89 -1
  11. package/dist/src/classes/Transactions.d.ts.map +1 -1
  12. package/dist/src/classes/Transactions.js +525 -0
  13. package/dist/src/classes/TxGenerator.d.ts +24 -1
  14. package/dist/src/classes/TxGenerator.d.ts.map +1 -1
  15. package/dist/src/classes/TxGenerator.js +96 -0
  16. package/dist/src/classes/TxGeneratorAutomations.d.ts +59 -1
  17. package/dist/src/classes/TxGeneratorAutomations.d.ts.map +1 -1
  18. package/dist/src/classes/TxGeneratorAutomations.js +157 -0
  19. package/dist/src/functions.d.ts +7 -13
  20. package/dist/src/functions.d.ts.map +1 -1
  21. package/dist/src/functions.js +144 -92
  22. package/dist/src/ixGenerator/HatchIxGenerator.d.ts +92 -0
  23. package/dist/src/ixGenerator/HatchIxGenerator.d.ts.map +1 -0
  24. package/dist/src/ixGenerator/HatchIxGenerator.js +304 -0
  25. package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.d.ts +192 -3
  26. package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.d.ts.map +1 -1
  27. package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.js +643 -33
  28. package/dist/src/pdaGenerator/HatchPdaGenerator.d.ts +41 -0
  29. package/dist/src/pdaGenerator/HatchPdaGenerator.d.ts.map +1 -0
  30. package/dist/src/pdaGenerator/HatchPdaGenerator.js +90 -0
  31. package/dist/src/types.d.ts +127 -0
  32. package/dist/src/types.d.ts.map +1 -1
  33. package/package.json +7 -6
  34. package/CHANGELOG.md +0 -135
  35. package/test/artifacts/temp/.gitignore +0 -2
  36. package/test/artifacts/temp/accounts/.gitignore +0 -2
  37. package/test/logs/.gitignore +0 -2
  38. package/test/visualization/output/.gitignore +0 -2
@@ -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);
@@ -3633,6 +3932,232 @@ class Transactions {
3633
3932
  });
3634
3933
  });
3635
3934
  }
3935
+ // ============================================================================
3936
+ // HATCH PROGRAM TRANSACTIONS
3937
+ // ============================================================================
3938
+ /**
3939
+ * Creates a Meteora DLMM pool with a locked position via the Hatch program.
3940
+ *
3941
+ * The position will have:
3942
+ * - Owner: HawkfiPda (global)
3943
+ * - Operator: HawkfiPda (global)
3944
+ * - Fee Owner: LauncherPda (per-launcher, derived from authority)
3945
+ *
3946
+ * Similar to meteoraCreatePoolAndPosition but uses Hatch program for locked positions.
3947
+ *
3948
+ * @param connection The Solana web3 connection object
3949
+ * @param params Parameters for creating the pool and locked position
3950
+ * @returns TransactionMetadataResponse
3951
+ */
3952
+ hatchCreatePoolAndLockedPosition(_a) {
3953
+ return __awaiter(this, arguments, void 0, function* ({ connection, params, }) {
3954
+ var _b, _c;
3955
+ // Get token programs - use provided or fetch from chain
3956
+ const validOwners = [
3957
+ addresses_1.TOKEN_PROGRAM_ID.toString(),
3958
+ addresses_1.TOKEN_2022_PROGRAM_ID.toString(),
3959
+ ];
3960
+ let tokenProgramX;
3961
+ let tokenProgramY;
3962
+ if (params.tokenProgramX && params.tokenProgramY) {
3963
+ tokenProgramX = params.tokenProgramX;
3964
+ tokenProgramY = params.tokenProgramY;
3965
+ }
3966
+ else if (!params.tokenProgramX && !params.tokenProgramY) {
3967
+ const tokenProgramMap = yield (0, functions_1.getTokenProgramMapForMints)(connection, [
3968
+ params.tokenMintX,
3969
+ params.tokenMintY,
3970
+ ]);
3971
+ tokenProgramX = tokenProgramMap[params.tokenMintX.toString()];
3972
+ tokenProgramY = tokenProgramMap[params.tokenMintY.toString()];
3973
+ }
3974
+ else {
3975
+ const missingMints = [];
3976
+ if (!params.tokenProgramX)
3977
+ missingMints.push(params.tokenMintX);
3978
+ if (!params.tokenProgramY)
3979
+ missingMints.push(params.tokenMintY);
3980
+ const tokenProgramMap = yield (0, functions_1.getTokenProgramMapForMints)(connection, missingMints);
3981
+ tokenProgramX =
3982
+ (_b = params.tokenProgramX) !== null && _b !== void 0 ? _b : tokenProgramMap[params.tokenMintX.toString()];
3983
+ tokenProgramY =
3984
+ (_c = params.tokenProgramY) !== null && _c !== void 0 ? _c : tokenProgramMap[params.tokenMintY.toString()];
3985
+ }
3986
+ // Validate token programs
3987
+ if (!validOwners.includes(tokenProgramX.toString())) {
3988
+ throw new errors_1.AppError(`tokenMintX: ${params.tokenMintX.toString()} is not a valid token mint. Program owner: ${tokenProgramX.toString()}`, 'hatchCreatePoolAndLockedPosition');
3989
+ }
3990
+ if (!validOwners.includes(tokenProgramY.toString())) {
3991
+ throw new errors_1.AppError(`tokenMintY: ${params.tokenMintY.toString()} is not a valid token mint. Program owner: ${tokenProgramY.toString()}`, 'hatchCreatePoolAndLockedPosition');
3992
+ }
3993
+ // Create ATA init instructions if needed
3994
+ const initAtaIxs = (0, functions_1.createAtaIdempotentIxs)({
3995
+ accounts: [
3996
+ {
3997
+ owner: params.authority,
3998
+ payer: params.authority,
3999
+ mint: params.tokenMintX,
4000
+ programId: tokenProgramX,
4001
+ },
4002
+ {
4003
+ owner: params.authority,
4004
+ payer: params.authority,
4005
+ mint: params.tokenMintY,
4006
+ programId: tokenProgramY,
4007
+ },
4008
+ ],
4009
+ });
4010
+ // Build main instructions
4011
+ const mainInstructions = yield Promise.all([
4012
+ // Wrap SOL if needed
4013
+ ...(0, functions_1.wrapSolIfMintIsWsol)(params.authority, params.authority, [
4014
+ { mint: params.tokenMintX, amount: params.amountX },
4015
+ { mint: params.tokenMintY, amount: params.amountY },
4016
+ ]),
4017
+ // Create pool and locked position via Hatch
4018
+ this.ix.hatch.createPoolAndLockedPosition({
4019
+ connection,
4020
+ authority: params.authority,
4021
+ position: params.position,
4022
+ base: params.base,
4023
+ presetParameter: params.presetParameter,
4024
+ tokenMintX: params.tokenMintX,
4025
+ tokenMintY: params.tokenMintY,
4026
+ tokenProgramX,
4027
+ tokenProgramY,
4028
+ activeId: params.activeId,
4029
+ lowerBinId: params.lowerBinId,
4030
+ upperBinId: params.upperBinId,
4031
+ strategyType: params.strategyType,
4032
+ lockReleasePoint: params.lockReleasePoint,
4033
+ amountX: params.amountX,
4034
+ amountY: params.amountY,
4035
+ }),
4036
+ ]);
4037
+ return (0, functions_1.createTransactionMeta)({
4038
+ payer: params.authority,
4039
+ description: 'Create pool and locked position via Hatch',
4040
+ addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
4041
+ mainInstructions: [...initAtaIxs, ...mainInstructions],
4042
+ });
4043
+ });
4044
+ }
4045
+ /**
4046
+ * Claim trading fees from a Hatch position.
4047
+ *
4048
+ * Only the rebalance authority can call this (automation).
4049
+ * Fees go to LauncherPda-owned token accounts, with 8% to treasury.
4050
+ *
4051
+ * @param connection The Solana web3 connection object
4052
+ * @param params Parameters for claiming fees
4053
+ * @returns TransactionMetadataResponse
4054
+ */
4055
+ hatchClaimFee(_a) {
4056
+ return __awaiter(this, arguments, void 0, function* ({ connection, params, }) {
4057
+ const launcherPda = this.ix.pda.hatch.deriveLauncherPda(params.launcherAuthority);
4058
+ // Create ATA init instructions for LauncherPda-owned accounts
4059
+ const initAtaIxs = (0, functions_1.createAtaIdempotentIxs)({
4060
+ accounts: [
4061
+ {
4062
+ owner: launcherPda,
4063
+ payer: params.rebalanceAuthority,
4064
+ mint: params.tokenMintX,
4065
+ programId: params.tokenProgramX,
4066
+ },
4067
+ {
4068
+ owner: launcherPda,
4069
+ payer: params.rebalanceAuthority,
4070
+ mint: params.tokenMintY,
4071
+ programId: params.tokenProgramY,
4072
+ },
4073
+ ],
4074
+ });
4075
+ const claimFeeIx = yield this.ix.hatch.claimFee({
4076
+ connection,
4077
+ rebalanceAuthority: params.rebalanceAuthority,
4078
+ launcherAuthority: params.launcherAuthority,
4079
+ position: params.position,
4080
+ lbPair: params.lbPair,
4081
+ minBinId: params.minBinId,
4082
+ maxBinId: params.maxBinId,
4083
+ tokenMintX: params.tokenMintX,
4084
+ tokenMintY: params.tokenMintY,
4085
+ tokenProgramX: params.tokenProgramX,
4086
+ tokenProgramY: params.tokenProgramY,
4087
+ });
4088
+ return (0, functions_1.createTransactionMeta)({
4089
+ payer: params.rebalanceAuthority,
4090
+ description: 'Claim fees from Hatch position',
4091
+ addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
4092
+ mainInstructions: [...initAtaIxs, claimFeeIx],
4093
+ });
4094
+ });
4095
+ }
4096
+ /**
4097
+ * Claim farming rewards from a Hatch position.
4098
+ *
4099
+ * Only the rebalance authority can call this (automation).
4100
+ * Rewards go to LauncherPda-owned token account, with 8% to treasury.
4101
+ *
4102
+ * @param connection The Solana web3 connection object
4103
+ * @param params Parameters for claiming rewards
4104
+ * @returns TransactionMetadataResponse
4105
+ */
4106
+ hatchClaimReward(_a) {
4107
+ return __awaiter(this, arguments, void 0, function* ({ connection, params, }) {
4108
+ const launcherPda = this.ix.pda.hatch.deriveLauncherPda(params.launcherAuthority);
4109
+ // Create ATA init instruction for LauncherPda-owned account
4110
+ const initAtaIxs = (0, functions_1.createAtaIdempotentIxs)({
4111
+ accounts: [
4112
+ {
4113
+ owner: launcherPda,
4114
+ payer: params.rebalanceAuthority,
4115
+ mint: params.rewardMint,
4116
+ programId: params.tokenProgram,
4117
+ },
4118
+ ],
4119
+ });
4120
+ const claimRewardIx = yield this.ix.hatch.claimReward({
4121
+ connection,
4122
+ rebalanceAuthority: params.rebalanceAuthority,
4123
+ launcherAuthority: params.launcherAuthority,
4124
+ position: params.position,
4125
+ lbPair: params.lbPair,
4126
+ rewardIndex: params.rewardIndex,
4127
+ minBinId: params.minBinId,
4128
+ maxBinId: params.maxBinId,
4129
+ rewardMint: params.rewardMint,
4130
+ rewardVault: params.rewardVault,
4131
+ tokenProgram: params.tokenProgram,
4132
+ });
4133
+ return (0, functions_1.createTransactionMeta)({
4134
+ payer: params.rebalanceAuthority,
4135
+ description: 'Claim rewards from Hatch position',
4136
+ addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
4137
+ mainInstructions: [...initAtaIxs, claimRewardIx],
4138
+ });
4139
+ });
4140
+ }
4141
+ /**
4142
+ * Initialize the global HawkfiPda (one-time operation).
4143
+ *
4144
+ * @param connection The Solana web3 connection object
4145
+ * @param params Parameters for initialization
4146
+ * @returns TransactionMetadataResponse
4147
+ */
4148
+ hatchInitializeHawkfiPda(_a) {
4149
+ return __awaiter(this, arguments, void 0, function* ({ params, }) {
4150
+ const initIx = this.ix.hatch.initializeHawkfiPda({
4151
+ payer: params.payer,
4152
+ });
4153
+ return (0, functions_1.createTransactionMeta)({
4154
+ payer: params.payer,
4155
+ description: 'Initialize Hatch HawkfiPda',
4156
+ addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
4157
+ mainInstructions: [initIx],
4158
+ });
4159
+ });
4160
+ }
3636
4161
  }
3637
4162
  exports.Transactions = Transactions;
3638
4163
  exports.txgen = Transactions.getInstance();
@@ -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, MeteoraInitializeLargePosition, MeteoraDepositToLargePosition, MeteoraDepositLargerPosition, MeteoraTxWithdrawLargerPosition } from "../types";
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, MeteoraInitializeLargePosition, MeteoraDepositToLargePosition, MeteoraDepositLargerPosition, MeteoraTxWithdrawLargerPosition, HatchCreatePoolAndLockedPosition, HatchInitializeHawkfiPda } from "../types";
4
4
  import { Client } from "./Client";
5
5
  import { GeneralUtility } from "./GeneralUtility";
6
6
  import BN from "bn.js";
@@ -345,6 +345,29 @@ export declare class TxGenerator {
345
345
  raydiumWithdrawAndClosePosition(connection: web3.Connection, payer: string, params: RaydiumWithdrawAndClosePosition): Promise<ResponseWithStatus<TransactionMetadata>>;
346
346
  raydiumIncreaseLiquidity(connection: web3.Connection, payer: string, params: RaydiumIncreaseLiquidity): Promise<ResponseWithStatus<TransactionMetadata>>;
347
347
  raydiumDecreaseLiquidity(connection: web3.Connection, payer: string, params: RaydiumDecreaseLiquidity): Promise<ResponseWithStatus<TransactionMetadata>>;
348
+ /**
349
+ * Creates a Meteora DLMM pool with a locked position via the Hatch program.
350
+ *
351
+ * The position will have:
352
+ * - Owner: HawkfiPda (global)
353
+ * - Operator: HawkfiPda (global)
354
+ * - Fee Owner: LauncherPda (per-launcher)
355
+ *
356
+ * @param connection The Solana web3 connection object
357
+ * @param payer The public key of the payer for transaction fees
358
+ * @param params Parameters for creating the pool and locked position
359
+ * @returns A ResponseWithStatus containing TransactionMetadata
360
+ */
361
+ hatchCreatePoolAndLockedPosition(connection: web3.Connection, payer: string, params: HatchCreatePoolAndLockedPosition): Promise<ResponseWithStatus<TransactionMetadata>>;
362
+ /**
363
+ * Initialize the global HawkfiPda (one-time operation).
364
+ *
365
+ * @param connection The Solana web3 connection object
366
+ * @param payer The public key of the payer for transaction fees
367
+ * @param params Parameters for initialization
368
+ * @returns A ResponseWithStatus containing TransactionMetadata
369
+ */
370
+ hatchInitializeHawkfiPda(connection: web3.Connection, payer: string, params: HatchInitializeHawkfiPda): Promise<ResponseWithStatus<TransactionMetadata>>;
348
371
  }
349
372
  export {};
350
373
  //# sourceMappingURL=TxGenerator.d.ts.map
@@ -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,6BAA6B,EAC7B,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,OAAO,CAAC;AAEvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,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