@hawksightco/hawk-sdk 1.3.96 → 1.3.98

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.
@@ -223,10 +223,10 @@ class MultiTransaction {
223
223
  let nonceIndex = 0;
224
224
  for (const tuple of this.txs) {
225
225
  const tx = this.transactionInstance(tuple[0], tuple[1], latestBlockhash);
226
- const simulation = yield tx.simulateTransaction(connection);
227
- const computeUnitLimit = Math.round(simulation.unitsConsumed * 1.15) + 100000; // + 15% + 100,000 additional CU to prevent exceeding CU.
226
+ // const simulation = await tx.simulateTransaction(connection);
227
+ // const computeUnitLimit = Math.round(simulation.unitsConsumed * 1.15) + 100_000; // + 15% + 100,000 additional CU to prevent exceeding CU.
228
228
  tx.feeEstimate = estimate;
229
- yield tx.addPriorityFeeIx(connection, computeUnitLimit, false, priorityLevel, priorityFeeMaxCap);
229
+ // await tx.addPriorityFeeIx(connection, computeUnitLimit, false, priorityLevel, priorityFeeMaxCap);
230
230
  if (tx.hasNonceAdvanceIx) {
231
231
  const nonceAccount = this.nonceAccounts[nonceIndex++];
232
232
  const blockhash = nonceAccount.data.nonce;
@@ -1 +1 @@
1
- {"version":3,"file":"Transactions.d.ts","sourceRoot":"","sources":["../../../src/classes/Transactions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAoBxC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,eAAe,EACf,+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,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EAEpB,gBAAgB,EACh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AC,oBAAoB,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAuB3E;;;;;;OAMG;IACG,wBAAwB,CAAC,EAC7B,UAAU,EACV,MAAM,GACP,EAAE,WAAW,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAmG/E;;;;;;OAMG;IACG,wBAAwB,CAAC,EAC7B,UAAU,EACV,MAAM,GACP,EAAE,WAAW,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAmFhF;AAED,eAAO,MAAM,KAAK,cAA6B,CAAC"}
@@ -734,32 +734,80 @@ class Transactions {
734
734
  }
735
735
  claimAutomationIx(_a) {
736
736
  return __awaiter(this, arguments, void 0, function* ({ connection, params, }) {
737
- const program = yield meteora_1.MeteoraDLMM.program(connection);
738
- const position = yield program.account.positionV2.fetch(params.position);
739
- const dlmmPool = yield meteora_1.MeteoraDLMM.create(connection, position.lbPair, this.ix);
740
- const userPda = (0, functions_1.generateUserPda)(params.userWallet);
741
- const { userPositions } = yield dlmmPool.getPositionsByUserAndLbPair(userPda);
742
- const userPosition = userPositions.find((userPosition) => userPosition.publicKey.equals(params.position));
743
- if (userPosition === undefined) {
744
- throw new Error(`Position: ${params.position} does not exist.`);
737
+ try {
738
+ console.log('=== CLAIM AUTOMATION IX START ===');
739
+ console.log('Params:', {
740
+ userWallet: params.userWallet.toString(),
741
+ position: params.position.toString()
742
+ });
743
+ const program = yield meteora_1.MeteoraDLMM.program(connection);
744
+ console.log('Program fetched successfully');
745
+ const position = yield program.account.positionV2.fetch(params.position);
746
+ console.log('Position fetched:', {
747
+ lbPair: position.lbPair.toString(),
748
+ owner: position.owner.toString(),
749
+ lowerBinId: position.lowerBinId.toString(),
750
+ upperBinId: position.upperBinId.toString()
751
+ });
752
+ const dlmmPool = yield meteora_1.MeteoraDLMM.create(connection, position.lbPair, this.ix);
753
+ console.log('DLMM pool created successfully');
754
+ const userPda = (0, functions_1.generateUserPda)(params.userWallet);
755
+ console.log('User PDA generated:', userPda.toString());
756
+ const { userPositions } = yield dlmmPool.getPositionsByUserAndLbPair(userPda);
757
+ console.log('User positions fetched, count:', userPositions.length);
758
+ const userPosition = userPositions.find((userPosition) => userPosition.publicKey.equals(params.position));
759
+ if (userPosition === undefined) {
760
+ throw new Error(`Position: ${params.position} does not exist.`);
761
+ }
762
+ console.log('User position found');
763
+ // Claim fee and claim reward ixs
764
+ console.log('Creating MeteoraFunctions...');
765
+ const fn = new meteora_1.MeteoraFunctions(this.ix);
766
+ console.log('Calling claimAllRewardsByPosition...');
767
+ const claimBuilder = yield fn.claimAllRewardsByPosition(connection, params.userWallet, addresses_1.HS_AUTHORITY, {
768
+ owner: userPda,
769
+ position: params.position,
770
+ lbPair: position.lbPair,
771
+ pdaTokenType: types_1.TokenType.STA,
772
+ }, hsToMeteora_1.meteoraToHawksightAutomationIxs);
773
+ console.log('Claim builder created successfully');
774
+ const mainInstructions = [
775
+ ...claimBuilder.mainIxs,
776
+ ];
777
+ console.log('=== CLAIM AUTOMATION IX SUCCESS ===');
778
+ try {
779
+ console.log('Creating transaction metadata...');
780
+ const result = (0, functions_1.createTransactionMeta)({
781
+ payer: params.userWallet,
782
+ description: "Automation IX: Meteora Auto-claim instructions (claim fee, reward)",
783
+ addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
784
+ mainInstructions,
785
+ });
786
+ console.log('Transaction metadata created successfully');
787
+ return result;
788
+ }
789
+ catch (metadataError) {
790
+ console.error('=== TRANSACTION METADATA ERROR ===');
791
+ console.error('Error creating transaction metadata:', metadataError);
792
+ console.error('Main instructions count:', mainInstructions.length);
793
+ console.error('Main instructions:', mainInstructions.map(ix => ({
794
+ programId: ix.programId.toString(),
795
+ keysCount: ix.keys.length,
796
+ dataLength: ix.data.length
797
+ })));
798
+ console.error('=== END METADATA ERROR LOG ===');
799
+ throw metadataError;
800
+ }
801
+ }
802
+ catch (error) {
803
+ console.error('=== CLAIM AUTOMATION IX ERROR ===');
804
+ console.error('Error type:', error instanceof Error ? error.constructor.name : typeof error);
805
+ console.error('Error message:', error instanceof Error ? error.message : String(error));
806
+ console.error('Error stack:', error instanceof Error ? error.stack : 'No stack trace');
807
+ console.error('Full error object:', error);
808
+ console.error('=== END CLAIM AUTOMATION ERROR LOG ===');
809
+ throw error;
745
810
  }
746
- // Claim fee and claim reward ixs
747
- const fn = new meteora_1.MeteoraFunctions(this.ix);
748
- const claimBuilder = yield fn.claimAllRewardsByPosition(connection, params.userWallet, addresses_1.HS_AUTHORITY, {
749
- owner: userPda,
750
- position: params.position,
751
- lbPair: position.lbPair,
752
- pdaTokenType: types_1.TokenType.STA,
753
- }, hsToMeteora_1.meteoraToHawksightAutomationIxs);
754
- const mainInstructions = [
755
- ...claimBuilder.mainIxs,
756
- ];
757
- return (0, functions_1.createTransactionMeta)({
758
- payer: params.userWallet,
759
- description: "Automation IX: Meteora Auto-claim instructions (claim fee, reward)",
760
- addressLookupTableAddresses: addresses_1.GLOBAL_ALT,
761
- mainInstructions,
762
- });
763
811
  });
764
812
  }
765
813
  rebalanceAutomationIx(_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawksightco/hawk-sdk",
3
- "version": "1.3.96",
3
+ "version": "1.3.98",
4
4
  "description": "Hawksight v2 SDK",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": "https://github.com/ghabxph/hawk-api-client.git",