@crypticdot/defituna-client 2.0.7 → 2.0.8
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.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +45 -45
- package/dist/index.mjs +45 -45
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -70,12 +70,12 @@ declare enum AccountsType {
|
|
|
70
70
|
SwapTickArrays = 0,
|
|
71
71
|
TickArrayLower = 1,
|
|
72
72
|
TickArrayUpper = 2,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
PoolVaultTokenA = 3,
|
|
74
|
+
PoolVaultTokenB = 4,
|
|
75
|
+
WhirlpoolOracle = 5,
|
|
76
|
+
Rewards = 6,
|
|
77
|
+
SecondaryTickArrayLower = 7,
|
|
78
|
+
SecondaryTickArrayUpper = 8
|
|
79
79
|
}
|
|
80
80
|
type AccountsTypeArgs = AccountsType;
|
|
81
81
|
declare function getAccountsTypeEncoder(): Encoder<AccountsTypeArgs>;
|
package/dist/index.d.ts
CHANGED
|
@@ -70,12 +70,12 @@ declare enum AccountsType {
|
|
|
70
70
|
SwapTickArrays = 0,
|
|
71
71
|
TickArrayLower = 1,
|
|
72
72
|
TickArrayUpper = 2,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
PoolVaultTokenA = 3,
|
|
74
|
+
PoolVaultTokenB = 4,
|
|
75
|
+
WhirlpoolOracle = 5,
|
|
76
|
+
Rewards = 6,
|
|
77
|
+
SecondaryTickArrayLower = 7,
|
|
78
|
+
SecondaryTickArrayUpper = 8
|
|
79
79
|
}
|
|
80
80
|
type AccountsTypeArgs = AccountsType;
|
|
81
81
|
declare function getAccountsTypeEncoder(): Encoder<AccountsTypeArgs>;
|
package/dist/index.js
CHANGED
|
@@ -639,12 +639,12 @@ var AccountsType = /* @__PURE__ */ ((AccountsType2) => {
|
|
|
639
639
|
AccountsType2[AccountsType2["SwapTickArrays"] = 0] = "SwapTickArrays";
|
|
640
640
|
AccountsType2[AccountsType2["TickArrayLower"] = 1] = "TickArrayLower";
|
|
641
641
|
AccountsType2[AccountsType2["TickArrayUpper"] = 2] = "TickArrayUpper";
|
|
642
|
-
AccountsType2[AccountsType2["
|
|
643
|
-
AccountsType2[AccountsType2["
|
|
644
|
-
AccountsType2[AccountsType2["
|
|
645
|
-
AccountsType2[AccountsType2["
|
|
646
|
-
AccountsType2[AccountsType2["
|
|
647
|
-
AccountsType2[AccountsType2["
|
|
642
|
+
AccountsType2[AccountsType2["PoolVaultTokenA"] = 3] = "PoolVaultTokenA";
|
|
643
|
+
AccountsType2[AccountsType2["PoolVaultTokenB"] = 4] = "PoolVaultTokenB";
|
|
644
|
+
AccountsType2[AccountsType2["WhirlpoolOracle"] = 5] = "WhirlpoolOracle";
|
|
645
|
+
AccountsType2[AccountsType2["Rewards"] = 6] = "Rewards";
|
|
646
|
+
AccountsType2[AccountsType2["SecondaryTickArrayLower"] = 7] = "SecondaryTickArrayLower";
|
|
647
|
+
AccountsType2[AccountsType2["SecondaryTickArrayUpper"] = 8] = "SecondaryTickArrayUpper";
|
|
648
648
|
return AccountsType2;
|
|
649
649
|
})(AccountsType || {});
|
|
650
650
|
function getAccountsTypeEncoder() {
|
|
@@ -7521,9 +7521,9 @@ async function addLiquidityOrcaInstruction(authority, tunaPosition, tunaConfig,
|
|
|
7521
7521
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
7522
7522
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
7523
7523
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
7524
|
-
{ accountsType:
|
|
7525
|
-
{ accountsType:
|
|
7526
|
-
{ accountsType:
|
|
7524
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
7525
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 },
|
|
7526
|
+
{ accountsType: 5 /* WhirlpoolOracle */, length: 1 }
|
|
7527
7527
|
]
|
|
7528
7528
|
};
|
|
7529
7529
|
const ix = getAddLiquidityOrcaInstruction({
|
|
@@ -7758,8 +7758,8 @@ async function addLiquidityFusionInstruction(authority, tunaPosition, tunaConfig
|
|
|
7758
7758
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
7759
7759
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
7760
7760
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
7761
|
-
{ accountsType:
|
|
7762
|
-
{ accountsType:
|
|
7761
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
7762
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
7763
7763
|
]
|
|
7764
7764
|
};
|
|
7765
7765
|
const ix = getAddLiquidityFusionInstruction({
|
|
@@ -8005,9 +8005,9 @@ async function collectAndCompoundFeesOrcaInstruction(authority, tunaConfig, tuna
|
|
|
8005
8005
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
8006
8006
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
8007
8007
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
8008
|
-
{ accountsType:
|
|
8009
|
-
{ accountsType:
|
|
8010
|
-
{ accountsType:
|
|
8008
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
8009
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 },
|
|
8010
|
+
{ accountsType: 5 /* WhirlpoolOracle */, length: 1 }
|
|
8011
8011
|
]
|
|
8012
8012
|
};
|
|
8013
8013
|
const ix = getCollectAndCompoundFeesOrcaInstruction({
|
|
@@ -8157,8 +8157,8 @@ async function collectAndCompoundFeesFusionInstruction(authority, tunaConfig, tu
|
|
|
8157
8157
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
8158
8158
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
8159
8159
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
8160
|
-
{ accountsType:
|
|
8161
|
-
{ accountsType:
|
|
8160
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
8161
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
8162
8162
|
]
|
|
8163
8163
|
};
|
|
8164
8164
|
const ix = getCollectAndCompoundFeesFusionInstruction({
|
|
@@ -8279,8 +8279,8 @@ async function collectFeesOrcaInstruction(authority, tunaPosition, mintA, mintB,
|
|
|
8279
8279
|
slices: [
|
|
8280
8280
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
8281
8281
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
8282
|
-
{ accountsType:
|
|
8283
|
-
{ accountsType:
|
|
8282
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
8283
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
8284
8284
|
]
|
|
8285
8285
|
};
|
|
8286
8286
|
const ix = getCollectFeesOrcaInstruction({
|
|
@@ -8393,8 +8393,8 @@ async function collectFeesFusionInstruction(authority, tunaPosition, mintA, mint
|
|
|
8393
8393
|
slices: [
|
|
8394
8394
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
8395
8395
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
8396
|
-
{ accountsType:
|
|
8397
|
-
{ accountsType:
|
|
8396
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
8397
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
8398
8398
|
]
|
|
8399
8399
|
};
|
|
8400
8400
|
const ix = getCollectFeesFusionInstruction({
|
|
@@ -8853,9 +8853,9 @@ async function liquidatePositionOrcaInstruction(authority, tunaPosition, mintA,
|
|
|
8853
8853
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
8854
8854
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
8855
8855
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
8856
|
-
{ accountsType:
|
|
8857
|
-
{ accountsType:
|
|
8858
|
-
{ accountsType:
|
|
8856
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
8857
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 },
|
|
8858
|
+
{ accountsType: 5 /* WhirlpoolOracle */, length: 1 }
|
|
8859
8859
|
]
|
|
8860
8860
|
};
|
|
8861
8861
|
const ix = getLiquidatePositionOrcaInstruction({
|
|
@@ -8992,8 +8992,8 @@ async function liquidatePositionFusionInstruction(authority, tunaPosition, mintA
|
|
|
8992
8992
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
8993
8993
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
8994
8994
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
8995
|
-
{ accountsType:
|
|
8996
|
-
{ accountsType:
|
|
8995
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
8996
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
8997
8997
|
]
|
|
8998
8998
|
};
|
|
8999
8999
|
const ix = getLiquidatePositionFusionInstruction({
|
|
@@ -9314,9 +9314,9 @@ async function openPositionWithLiquidityOrcaInstruction(authority, positionMint,
|
|
|
9314
9314
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
9315
9315
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
9316
9316
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
9317
|
-
{ accountsType:
|
|
9318
|
-
{ accountsType:
|
|
9319
|
-
{ accountsType:
|
|
9317
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
9318
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 },
|
|
9319
|
+
{ accountsType: 5 /* WhirlpoolOracle */, length: 1 }
|
|
9320
9320
|
]
|
|
9321
9321
|
};
|
|
9322
9322
|
const ix = getOpenPositionWithLiquidityOrcaInstruction({
|
|
@@ -9540,8 +9540,8 @@ async function openPositionWithLiquidityFusionInstruction(authority, positionMin
|
|
|
9540
9540
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
9541
9541
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
9542
9542
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
9543
|
-
{ accountsType:
|
|
9544
|
-
{ accountsType:
|
|
9543
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
9544
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
9545
9545
|
]
|
|
9546
9546
|
};
|
|
9547
9547
|
const ix = getOpenPositionWithLiquidityFusionInstruction({
|
|
@@ -9749,13 +9749,13 @@ async function removeLiquidityOrcaInstruction(authority, tunaPosition, mintA, mi
|
|
|
9749
9749
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
9750
9750
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
9751
9751
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
9752
|
-
{ accountsType:
|
|
9753
|
-
{ accountsType:
|
|
9754
|
-
{ accountsType:
|
|
9752
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
9753
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 },
|
|
9754
|
+
{ accountsType: 5 /* WhirlpoolOracle */, length: 1 }
|
|
9755
9755
|
]
|
|
9756
9756
|
};
|
|
9757
9757
|
if (rewardIndicesToClaim.length > 0) {
|
|
9758
|
-
remainingAccountsInfo.slices.push({ accountsType:
|
|
9758
|
+
remainingAccountsInfo.slices.push({ accountsType: 6 /* Rewards */, length: 4 * rewardIndicesToClaim.length });
|
|
9759
9759
|
}
|
|
9760
9760
|
const ix = getRemoveLiquidityOrcaInstruction({
|
|
9761
9761
|
market: marketAddress,
|
|
@@ -9906,8 +9906,8 @@ async function removeLiquidityFusionInstruction(authority, tunaPosition, mintA,
|
|
|
9906
9906
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
9907
9907
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
9908
9908
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
9909
|
-
{ accountsType:
|
|
9910
|
-
{ accountsType:
|
|
9909
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
9910
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
9911
9911
|
]
|
|
9912
9912
|
};
|
|
9913
9913
|
const ix = getRemoveLiquidityFusionInstruction({
|
|
@@ -10381,11 +10381,11 @@ async function rebalancePositionOrcaInstruction(authority, tunaPosition, tunaCon
|
|
|
10381
10381
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
10382
10382
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
10383
10383
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
10384
|
-
{ accountsType:
|
|
10385
|
-
{ accountsType:
|
|
10386
|
-
{ accountsType:
|
|
10387
|
-
{ accountsType:
|
|
10388
|
-
{ accountsType:
|
|
10384
|
+
{ accountsType: 7 /* SecondaryTickArrayLower */, length: 1 },
|
|
10385
|
+
{ accountsType: 8 /* SecondaryTickArrayUpper */, length: 1 },
|
|
10386
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
10387
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 },
|
|
10388
|
+
{ accountsType: 5 /* WhirlpoolOracle */, length: 1 }
|
|
10389
10389
|
]
|
|
10390
10390
|
};
|
|
10391
10391
|
const ix = getRebalancePositionOrcaInstruction({
|
|
@@ -10551,10 +10551,10 @@ async function rebalancePositionFusionInstruction(authority, tunaPosition, tunaC
|
|
|
10551
10551
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
10552
10552
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
10553
10553
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
10554
|
-
{ accountsType:
|
|
10555
|
-
{ accountsType:
|
|
10556
|
-
{ accountsType:
|
|
10557
|
-
{ accountsType:
|
|
10554
|
+
{ accountsType: 7 /* SecondaryTickArrayLower */, length: 1 },
|
|
10555
|
+
{ accountsType: 8 /* SecondaryTickArrayUpper */, length: 1 },
|
|
10556
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
10557
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
10558
10558
|
]
|
|
10559
10559
|
};
|
|
10560
10560
|
const ix = getRebalancePositionFusionInstruction({
|
package/dist/index.mjs
CHANGED
|
@@ -136,12 +136,12 @@ var AccountsType = /* @__PURE__ */ ((AccountsType2) => {
|
|
|
136
136
|
AccountsType2[AccountsType2["SwapTickArrays"] = 0] = "SwapTickArrays";
|
|
137
137
|
AccountsType2[AccountsType2["TickArrayLower"] = 1] = "TickArrayLower";
|
|
138
138
|
AccountsType2[AccountsType2["TickArrayUpper"] = 2] = "TickArrayUpper";
|
|
139
|
-
AccountsType2[AccountsType2["
|
|
140
|
-
AccountsType2[AccountsType2["
|
|
141
|
-
AccountsType2[AccountsType2["
|
|
142
|
-
AccountsType2[AccountsType2["
|
|
143
|
-
AccountsType2[AccountsType2["
|
|
144
|
-
AccountsType2[AccountsType2["
|
|
139
|
+
AccountsType2[AccountsType2["PoolVaultTokenA"] = 3] = "PoolVaultTokenA";
|
|
140
|
+
AccountsType2[AccountsType2["PoolVaultTokenB"] = 4] = "PoolVaultTokenB";
|
|
141
|
+
AccountsType2[AccountsType2["WhirlpoolOracle"] = 5] = "WhirlpoolOracle";
|
|
142
|
+
AccountsType2[AccountsType2["Rewards"] = 6] = "Rewards";
|
|
143
|
+
AccountsType2[AccountsType2["SecondaryTickArrayLower"] = 7] = "SecondaryTickArrayLower";
|
|
144
|
+
AccountsType2[AccountsType2["SecondaryTickArrayUpper"] = 8] = "SecondaryTickArrayUpper";
|
|
145
145
|
return AccountsType2;
|
|
146
146
|
})(AccountsType || {});
|
|
147
147
|
function getAccountsTypeEncoder() {
|
|
@@ -7631,9 +7631,9 @@ async function addLiquidityOrcaInstruction(authority, tunaPosition, tunaConfig,
|
|
|
7631
7631
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
7632
7632
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
7633
7633
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
7634
|
-
{ accountsType:
|
|
7635
|
-
{ accountsType:
|
|
7636
|
-
{ accountsType:
|
|
7634
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
7635
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 },
|
|
7636
|
+
{ accountsType: 5 /* WhirlpoolOracle */, length: 1 }
|
|
7637
7637
|
]
|
|
7638
7638
|
};
|
|
7639
7639
|
const ix = getAddLiquidityOrcaInstruction({
|
|
@@ -7881,8 +7881,8 @@ async function addLiquidityFusionInstruction(authority, tunaPosition, tunaConfig
|
|
|
7881
7881
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
7882
7882
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
7883
7883
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
7884
|
-
{ accountsType:
|
|
7885
|
-
{ accountsType:
|
|
7884
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
7885
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
7886
7886
|
]
|
|
7887
7887
|
};
|
|
7888
7888
|
const ix = getAddLiquidityFusionInstruction({
|
|
@@ -8139,9 +8139,9 @@ async function collectAndCompoundFeesOrcaInstruction(authority, tunaConfig, tuna
|
|
|
8139
8139
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
8140
8140
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
8141
8141
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
8142
|
-
{ accountsType:
|
|
8143
|
-
{ accountsType:
|
|
8144
|
-
{ accountsType:
|
|
8142
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
8143
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 },
|
|
8144
|
+
{ accountsType: 5 /* WhirlpoolOracle */, length: 1 }
|
|
8145
8145
|
]
|
|
8146
8146
|
};
|
|
8147
8147
|
const ix = getCollectAndCompoundFeesOrcaInstruction({
|
|
@@ -8301,8 +8301,8 @@ async function collectAndCompoundFeesFusionInstruction(authority, tunaConfig, tu
|
|
|
8301
8301
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
8302
8302
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
8303
8303
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
8304
|
-
{ accountsType:
|
|
8305
|
-
{ accountsType:
|
|
8304
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
8305
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
8306
8306
|
]
|
|
8307
8307
|
};
|
|
8308
8308
|
const ix = getCollectAndCompoundFeesFusionInstruction({
|
|
@@ -8433,8 +8433,8 @@ async function collectFeesOrcaInstruction(authority, tunaPosition, mintA, mintB,
|
|
|
8433
8433
|
slices: [
|
|
8434
8434
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
8435
8435
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
8436
|
-
{ accountsType:
|
|
8437
|
-
{ accountsType:
|
|
8436
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
8437
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
8438
8438
|
]
|
|
8439
8439
|
};
|
|
8440
8440
|
const ix = getCollectFeesOrcaInstruction({
|
|
@@ -8557,8 +8557,8 @@ async function collectFeesFusionInstruction(authority, tunaPosition, mintA, mint
|
|
|
8557
8557
|
slices: [
|
|
8558
8558
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
8559
8559
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
8560
|
-
{ accountsType:
|
|
8561
|
-
{ accountsType:
|
|
8560
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
8561
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
8562
8562
|
]
|
|
8563
8563
|
};
|
|
8564
8564
|
const ix = getCollectFeesFusionInstruction({
|
|
@@ -9031,9 +9031,9 @@ async function liquidatePositionOrcaInstruction(authority, tunaPosition, mintA,
|
|
|
9031
9031
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
9032
9032
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
9033
9033
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
9034
|
-
{ accountsType:
|
|
9035
|
-
{ accountsType:
|
|
9036
|
-
{ accountsType:
|
|
9034
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
9035
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 },
|
|
9036
|
+
{ accountsType: 5 /* WhirlpoolOracle */, length: 1 }
|
|
9037
9037
|
]
|
|
9038
9038
|
};
|
|
9039
9039
|
const ix = getLiquidatePositionOrcaInstruction({
|
|
@@ -9170,8 +9170,8 @@ async function liquidatePositionFusionInstruction(authority, tunaPosition, mintA
|
|
|
9170
9170
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
9171
9171
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
9172
9172
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
9173
|
-
{ accountsType:
|
|
9174
|
-
{ accountsType:
|
|
9173
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
9174
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
9175
9175
|
]
|
|
9176
9176
|
};
|
|
9177
9177
|
const ix = getLiquidatePositionFusionInstruction({
|
|
@@ -9517,9 +9517,9 @@ async function openPositionWithLiquidityOrcaInstruction(authority, positionMint,
|
|
|
9517
9517
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
9518
9518
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
9519
9519
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
9520
|
-
{ accountsType:
|
|
9521
|
-
{ accountsType:
|
|
9522
|
-
{ accountsType:
|
|
9520
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
9521
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 },
|
|
9522
|
+
{ accountsType: 5 /* WhirlpoolOracle */, length: 1 }
|
|
9523
9523
|
]
|
|
9524
9524
|
};
|
|
9525
9525
|
const ix = getOpenPositionWithLiquidityOrcaInstruction({
|
|
@@ -9758,8 +9758,8 @@ async function openPositionWithLiquidityFusionInstruction(authority, positionMin
|
|
|
9758
9758
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
9759
9759
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
9760
9760
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
9761
|
-
{ accountsType:
|
|
9762
|
-
{ accountsType:
|
|
9761
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
9762
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
9763
9763
|
]
|
|
9764
9764
|
};
|
|
9765
9765
|
const ix = getOpenPositionWithLiquidityFusionInstruction({
|
|
@@ -9982,13 +9982,13 @@ async function removeLiquidityOrcaInstruction(authority, tunaPosition, mintA, mi
|
|
|
9982
9982
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
9983
9983
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
9984
9984
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
9985
|
-
{ accountsType:
|
|
9986
|
-
{ accountsType:
|
|
9987
|
-
{ accountsType:
|
|
9985
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
9986
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 },
|
|
9987
|
+
{ accountsType: 5 /* WhirlpoolOracle */, length: 1 }
|
|
9988
9988
|
]
|
|
9989
9989
|
};
|
|
9990
9990
|
if (rewardIndicesToClaim.length > 0) {
|
|
9991
|
-
remainingAccountsInfo.slices.push({ accountsType:
|
|
9991
|
+
remainingAccountsInfo.slices.push({ accountsType: 6 /* Rewards */, length: 4 * rewardIndicesToClaim.length });
|
|
9992
9992
|
}
|
|
9993
9993
|
const ix = getRemoveLiquidityOrcaInstruction({
|
|
9994
9994
|
market: marketAddress,
|
|
@@ -10149,8 +10149,8 @@ async function removeLiquidityFusionInstruction(authority, tunaPosition, mintA,
|
|
|
10149
10149
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
10150
10150
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
10151
10151
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
10152
|
-
{ accountsType:
|
|
10153
|
-
{ accountsType:
|
|
10152
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
10153
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
10154
10154
|
]
|
|
10155
10155
|
};
|
|
10156
10156
|
const ix = getRemoveLiquidityFusionInstruction({
|
|
@@ -10644,11 +10644,11 @@ async function rebalancePositionOrcaInstruction(authority, tunaPosition, tunaCon
|
|
|
10644
10644
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
10645
10645
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
10646
10646
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
10647
|
-
{ accountsType:
|
|
10648
|
-
{ accountsType:
|
|
10649
|
-
{ accountsType:
|
|
10650
|
-
{ accountsType:
|
|
10651
|
-
{ accountsType:
|
|
10647
|
+
{ accountsType: 7 /* SecondaryTickArrayLower */, length: 1 },
|
|
10648
|
+
{ accountsType: 8 /* SecondaryTickArrayUpper */, length: 1 },
|
|
10649
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
10650
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 },
|
|
10651
|
+
{ accountsType: 5 /* WhirlpoolOracle */, length: 1 }
|
|
10652
10652
|
]
|
|
10653
10653
|
};
|
|
10654
10654
|
const ix = getRebalancePositionOrcaInstruction({
|
|
@@ -10826,10 +10826,10 @@ async function rebalancePositionFusionInstruction(authority, tunaPosition, tunaC
|
|
|
10826
10826
|
{ accountsType: 0 /* SwapTickArrays */, length: 5 },
|
|
10827
10827
|
{ accountsType: 1 /* TickArrayLower */, length: 1 },
|
|
10828
10828
|
{ accountsType: 2 /* TickArrayUpper */, length: 1 },
|
|
10829
|
-
{ accountsType:
|
|
10830
|
-
{ accountsType:
|
|
10831
|
-
{ accountsType:
|
|
10832
|
-
{ accountsType:
|
|
10829
|
+
{ accountsType: 7 /* SecondaryTickArrayLower */, length: 1 },
|
|
10830
|
+
{ accountsType: 8 /* SecondaryTickArrayUpper */, length: 1 },
|
|
10831
|
+
{ accountsType: 3 /* PoolVaultTokenA */, length: 1 },
|
|
10832
|
+
{ accountsType: 4 /* PoolVaultTokenB */, length: 1 }
|
|
10833
10833
|
]
|
|
10834
10834
|
};
|
|
10835
10835
|
const ix = getRebalancePositionFusionInstruction({
|
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.
|
|
4
|
+
"version": "2.0.8",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"rimraf": "^6.0.1",
|
|
52
52
|
"vitest": "^3.1.1",
|
|
53
53
|
"solana-bankrun": "^0.4.0",
|
|
54
|
-
"@crypticdot/defituna-program": "2.0.
|
|
54
|
+
"@crypticdot/defituna-program": "2.0.3"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "node ./codama.mjs && tsup src/index.ts --format cjs,esm --dts",
|