@crypticdot/defituna-client 2.0.9 → 2.0.11

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.
package/dist/index.js CHANGED
@@ -7161,7 +7161,7 @@ async function getCreateAtaInstructions(rpc, payer, mint, owner, tokenProgram =
7161
7161
  if (owner == payer.address) {
7162
7162
  cleanup.push(
7163
7163
  (0, import_token_2022.getCloseAccountInstruction)(
7164
- { account: ata, destination: payer.address, owner },
7164
+ { account: ata, destination: owner, owner: payer },
7165
7165
  { programAddress: tokenProgram }
7166
7166
  )
7167
7167
  );
@@ -7402,30 +7402,24 @@ async function addLiquidityOrcaInstructions(rpc, authority, positionMint, args,
7402
7402
  whirlpool.data.tickSpacing
7403
7403
  );
7404
7404
  const [upperTickArrayAddress] = await (0, import_whirlpools_client2.getTickArrayAddress)(whirlpool.address, upperTickArrayStartIndex);
7405
- const [lowerTickArray, upperTickArray] = await (0, import_whirlpools_client2.fetchAllMaybeTickArray)(rpc, [
7406
- lowerTickArrayAddress,
7407
- upperTickArrayAddress
7408
- ]);
7409
- if (!lowerTickArray.exists) {
7410
- instructions.push(
7411
- (0, import_whirlpools_client2.getInitializeTickArrayInstruction)({
7412
- whirlpool: whirlpool.address,
7413
- funder: authority,
7414
- tickArray: lowerTickArrayAddress,
7415
- startTickIndex: lowerTickArrayStartIndex
7416
- })
7417
- );
7418
- }
7419
- if (!upperTickArray.exists && lowerTickArrayStartIndex !== upperTickArrayStartIndex) {
7420
- instructions.push(
7421
- (0, import_whirlpools_client2.getInitializeTickArrayInstruction)({
7422
- whirlpool: whirlpool.address,
7423
- funder: authority,
7424
- tickArray: upperTickArrayAddress,
7425
- startTickIndex: upperTickArrayStartIndex
7426
- })
7427
- );
7428
- }
7405
+ instructions.push(
7406
+ (0, import_whirlpools_client2.getInitializeDynamicTickArrayInstruction)({
7407
+ whirlpool: whirlpool.address,
7408
+ funder: authority,
7409
+ tickArray: lowerTickArrayAddress,
7410
+ startTickIndex: lowerTickArrayStartIndex,
7411
+ idempotent: true
7412
+ })
7413
+ );
7414
+ instructions.push(
7415
+ (0, import_whirlpools_client2.getInitializeDynamicTickArrayInstruction)({
7416
+ whirlpool: whirlpool.address,
7417
+ funder: authority,
7418
+ tickArray: upperTickArrayAddress,
7419
+ startTickIndex: upperTickArrayStartIndex,
7420
+ idempotent: true
7421
+ })
7422
+ );
7429
7423
  const ix = await addLiquidityOrcaInstruction(
7430
7424
  authority,
7431
7425
  tunaPosition,
@@ -9202,30 +9196,24 @@ async function openPositionWithLiquidityOrcaInstructions(rpc, authority, positio
9202
9196
  const [lowerTickArrayAddress] = await (0, import_whirlpools_client9.getTickArrayAddress)(whirlpool.address, lowerTickArrayIndex);
9203
9197
  const upperTickArrayIndex = (0, import_whirlpools_core4.getTickArrayStartTickIndex)(args.tickUpperIndex, whirlpool.data.tickSpacing);
9204
9198
  const [upperTickArrayAddress] = await (0, import_whirlpools_client9.getTickArrayAddress)(whirlpool.address, upperTickArrayIndex);
9205
- const [lowerTickArray, upperTickArray] = await (0, import_whirlpools_client9.fetchAllMaybeTickArray)(rpc, [
9206
- lowerTickArrayAddress,
9207
- upperTickArrayAddress
9208
- ]);
9209
- if (!lowerTickArray.exists) {
9210
- instructions.push(
9211
- (0, import_whirlpools_client9.getInitializeTickArrayInstruction)({
9212
- whirlpool: whirlpool.address,
9213
- funder: authority,
9214
- tickArray: lowerTickArrayAddress,
9215
- startTickIndex: lowerTickArrayIndex
9216
- })
9217
- );
9218
- }
9219
- if (!upperTickArray.exists && lowerTickArrayIndex !== upperTickArrayIndex) {
9220
- instructions.push(
9221
- (0, import_whirlpools_client9.getInitializeTickArrayInstruction)({
9222
- whirlpool: whirlpool.address,
9223
- funder: authority,
9224
- tickArray: upperTickArrayAddress,
9225
- startTickIndex: upperTickArrayIndex
9226
- })
9227
- );
9228
- }
9199
+ instructions.push(
9200
+ (0, import_whirlpools_client9.getInitializeDynamicTickArrayInstruction)({
9201
+ whirlpool: whirlpool.address,
9202
+ funder: authority,
9203
+ tickArray: lowerTickArrayAddress,
9204
+ startTickIndex: lowerTickArrayIndex,
9205
+ idempotent: true
9206
+ })
9207
+ );
9208
+ instructions.push(
9209
+ (0, import_whirlpools_client9.getInitializeDynamicTickArrayInstruction)({
9210
+ whirlpool: whirlpool.address,
9211
+ funder: authority,
9212
+ tickArray: upperTickArrayAddress,
9213
+ startTickIndex: upperTickArrayIndex,
9214
+ idempotent: true
9215
+ })
9216
+ );
9229
9217
  const ix = await openPositionWithLiquidityOrcaInstruction(
9230
9218
  authority,
9231
9219
  positionMint,
@@ -10266,30 +10254,24 @@ async function rebalancePositionOrcaInstructions(rpc, authority, positionMint, c
10266
10254
  if (!cleanupInstructions) cleanupInstructions = instructions;
10267
10255
  const internalCleanupInstructions = [];
10268
10256
  const secondaryTickArrays = await OrcaUtils.getTickArraysForRebalancedPosition(whirlpool, tunaPosition);
10269
- const [lowerTickArray, upperTickArray] = await (0, import_whirlpools_client12.fetchAllMaybeTickArray)(rpc, [
10270
- secondaryTickArrays.lowerTickArrayAddress,
10271
- secondaryTickArrays.upperTickArrayAddress
10272
- ]);
10273
- if (!lowerTickArray.exists) {
10274
- instructions.push(
10275
- (0, import_whirlpools_client12.getInitializeTickArrayInstruction)({
10276
- whirlpool: whirlpool.address,
10277
- funder: authority,
10278
- tickArray: secondaryTickArrays.lowerTickArrayAddress,
10279
- startTickIndex: secondaryTickArrays.lowerTickArrayStartIndex
10280
- })
10281
- );
10282
- }
10283
- if (!upperTickArray.exists && secondaryTickArrays.lowerTickArrayStartIndex !== secondaryTickArrays.upperTickArrayStartIndex) {
10284
- instructions.push(
10285
- (0, import_whirlpools_client12.getInitializeTickArrayInstruction)({
10286
- whirlpool: whirlpool.address,
10287
- funder: authority,
10288
- tickArray: secondaryTickArrays.upperTickArrayAddress,
10289
- startTickIndex: secondaryTickArrays.upperTickArrayStartIndex
10290
- })
10291
- );
10292
- }
10257
+ instructions.push(
10258
+ (0, import_whirlpools_client12.getInitializeDynamicTickArrayInstruction)({
10259
+ whirlpool: whirlpool.address,
10260
+ funder: authority,
10261
+ tickArray: secondaryTickArrays.lowerTickArrayAddress,
10262
+ startTickIndex: secondaryTickArrays.lowerTickArrayStartIndex,
10263
+ idempotent: true
10264
+ })
10265
+ );
10266
+ instructions.push(
10267
+ (0, import_whirlpools_client12.getInitializeDynamicTickArrayInstruction)({
10268
+ whirlpool: whirlpool.address,
10269
+ funder: authority,
10270
+ tickArray: secondaryTickArrays.upperTickArrayAddress,
10271
+ startTickIndex: secondaryTickArrays.upperTickArrayStartIndex,
10272
+ idempotent: true
10273
+ })
10274
+ );
10293
10275
  const createFeeRecipientAtaAInstructions = await getCreateAtaInstructions(
10294
10276
  rpc,
10295
10277
  authority,
package/dist/index.mjs CHANGED
@@ -7245,7 +7245,7 @@ async function getCreateAtaInstructions(rpc, payer, mint, owner, tokenProgram =
7245
7245
  if (owner == payer.address) {
7246
7246
  cleanup.push(
7247
7247
  getCloseAccountInstruction(
7248
- { account: ata, destination: payer.address, owner },
7248
+ { account: ata, destination: owner, owner: payer },
7249
7249
  { programAddress: tokenProgram }
7250
7250
  )
7251
7251
  );
@@ -7418,9 +7418,8 @@ function calculateProtocolFee(collateralAmount, borrowAmount, protocolFeeRateOnC
7418
7418
 
7419
7419
  // src/txbuilder/addLiquidityOrca.ts
7420
7420
  import {
7421
- fetchAllMaybeTickArray,
7422
7421
  fetchMaybeWhirlpool,
7423
- getInitializeTickArrayInstruction,
7422
+ getInitializeDynamicTickArrayInstruction,
7424
7423
  getOracleAddress,
7425
7424
  getPositionAddress,
7426
7425
  getTickArrayAddress as getTickArrayAddress3,
@@ -7512,30 +7511,24 @@ async function addLiquidityOrcaInstructions(rpc, authority, positionMint, args,
7512
7511
  whirlpool.data.tickSpacing
7513
7512
  );
7514
7513
  const [upperTickArrayAddress] = await getTickArrayAddress3(whirlpool.address, upperTickArrayStartIndex);
7515
- const [lowerTickArray, upperTickArray] = await fetchAllMaybeTickArray(rpc, [
7516
- lowerTickArrayAddress,
7517
- upperTickArrayAddress
7518
- ]);
7519
- if (!lowerTickArray.exists) {
7520
- instructions.push(
7521
- getInitializeTickArrayInstruction({
7522
- whirlpool: whirlpool.address,
7523
- funder: authority,
7524
- tickArray: lowerTickArrayAddress,
7525
- startTickIndex: lowerTickArrayStartIndex
7526
- })
7527
- );
7528
- }
7529
- if (!upperTickArray.exists && lowerTickArrayStartIndex !== upperTickArrayStartIndex) {
7530
- instructions.push(
7531
- getInitializeTickArrayInstruction({
7532
- whirlpool: whirlpool.address,
7533
- funder: authority,
7534
- tickArray: upperTickArrayAddress,
7535
- startTickIndex: upperTickArrayStartIndex
7536
- })
7537
- );
7538
- }
7514
+ instructions.push(
7515
+ getInitializeDynamicTickArrayInstruction({
7516
+ whirlpool: whirlpool.address,
7517
+ funder: authority,
7518
+ tickArray: lowerTickArrayAddress,
7519
+ startTickIndex: lowerTickArrayStartIndex,
7520
+ idempotent: true
7521
+ })
7522
+ );
7523
+ instructions.push(
7524
+ getInitializeDynamicTickArrayInstruction({
7525
+ whirlpool: whirlpool.address,
7526
+ funder: authority,
7527
+ tickArray: upperTickArrayAddress,
7528
+ startTickIndex: upperTickArrayStartIndex,
7529
+ idempotent: true
7530
+ })
7531
+ );
7539
7532
  const ix = await addLiquidityOrcaInstruction(
7540
7533
  authority,
7541
7534
  tunaPosition,
@@ -7671,10 +7664,10 @@ async function addLiquidityOrcaInstruction(authority, tunaPosition, tunaConfig,
7671
7664
 
7672
7665
  // src/txbuilder/addLiquidityFusion.ts
7673
7666
  import {
7674
- fetchAllMaybeTickArray as fetchAllMaybeTickArray2,
7667
+ fetchAllMaybeTickArray,
7675
7668
  fetchMaybeFusionPool,
7676
7669
  FUSIONAMM_PROGRAM_ADDRESS,
7677
- getInitializeTickArrayInstruction as getInitializeTickArrayInstruction2,
7670
+ getInitializeTickArrayInstruction,
7678
7671
  getPositionAddress as getPositionAddress2,
7679
7672
  getTickArrayAddress as getTickArrayAddress4
7680
7673
  } from "@crypticdot/fusionamm-client";
@@ -7764,13 +7757,13 @@ async function addLiquidityFusionInstructions(rpc, authority, positionMint, args
7764
7757
  fusionPool.data.tickSpacing
7765
7758
  );
7766
7759
  const [upperTickArrayAddress] = await getTickArrayAddress4(fusionPool.address, upperTickArrayStartIndex);
7767
- const [lowerTickArray, upperTickArray] = await fetchAllMaybeTickArray2(rpc, [
7760
+ const [lowerTickArray, upperTickArray] = await fetchAllMaybeTickArray(rpc, [
7768
7761
  lowerTickArrayAddress,
7769
7762
  upperTickArrayAddress
7770
7763
  ]);
7771
7764
  if (!lowerTickArray.exists) {
7772
7765
  instructions.push(
7773
- getInitializeTickArrayInstruction2({
7766
+ getInitializeTickArrayInstruction({
7774
7767
  fusionPool: fusionPool.address,
7775
7768
  funder: authority,
7776
7769
  tickArray: lowerTickArrayAddress,
@@ -7780,7 +7773,7 @@ async function addLiquidityFusionInstructions(rpc, authority, positionMint, args
7780
7773
  }
7781
7774
  if (!upperTickArray.exists && lowerTickArrayStartIndex !== upperTickArrayStartIndex) {
7782
7775
  instructions.push(
7783
- getInitializeTickArrayInstruction2({
7776
+ getInitializeTickArrayInstruction({
7784
7777
  fusionPool: fusionPool.address,
7785
7778
  funder: authority,
7786
7779
  tickArray: upperTickArrayAddress,
@@ -9318,9 +9311,8 @@ async function openPositionFusionInstruction(rpc, authority, positionMint, fusio
9318
9311
 
9319
9312
  // src/txbuilder/openPositionWithLiquidityOrca.ts
9320
9313
  import {
9321
- fetchAllMaybeTickArray as fetchAllMaybeTickArray3,
9322
9314
  fetchMaybeWhirlpool as fetchMaybeWhirlpool7,
9323
- getInitializeTickArrayInstruction as getInitializeTickArrayInstruction3,
9315
+ getInitializeDynamicTickArrayInstruction as getInitializeDynamicTickArrayInstruction2,
9324
9316
  getOracleAddress as getOracleAddress4,
9325
9317
  getPositionAddress as getPositionAddress15,
9326
9318
  getTickArrayAddress as getTickArrayAddress6,
@@ -9405,30 +9397,24 @@ async function openPositionWithLiquidityOrcaInstructions(rpc, authority, positio
9405
9397
  const [lowerTickArrayAddress] = await getTickArrayAddress6(whirlpool.address, lowerTickArrayIndex);
9406
9398
  const upperTickArrayIndex = getTickArrayStartTickIndex6(args.tickUpperIndex, whirlpool.data.tickSpacing);
9407
9399
  const [upperTickArrayAddress] = await getTickArrayAddress6(whirlpool.address, upperTickArrayIndex);
9408
- const [lowerTickArray, upperTickArray] = await fetchAllMaybeTickArray3(rpc, [
9409
- lowerTickArrayAddress,
9410
- upperTickArrayAddress
9411
- ]);
9412
- if (!lowerTickArray.exists) {
9413
- instructions.push(
9414
- getInitializeTickArrayInstruction3({
9415
- whirlpool: whirlpool.address,
9416
- funder: authority,
9417
- tickArray: lowerTickArrayAddress,
9418
- startTickIndex: lowerTickArrayIndex
9419
- })
9420
- );
9421
- }
9422
- if (!upperTickArray.exists && lowerTickArrayIndex !== upperTickArrayIndex) {
9423
- instructions.push(
9424
- getInitializeTickArrayInstruction3({
9425
- whirlpool: whirlpool.address,
9426
- funder: authority,
9427
- tickArray: upperTickArrayAddress,
9428
- startTickIndex: upperTickArrayIndex
9429
- })
9430
- );
9431
- }
9400
+ instructions.push(
9401
+ getInitializeDynamicTickArrayInstruction2({
9402
+ whirlpool: whirlpool.address,
9403
+ funder: authority,
9404
+ tickArray: lowerTickArrayAddress,
9405
+ startTickIndex: lowerTickArrayIndex,
9406
+ idempotent: true
9407
+ })
9408
+ );
9409
+ instructions.push(
9410
+ getInitializeDynamicTickArrayInstruction2({
9411
+ whirlpool: whirlpool.address,
9412
+ funder: authority,
9413
+ tickArray: upperTickArrayAddress,
9414
+ startTickIndex: upperTickArrayIndex,
9415
+ idempotent: true
9416
+ })
9417
+ );
9432
9418
  const ix = await openPositionWithLiquidityOrcaInstruction(
9433
9419
  authority,
9434
9420
  positionMint,
@@ -9561,11 +9547,11 @@ async function openPositionWithLiquidityOrcaInstruction(authority, positionMint,
9561
9547
 
9562
9548
  // src/txbuilder/openPositionWithLiquidityFusion.ts
9563
9549
  import {
9564
- fetchAllMaybeTickArray as fetchAllMaybeTickArray4,
9550
+ fetchAllMaybeTickArray as fetchAllMaybeTickArray2,
9565
9551
  fetchMaybeFusionPool as fetchMaybeFusionPool7,
9566
9552
  FP_NFT_UPDATE_AUTH as FP_NFT_UPDATE_AUTH2,
9567
9553
  FUSIONAMM_PROGRAM_ADDRESS as FUSIONAMM_PROGRAM_ADDRESS8,
9568
- getInitializeTickArrayInstruction as getInitializeTickArrayInstruction4,
9554
+ getInitializeTickArrayInstruction as getInitializeTickArrayInstruction2,
9569
9555
  getPositionAddress as getPositionAddress16,
9570
9556
  getTickArrayAddress as getTickArrayAddress7
9571
9557
  } from "@crypticdot/fusionamm-client";
@@ -9648,13 +9634,13 @@ async function openPositionWithLiquidityFusionInstructions(rpc, authority, posit
9648
9634
  const [lowerTickArrayAddress] = await getTickArrayAddress7(fusionPool.address, lowerTickArrayIndex);
9649
9635
  const upperTickArrayIndex = getTickArrayStartTickIndex7(args.tickUpperIndex, fusionPool.data.tickSpacing);
9650
9636
  const [upperTickArrayAddress] = await getTickArrayAddress7(fusionPool.address, upperTickArrayIndex);
9651
- const [lowerTickArray, upperTickArray] = await fetchAllMaybeTickArray4(rpc, [
9637
+ const [lowerTickArray, upperTickArray] = await fetchAllMaybeTickArray2(rpc, [
9652
9638
  lowerTickArrayAddress,
9653
9639
  upperTickArrayAddress
9654
9640
  ]);
9655
9641
  if (!lowerTickArray.exists) {
9656
9642
  instructions.push(
9657
- getInitializeTickArrayInstruction4({
9643
+ getInitializeTickArrayInstruction2({
9658
9644
  fusionPool: fusionPool.address,
9659
9645
  funder: authority,
9660
9646
  tickArray: lowerTickArrayAddress,
@@ -9664,7 +9650,7 @@ async function openPositionWithLiquidityFusionInstructions(rpc, authority, posit
9664
9650
  }
9665
9651
  if (!upperTickArray.exists && lowerTickArrayIndex !== upperTickArrayIndex) {
9666
9652
  instructions.push(
9667
- getInitializeTickArrayInstruction4({
9653
+ getInitializeTickArrayInstruction2({
9668
9654
  fusionPool: fusionPool.address,
9669
9655
  funder: authority,
9670
9656
  tickArray: upperTickArrayAddress,
@@ -10494,9 +10480,8 @@ async function repayDebtInstruction(authority, positionMint, mintA, mintB, marke
10494
10480
 
10495
10481
  // src/txbuilder/rebalancePositionOrca.ts
10496
10482
  import {
10497
- fetchAllMaybeTickArray as fetchAllMaybeTickArray5,
10498
10483
  fetchMaybeWhirlpool as fetchMaybeWhirlpool9,
10499
- getInitializeTickArrayInstruction as getInitializeTickArrayInstruction5,
10484
+ getInitializeDynamicTickArrayInstruction as getInitializeDynamicTickArrayInstruction3,
10500
10485
  getOracleAddress as getOracleAddress7,
10501
10486
  getPositionAddress as getPositionAddress19,
10502
10487
  WHIRLPOOL_PROGRAM_ADDRESS as WHIRLPOOL_PROGRAM_ADDRESS11
@@ -10529,30 +10514,24 @@ async function rebalancePositionOrcaInstructions(rpc, authority, positionMint, c
10529
10514
  if (!cleanupInstructions) cleanupInstructions = instructions;
10530
10515
  const internalCleanupInstructions = [];
10531
10516
  const secondaryTickArrays = await OrcaUtils.getTickArraysForRebalancedPosition(whirlpool, tunaPosition);
10532
- const [lowerTickArray, upperTickArray] = await fetchAllMaybeTickArray5(rpc, [
10533
- secondaryTickArrays.lowerTickArrayAddress,
10534
- secondaryTickArrays.upperTickArrayAddress
10535
- ]);
10536
- if (!lowerTickArray.exists) {
10537
- instructions.push(
10538
- getInitializeTickArrayInstruction5({
10539
- whirlpool: whirlpool.address,
10540
- funder: authority,
10541
- tickArray: secondaryTickArrays.lowerTickArrayAddress,
10542
- startTickIndex: secondaryTickArrays.lowerTickArrayStartIndex
10543
- })
10544
- );
10545
- }
10546
- if (!upperTickArray.exists && secondaryTickArrays.lowerTickArrayStartIndex !== secondaryTickArrays.upperTickArrayStartIndex) {
10547
- instructions.push(
10548
- getInitializeTickArrayInstruction5({
10549
- whirlpool: whirlpool.address,
10550
- funder: authority,
10551
- tickArray: secondaryTickArrays.upperTickArrayAddress,
10552
- startTickIndex: secondaryTickArrays.upperTickArrayStartIndex
10553
- })
10554
- );
10555
- }
10517
+ instructions.push(
10518
+ getInitializeDynamicTickArrayInstruction3({
10519
+ whirlpool: whirlpool.address,
10520
+ funder: authority,
10521
+ tickArray: secondaryTickArrays.lowerTickArrayAddress,
10522
+ startTickIndex: secondaryTickArrays.lowerTickArrayStartIndex,
10523
+ idempotent: true
10524
+ })
10525
+ );
10526
+ instructions.push(
10527
+ getInitializeDynamicTickArrayInstruction3({
10528
+ whirlpool: whirlpool.address,
10529
+ funder: authority,
10530
+ tickArray: secondaryTickArrays.upperTickArrayAddress,
10531
+ startTickIndex: secondaryTickArrays.upperTickArrayStartIndex,
10532
+ idempotent: true
10533
+ })
10534
+ );
10556
10535
  const createFeeRecipientAtaAInstructions = await getCreateAtaInstructions(
10557
10536
  rpc,
10558
10537
  authority,
@@ -10681,10 +10660,10 @@ async function rebalancePositionOrcaInstruction(authority, tunaPosition, tunaCon
10681
10660
 
10682
10661
  // src/txbuilder/rebalancePositionFusion.ts
10683
10662
  import {
10684
- fetchAllMaybeTickArray as fetchAllMaybeTickArray6,
10663
+ fetchAllMaybeTickArray as fetchAllMaybeTickArray3,
10685
10664
  fetchMaybeFusionPool as fetchMaybeFusionPool9,
10686
10665
  FUSIONAMM_PROGRAM_ADDRESS as FUSIONAMM_PROGRAM_ADDRESS11,
10687
- getInitializeTickArrayInstruction as getInitializeTickArrayInstruction6,
10666
+ getInitializeTickArrayInstruction as getInitializeTickArrayInstruction3,
10688
10667
  getPositionAddress as getPositionAddress20
10689
10668
  } from "@crypticdot/fusionamm-client";
10690
10669
  import {
@@ -10714,13 +10693,13 @@ async function rebalancePositionFusionInstructions(rpc, authority, positionMint,
10714
10693
  if (!createInstructions) createInstructions = instructions;
10715
10694
  if (!cleanupInstructions) cleanupInstructions = instructions;
10716
10695
  const secondaryTickArrays = await FusionUtils.getTickArraysForRebalancedPosition(fusionPool, tunaPosition);
10717
- const [lowerTickArray, upperTickArray] = await fetchAllMaybeTickArray6(rpc, [
10696
+ const [lowerTickArray, upperTickArray] = await fetchAllMaybeTickArray3(rpc, [
10718
10697
  secondaryTickArrays.lowerTickArrayAddress,
10719
10698
  secondaryTickArrays.upperTickArrayAddress
10720
10699
  ]);
10721
10700
  if (!lowerTickArray.exists) {
10722
10701
  instructions.push(
10723
- getInitializeTickArrayInstruction6({
10702
+ getInitializeTickArrayInstruction3({
10724
10703
  fusionPool: fusionPool.address,
10725
10704
  funder: authority,
10726
10705
  tickArray: secondaryTickArrays.lowerTickArrayAddress,
@@ -10730,7 +10709,7 @@ async function rebalancePositionFusionInstructions(rpc, authority, positionMint,
10730
10709
  }
10731
10710
  if (!upperTickArray.exists && secondaryTickArrays.lowerTickArrayStartIndex !== secondaryTickArrays.upperTickArrayStartIndex) {
10732
10711
  instructions.push(
10733
- getInitializeTickArrayInstruction6({
10712
+ getInitializeTickArrayInstruction3({
10734
10713
  fusionPool: fusionPool.address,
10735
10714
  funder: authority,
10736
10715
  tickArray: secondaryTickArrays.upperTickArrayAddress,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@crypticdot/defituna-client",
3
3
  "description": "Typescript client to interact with DefiTuna's on-chain program.",
4
- "version": "2.0.9",
4
+ "version": "2.0.11",
5
5
  "private": false,
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "main": "./dist/index.js",
@@ -17,11 +17,11 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@orca-so/whirlpools-core": "^2.0.0",
20
- "@orca-so/whirlpools-client": "^2.0.0",
21
- "@orca-so/whirlpools": "^2.2.0",
22
- "@crypticdot/fusionamm-core": "^1.0.49",
23
- "@crypticdot/fusionamm-client": "^1.0.49",
24
- "@crypticdot/fusionamm-sdk": "^1.0.49",
20
+ "@orca-so/whirlpools-client": "^3.0.0",
21
+ "@orca-so/whirlpools": "^3.0.0",
22
+ "@crypticdot/fusionamm-core": "^1.0.53",
23
+ "@crypticdot/fusionamm-client": "^1.0.53",
24
+ "@crypticdot/fusionamm-sdk": "^1.0.53",
25
25
  "@solana/kit": "^2.1.0",
26
26
  "@solana-program/compute-budget": "^0.7.0",
27
27
  "@solana-program/system": "^0.7.0",
@@ -38,9 +38,9 @@
38
38
  "@codama/renderers-rust": "^1.0.22",
39
39
  "@codama/visitors-core": "^1.2.13",
40
40
  "@codama/nodes-from-anchor": "^1.1.14",
41
- "@codama/renderers": "^1.0.23",
41
+ "@codama/renderers": "^1.0.24",
42
42
  "@types/node": "22.9.0",
43
- "codama": "^1.2.12",
43
+ "codama": "^1.2.14",
44
44
  "dotenv": "^16.4.7",
45
45
  "eslint": "^8.57.0",
46
46
  "ts-node": "^10.9.2",