@hawksightco/hawk-sdk 1.3.194 → 1.3.196

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 (36) 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 +54 -14
  11. package/dist/src/classes/Transactions.d.ts.map +1 -1
  12. package/dist/src/classes/Transactions.js +255 -214
  13. package/dist/src/classes/TxGenerator.d.ts +30 -1
  14. package/dist/src/classes/TxGenerator.d.ts.map +1 -1
  15. package/dist/src/classes/TxGenerator.js +102 -0
  16. package/dist/src/classes/TxGeneratorAutomations.d.ts +29 -15
  17. package/dist/src/classes/TxGeneratorAutomations.d.ts.map +1 -1
  18. package/dist/src/classes/TxGeneratorAutomations.js +84 -52
  19. package/dist/src/idl/iyf-extension-idl.d.ts +0 -12
  20. package/dist/src/idl/iyf-extension-idl.d.ts.map +1 -1
  21. package/dist/src/idl/iyf-extension-idl.js +0 -12
  22. package/dist/src/ixGenerator/HatchIxGenerator.d.ts +126 -0
  23. package/dist/src/ixGenerator/HatchIxGenerator.d.ts.map +1 -0
  24. package/dist/src/ixGenerator/HatchIxGenerator.js +339 -0
  25. package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.d.ts +4 -6
  26. package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.d.ts.map +1 -1
  27. package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.js +3 -3
  28. package/dist/src/pdaGenerator/HatchPdaGenerator.d.ts +52 -0
  29. package/dist/src/pdaGenerator/HatchPdaGenerator.d.ts.map +1 -0
  30. package/dist/src/pdaGenerator/HatchPdaGenerator.js +101 -0
  31. package/dist/src/pdaGenerator/MeteoraPdaGenerator.d.ts +13 -0
  32. package/dist/src/pdaGenerator/MeteoraPdaGenerator.d.ts.map +1 -1
  33. package/dist/src/pdaGenerator/MeteoraPdaGenerator.js +26 -0
  34. package/dist/src/types.d.ts +121 -21
  35. package/dist/src/types.d.ts.map +1 -1
  36. package/package.json +1 -1
@@ -1831,5 +1831,107 @@ class TxGenerator {
1831
1831
  }
1832
1832
  });
1833
1833
  }
1834
+ // ============================================================================
1835
+ // HATCH PROGRAM TRANSACTIONS
1836
+ // ============================================================================
1837
+ /**
1838
+ * Creates a Meteora DLMM pool with a locked position via the Hatch program.
1839
+ *
1840
+ * The position will have:
1841
+ * - Owner: HawkfiPda (global)
1842
+ * - Operator: HawkfiPda (global)
1843
+ * - Fee Owner: LauncherPda (per-launcher)
1844
+ *
1845
+ * @param connection The Solana web3 connection object
1846
+ * @param payer The public key of the payer for transaction fees
1847
+ * @param params Parameters for creating the pool and locked position
1848
+ * @returns A ResponseWithStatus containing TransactionMetadata
1849
+ */
1850
+ hatchCreatePoolAndLockedPosition(connection, payer, params) {
1851
+ return __awaiter(this, void 0, void 0, function* () {
1852
+ anchor_1.Anchor.initialize(connection);
1853
+ try {
1854
+ const result = yield Transactions_1.txgen.hatchCreatePoolAndLockedPosition({
1855
+ connection,
1856
+ params,
1857
+ fetch: undefined,
1858
+ });
1859
+ return {
1860
+ status: 200,
1861
+ data: yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result),
1862
+ };
1863
+ }
1864
+ catch (e) {
1865
+ if (e instanceof Error) {
1866
+ return {
1867
+ status: 400,
1868
+ data: {
1869
+ code: "custom",
1870
+ message: e.message,
1871
+ path: [],
1872
+ },
1873
+ };
1874
+ }
1875
+ return {
1876
+ status: 400,
1877
+ data: {
1878
+ code: "custom",
1879
+ message: e,
1880
+ path: [],
1881
+ },
1882
+ };
1883
+ }
1884
+ });
1885
+ }
1886
+ /**
1887
+ * Create a token mint and launch token account via Hatch.
1888
+ *
1889
+ * This instruction creates the token mint and the LaunchTokenAccount PDA
1890
+ * that will hold tokens for position creation. Must be called before
1891
+ * hatchCreatePoolAndLockedPosition.
1892
+ *
1893
+ * Automatically initializes LauncherPda if it doesn't exist yet.
1894
+ *
1895
+ * @param connection The Solana web3 connection object
1896
+ * @param payer The public key of the payer for transaction fees
1897
+ * @param params Parameters for creating token and launch account
1898
+ * @returns A ResponseWithStatus containing TransactionMetadata
1899
+ */
1900
+ hatchCreateTokenAndLaunchAccount(connection, payer, params) {
1901
+ return __awaiter(this, void 0, void 0, function* () {
1902
+ anchor_1.Anchor.initialize(connection);
1903
+ try {
1904
+ const result = yield Transactions_1.txgen.hatchCreateTokenAndLaunchAccount({
1905
+ connection,
1906
+ params,
1907
+ fetch: undefined,
1908
+ });
1909
+ return {
1910
+ status: 200,
1911
+ data: yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result),
1912
+ };
1913
+ }
1914
+ catch (e) {
1915
+ if (e instanceof Error) {
1916
+ return {
1917
+ status: 400,
1918
+ data: {
1919
+ code: "custom",
1920
+ message: e.message,
1921
+ path: [],
1922
+ },
1923
+ };
1924
+ }
1925
+ return {
1926
+ status: 400,
1927
+ data: {
1928
+ code: "custom",
1929
+ message: e,
1930
+ path: [],
1931
+ },
1932
+ };
1933
+ }
1934
+ });
1935
+ }
1834
1936
  }
1835
1937
  exports.TxGenerator = TxGenerator;
@@ -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, OpenAutomationIx, RelativeOpenAutomationIx, ResponseWithStatus, TransactionMetadata, MeteoraRebalanceForLargerPosition, HatchClaimFee, HatchClaimReward } from "../types";
4
4
  import { Client } from "./Client";
5
5
  import { GeneralUtility } from "./GeneralUtility";
6
6
  /**
@@ -112,20 +112,6 @@ export declare class TxGeneratorAutomations {
112
112
  * @returns A ResponseWithStatus containing an array of TransactionMetadata (2-3 transactions).
113
113
  */
114
114
  meteoraRebalanceLargerPositionAutomation(connection: web3.Connection, payer: string, params: MeteoraRebalanceForLargerPosition): Promise<ResponseWithStatus<TransactionMetadata[]>>;
115
- /**
116
- * Creates meteora hybrid rebalance instructions with per-side distribution control.
117
- *
118
- * Supports simple mode (single distribution, same as Ixs2) and hybrid mode
119
- * (multiple layers with different distributions per side).
120
- *
121
- * NOTE: For hawksight devs only.
122
- *
123
- * @param connection The Solana web3 connection object for blockchain interactions.
124
- * @param payer The public key of the payer for transaction fees.
125
- * @param params Parameters required (MeteoraRebalance3)
126
- * @returns A ResponseWithStatus containing an array of TransactionMetadata (1-2 transactions).
127
- */
128
- meteoraRebalanceIxs3(connection: web3.Connection, payer: string, params: MeteoraRebalance3): Promise<ResponseWithStatus<LabeledInstructions>>;
129
115
  /**
130
116
  * Creates meteora close limit instruction (combination of claim fees/rewards + remove liquidity + close position)
131
117
  *
@@ -181,5 +167,33 @@ export declare class TxGeneratorAutomations {
181
167
  * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
182
168
  */
183
169
  meteoraRelativeOpenIxs(connection: web3.Connection, payer: string, params: RelativeOpenAutomationIx): Promise<ResponseWithStatus<TransactionMetadata>>;
170
+ /**
171
+ * Claims trading fees from a Hatch locked position.
172
+ *
173
+ * Only the rebalance authority can call this.
174
+ * Fees go to LauncherPda-owned token accounts, with 8% to treasury.
175
+ *
176
+ * NOTE: For hawksight devs only.
177
+ *
178
+ * @param connection The Solana web3 connection object for blockchain interactions.
179
+ * @param payer The public key of the payer for transaction fees.
180
+ * @param params Parameters required for claiming fees
181
+ * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
182
+ */
183
+ hatchClaimFeeIxs(connection: web3.Connection, payer: string, params: HatchClaimFee): Promise<ResponseWithStatus<TransactionMetadata>>;
184
+ /**
185
+ * Claims farming rewards from a Hatch locked position.
186
+ *
187
+ * Only the rebalance authority can call this.
188
+ * Rewards go to LauncherPda-owned token account, with 8% to treasury.
189
+ *
190
+ * NOTE: For hawksight devs only.
191
+ *
192
+ * @param connection The Solana web3 connection object for blockchain interactions.
193
+ * @param payer The public key of the payer for transaction fees.
194
+ * @param params Parameters required for claiming rewards
195
+ * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
196
+ */
197
+ hatchClaimRewardIxs(connection: web3.Connection, payer: string, params: HatchClaimReward): Promise<ResponseWithStatus<TransactionMetadata>>;
184
198
  }
185
199
  //# sourceMappingURL=TxGeneratorAutomations.d.ts.map
@@ -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;AAC3U,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,kB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AU,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;IAyC5J;;;;;;;;;;;;OAYG;IACG,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAgC3I;;;;;;;;;;;;OAYG;IACG,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;CA+BlJ"}
@@ -366,58 +366,6 @@ class TxGeneratorAutomations {
366
366
  }
367
367
  });
368
368
  }
369
- /**
370
- * Creates meteora hybrid rebalance instructions with per-side distribution control.
371
- *
372
- * Supports simple mode (single distribution, same as Ixs2) and hybrid mode
373
- * (multiple layers with different distributions per side).
374
- *
375
- * NOTE: For hawksight devs only.
376
- *
377
- * @param connection The Solana web3 connection object for blockchain interactions.
378
- * @param payer The public key of the payer for transaction fees.
379
- * @param params Parameters required (MeteoraRebalance3)
380
- * @returns A ResponseWithStatus containing an array of TransactionMetadata (1-2 transactions).
381
- */
382
- meteoraRebalanceIxs3(connection, payer, params) {
383
- return __awaiter(this, void 0, void 0, function* () {
384
- var _a;
385
- // Initialize anchor
386
- anchor_1.Anchor.initialize(connection);
387
- try {
388
- const result = yield Transactions_1.txgen.rebalanceAutomationIx3({
389
- connection,
390
- params,
391
- fetch: undefined,
392
- });
393
- return {
394
- status: 200,
395
- data: result,
396
- };
397
- }
398
- catch (e) {
399
- if (e instanceof Error) {
400
- return {
401
- status: 400,
402
- data: {
403
- code: "custom",
404
- message: e.message,
405
- stack: (_a = e.stack) === null || _a === void 0 ? void 0 : _a.split('\n'),
406
- path: [],
407
- },
408
- };
409
- }
410
- return {
411
- status: 400,
412
- data: {
413
- code: "custom",
414
- message: e,
415
- path: [],
416
- },
417
- };
418
- }
419
- });
420
- }
421
369
  /**
422
370
  * Creates meteora close limit instruction (combination of claim fees/rewards + remove liquidity + close position)
423
371
  *
@@ -654,5 +602,89 @@ class TxGeneratorAutomations {
654
602
  }
655
603
  });
656
604
  }
605
+ /**
606
+ * Claims trading fees from a Hatch locked position.
607
+ *
608
+ * Only the rebalance authority can call this.
609
+ * Fees go to LauncherPda-owned token accounts, with 8% to treasury.
610
+ *
611
+ * NOTE: For hawksight devs only.
612
+ *
613
+ * @param connection The Solana web3 connection object for blockchain interactions.
614
+ * @param payer The public key of the payer for transaction fees.
615
+ * @param params Parameters required for claiming fees
616
+ * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
617
+ */
618
+ hatchClaimFeeIxs(connection, payer, params) {
619
+ return __awaiter(this, void 0, void 0, function* () {
620
+ // Initialize anchor
621
+ anchor_1.Anchor.initialize(connection);
622
+ try {
623
+ const result = yield Transactions_1.txgen.hatchClaimFee({
624
+ connection,
625
+ params,
626
+ fetch: undefined,
627
+ });
628
+ return {
629
+ status: 200,
630
+ data: yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result),
631
+ };
632
+ }
633
+ catch (e) {
634
+ const errorMessage = e instanceof Error ? e.message : String(e);
635
+ console.error('hatchClaimFeeIxs error:', errorMessage, e);
636
+ return {
637
+ status: 400,
638
+ data: {
639
+ code: 'custom',
640
+ message: errorMessage,
641
+ path: [],
642
+ },
643
+ };
644
+ }
645
+ });
646
+ }
647
+ /**
648
+ * Claims farming rewards from a Hatch locked position.
649
+ *
650
+ * Only the rebalance authority can call this.
651
+ * Rewards go to LauncherPda-owned token account, with 8% to treasury.
652
+ *
653
+ * NOTE: For hawksight devs only.
654
+ *
655
+ * @param connection The Solana web3 connection object for blockchain interactions.
656
+ * @param payer The public key of the payer for transaction fees.
657
+ * @param params Parameters required for claiming rewards
658
+ * @returns A ResponseWithStatus containing either TransactionMetadataResponse or TransactionMetadata.
659
+ */
660
+ hatchClaimRewardIxs(connection, payer, params) {
661
+ return __awaiter(this, void 0, void 0, function* () {
662
+ // Initialize anchor
663
+ anchor_1.Anchor.initialize(connection);
664
+ try {
665
+ const result = yield Transactions_1.txgen.hatchClaimReward({
666
+ connection,
667
+ params,
668
+ fetch: undefined,
669
+ });
670
+ return {
671
+ status: 200,
672
+ data: yield (0, functions_1.createTxMetadata)(this.generalUtility, connection, payer, result),
673
+ };
674
+ }
675
+ catch (e) {
676
+ const errorMessage = e instanceof Error ? e.message : String(e);
677
+ console.error('hatchClaimRewardIxs error:', errorMessage, e);
678
+ return {
679
+ status: 400,
680
+ data: {
681
+ code: 'custom',
682
+ message: errorMessage,
683
+ path: [],
684
+ },
685
+ };
686
+ }
687
+ });
688
+ }
657
689
  }
658
690
  exports.TxGeneratorAutomations = TxGeneratorAutomations;
@@ -5315,18 +5315,6 @@ export type IyfExtension = {
5315
5315
  "name": "strategyType";
5316
5316
  "type": "u8";
5317
5317
  },
5318
- {
5319
- "name": "userTokenXAmount";
5320
- "type": {
5321
- "option": "u64";
5322
- };
5323
- },
5324
- {
5325
- "name": "userTokenYAmount";
5326
- "type": {
5327
- "option": "u64";
5328
- };
5329
- },
5330
5318
  {
5331
5319
  "name": "checkRange";
5332
5320
  "type": {