@hawksightco/hawk-sdk 1.1.54 → 1.1.55

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 +1 @@
1
- {"version":3,"file":"OrcaIxGenerator.d.ts","sourceRoot":"","sources":["../../../src/ixGenerator/OrcaIxGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,KAAK,gCAAgC,GAAG;IACtC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC;IAC5B,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAA;AAED;;GAEG;AACH,qBAAa,eAAe;IAGxB,OAAO,CAAC,OAAO;gBAAP,OAAO,EAAE,kBAAkB;IAGrC;;OAEG;IACG,gCAAgC,CAAC,EACrC,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAa,GACd,EAAE,gCAAgC,GAAG,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC;CA6E3E"}
1
+ {"version":3,"file":"OrcaIxGenerator.d.ts","sourceRoot":"","sources":["../../../src/ixGenerator/OrcaIxGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,KAAK,gCAAgC,GAAG;IACtC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC;IAC5B,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAA;AAED;;GAEG;AACH,qBAAa,eAAe;IAGxB,OAAO,CAAC,OAAO;gBAAP,OAAO,EAAE,kBAAkB;IAGrC;;OAEG;IACG,gCAAgC,CAAC,EACrC,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAa,GACd,EAAE,gCAAgC,GAAG,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC;CAsE3E"}
@@ -63,16 +63,8 @@ class OrcaIxGenerator {
63
63
  const tokenOwnerAccountB = useAta ? (0, functions_1.generateAta)(userPda, whirlpoolInfo.tokenMintB) : (0, functions_1.generateUserPdaStorageAccount)(userPda, whirlpoolInfo.tokenMintB);
64
64
  const tokenVaultA = whirlpoolInfo.tokenVaultA;
65
65
  const tokenVaultB = whirlpoolInfo.tokenVaultB;
66
- let startIndex;
67
- let nextIndex;
68
- if (whirlpoolInfo.tickCurrentIndex < 0) {
69
- startIndex = (0, orca_1.getPreviousStartTick)(whirlpoolInfo.tickCurrentIndex, whirlpoolInfo.tickSpacing);
70
- nextIndex = (0, orca_1.getStartTickIndex)(whirlpoolInfo.tickCurrentIndex, whirlpoolInfo.tickSpacing);
71
- }
72
- else {
73
- startIndex = (0, orca_1.getStartTickIndex)(whirlpoolInfo.tickCurrentIndex, whirlpoolInfo.tickSpacing);
74
- nextIndex = (0, orca_1.getNextStartTick)(whirlpoolInfo.tickCurrentIndex, whirlpoolInfo.tickSpacing);
75
- }
66
+ const startIndex = (0, orca_1.getStartTickIndex)(positionInfo.tickLowerIndex, whirlpoolInfo.tickSpacing);
67
+ const nextIndex = (0, orca_1.getStartTickIndex)(positionInfo.tickUpperIndex, whirlpoolInfo.tickSpacing);
76
68
  const { publicKey: tickArrayLower } = (0, orca_1.getTickArray)(addresses_1.ORCA_WHIRLPOOL_PROGRAM, whirlpool, startIndex);
77
69
  const { publicKey: tickArrayUpper } = (0, orca_1.getTickArray)(addresses_1.ORCA_WHIRLPOOL_PROGRAM, whirlpool, nextIndex);
78
70
  const ownerFeeA = (0, functions_1.generateAta)(addresses_1.SITE_FEE_OWNER, whirlpoolInfo.tokenMintA);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawksightco/hawk-sdk",
3
- "version": "1.1.54",
3
+ "version": "1.1.55",
4
4
  "description": "Hawksight v2 SDK",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": "https://github.com/ghabxph/hawk-api-client.git",