@crypticdot/defituna-client 3.3.2 → 3.3.3
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 +190 -33
- package/dist/index.d.ts +190 -33
- package/dist/index.js +958 -742
- package/dist/index.mjs +931 -709
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -60,6 +60,7 @@ __export(index_exports, {
|
|
|
60
60
|
LIQUIDATE_TUNA_LP_POSITION_FUSION_DISCRIMINATOR: () => LIQUIDATE_TUNA_LP_POSITION_FUSION_DISCRIMINATOR,
|
|
61
61
|
LIQUIDATE_TUNA_LP_POSITION_ORCA_DISCRIMINATOR: () => LIQUIDATE_TUNA_LP_POSITION_ORCA_DISCRIMINATOR,
|
|
62
62
|
LIQUIDATE_TUNA_SPOT_POSITION_FUSION_DISCRIMINATOR: () => LIQUIDATE_TUNA_SPOT_POSITION_FUSION_DISCRIMINATOR,
|
|
63
|
+
LIQUIDATE_TUNA_SPOT_POSITION_JUPITER_DISCRIMINATOR: () => LIQUIDATE_TUNA_SPOT_POSITION_JUPITER_DISCRIMINATOR,
|
|
63
64
|
LIQUIDATE_TUNA_SPOT_POSITION_ORCA_DISCRIMINATOR: () => LIQUIDATE_TUNA_SPOT_POSITION_ORCA_DISCRIMINATOR,
|
|
64
65
|
MARKET_DISCRIMINATOR: () => MARKET_DISCRIMINATOR,
|
|
65
66
|
MAX_LEVERAGE: () => MAX_LEVERAGE,
|
|
@@ -358,6 +359,11 @@ __export(index_exports, {
|
|
|
358
359
|
getLiquidateTunaSpotPositionFusionInstructionDataCodec: () => getLiquidateTunaSpotPositionFusionInstructionDataCodec,
|
|
359
360
|
getLiquidateTunaSpotPositionFusionInstructionDataDecoder: () => getLiquidateTunaSpotPositionFusionInstructionDataDecoder,
|
|
360
361
|
getLiquidateTunaSpotPositionFusionInstructionDataEncoder: () => getLiquidateTunaSpotPositionFusionInstructionDataEncoder,
|
|
362
|
+
getLiquidateTunaSpotPositionJupiterDiscriminatorBytes: () => getLiquidateTunaSpotPositionJupiterDiscriminatorBytes,
|
|
363
|
+
getLiquidateTunaSpotPositionJupiterInstruction: () => getLiquidateTunaSpotPositionJupiterInstruction,
|
|
364
|
+
getLiquidateTunaSpotPositionJupiterInstructionDataCodec: () => getLiquidateTunaSpotPositionJupiterInstructionDataCodec,
|
|
365
|
+
getLiquidateTunaSpotPositionJupiterInstructionDataDecoder: () => getLiquidateTunaSpotPositionJupiterInstructionDataDecoder,
|
|
366
|
+
getLiquidateTunaSpotPositionJupiterInstructionDataEncoder: () => getLiquidateTunaSpotPositionJupiterInstructionDataEncoder,
|
|
361
367
|
getLiquidateTunaSpotPositionOrcaDiscriminatorBytes: () => getLiquidateTunaSpotPositionOrcaDiscriminatorBytes,
|
|
362
368
|
getLiquidateTunaSpotPositionOrcaInstruction: () => getLiquidateTunaSpotPositionOrcaInstruction,
|
|
363
369
|
getLiquidateTunaSpotPositionOrcaInstructionDataCodec: () => getLiquidateTunaSpotPositionOrcaInstructionDataCodec,
|
|
@@ -607,6 +613,7 @@ __export(index_exports, {
|
|
|
607
613
|
parseLiquidateTunaLpPositionFusionInstruction: () => parseLiquidateTunaLpPositionFusionInstruction,
|
|
608
614
|
parseLiquidateTunaLpPositionOrcaInstruction: () => parseLiquidateTunaLpPositionOrcaInstruction,
|
|
609
615
|
parseLiquidateTunaSpotPositionFusionInstruction: () => parseLiquidateTunaSpotPositionFusionInstruction,
|
|
616
|
+
parseLiquidateTunaSpotPositionJupiterInstruction: () => parseLiquidateTunaSpotPositionJupiterInstruction,
|
|
610
617
|
parseLiquidateTunaSpotPositionOrcaInstruction: () => parseLiquidateTunaSpotPositionOrcaInstruction,
|
|
611
618
|
parseModifyTunaSpotPositionFusionInstruction: () => parseModifyTunaSpotPositionFusionInstruction,
|
|
612
619
|
parseModifyTunaSpotPositionJupiterInstruction: () => parseModifyTunaSpotPositionJupiterInstruction,
|
|
@@ -1470,36 +1477,37 @@ var TunaInstruction = /* @__PURE__ */ ((TunaInstruction2) => {
|
|
|
1470
1477
|
TunaInstruction2[TunaInstruction2["LiquidateTunaLpPositionFusion"] = 16] = "LiquidateTunaLpPositionFusion";
|
|
1471
1478
|
TunaInstruction2[TunaInstruction2["LiquidateTunaLpPositionOrca"] = 17] = "LiquidateTunaLpPositionOrca";
|
|
1472
1479
|
TunaInstruction2[TunaInstruction2["LiquidateTunaSpotPositionFusion"] = 18] = "LiquidateTunaSpotPositionFusion";
|
|
1473
|
-
TunaInstruction2[TunaInstruction2["
|
|
1474
|
-
TunaInstruction2[TunaInstruction2["
|
|
1475
|
-
TunaInstruction2[TunaInstruction2["
|
|
1476
|
-
TunaInstruction2[TunaInstruction2["
|
|
1477
|
-
TunaInstruction2[TunaInstruction2["
|
|
1478
|
-
TunaInstruction2[TunaInstruction2["
|
|
1479
|
-
TunaInstruction2[TunaInstruction2["
|
|
1480
|
-
TunaInstruction2[TunaInstruction2["
|
|
1481
|
-
TunaInstruction2[TunaInstruction2["
|
|
1482
|
-
TunaInstruction2[TunaInstruction2["
|
|
1483
|
-
TunaInstruction2[TunaInstruction2["
|
|
1484
|
-
TunaInstruction2[TunaInstruction2["
|
|
1485
|
-
TunaInstruction2[TunaInstruction2["
|
|
1486
|
-
TunaInstruction2[TunaInstruction2["
|
|
1487
|
-
TunaInstruction2[TunaInstruction2["
|
|
1488
|
-
TunaInstruction2[TunaInstruction2["
|
|
1489
|
-
TunaInstruction2[TunaInstruction2["
|
|
1490
|
-
TunaInstruction2[TunaInstruction2["
|
|
1491
|
-
TunaInstruction2[TunaInstruction2["
|
|
1492
|
-
TunaInstruction2[TunaInstruction2["
|
|
1493
|
-
TunaInstruction2[TunaInstruction2["
|
|
1494
|
-
TunaInstruction2[TunaInstruction2["
|
|
1495
|
-
TunaInstruction2[TunaInstruction2["
|
|
1496
|
-
TunaInstruction2[TunaInstruction2["
|
|
1497
|
-
TunaInstruction2[TunaInstruction2["
|
|
1498
|
-
TunaInstruction2[TunaInstruction2["
|
|
1499
|
-
TunaInstruction2[TunaInstruction2["
|
|
1500
|
-
TunaInstruction2[TunaInstruction2["
|
|
1501
|
-
TunaInstruction2[TunaInstruction2["
|
|
1502
|
-
TunaInstruction2[TunaInstruction2["
|
|
1480
|
+
TunaInstruction2[TunaInstruction2["LiquidateTunaSpotPositionJupiter"] = 19] = "LiquidateTunaSpotPositionJupiter";
|
|
1481
|
+
TunaInstruction2[TunaInstruction2["LiquidateTunaSpotPositionOrca"] = 20] = "LiquidateTunaSpotPositionOrca";
|
|
1482
|
+
TunaInstruction2[TunaInstruction2["ModifyTunaSpotPositionFusion"] = 21] = "ModifyTunaSpotPositionFusion";
|
|
1483
|
+
TunaInstruction2[TunaInstruction2["ModifyTunaSpotPositionJupiter"] = 22] = "ModifyTunaSpotPositionJupiter";
|
|
1484
|
+
TunaInstruction2[TunaInstruction2["ModifyTunaSpotPositionOrca"] = 23] = "ModifyTunaSpotPositionOrca";
|
|
1485
|
+
TunaInstruction2[TunaInstruction2["OpenAndIncreaseTunaLpPositionFusion"] = 24] = "OpenAndIncreaseTunaLpPositionFusion";
|
|
1486
|
+
TunaInstruction2[TunaInstruction2["OpenAndIncreaseTunaLpPositionOrca"] = 25] = "OpenAndIncreaseTunaLpPositionOrca";
|
|
1487
|
+
TunaInstruction2[TunaInstruction2["OpenLendingPosition"] = 26] = "OpenLendingPosition";
|
|
1488
|
+
TunaInstruction2[TunaInstruction2["OpenTunaLpPositionFusion"] = 27] = "OpenTunaLpPositionFusion";
|
|
1489
|
+
TunaInstruction2[TunaInstruction2["OpenTunaLpPositionOrca"] = 28] = "OpenTunaLpPositionOrca";
|
|
1490
|
+
TunaInstruction2[TunaInstruction2["OpenTunaSpotPosition"] = 29] = "OpenTunaSpotPosition";
|
|
1491
|
+
TunaInstruction2[TunaInstruction2["RebalanceTunaLpPositionFusion"] = 30] = "RebalanceTunaLpPositionFusion";
|
|
1492
|
+
TunaInstruction2[TunaInstruction2["RebalanceTunaLpPositionOrca"] = 31] = "RebalanceTunaLpPositionOrca";
|
|
1493
|
+
TunaInstruction2[TunaInstruction2["RepayBadDebt"] = 32] = "RepayBadDebt";
|
|
1494
|
+
TunaInstruction2[TunaInstruction2["RepayTunaLpPositionDebt"] = 33] = "RepayTunaLpPositionDebt";
|
|
1495
|
+
TunaInstruction2[TunaInstruction2["ResetTunaSpotPosition"] = 34] = "ResetTunaSpotPosition";
|
|
1496
|
+
TunaInstruction2[TunaInstruction2["SetAdminAuthority"] = 35] = "SetAdminAuthority";
|
|
1497
|
+
TunaInstruction2[TunaInstruction2["SetDefaultMaxPercentageOfLeftovers"] = 36] = "SetDefaultMaxPercentageOfLeftovers";
|
|
1498
|
+
TunaInstruction2[TunaInstruction2["SetDefaultMaxSwapSlippage"] = 37] = "SetDefaultMaxSwapSlippage";
|
|
1499
|
+
TunaInstruction2[TunaInstruction2["SetDefaultOraclePriceDeviationThreshold"] = 38] = "SetDefaultOraclePriceDeviationThreshold";
|
|
1500
|
+
TunaInstruction2[TunaInstruction2["SetFeeRecipient"] = 39] = "SetFeeRecipient";
|
|
1501
|
+
TunaInstruction2[TunaInstruction2["SetLiquidatorAuthority"] = 40] = "SetLiquidatorAuthority";
|
|
1502
|
+
TunaInstruction2[TunaInstruction2["SetOwnerAuthority"] = 41] = "SetOwnerAuthority";
|
|
1503
|
+
TunaInstruction2[TunaInstruction2["SetSuspendedState"] = 42] = "SetSuspendedState";
|
|
1504
|
+
TunaInstruction2[TunaInstruction2["SetTunaLpPositionFlags"] = 43] = "SetTunaLpPositionFlags";
|
|
1505
|
+
TunaInstruction2[TunaInstruction2["SetTunaLpPositionLimitOrders"] = 44] = "SetTunaLpPositionLimitOrders";
|
|
1506
|
+
TunaInstruction2[TunaInstruction2["SetTunaLpPositionRebalanceThreshold"] = 45] = "SetTunaLpPositionRebalanceThreshold";
|
|
1507
|
+
TunaInstruction2[TunaInstruction2["SetTunaSpotPositionLimitOrders"] = 46] = "SetTunaSpotPositionLimitOrders";
|
|
1508
|
+
TunaInstruction2[TunaInstruction2["UpdateMarket"] = 47] = "UpdateMarket";
|
|
1509
|
+
TunaInstruction2[TunaInstruction2["UpdateVault"] = 48] = "UpdateVault";
|
|
1510
|
+
TunaInstruction2[TunaInstruction2["Withdraw"] = 49] = "Withdraw";
|
|
1503
1511
|
return TunaInstruction2;
|
|
1504
1512
|
})(TunaInstruction || {});
|
|
1505
1513
|
function identifyTunaInstruction(instruction) {
|
|
@@ -1675,6 +1683,15 @@ function identifyTunaInstruction(instruction) {
|
|
|
1675
1683
|
)) {
|
|
1676
1684
|
return 18 /* LiquidateTunaSpotPositionFusion */;
|
|
1677
1685
|
}
|
|
1686
|
+
if ((0, import_kit13.containsBytes)(
|
|
1687
|
+
data,
|
|
1688
|
+
(0, import_kit13.fixEncoderSize)((0, import_kit13.getBytesEncoder)(), 8).encode(
|
|
1689
|
+
new Uint8Array([202, 175, 176, 66, 139, 120, 175, 193])
|
|
1690
|
+
),
|
|
1691
|
+
0
|
|
1692
|
+
)) {
|
|
1693
|
+
return 19 /* LiquidateTunaSpotPositionJupiter */;
|
|
1694
|
+
}
|
|
1678
1695
|
if ((0, import_kit13.containsBytes)(
|
|
1679
1696
|
data,
|
|
1680
1697
|
(0, import_kit13.fixEncoderSize)((0, import_kit13.getBytesEncoder)(), 8).encode(
|
|
@@ -1682,7 +1699,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1682
1699
|
),
|
|
1683
1700
|
0
|
|
1684
1701
|
)) {
|
|
1685
|
-
return
|
|
1702
|
+
return 20 /* LiquidateTunaSpotPositionOrca */;
|
|
1686
1703
|
}
|
|
1687
1704
|
if ((0, import_kit13.containsBytes)(
|
|
1688
1705
|
data,
|
|
@@ -1691,7 +1708,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1691
1708
|
),
|
|
1692
1709
|
0
|
|
1693
1710
|
)) {
|
|
1694
|
-
return
|
|
1711
|
+
return 21 /* ModifyTunaSpotPositionFusion */;
|
|
1695
1712
|
}
|
|
1696
1713
|
if ((0, import_kit13.containsBytes)(
|
|
1697
1714
|
data,
|
|
@@ -1700,7 +1717,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1700
1717
|
),
|
|
1701
1718
|
0
|
|
1702
1719
|
)) {
|
|
1703
|
-
return
|
|
1720
|
+
return 22 /* ModifyTunaSpotPositionJupiter */;
|
|
1704
1721
|
}
|
|
1705
1722
|
if ((0, import_kit13.containsBytes)(
|
|
1706
1723
|
data,
|
|
@@ -1709,7 +1726,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1709
1726
|
),
|
|
1710
1727
|
0
|
|
1711
1728
|
)) {
|
|
1712
|
-
return
|
|
1729
|
+
return 23 /* ModifyTunaSpotPositionOrca */;
|
|
1713
1730
|
}
|
|
1714
1731
|
if ((0, import_kit13.containsBytes)(
|
|
1715
1732
|
data,
|
|
@@ -1718,7 +1735,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1718
1735
|
),
|
|
1719
1736
|
0
|
|
1720
1737
|
)) {
|
|
1721
|
-
return
|
|
1738
|
+
return 24 /* OpenAndIncreaseTunaLpPositionFusion */;
|
|
1722
1739
|
}
|
|
1723
1740
|
if ((0, import_kit13.containsBytes)(
|
|
1724
1741
|
data,
|
|
@@ -1727,7 +1744,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1727
1744
|
),
|
|
1728
1745
|
0
|
|
1729
1746
|
)) {
|
|
1730
|
-
return
|
|
1747
|
+
return 25 /* OpenAndIncreaseTunaLpPositionOrca */;
|
|
1731
1748
|
}
|
|
1732
1749
|
if ((0, import_kit13.containsBytes)(
|
|
1733
1750
|
data,
|
|
@@ -1736,7 +1753,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1736
1753
|
),
|
|
1737
1754
|
0
|
|
1738
1755
|
)) {
|
|
1739
|
-
return
|
|
1756
|
+
return 26 /* OpenLendingPosition */;
|
|
1740
1757
|
}
|
|
1741
1758
|
if ((0, import_kit13.containsBytes)(
|
|
1742
1759
|
data,
|
|
@@ -1745,7 +1762,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1745
1762
|
),
|
|
1746
1763
|
0
|
|
1747
1764
|
)) {
|
|
1748
|
-
return
|
|
1765
|
+
return 27 /* OpenTunaLpPositionFusion */;
|
|
1749
1766
|
}
|
|
1750
1767
|
if ((0, import_kit13.containsBytes)(
|
|
1751
1768
|
data,
|
|
@@ -1754,7 +1771,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1754
1771
|
),
|
|
1755
1772
|
0
|
|
1756
1773
|
)) {
|
|
1757
|
-
return
|
|
1774
|
+
return 28 /* OpenTunaLpPositionOrca */;
|
|
1758
1775
|
}
|
|
1759
1776
|
if ((0, import_kit13.containsBytes)(
|
|
1760
1777
|
data,
|
|
@@ -1763,7 +1780,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1763
1780
|
),
|
|
1764
1781
|
0
|
|
1765
1782
|
)) {
|
|
1766
|
-
return
|
|
1783
|
+
return 29 /* OpenTunaSpotPosition */;
|
|
1767
1784
|
}
|
|
1768
1785
|
if ((0, import_kit13.containsBytes)(
|
|
1769
1786
|
data,
|
|
@@ -1772,7 +1789,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1772
1789
|
),
|
|
1773
1790
|
0
|
|
1774
1791
|
)) {
|
|
1775
|
-
return
|
|
1792
|
+
return 30 /* RebalanceTunaLpPositionFusion */;
|
|
1776
1793
|
}
|
|
1777
1794
|
if ((0, import_kit13.containsBytes)(
|
|
1778
1795
|
data,
|
|
@@ -1781,7 +1798,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1781
1798
|
),
|
|
1782
1799
|
0
|
|
1783
1800
|
)) {
|
|
1784
|
-
return
|
|
1801
|
+
return 31 /* RebalanceTunaLpPositionOrca */;
|
|
1785
1802
|
}
|
|
1786
1803
|
if ((0, import_kit13.containsBytes)(
|
|
1787
1804
|
data,
|
|
@@ -1790,7 +1807,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1790
1807
|
),
|
|
1791
1808
|
0
|
|
1792
1809
|
)) {
|
|
1793
|
-
return
|
|
1810
|
+
return 32 /* RepayBadDebt */;
|
|
1794
1811
|
}
|
|
1795
1812
|
if ((0, import_kit13.containsBytes)(
|
|
1796
1813
|
data,
|
|
@@ -1799,7 +1816,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1799
1816
|
),
|
|
1800
1817
|
0
|
|
1801
1818
|
)) {
|
|
1802
|
-
return
|
|
1819
|
+
return 33 /* RepayTunaLpPositionDebt */;
|
|
1803
1820
|
}
|
|
1804
1821
|
if ((0, import_kit13.containsBytes)(
|
|
1805
1822
|
data,
|
|
@@ -1808,7 +1825,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1808
1825
|
),
|
|
1809
1826
|
0
|
|
1810
1827
|
)) {
|
|
1811
|
-
return
|
|
1828
|
+
return 34 /* ResetTunaSpotPosition */;
|
|
1812
1829
|
}
|
|
1813
1830
|
if ((0, import_kit13.containsBytes)(
|
|
1814
1831
|
data,
|
|
@@ -1817,7 +1834,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1817
1834
|
),
|
|
1818
1835
|
0
|
|
1819
1836
|
)) {
|
|
1820
|
-
return
|
|
1837
|
+
return 35 /* SetAdminAuthority */;
|
|
1821
1838
|
}
|
|
1822
1839
|
if ((0, import_kit13.containsBytes)(
|
|
1823
1840
|
data,
|
|
@@ -1826,7 +1843,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1826
1843
|
),
|
|
1827
1844
|
0
|
|
1828
1845
|
)) {
|
|
1829
|
-
return
|
|
1846
|
+
return 36 /* SetDefaultMaxPercentageOfLeftovers */;
|
|
1830
1847
|
}
|
|
1831
1848
|
if ((0, import_kit13.containsBytes)(
|
|
1832
1849
|
data,
|
|
@@ -1835,7 +1852,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1835
1852
|
),
|
|
1836
1853
|
0
|
|
1837
1854
|
)) {
|
|
1838
|
-
return
|
|
1855
|
+
return 37 /* SetDefaultMaxSwapSlippage */;
|
|
1839
1856
|
}
|
|
1840
1857
|
if ((0, import_kit13.containsBytes)(
|
|
1841
1858
|
data,
|
|
@@ -1844,7 +1861,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1844
1861
|
),
|
|
1845
1862
|
0
|
|
1846
1863
|
)) {
|
|
1847
|
-
return
|
|
1864
|
+
return 38 /* SetDefaultOraclePriceDeviationThreshold */;
|
|
1848
1865
|
}
|
|
1849
1866
|
if ((0, import_kit13.containsBytes)(
|
|
1850
1867
|
data,
|
|
@@ -1853,7 +1870,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1853
1870
|
),
|
|
1854
1871
|
0
|
|
1855
1872
|
)) {
|
|
1856
|
-
return
|
|
1873
|
+
return 39 /* SetFeeRecipient */;
|
|
1857
1874
|
}
|
|
1858
1875
|
if ((0, import_kit13.containsBytes)(
|
|
1859
1876
|
data,
|
|
@@ -1862,7 +1879,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1862
1879
|
),
|
|
1863
1880
|
0
|
|
1864
1881
|
)) {
|
|
1865
|
-
return
|
|
1882
|
+
return 40 /* SetLiquidatorAuthority */;
|
|
1866
1883
|
}
|
|
1867
1884
|
if ((0, import_kit13.containsBytes)(
|
|
1868
1885
|
data,
|
|
@@ -1871,7 +1888,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1871
1888
|
),
|
|
1872
1889
|
0
|
|
1873
1890
|
)) {
|
|
1874
|
-
return
|
|
1891
|
+
return 41 /* SetOwnerAuthority */;
|
|
1875
1892
|
}
|
|
1876
1893
|
if ((0, import_kit13.containsBytes)(
|
|
1877
1894
|
data,
|
|
@@ -1880,7 +1897,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1880
1897
|
),
|
|
1881
1898
|
0
|
|
1882
1899
|
)) {
|
|
1883
|
-
return
|
|
1900
|
+
return 42 /* SetSuspendedState */;
|
|
1884
1901
|
}
|
|
1885
1902
|
if ((0, import_kit13.containsBytes)(
|
|
1886
1903
|
data,
|
|
@@ -1889,7 +1906,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1889
1906
|
),
|
|
1890
1907
|
0
|
|
1891
1908
|
)) {
|
|
1892
|
-
return
|
|
1909
|
+
return 43 /* SetTunaLpPositionFlags */;
|
|
1893
1910
|
}
|
|
1894
1911
|
if ((0, import_kit13.containsBytes)(
|
|
1895
1912
|
data,
|
|
@@ -1898,7 +1915,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1898
1915
|
),
|
|
1899
1916
|
0
|
|
1900
1917
|
)) {
|
|
1901
|
-
return
|
|
1918
|
+
return 44 /* SetTunaLpPositionLimitOrders */;
|
|
1902
1919
|
}
|
|
1903
1920
|
if ((0, import_kit13.containsBytes)(
|
|
1904
1921
|
data,
|
|
@@ -1907,7 +1924,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1907
1924
|
),
|
|
1908
1925
|
0
|
|
1909
1926
|
)) {
|
|
1910
|
-
return
|
|
1927
|
+
return 45 /* SetTunaLpPositionRebalanceThreshold */;
|
|
1911
1928
|
}
|
|
1912
1929
|
if ((0, import_kit13.containsBytes)(
|
|
1913
1930
|
data,
|
|
@@ -1916,7 +1933,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1916
1933
|
),
|
|
1917
1934
|
0
|
|
1918
1935
|
)) {
|
|
1919
|
-
return
|
|
1936
|
+
return 46 /* SetTunaSpotPositionLimitOrders */;
|
|
1920
1937
|
}
|
|
1921
1938
|
if ((0, import_kit13.containsBytes)(
|
|
1922
1939
|
data,
|
|
@@ -1925,7 +1942,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1925
1942
|
),
|
|
1926
1943
|
0
|
|
1927
1944
|
)) {
|
|
1928
|
-
return
|
|
1945
|
+
return 47 /* UpdateMarket */;
|
|
1929
1946
|
}
|
|
1930
1947
|
if ((0, import_kit13.containsBytes)(
|
|
1931
1948
|
data,
|
|
@@ -1934,7 +1951,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1934
1951
|
),
|
|
1935
1952
|
0
|
|
1936
1953
|
)) {
|
|
1937
|
-
return
|
|
1954
|
+
return 48 /* UpdateVault */;
|
|
1938
1955
|
}
|
|
1939
1956
|
if ((0, import_kit13.containsBytes)(
|
|
1940
1957
|
data,
|
|
@@ -1943,7 +1960,7 @@ function identifyTunaInstruction(instruction) {
|
|
|
1943
1960
|
),
|
|
1944
1961
|
0
|
|
1945
1962
|
)) {
|
|
1946
|
-
return
|
|
1963
|
+
return 49 /* Withdraw */;
|
|
1947
1964
|
}
|
|
1948
1965
|
throw new Error(
|
|
1949
1966
|
"The provided instruction could not be identified as a tuna instruction."
|
|
@@ -4942,8 +4959,202 @@ function parseLiquidateTunaSpotPositionFusionInstruction(instruction) {
|
|
|
4942
4959
|
};
|
|
4943
4960
|
}
|
|
4944
4961
|
|
|
4945
|
-
// src/generated/instructions/
|
|
4962
|
+
// src/generated/instructions/liquidateTunaSpotPositionJupiter.ts
|
|
4946
4963
|
var import_kit35 = require("@solana/kit");
|
|
4964
|
+
var LIQUIDATE_TUNA_SPOT_POSITION_JUPITER_DISCRIMINATOR = new Uint8Array([202, 175, 176, 66, 139, 120, 175, 193]);
|
|
4965
|
+
function getLiquidateTunaSpotPositionJupiterDiscriminatorBytes() {
|
|
4966
|
+
return (0, import_kit35.fixEncoderSize)((0, import_kit35.getBytesEncoder)(), 8).encode(
|
|
4967
|
+
LIQUIDATE_TUNA_SPOT_POSITION_JUPITER_DISCRIMINATOR
|
|
4968
|
+
);
|
|
4969
|
+
}
|
|
4970
|
+
function getLiquidateTunaSpotPositionJupiterInstructionDataEncoder() {
|
|
4971
|
+
return (0, import_kit35.transformEncoder)(
|
|
4972
|
+
(0, import_kit35.getStructEncoder)([
|
|
4973
|
+
["discriminator", (0, import_kit35.fixEncoderSize)((0, import_kit35.getBytesEncoder)(), 8)],
|
|
4974
|
+
["decreasePercent", (0, import_kit35.getU32Encoder)()],
|
|
4975
|
+
["routeData", (0, import_kit35.addEncoderSizePrefix)((0, import_kit35.getBytesEncoder)(), (0, import_kit35.getU32Encoder)())]
|
|
4976
|
+
]),
|
|
4977
|
+
(value) => ({
|
|
4978
|
+
...value,
|
|
4979
|
+
discriminator: LIQUIDATE_TUNA_SPOT_POSITION_JUPITER_DISCRIMINATOR
|
|
4980
|
+
})
|
|
4981
|
+
);
|
|
4982
|
+
}
|
|
4983
|
+
function getLiquidateTunaSpotPositionJupiterInstructionDataDecoder() {
|
|
4984
|
+
return (0, import_kit35.getStructDecoder)([
|
|
4985
|
+
["discriminator", (0, import_kit35.fixDecoderSize)((0, import_kit35.getBytesDecoder)(), 8)],
|
|
4986
|
+
["decreasePercent", (0, import_kit35.getU32Decoder)()],
|
|
4987
|
+
["routeData", (0, import_kit35.addDecoderSizePrefix)((0, import_kit35.getBytesDecoder)(), (0, import_kit35.getU32Decoder)())]
|
|
4988
|
+
]);
|
|
4989
|
+
}
|
|
4990
|
+
function getLiquidateTunaSpotPositionJupiterInstructionDataCodec() {
|
|
4991
|
+
return (0, import_kit35.combineCodec)(
|
|
4992
|
+
getLiquidateTunaSpotPositionJupiterInstructionDataEncoder(),
|
|
4993
|
+
getLiquidateTunaSpotPositionJupiterInstructionDataDecoder()
|
|
4994
|
+
);
|
|
4995
|
+
}
|
|
4996
|
+
function getLiquidateTunaSpotPositionJupiterInstruction(input, config) {
|
|
4997
|
+
const programAddress = config?.programAddress ?? TUNA_PROGRAM_ADDRESS;
|
|
4998
|
+
const originalAccounts = {
|
|
4999
|
+
authority: { value: input.authority ?? null, isWritable: true },
|
|
5000
|
+
tunaConfig: { value: input.tunaConfig ?? null, isWritable: false },
|
|
5001
|
+
mintA: { value: input.mintA ?? null, isWritable: false },
|
|
5002
|
+
mintB: { value: input.mintB ?? null, isWritable: false },
|
|
5003
|
+
tokenProgramA: { value: input.tokenProgramA ?? null, isWritable: false },
|
|
5004
|
+
tokenProgramB: { value: input.tokenProgramB ?? null, isWritable: false },
|
|
5005
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
5006
|
+
vaultA: { value: input.vaultA ?? null, isWritable: true },
|
|
5007
|
+
vaultB: { value: input.vaultB ?? null, isWritable: true },
|
|
5008
|
+
vaultAAta: { value: input.vaultAAta ?? null, isWritable: true },
|
|
5009
|
+
vaultBAta: { value: input.vaultBAta ?? null, isWritable: true },
|
|
5010
|
+
tunaPosition: { value: input.tunaPosition ?? null, isWritable: true },
|
|
5011
|
+
tunaPositionAtaA: {
|
|
5012
|
+
value: input.tunaPositionAtaA ?? null,
|
|
5013
|
+
isWritable: true
|
|
5014
|
+
},
|
|
5015
|
+
tunaPositionAtaB: {
|
|
5016
|
+
value: input.tunaPositionAtaB ?? null,
|
|
5017
|
+
isWritable: true
|
|
5018
|
+
},
|
|
5019
|
+
feeRecipientAtaA: {
|
|
5020
|
+
value: input.feeRecipientAtaA ?? null,
|
|
5021
|
+
isWritable: true
|
|
5022
|
+
},
|
|
5023
|
+
feeRecipientAtaB: {
|
|
5024
|
+
value: input.feeRecipientAtaB ?? null,
|
|
5025
|
+
isWritable: true
|
|
5026
|
+
},
|
|
5027
|
+
tunaPositionOwner: {
|
|
5028
|
+
value: input.tunaPositionOwner ?? null,
|
|
5029
|
+
isWritable: true
|
|
5030
|
+
},
|
|
5031
|
+
tunaPositionOwnerAtaA: {
|
|
5032
|
+
value: input.tunaPositionOwnerAtaA ?? null,
|
|
5033
|
+
isWritable: true
|
|
5034
|
+
},
|
|
5035
|
+
tunaPositionOwnerAtaB: {
|
|
5036
|
+
value: input.tunaPositionOwnerAtaB ?? null,
|
|
5037
|
+
isWritable: true
|
|
5038
|
+
},
|
|
5039
|
+
pythOraclePriceFeedA: {
|
|
5040
|
+
value: input.pythOraclePriceFeedA ?? null,
|
|
5041
|
+
isWritable: false
|
|
5042
|
+
},
|
|
5043
|
+
pythOraclePriceFeedB: {
|
|
5044
|
+
value: input.pythOraclePriceFeedB ?? null,
|
|
5045
|
+
isWritable: false
|
|
5046
|
+
},
|
|
5047
|
+
pool: { value: input.pool ?? null, isWritable: false },
|
|
5048
|
+
jupiterProgram: { value: input.jupiterProgram ?? null, isWritable: false },
|
|
5049
|
+
jupiterEventAuthority: {
|
|
5050
|
+
value: input.jupiterEventAuthority ?? null,
|
|
5051
|
+
isWritable: false
|
|
5052
|
+
},
|
|
5053
|
+
jupiterProgramAuthority: {
|
|
5054
|
+
value: input.jupiterProgramAuthority ?? null,
|
|
5055
|
+
isWritable: false
|
|
5056
|
+
},
|
|
5057
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
5058
|
+
memoProgram: { value: input.memoProgram ?? null, isWritable: false },
|
|
5059
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
5060
|
+
};
|
|
5061
|
+
const accounts = originalAccounts;
|
|
5062
|
+
const args = { ...input };
|
|
5063
|
+
if (!accounts.tokenProgram.value) {
|
|
5064
|
+
accounts.tokenProgram.value = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
5065
|
+
}
|
|
5066
|
+
if (!accounts.systemProgram.value) {
|
|
5067
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
5068
|
+
}
|
|
5069
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
5070
|
+
const instruction = {
|
|
5071
|
+
accounts: [
|
|
5072
|
+
getAccountMeta(accounts.authority),
|
|
5073
|
+
getAccountMeta(accounts.tunaConfig),
|
|
5074
|
+
getAccountMeta(accounts.mintA),
|
|
5075
|
+
getAccountMeta(accounts.mintB),
|
|
5076
|
+
getAccountMeta(accounts.tokenProgramA),
|
|
5077
|
+
getAccountMeta(accounts.tokenProgramB),
|
|
5078
|
+
getAccountMeta(accounts.market),
|
|
5079
|
+
getAccountMeta(accounts.vaultA),
|
|
5080
|
+
getAccountMeta(accounts.vaultB),
|
|
5081
|
+
getAccountMeta(accounts.vaultAAta),
|
|
5082
|
+
getAccountMeta(accounts.vaultBAta),
|
|
5083
|
+
getAccountMeta(accounts.tunaPosition),
|
|
5084
|
+
getAccountMeta(accounts.tunaPositionAtaA),
|
|
5085
|
+
getAccountMeta(accounts.tunaPositionAtaB),
|
|
5086
|
+
getAccountMeta(accounts.feeRecipientAtaA),
|
|
5087
|
+
getAccountMeta(accounts.feeRecipientAtaB),
|
|
5088
|
+
getAccountMeta(accounts.tunaPositionOwner),
|
|
5089
|
+
getAccountMeta(accounts.tunaPositionOwnerAtaA),
|
|
5090
|
+
getAccountMeta(accounts.tunaPositionOwnerAtaB),
|
|
5091
|
+
getAccountMeta(accounts.pythOraclePriceFeedA),
|
|
5092
|
+
getAccountMeta(accounts.pythOraclePriceFeedB),
|
|
5093
|
+
getAccountMeta(accounts.pool),
|
|
5094
|
+
getAccountMeta(accounts.jupiterProgram),
|
|
5095
|
+
getAccountMeta(accounts.jupiterEventAuthority),
|
|
5096
|
+
getAccountMeta(accounts.jupiterProgramAuthority),
|
|
5097
|
+
getAccountMeta(accounts.tokenProgram),
|
|
5098
|
+
getAccountMeta(accounts.memoProgram),
|
|
5099
|
+
getAccountMeta(accounts.systemProgram)
|
|
5100
|
+
],
|
|
5101
|
+
programAddress,
|
|
5102
|
+
data: getLiquidateTunaSpotPositionJupiterInstructionDataEncoder().encode(
|
|
5103
|
+
args
|
|
5104
|
+
)
|
|
5105
|
+
};
|
|
5106
|
+
return instruction;
|
|
5107
|
+
}
|
|
5108
|
+
function parseLiquidateTunaSpotPositionJupiterInstruction(instruction) {
|
|
5109
|
+
if (instruction.accounts.length < 28) {
|
|
5110
|
+
throw new Error("Not enough accounts");
|
|
5111
|
+
}
|
|
5112
|
+
let accountIndex = 0;
|
|
5113
|
+
const getNextAccount = () => {
|
|
5114
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
5115
|
+
accountIndex += 1;
|
|
5116
|
+
return accountMeta;
|
|
5117
|
+
};
|
|
5118
|
+
return {
|
|
5119
|
+
programAddress: instruction.programAddress,
|
|
5120
|
+
accounts: {
|
|
5121
|
+
authority: getNextAccount(),
|
|
5122
|
+
tunaConfig: getNextAccount(),
|
|
5123
|
+
mintA: getNextAccount(),
|
|
5124
|
+
mintB: getNextAccount(),
|
|
5125
|
+
tokenProgramA: getNextAccount(),
|
|
5126
|
+
tokenProgramB: getNextAccount(),
|
|
5127
|
+
market: getNextAccount(),
|
|
5128
|
+
vaultA: getNextAccount(),
|
|
5129
|
+
vaultB: getNextAccount(),
|
|
5130
|
+
vaultAAta: getNextAccount(),
|
|
5131
|
+
vaultBAta: getNextAccount(),
|
|
5132
|
+
tunaPosition: getNextAccount(),
|
|
5133
|
+
tunaPositionAtaA: getNextAccount(),
|
|
5134
|
+
tunaPositionAtaB: getNextAccount(),
|
|
5135
|
+
feeRecipientAtaA: getNextAccount(),
|
|
5136
|
+
feeRecipientAtaB: getNextAccount(),
|
|
5137
|
+
tunaPositionOwner: getNextAccount(),
|
|
5138
|
+
tunaPositionOwnerAtaA: getNextAccount(),
|
|
5139
|
+
tunaPositionOwnerAtaB: getNextAccount(),
|
|
5140
|
+
pythOraclePriceFeedA: getNextAccount(),
|
|
5141
|
+
pythOraclePriceFeedB: getNextAccount(),
|
|
5142
|
+
pool: getNextAccount(),
|
|
5143
|
+
jupiterProgram: getNextAccount(),
|
|
5144
|
+
jupiterEventAuthority: getNextAccount(),
|
|
5145
|
+
jupiterProgramAuthority: getNextAccount(),
|
|
5146
|
+
tokenProgram: getNextAccount(),
|
|
5147
|
+
memoProgram: getNextAccount(),
|
|
5148
|
+
systemProgram: getNextAccount()
|
|
5149
|
+
},
|
|
5150
|
+
data: getLiquidateTunaSpotPositionJupiterInstructionDataDecoder().decode(
|
|
5151
|
+
instruction.data
|
|
5152
|
+
)
|
|
5153
|
+
};
|
|
5154
|
+
}
|
|
5155
|
+
|
|
5156
|
+
// src/generated/instructions/liquidateTunaSpotPositionOrca.ts
|
|
5157
|
+
var import_kit36 = require("@solana/kit");
|
|
4947
5158
|
var LIQUIDATE_TUNA_SPOT_POSITION_ORCA_DISCRIMINATOR = new Uint8Array([
|
|
4948
5159
|
4,
|
|
4949
5160
|
211,
|
|
@@ -4955,15 +5166,15 @@ var LIQUIDATE_TUNA_SPOT_POSITION_ORCA_DISCRIMINATOR = new Uint8Array([
|
|
|
4955
5166
|
162
|
|
4956
5167
|
]);
|
|
4957
5168
|
function getLiquidateTunaSpotPositionOrcaDiscriminatorBytes() {
|
|
4958
|
-
return (0,
|
|
5169
|
+
return (0, import_kit36.fixEncoderSize)((0, import_kit36.getBytesEncoder)(), 8).encode(
|
|
4959
5170
|
LIQUIDATE_TUNA_SPOT_POSITION_ORCA_DISCRIMINATOR
|
|
4960
5171
|
);
|
|
4961
5172
|
}
|
|
4962
5173
|
function getLiquidateTunaSpotPositionOrcaInstructionDataEncoder() {
|
|
4963
|
-
return (0,
|
|
4964
|
-
(0,
|
|
4965
|
-
["discriminator", (0,
|
|
4966
|
-
["decreasePercent", (0,
|
|
5174
|
+
return (0, import_kit36.transformEncoder)(
|
|
5175
|
+
(0, import_kit36.getStructEncoder)([
|
|
5176
|
+
["discriminator", (0, import_kit36.fixEncoderSize)((0, import_kit36.getBytesEncoder)(), 8)],
|
|
5177
|
+
["decreasePercent", (0, import_kit36.getU32Encoder)()],
|
|
4967
5178
|
["remainingAccountsInfo", getRemainingAccountsInfoEncoder()]
|
|
4968
5179
|
]),
|
|
4969
5180
|
(value) => ({
|
|
@@ -4973,14 +5184,14 @@ function getLiquidateTunaSpotPositionOrcaInstructionDataEncoder() {
|
|
|
4973
5184
|
);
|
|
4974
5185
|
}
|
|
4975
5186
|
function getLiquidateTunaSpotPositionOrcaInstructionDataDecoder() {
|
|
4976
|
-
return (0,
|
|
4977
|
-
["discriminator", (0,
|
|
4978
|
-
["decreasePercent", (0,
|
|
5187
|
+
return (0, import_kit36.getStructDecoder)([
|
|
5188
|
+
["discriminator", (0, import_kit36.fixDecoderSize)((0, import_kit36.getBytesDecoder)(), 8)],
|
|
5189
|
+
["decreasePercent", (0, import_kit36.getU32Decoder)()],
|
|
4979
5190
|
["remainingAccountsInfo", getRemainingAccountsInfoDecoder()]
|
|
4980
5191
|
]);
|
|
4981
5192
|
}
|
|
4982
5193
|
function getLiquidateTunaSpotPositionOrcaInstructionDataCodec() {
|
|
4983
|
-
return (0,
|
|
5194
|
+
return (0, import_kit36.combineCodec)(
|
|
4984
5195
|
getLiquidateTunaSpotPositionOrcaInstructionDataEncoder(),
|
|
4985
5196
|
getLiquidateTunaSpotPositionOrcaInstructionDataDecoder()
|
|
4986
5197
|
);
|
|
@@ -5135,7 +5346,7 @@ function parseLiquidateTunaSpotPositionOrcaInstruction(instruction) {
|
|
|
5135
5346
|
}
|
|
5136
5347
|
|
|
5137
5348
|
// src/generated/instructions/modifyTunaSpotPositionFusion.ts
|
|
5138
|
-
var
|
|
5349
|
+
var import_kit37 = require("@solana/kit");
|
|
5139
5350
|
var MODIFY_TUNA_SPOT_POSITION_FUSION_DISCRIMINATOR = new Uint8Array([
|
|
5140
5351
|
98,
|
|
5141
5352
|
4,
|
|
@@ -5147,18 +5358,18 @@ var MODIFY_TUNA_SPOT_POSITION_FUSION_DISCRIMINATOR = new Uint8Array([
|
|
|
5147
5358
|
30
|
|
5148
5359
|
]);
|
|
5149
5360
|
function getModifyTunaSpotPositionFusionDiscriminatorBytes() {
|
|
5150
|
-
return (0,
|
|
5361
|
+
return (0, import_kit37.fixEncoderSize)((0, import_kit37.getBytesEncoder)(), 8).encode(
|
|
5151
5362
|
MODIFY_TUNA_SPOT_POSITION_FUSION_DISCRIMINATOR
|
|
5152
5363
|
);
|
|
5153
5364
|
}
|
|
5154
5365
|
function getModifyTunaSpotPositionFusionInstructionDataEncoder() {
|
|
5155
|
-
return (0,
|
|
5156
|
-
(0,
|
|
5157
|
-
["discriminator", (0,
|
|
5158
|
-
["decreasePercent", (0,
|
|
5159
|
-
["collateralAmount", (0,
|
|
5160
|
-
["borrowAmount", (0,
|
|
5161
|
-
["requiredSwapAmount", (0,
|
|
5366
|
+
return (0, import_kit37.transformEncoder)(
|
|
5367
|
+
(0, import_kit37.getStructEncoder)([
|
|
5368
|
+
["discriminator", (0, import_kit37.fixEncoderSize)((0, import_kit37.getBytesEncoder)(), 8)],
|
|
5369
|
+
["decreasePercent", (0, import_kit37.getU32Encoder)()],
|
|
5370
|
+
["collateralAmount", (0, import_kit37.getU64Encoder)()],
|
|
5371
|
+
["borrowAmount", (0, import_kit37.getU64Encoder)()],
|
|
5372
|
+
["requiredSwapAmount", (0, import_kit37.getU64Encoder)()],
|
|
5162
5373
|
["remainingAccountsInfo", getRemainingAccountsInfoEncoder()]
|
|
5163
5374
|
]),
|
|
5164
5375
|
(value) => ({
|
|
@@ -5168,17 +5379,17 @@ function getModifyTunaSpotPositionFusionInstructionDataEncoder() {
|
|
|
5168
5379
|
);
|
|
5169
5380
|
}
|
|
5170
5381
|
function getModifyTunaSpotPositionFusionInstructionDataDecoder() {
|
|
5171
|
-
return (0,
|
|
5172
|
-
["discriminator", (0,
|
|
5173
|
-
["decreasePercent", (0,
|
|
5174
|
-
["collateralAmount", (0,
|
|
5175
|
-
["borrowAmount", (0,
|
|
5176
|
-
["requiredSwapAmount", (0,
|
|
5382
|
+
return (0, import_kit37.getStructDecoder)([
|
|
5383
|
+
["discriminator", (0, import_kit37.fixDecoderSize)((0, import_kit37.getBytesDecoder)(), 8)],
|
|
5384
|
+
["decreasePercent", (0, import_kit37.getU32Decoder)()],
|
|
5385
|
+
["collateralAmount", (0, import_kit37.getU64Decoder)()],
|
|
5386
|
+
["borrowAmount", (0, import_kit37.getU64Decoder)()],
|
|
5387
|
+
["requiredSwapAmount", (0, import_kit37.getU64Decoder)()],
|
|
5177
5388
|
["remainingAccountsInfo", getRemainingAccountsInfoDecoder()]
|
|
5178
5389
|
]);
|
|
5179
5390
|
}
|
|
5180
5391
|
function getModifyTunaSpotPositionFusionInstructionDataCodec() {
|
|
5181
|
-
return (0,
|
|
5392
|
+
return (0, import_kit37.combineCodec)(
|
|
5182
5393
|
getModifyTunaSpotPositionFusionInstructionDataEncoder(),
|
|
5183
5394
|
getModifyTunaSpotPositionFusionInstructionDataDecoder()
|
|
5184
5395
|
);
|
|
@@ -5327,7 +5538,7 @@ function parseModifyTunaSpotPositionFusionInstruction(instruction) {
|
|
|
5327
5538
|
}
|
|
5328
5539
|
|
|
5329
5540
|
// src/generated/instructions/modifyTunaSpotPositionJupiter.ts
|
|
5330
|
-
var
|
|
5541
|
+
var import_kit38 = require("@solana/kit");
|
|
5331
5542
|
var MODIFY_TUNA_SPOT_POSITION_JUPITER_DISCRIMINATOR = new Uint8Array([
|
|
5332
5543
|
35,
|
|
5333
5544
|
235,
|
|
@@ -5339,18 +5550,18 @@ var MODIFY_TUNA_SPOT_POSITION_JUPITER_DISCRIMINATOR = new Uint8Array([
|
|
|
5339
5550
|
9
|
|
5340
5551
|
]);
|
|
5341
5552
|
function getModifyTunaSpotPositionJupiterDiscriminatorBytes() {
|
|
5342
|
-
return (0,
|
|
5553
|
+
return (0, import_kit38.fixEncoderSize)((0, import_kit38.getBytesEncoder)(), 8).encode(
|
|
5343
5554
|
MODIFY_TUNA_SPOT_POSITION_JUPITER_DISCRIMINATOR
|
|
5344
5555
|
);
|
|
5345
5556
|
}
|
|
5346
5557
|
function getModifyTunaSpotPositionJupiterInstructionDataEncoder() {
|
|
5347
|
-
return (0,
|
|
5348
|
-
(0,
|
|
5349
|
-
["discriminator", (0,
|
|
5350
|
-
["decreasePercent", (0,
|
|
5351
|
-
["collateralAmount", (0,
|
|
5352
|
-
["borrowAmount", (0,
|
|
5353
|
-
["routeData", (0,
|
|
5558
|
+
return (0, import_kit38.transformEncoder)(
|
|
5559
|
+
(0, import_kit38.getStructEncoder)([
|
|
5560
|
+
["discriminator", (0, import_kit38.fixEncoderSize)((0, import_kit38.getBytesEncoder)(), 8)],
|
|
5561
|
+
["decreasePercent", (0, import_kit38.getU32Encoder)()],
|
|
5562
|
+
["collateralAmount", (0, import_kit38.getU64Encoder)()],
|
|
5563
|
+
["borrowAmount", (0, import_kit38.getU64Encoder)()],
|
|
5564
|
+
["routeData", (0, import_kit38.addEncoderSizePrefix)((0, import_kit38.getBytesEncoder)(), (0, import_kit38.getU32Encoder)())]
|
|
5354
5565
|
]),
|
|
5355
5566
|
(value) => ({
|
|
5356
5567
|
...value,
|
|
@@ -5359,16 +5570,16 @@ function getModifyTunaSpotPositionJupiterInstructionDataEncoder() {
|
|
|
5359
5570
|
);
|
|
5360
5571
|
}
|
|
5361
5572
|
function getModifyTunaSpotPositionJupiterInstructionDataDecoder() {
|
|
5362
|
-
return (0,
|
|
5363
|
-
["discriminator", (0,
|
|
5364
|
-
["decreasePercent", (0,
|
|
5365
|
-
["collateralAmount", (0,
|
|
5366
|
-
["borrowAmount", (0,
|
|
5367
|
-
["routeData", (0,
|
|
5573
|
+
return (0, import_kit38.getStructDecoder)([
|
|
5574
|
+
["discriminator", (0, import_kit38.fixDecoderSize)((0, import_kit38.getBytesDecoder)(), 8)],
|
|
5575
|
+
["decreasePercent", (0, import_kit38.getU32Decoder)()],
|
|
5576
|
+
["collateralAmount", (0, import_kit38.getU64Decoder)()],
|
|
5577
|
+
["borrowAmount", (0, import_kit38.getU64Decoder)()],
|
|
5578
|
+
["routeData", (0, import_kit38.addDecoderSizePrefix)((0, import_kit38.getBytesDecoder)(), (0, import_kit38.getU32Decoder)())]
|
|
5368
5579
|
]);
|
|
5369
5580
|
}
|
|
5370
5581
|
function getModifyTunaSpotPositionJupiterInstructionDataCodec() {
|
|
5371
|
-
return (0,
|
|
5582
|
+
return (0, import_kit38.combineCodec)(
|
|
5372
5583
|
getModifyTunaSpotPositionJupiterInstructionDataEncoder(),
|
|
5373
5584
|
getModifyTunaSpotPositionJupiterInstructionDataDecoder()
|
|
5374
5585
|
);
|
|
@@ -5528,7 +5739,7 @@ function parseModifyTunaSpotPositionJupiterInstruction(instruction) {
|
|
|
5528
5739
|
}
|
|
5529
5740
|
|
|
5530
5741
|
// src/generated/instructions/modifyTunaSpotPositionOrca.ts
|
|
5531
|
-
var
|
|
5742
|
+
var import_kit39 = require("@solana/kit");
|
|
5532
5743
|
var MODIFY_TUNA_SPOT_POSITION_ORCA_DISCRIMINATOR = new Uint8Array([
|
|
5533
5744
|
133,
|
|
5534
5745
|
227,
|
|
@@ -5540,18 +5751,18 @@ var MODIFY_TUNA_SPOT_POSITION_ORCA_DISCRIMINATOR = new Uint8Array([
|
|
|
5540
5751
|
218
|
|
5541
5752
|
]);
|
|
5542
5753
|
function getModifyTunaSpotPositionOrcaDiscriminatorBytes() {
|
|
5543
|
-
return (0,
|
|
5754
|
+
return (0, import_kit39.fixEncoderSize)((0, import_kit39.getBytesEncoder)(), 8).encode(
|
|
5544
5755
|
MODIFY_TUNA_SPOT_POSITION_ORCA_DISCRIMINATOR
|
|
5545
5756
|
);
|
|
5546
5757
|
}
|
|
5547
5758
|
function getModifyTunaSpotPositionOrcaInstructionDataEncoder() {
|
|
5548
|
-
return (0,
|
|
5549
|
-
(0,
|
|
5550
|
-
["discriminator", (0,
|
|
5551
|
-
["decreasePercent", (0,
|
|
5552
|
-
["collateralAmount", (0,
|
|
5553
|
-
["borrowAmount", (0,
|
|
5554
|
-
["requiredSwapAmount", (0,
|
|
5759
|
+
return (0, import_kit39.transformEncoder)(
|
|
5760
|
+
(0, import_kit39.getStructEncoder)([
|
|
5761
|
+
["discriminator", (0, import_kit39.fixEncoderSize)((0, import_kit39.getBytesEncoder)(), 8)],
|
|
5762
|
+
["decreasePercent", (0, import_kit39.getU32Encoder)()],
|
|
5763
|
+
["collateralAmount", (0, import_kit39.getU64Encoder)()],
|
|
5764
|
+
["borrowAmount", (0, import_kit39.getU64Encoder)()],
|
|
5765
|
+
["requiredSwapAmount", (0, import_kit39.getU64Encoder)()],
|
|
5555
5766
|
["remainingAccountsInfo", getRemainingAccountsInfoEncoder()]
|
|
5556
5767
|
]),
|
|
5557
5768
|
(value) => ({
|
|
@@ -5561,17 +5772,17 @@ function getModifyTunaSpotPositionOrcaInstructionDataEncoder() {
|
|
|
5561
5772
|
);
|
|
5562
5773
|
}
|
|
5563
5774
|
function getModifyTunaSpotPositionOrcaInstructionDataDecoder() {
|
|
5564
|
-
return (0,
|
|
5565
|
-
["discriminator", (0,
|
|
5566
|
-
["decreasePercent", (0,
|
|
5567
|
-
["collateralAmount", (0,
|
|
5568
|
-
["borrowAmount", (0,
|
|
5569
|
-
["requiredSwapAmount", (0,
|
|
5775
|
+
return (0, import_kit39.getStructDecoder)([
|
|
5776
|
+
["discriminator", (0, import_kit39.fixDecoderSize)((0, import_kit39.getBytesDecoder)(), 8)],
|
|
5777
|
+
["decreasePercent", (0, import_kit39.getU32Decoder)()],
|
|
5778
|
+
["collateralAmount", (0, import_kit39.getU64Decoder)()],
|
|
5779
|
+
["borrowAmount", (0, import_kit39.getU64Decoder)()],
|
|
5780
|
+
["requiredSwapAmount", (0, import_kit39.getU64Decoder)()],
|
|
5570
5781
|
["remainingAccountsInfo", getRemainingAccountsInfoDecoder()]
|
|
5571
5782
|
]);
|
|
5572
5783
|
}
|
|
5573
5784
|
function getModifyTunaSpotPositionOrcaInstructionDataCodec() {
|
|
5574
|
-
return (0,
|
|
5785
|
+
return (0, import_kit39.combineCodec)(
|
|
5575
5786
|
getModifyTunaSpotPositionOrcaInstructionDataEncoder(),
|
|
5576
5787
|
getModifyTunaSpotPositionOrcaInstructionDataDecoder()
|
|
5577
5788
|
);
|
|
@@ -5720,29 +5931,29 @@ function parseModifyTunaSpotPositionOrcaInstruction(instruction) {
|
|
|
5720
5931
|
}
|
|
5721
5932
|
|
|
5722
5933
|
// src/generated/instructions/openAndIncreaseTunaLpPositionFusion.ts
|
|
5723
|
-
var
|
|
5934
|
+
var import_kit40 = require("@solana/kit");
|
|
5724
5935
|
var OPEN_AND_INCREASE_TUNA_LP_POSITION_FUSION_DISCRIMINATOR = new Uint8Array([123, 115, 192, 91, 113, 191, 73, 56]);
|
|
5725
5936
|
function getOpenAndIncreaseTunaLpPositionFusionDiscriminatorBytes() {
|
|
5726
|
-
return (0,
|
|
5937
|
+
return (0, import_kit40.fixEncoderSize)((0, import_kit40.getBytesEncoder)(), 8).encode(
|
|
5727
5938
|
OPEN_AND_INCREASE_TUNA_LP_POSITION_FUSION_DISCRIMINATOR
|
|
5728
5939
|
);
|
|
5729
5940
|
}
|
|
5730
5941
|
function getOpenAndIncreaseTunaLpPositionFusionInstructionDataEncoder() {
|
|
5731
|
-
return (0,
|
|
5732
|
-
(0,
|
|
5733
|
-
["discriminator", (0,
|
|
5734
|
-
["tickLowerIndex", (0,
|
|
5735
|
-
["tickUpperIndex", (0,
|
|
5736
|
-
["lowerLimitOrderSqrtPrice", (0,
|
|
5737
|
-
["upperLimitOrderSqrtPrice", (0,
|
|
5738
|
-
["flags", (0,
|
|
5739
|
-
["collateralA", (0,
|
|
5740
|
-
["collateralB", (0,
|
|
5741
|
-
["borrowA", (0,
|
|
5742
|
-
["borrowB", (0,
|
|
5743
|
-
["minAddedAmountA", (0,
|
|
5744
|
-
["minAddedAmountB", (0,
|
|
5745
|
-
["maxSwapSlippage", (0,
|
|
5942
|
+
return (0, import_kit40.transformEncoder)(
|
|
5943
|
+
(0, import_kit40.getStructEncoder)([
|
|
5944
|
+
["discriminator", (0, import_kit40.fixEncoderSize)((0, import_kit40.getBytesEncoder)(), 8)],
|
|
5945
|
+
["tickLowerIndex", (0, import_kit40.getI32Encoder)()],
|
|
5946
|
+
["tickUpperIndex", (0, import_kit40.getI32Encoder)()],
|
|
5947
|
+
["lowerLimitOrderSqrtPrice", (0, import_kit40.getU128Encoder)()],
|
|
5948
|
+
["upperLimitOrderSqrtPrice", (0, import_kit40.getU128Encoder)()],
|
|
5949
|
+
["flags", (0, import_kit40.getU32Encoder)()],
|
|
5950
|
+
["collateralA", (0, import_kit40.getU64Encoder)()],
|
|
5951
|
+
["collateralB", (0, import_kit40.getU64Encoder)()],
|
|
5952
|
+
["borrowA", (0, import_kit40.getU64Encoder)()],
|
|
5953
|
+
["borrowB", (0, import_kit40.getU64Encoder)()],
|
|
5954
|
+
["minAddedAmountA", (0, import_kit40.getU64Encoder)()],
|
|
5955
|
+
["minAddedAmountB", (0, import_kit40.getU64Encoder)()],
|
|
5956
|
+
["maxSwapSlippage", (0, import_kit40.getU32Encoder)()],
|
|
5746
5957
|
["remainingAccountsInfo", getRemainingAccountsInfoEncoder()]
|
|
5747
5958
|
]),
|
|
5748
5959
|
(value) => ({
|
|
@@ -5752,25 +5963,25 @@ function getOpenAndIncreaseTunaLpPositionFusionInstructionDataEncoder() {
|
|
|
5752
5963
|
);
|
|
5753
5964
|
}
|
|
5754
5965
|
function getOpenAndIncreaseTunaLpPositionFusionInstructionDataDecoder() {
|
|
5755
|
-
return (0,
|
|
5756
|
-
["discriminator", (0,
|
|
5757
|
-
["tickLowerIndex", (0,
|
|
5758
|
-
["tickUpperIndex", (0,
|
|
5759
|
-
["lowerLimitOrderSqrtPrice", (0,
|
|
5760
|
-
["upperLimitOrderSqrtPrice", (0,
|
|
5761
|
-
["flags", (0,
|
|
5762
|
-
["collateralA", (0,
|
|
5763
|
-
["collateralB", (0,
|
|
5764
|
-
["borrowA", (0,
|
|
5765
|
-
["borrowB", (0,
|
|
5766
|
-
["minAddedAmountA", (0,
|
|
5767
|
-
["minAddedAmountB", (0,
|
|
5768
|
-
["maxSwapSlippage", (0,
|
|
5966
|
+
return (0, import_kit40.getStructDecoder)([
|
|
5967
|
+
["discriminator", (0, import_kit40.fixDecoderSize)((0, import_kit40.getBytesDecoder)(), 8)],
|
|
5968
|
+
["tickLowerIndex", (0, import_kit40.getI32Decoder)()],
|
|
5969
|
+
["tickUpperIndex", (0, import_kit40.getI32Decoder)()],
|
|
5970
|
+
["lowerLimitOrderSqrtPrice", (0, import_kit40.getU128Decoder)()],
|
|
5971
|
+
["upperLimitOrderSqrtPrice", (0, import_kit40.getU128Decoder)()],
|
|
5972
|
+
["flags", (0, import_kit40.getU32Decoder)()],
|
|
5973
|
+
["collateralA", (0, import_kit40.getU64Decoder)()],
|
|
5974
|
+
["collateralB", (0, import_kit40.getU64Decoder)()],
|
|
5975
|
+
["borrowA", (0, import_kit40.getU64Decoder)()],
|
|
5976
|
+
["borrowB", (0, import_kit40.getU64Decoder)()],
|
|
5977
|
+
["minAddedAmountA", (0, import_kit40.getU64Decoder)()],
|
|
5978
|
+
["minAddedAmountB", (0, import_kit40.getU64Decoder)()],
|
|
5979
|
+
["maxSwapSlippage", (0, import_kit40.getU32Decoder)()],
|
|
5769
5980
|
["remainingAccountsInfo", getRemainingAccountsInfoDecoder()]
|
|
5770
5981
|
]);
|
|
5771
5982
|
}
|
|
5772
5983
|
function getOpenAndIncreaseTunaLpPositionFusionInstructionDataCodec() {
|
|
5773
|
-
return (0,
|
|
5984
|
+
return (0, import_kit40.combineCodec)(
|
|
5774
5985
|
getOpenAndIncreaseTunaLpPositionFusionInstructionDataEncoder(),
|
|
5775
5986
|
getOpenAndIncreaseTunaLpPositionFusionInstructionDataDecoder()
|
|
5776
5987
|
);
|
|
@@ -5945,29 +6156,29 @@ function parseOpenAndIncreaseTunaLpPositionFusionInstruction(instruction) {
|
|
|
5945
6156
|
}
|
|
5946
6157
|
|
|
5947
6158
|
// src/generated/instructions/openAndIncreaseTunaLpPositionOrca.ts
|
|
5948
|
-
var
|
|
6159
|
+
var import_kit41 = require("@solana/kit");
|
|
5949
6160
|
var OPEN_AND_INCREASE_TUNA_LP_POSITION_ORCA_DISCRIMINATOR = new Uint8Array([163, 21, 84, 199, 172, 40, 87, 122]);
|
|
5950
6161
|
function getOpenAndIncreaseTunaLpPositionOrcaDiscriminatorBytes() {
|
|
5951
|
-
return (0,
|
|
6162
|
+
return (0, import_kit41.fixEncoderSize)((0, import_kit41.getBytesEncoder)(), 8).encode(
|
|
5952
6163
|
OPEN_AND_INCREASE_TUNA_LP_POSITION_ORCA_DISCRIMINATOR
|
|
5953
6164
|
);
|
|
5954
6165
|
}
|
|
5955
6166
|
function getOpenAndIncreaseTunaLpPositionOrcaInstructionDataEncoder() {
|
|
5956
|
-
return (0,
|
|
5957
|
-
(0,
|
|
5958
|
-
["discriminator", (0,
|
|
5959
|
-
["tickLowerIndex", (0,
|
|
5960
|
-
["tickUpperIndex", (0,
|
|
5961
|
-
["lowerLimitOrderSqrtPrice", (0,
|
|
5962
|
-
["upperLimitOrderSqrtPrice", (0,
|
|
5963
|
-
["flags", (0,
|
|
5964
|
-
["collateralA", (0,
|
|
5965
|
-
["collateralB", (0,
|
|
5966
|
-
["borrowA", (0,
|
|
5967
|
-
["borrowB", (0,
|
|
5968
|
-
["minAddedAmountA", (0,
|
|
5969
|
-
["minAddedAmountB", (0,
|
|
5970
|
-
["maxSwapSlippage", (0,
|
|
6167
|
+
return (0, import_kit41.transformEncoder)(
|
|
6168
|
+
(0, import_kit41.getStructEncoder)([
|
|
6169
|
+
["discriminator", (0, import_kit41.fixEncoderSize)((0, import_kit41.getBytesEncoder)(), 8)],
|
|
6170
|
+
["tickLowerIndex", (0, import_kit41.getI32Encoder)()],
|
|
6171
|
+
["tickUpperIndex", (0, import_kit41.getI32Encoder)()],
|
|
6172
|
+
["lowerLimitOrderSqrtPrice", (0, import_kit41.getU128Encoder)()],
|
|
6173
|
+
["upperLimitOrderSqrtPrice", (0, import_kit41.getU128Encoder)()],
|
|
6174
|
+
["flags", (0, import_kit41.getU32Encoder)()],
|
|
6175
|
+
["collateralA", (0, import_kit41.getU64Encoder)()],
|
|
6176
|
+
["collateralB", (0, import_kit41.getU64Encoder)()],
|
|
6177
|
+
["borrowA", (0, import_kit41.getU64Encoder)()],
|
|
6178
|
+
["borrowB", (0, import_kit41.getU64Encoder)()],
|
|
6179
|
+
["minAddedAmountA", (0, import_kit41.getU64Encoder)()],
|
|
6180
|
+
["minAddedAmountB", (0, import_kit41.getU64Encoder)()],
|
|
6181
|
+
["maxSwapSlippage", (0, import_kit41.getU32Encoder)()],
|
|
5971
6182
|
["remainingAccountsInfo", getRemainingAccountsInfoEncoder()]
|
|
5972
6183
|
]),
|
|
5973
6184
|
(value) => ({
|
|
@@ -5977,25 +6188,25 @@ function getOpenAndIncreaseTunaLpPositionOrcaInstructionDataEncoder() {
|
|
|
5977
6188
|
);
|
|
5978
6189
|
}
|
|
5979
6190
|
function getOpenAndIncreaseTunaLpPositionOrcaInstructionDataDecoder() {
|
|
5980
|
-
return (0,
|
|
5981
|
-
["discriminator", (0,
|
|
5982
|
-
["tickLowerIndex", (0,
|
|
5983
|
-
["tickUpperIndex", (0,
|
|
5984
|
-
["lowerLimitOrderSqrtPrice", (0,
|
|
5985
|
-
["upperLimitOrderSqrtPrice", (0,
|
|
5986
|
-
["flags", (0,
|
|
5987
|
-
["collateralA", (0,
|
|
5988
|
-
["collateralB", (0,
|
|
5989
|
-
["borrowA", (0,
|
|
5990
|
-
["borrowB", (0,
|
|
5991
|
-
["minAddedAmountA", (0,
|
|
5992
|
-
["minAddedAmountB", (0,
|
|
5993
|
-
["maxSwapSlippage", (0,
|
|
6191
|
+
return (0, import_kit41.getStructDecoder)([
|
|
6192
|
+
["discriminator", (0, import_kit41.fixDecoderSize)((0, import_kit41.getBytesDecoder)(), 8)],
|
|
6193
|
+
["tickLowerIndex", (0, import_kit41.getI32Decoder)()],
|
|
6194
|
+
["tickUpperIndex", (0, import_kit41.getI32Decoder)()],
|
|
6195
|
+
["lowerLimitOrderSqrtPrice", (0, import_kit41.getU128Decoder)()],
|
|
6196
|
+
["upperLimitOrderSqrtPrice", (0, import_kit41.getU128Decoder)()],
|
|
6197
|
+
["flags", (0, import_kit41.getU32Decoder)()],
|
|
6198
|
+
["collateralA", (0, import_kit41.getU64Decoder)()],
|
|
6199
|
+
["collateralB", (0, import_kit41.getU64Decoder)()],
|
|
6200
|
+
["borrowA", (0, import_kit41.getU64Decoder)()],
|
|
6201
|
+
["borrowB", (0, import_kit41.getU64Decoder)()],
|
|
6202
|
+
["minAddedAmountA", (0, import_kit41.getU64Decoder)()],
|
|
6203
|
+
["minAddedAmountB", (0, import_kit41.getU64Decoder)()],
|
|
6204
|
+
["maxSwapSlippage", (0, import_kit41.getU32Decoder)()],
|
|
5994
6205
|
["remainingAccountsInfo", getRemainingAccountsInfoDecoder()]
|
|
5995
6206
|
]);
|
|
5996
6207
|
}
|
|
5997
6208
|
function getOpenAndIncreaseTunaLpPositionOrcaInstructionDataCodec() {
|
|
5998
|
-
return (0,
|
|
6209
|
+
return (0, import_kit41.combineCodec)(
|
|
5999
6210
|
getOpenAndIncreaseTunaLpPositionOrcaInstructionDataEncoder(),
|
|
6000
6211
|
getOpenAndIncreaseTunaLpPositionOrcaInstructionDataDecoder()
|
|
6001
6212
|
);
|
|
@@ -6170,7 +6381,7 @@ function parseOpenAndIncreaseTunaLpPositionOrcaInstruction(instruction) {
|
|
|
6170
6381
|
}
|
|
6171
6382
|
|
|
6172
6383
|
// src/generated/instructions/openLendingPosition.ts
|
|
6173
|
-
var
|
|
6384
|
+
var import_kit42 = require("@solana/kit");
|
|
6174
6385
|
var OPEN_LENDING_POSITION_DISCRIMINATOR = new Uint8Array([
|
|
6175
6386
|
174,
|
|
6176
6387
|
227,
|
|
@@ -6182,13 +6393,13 @@ var OPEN_LENDING_POSITION_DISCRIMINATOR = new Uint8Array([
|
|
|
6182
6393
|
19
|
|
6183
6394
|
]);
|
|
6184
6395
|
function getOpenLendingPositionDiscriminatorBytes() {
|
|
6185
|
-
return (0,
|
|
6396
|
+
return (0, import_kit42.fixEncoderSize)((0, import_kit42.getBytesEncoder)(), 8).encode(
|
|
6186
6397
|
OPEN_LENDING_POSITION_DISCRIMINATOR
|
|
6187
6398
|
);
|
|
6188
6399
|
}
|
|
6189
6400
|
function getOpenLendingPositionInstructionDataEncoder() {
|
|
6190
|
-
return (0,
|
|
6191
|
-
(0,
|
|
6401
|
+
return (0, import_kit42.transformEncoder)(
|
|
6402
|
+
(0, import_kit42.getStructEncoder)([["discriminator", (0, import_kit42.fixEncoderSize)((0, import_kit42.getBytesEncoder)(), 8)]]),
|
|
6192
6403
|
(value) => ({
|
|
6193
6404
|
...value,
|
|
6194
6405
|
discriminator: OPEN_LENDING_POSITION_DISCRIMINATOR
|
|
@@ -6196,12 +6407,12 @@ function getOpenLendingPositionInstructionDataEncoder() {
|
|
|
6196
6407
|
);
|
|
6197
6408
|
}
|
|
6198
6409
|
function getOpenLendingPositionInstructionDataDecoder() {
|
|
6199
|
-
return (0,
|
|
6200
|
-
["discriminator", (0,
|
|
6410
|
+
return (0, import_kit42.getStructDecoder)([
|
|
6411
|
+
["discriminator", (0, import_kit42.fixDecoderSize)((0, import_kit42.getBytesDecoder)(), 8)]
|
|
6201
6412
|
]);
|
|
6202
6413
|
}
|
|
6203
6414
|
function getOpenLendingPositionInstructionDataCodec() {
|
|
6204
|
-
return (0,
|
|
6415
|
+
return (0, import_kit42.combineCodec)(
|
|
6205
6416
|
getOpenLendingPositionInstructionDataEncoder(),
|
|
6206
6417
|
getOpenLendingPositionInstructionDataDecoder()
|
|
6207
6418
|
);
|
|
@@ -6262,7 +6473,7 @@ function parseOpenLendingPositionInstruction(instruction) {
|
|
|
6262
6473
|
}
|
|
6263
6474
|
|
|
6264
6475
|
// src/generated/instructions/openTunaLpPositionFusion.ts
|
|
6265
|
-
var
|
|
6476
|
+
var import_kit43 = require("@solana/kit");
|
|
6266
6477
|
var OPEN_TUNA_LP_POSITION_FUSION_DISCRIMINATOR = new Uint8Array([
|
|
6267
6478
|
78,
|
|
6268
6479
|
68,
|
|
@@ -6274,19 +6485,19 @@ var OPEN_TUNA_LP_POSITION_FUSION_DISCRIMINATOR = new Uint8Array([
|
|
|
6274
6485
|
238
|
|
6275
6486
|
]);
|
|
6276
6487
|
function getOpenTunaLpPositionFusionDiscriminatorBytes() {
|
|
6277
|
-
return (0,
|
|
6488
|
+
return (0, import_kit43.fixEncoderSize)((0, import_kit43.getBytesEncoder)(), 8).encode(
|
|
6278
6489
|
OPEN_TUNA_LP_POSITION_FUSION_DISCRIMINATOR
|
|
6279
6490
|
);
|
|
6280
6491
|
}
|
|
6281
6492
|
function getOpenTunaLpPositionFusionInstructionDataEncoder() {
|
|
6282
|
-
return (0,
|
|
6283
|
-
(0,
|
|
6284
|
-
["discriminator", (0,
|
|
6285
|
-
["tickLowerIndex", (0,
|
|
6286
|
-
["tickUpperIndex", (0,
|
|
6287
|
-
["lowerLimitOrderSqrtPrice", (0,
|
|
6288
|
-
["upperLimitOrderSqrtPrice", (0,
|
|
6289
|
-
["flags", (0,
|
|
6493
|
+
return (0, import_kit43.transformEncoder)(
|
|
6494
|
+
(0, import_kit43.getStructEncoder)([
|
|
6495
|
+
["discriminator", (0, import_kit43.fixEncoderSize)((0, import_kit43.getBytesEncoder)(), 8)],
|
|
6496
|
+
["tickLowerIndex", (0, import_kit43.getI32Encoder)()],
|
|
6497
|
+
["tickUpperIndex", (0, import_kit43.getI32Encoder)()],
|
|
6498
|
+
["lowerLimitOrderSqrtPrice", (0, import_kit43.getU128Encoder)()],
|
|
6499
|
+
["upperLimitOrderSqrtPrice", (0, import_kit43.getU128Encoder)()],
|
|
6500
|
+
["flags", (0, import_kit43.getU32Encoder)()]
|
|
6290
6501
|
]),
|
|
6291
6502
|
(value) => ({
|
|
6292
6503
|
...value,
|
|
@@ -6295,17 +6506,17 @@ function getOpenTunaLpPositionFusionInstructionDataEncoder() {
|
|
|
6295
6506
|
);
|
|
6296
6507
|
}
|
|
6297
6508
|
function getOpenTunaLpPositionFusionInstructionDataDecoder() {
|
|
6298
|
-
return (0,
|
|
6299
|
-
["discriminator", (0,
|
|
6300
|
-
["tickLowerIndex", (0,
|
|
6301
|
-
["tickUpperIndex", (0,
|
|
6302
|
-
["lowerLimitOrderSqrtPrice", (0,
|
|
6303
|
-
["upperLimitOrderSqrtPrice", (0,
|
|
6304
|
-
["flags", (0,
|
|
6509
|
+
return (0, import_kit43.getStructDecoder)([
|
|
6510
|
+
["discriminator", (0, import_kit43.fixDecoderSize)((0, import_kit43.getBytesDecoder)(), 8)],
|
|
6511
|
+
["tickLowerIndex", (0, import_kit43.getI32Decoder)()],
|
|
6512
|
+
["tickUpperIndex", (0, import_kit43.getI32Decoder)()],
|
|
6513
|
+
["lowerLimitOrderSqrtPrice", (0, import_kit43.getU128Decoder)()],
|
|
6514
|
+
["upperLimitOrderSqrtPrice", (0, import_kit43.getU128Decoder)()],
|
|
6515
|
+
["flags", (0, import_kit43.getU32Decoder)()]
|
|
6305
6516
|
]);
|
|
6306
6517
|
}
|
|
6307
6518
|
function getOpenTunaLpPositionFusionInstructionDataCodec() {
|
|
6308
|
-
return (0,
|
|
6519
|
+
return (0, import_kit43.combineCodec)(
|
|
6309
6520
|
getOpenTunaLpPositionFusionInstructionDataEncoder(),
|
|
6310
6521
|
getOpenTunaLpPositionFusionInstructionDataDecoder()
|
|
6311
6522
|
);
|
|
@@ -6426,7 +6637,7 @@ function parseOpenTunaLpPositionFusionInstruction(instruction) {
|
|
|
6426
6637
|
}
|
|
6427
6638
|
|
|
6428
6639
|
// src/generated/instructions/openTunaLpPositionOrca.ts
|
|
6429
|
-
var
|
|
6640
|
+
var import_kit44 = require("@solana/kit");
|
|
6430
6641
|
var OPEN_TUNA_LP_POSITION_ORCA_DISCRIMINATOR = new Uint8Array([
|
|
6431
6642
|
201,
|
|
6432
6643
|
85,
|
|
@@ -6438,19 +6649,19 @@ var OPEN_TUNA_LP_POSITION_ORCA_DISCRIMINATOR = new Uint8Array([
|
|
|
6438
6649
|
115
|
|
6439
6650
|
]);
|
|
6440
6651
|
function getOpenTunaLpPositionOrcaDiscriminatorBytes() {
|
|
6441
|
-
return (0,
|
|
6652
|
+
return (0, import_kit44.fixEncoderSize)((0, import_kit44.getBytesEncoder)(), 8).encode(
|
|
6442
6653
|
OPEN_TUNA_LP_POSITION_ORCA_DISCRIMINATOR
|
|
6443
6654
|
);
|
|
6444
6655
|
}
|
|
6445
6656
|
function getOpenTunaLpPositionOrcaInstructionDataEncoder() {
|
|
6446
|
-
return (0,
|
|
6447
|
-
(0,
|
|
6448
|
-
["discriminator", (0,
|
|
6449
|
-
["tickLowerIndex", (0,
|
|
6450
|
-
["tickUpperIndex", (0,
|
|
6451
|
-
["lowerLimitOrderSqrtPrice", (0,
|
|
6452
|
-
["upperLimitOrderSqrtPrice", (0,
|
|
6453
|
-
["flags", (0,
|
|
6657
|
+
return (0, import_kit44.transformEncoder)(
|
|
6658
|
+
(0, import_kit44.getStructEncoder)([
|
|
6659
|
+
["discriminator", (0, import_kit44.fixEncoderSize)((0, import_kit44.getBytesEncoder)(), 8)],
|
|
6660
|
+
["tickLowerIndex", (0, import_kit44.getI32Encoder)()],
|
|
6661
|
+
["tickUpperIndex", (0, import_kit44.getI32Encoder)()],
|
|
6662
|
+
["lowerLimitOrderSqrtPrice", (0, import_kit44.getU128Encoder)()],
|
|
6663
|
+
["upperLimitOrderSqrtPrice", (0, import_kit44.getU128Encoder)()],
|
|
6664
|
+
["flags", (0, import_kit44.getU32Encoder)()]
|
|
6454
6665
|
]),
|
|
6455
6666
|
(value) => ({
|
|
6456
6667
|
...value,
|
|
@@ -6459,17 +6670,17 @@ function getOpenTunaLpPositionOrcaInstructionDataEncoder() {
|
|
|
6459
6670
|
);
|
|
6460
6671
|
}
|
|
6461
6672
|
function getOpenTunaLpPositionOrcaInstructionDataDecoder() {
|
|
6462
|
-
return (0,
|
|
6463
|
-
["discriminator", (0,
|
|
6464
|
-
["tickLowerIndex", (0,
|
|
6465
|
-
["tickUpperIndex", (0,
|
|
6466
|
-
["lowerLimitOrderSqrtPrice", (0,
|
|
6467
|
-
["upperLimitOrderSqrtPrice", (0,
|
|
6468
|
-
["flags", (0,
|
|
6673
|
+
return (0, import_kit44.getStructDecoder)([
|
|
6674
|
+
["discriminator", (0, import_kit44.fixDecoderSize)((0, import_kit44.getBytesDecoder)(), 8)],
|
|
6675
|
+
["tickLowerIndex", (0, import_kit44.getI32Decoder)()],
|
|
6676
|
+
["tickUpperIndex", (0, import_kit44.getI32Decoder)()],
|
|
6677
|
+
["lowerLimitOrderSqrtPrice", (0, import_kit44.getU128Decoder)()],
|
|
6678
|
+
["upperLimitOrderSqrtPrice", (0, import_kit44.getU128Decoder)()],
|
|
6679
|
+
["flags", (0, import_kit44.getU32Decoder)()]
|
|
6469
6680
|
]);
|
|
6470
6681
|
}
|
|
6471
6682
|
function getOpenTunaLpPositionOrcaInstructionDataCodec() {
|
|
6472
|
-
return (0,
|
|
6683
|
+
return (0, import_kit44.combineCodec)(
|
|
6473
6684
|
getOpenTunaLpPositionOrcaInstructionDataEncoder(),
|
|
6474
6685
|
getOpenTunaLpPositionOrcaInstructionDataDecoder()
|
|
6475
6686
|
);
|
|
@@ -6590,7 +6801,7 @@ function parseOpenTunaLpPositionOrcaInstruction(instruction) {
|
|
|
6590
6801
|
}
|
|
6591
6802
|
|
|
6592
6803
|
// src/generated/instructions/openTunaSpotPosition.ts
|
|
6593
|
-
var
|
|
6804
|
+
var import_kit45 = require("@solana/kit");
|
|
6594
6805
|
var OPEN_TUNA_SPOT_POSITION_DISCRIMINATOR = new Uint8Array([
|
|
6595
6806
|
87,
|
|
6596
6807
|
208,
|
|
@@ -6602,14 +6813,14 @@ var OPEN_TUNA_SPOT_POSITION_DISCRIMINATOR = new Uint8Array([
|
|
|
6602
6813
|
220
|
|
6603
6814
|
]);
|
|
6604
6815
|
function getOpenTunaSpotPositionDiscriminatorBytes() {
|
|
6605
|
-
return (0,
|
|
6816
|
+
return (0, import_kit45.fixEncoderSize)((0, import_kit45.getBytesEncoder)(), 8).encode(
|
|
6606
6817
|
OPEN_TUNA_SPOT_POSITION_DISCRIMINATOR
|
|
6607
6818
|
);
|
|
6608
6819
|
}
|
|
6609
6820
|
function getOpenTunaSpotPositionInstructionDataEncoder() {
|
|
6610
|
-
return (0,
|
|
6611
|
-
(0,
|
|
6612
|
-
["discriminator", (0,
|
|
6821
|
+
return (0, import_kit45.transformEncoder)(
|
|
6822
|
+
(0, import_kit45.getStructEncoder)([
|
|
6823
|
+
["discriminator", (0, import_kit45.fixEncoderSize)((0, import_kit45.getBytesEncoder)(), 8)],
|
|
6613
6824
|
["positionToken", getPoolTokenEncoder()],
|
|
6614
6825
|
["collateralToken", getPoolTokenEncoder()]
|
|
6615
6826
|
]),
|
|
@@ -6620,14 +6831,14 @@ function getOpenTunaSpotPositionInstructionDataEncoder() {
|
|
|
6620
6831
|
);
|
|
6621
6832
|
}
|
|
6622
6833
|
function getOpenTunaSpotPositionInstructionDataDecoder() {
|
|
6623
|
-
return (0,
|
|
6624
|
-
["discriminator", (0,
|
|
6834
|
+
return (0, import_kit45.getStructDecoder)([
|
|
6835
|
+
["discriminator", (0, import_kit45.fixDecoderSize)((0, import_kit45.getBytesDecoder)(), 8)],
|
|
6625
6836
|
["positionToken", getPoolTokenDecoder()],
|
|
6626
6837
|
["collateralToken", getPoolTokenDecoder()]
|
|
6627
6838
|
]);
|
|
6628
6839
|
}
|
|
6629
6840
|
function getOpenTunaSpotPositionInstructionDataCodec() {
|
|
6630
|
-
return (0,
|
|
6841
|
+
return (0, import_kit45.combineCodec)(
|
|
6631
6842
|
getOpenTunaSpotPositionInstructionDataEncoder(),
|
|
6632
6843
|
getOpenTunaSpotPositionInstructionDataDecoder()
|
|
6633
6844
|
);
|
|
@@ -6715,7 +6926,7 @@ function parseOpenTunaSpotPositionInstruction(instruction) {
|
|
|
6715
6926
|
}
|
|
6716
6927
|
|
|
6717
6928
|
// src/generated/instructions/rebalanceTunaLpPositionFusion.ts
|
|
6718
|
-
var
|
|
6929
|
+
var import_kit46 = require("@solana/kit");
|
|
6719
6930
|
var REBALANCE_TUNA_LP_POSITION_FUSION_DISCRIMINATOR = new Uint8Array([
|
|
6720
6931
|
190,
|
|
6721
6932
|
86,
|
|
@@ -6727,14 +6938,14 @@ var REBALANCE_TUNA_LP_POSITION_FUSION_DISCRIMINATOR = new Uint8Array([
|
|
|
6727
6938
|
51
|
|
6728
6939
|
]);
|
|
6729
6940
|
function getRebalanceTunaLpPositionFusionDiscriminatorBytes() {
|
|
6730
|
-
return (0,
|
|
6941
|
+
return (0, import_kit46.fixEncoderSize)((0, import_kit46.getBytesEncoder)(), 8).encode(
|
|
6731
6942
|
REBALANCE_TUNA_LP_POSITION_FUSION_DISCRIMINATOR
|
|
6732
6943
|
);
|
|
6733
6944
|
}
|
|
6734
6945
|
function getRebalanceTunaLpPositionFusionInstructionDataEncoder() {
|
|
6735
|
-
return (0,
|
|
6736
|
-
(0,
|
|
6737
|
-
["discriminator", (0,
|
|
6946
|
+
return (0, import_kit46.transformEncoder)(
|
|
6947
|
+
(0, import_kit46.getStructEncoder)([
|
|
6948
|
+
["discriminator", (0, import_kit46.fixEncoderSize)((0, import_kit46.getBytesEncoder)(), 8)],
|
|
6738
6949
|
["remainingAccountsInfo", getRemainingAccountsInfoEncoder()]
|
|
6739
6950
|
]),
|
|
6740
6951
|
(value) => ({
|
|
@@ -6744,13 +6955,13 @@ function getRebalanceTunaLpPositionFusionInstructionDataEncoder() {
|
|
|
6744
6955
|
);
|
|
6745
6956
|
}
|
|
6746
6957
|
function getRebalanceTunaLpPositionFusionInstructionDataDecoder() {
|
|
6747
|
-
return (0,
|
|
6748
|
-
["discriminator", (0,
|
|
6958
|
+
return (0, import_kit46.getStructDecoder)([
|
|
6959
|
+
["discriminator", (0, import_kit46.fixDecoderSize)((0, import_kit46.getBytesDecoder)(), 8)],
|
|
6749
6960
|
["remainingAccountsInfo", getRemainingAccountsInfoDecoder()]
|
|
6750
6961
|
]);
|
|
6751
6962
|
}
|
|
6752
6963
|
function getRebalanceTunaLpPositionFusionInstructionDataCodec() {
|
|
6753
|
-
return (0,
|
|
6964
|
+
return (0, import_kit46.combineCodec)(
|
|
6754
6965
|
getRebalanceTunaLpPositionFusionInstructionDataEncoder(),
|
|
6755
6966
|
getRebalanceTunaLpPositionFusionInstructionDataDecoder()
|
|
6756
6967
|
);
|
|
@@ -6877,7 +7088,7 @@ function parseRebalanceTunaLpPositionFusionInstruction(instruction) {
|
|
|
6877
7088
|
}
|
|
6878
7089
|
|
|
6879
7090
|
// src/generated/instructions/rebalanceTunaLpPositionOrca.ts
|
|
6880
|
-
var
|
|
7091
|
+
var import_kit47 = require("@solana/kit");
|
|
6881
7092
|
var REBALANCE_TUNA_LP_POSITION_ORCA_DISCRIMINATOR = new Uint8Array([
|
|
6882
7093
|
124,
|
|
6883
7094
|
212,
|
|
@@ -6889,14 +7100,14 @@ var REBALANCE_TUNA_LP_POSITION_ORCA_DISCRIMINATOR = new Uint8Array([
|
|
|
6889
7100
|
231
|
|
6890
7101
|
]);
|
|
6891
7102
|
function getRebalanceTunaLpPositionOrcaDiscriminatorBytes() {
|
|
6892
|
-
return (0,
|
|
7103
|
+
return (0, import_kit47.fixEncoderSize)((0, import_kit47.getBytesEncoder)(), 8).encode(
|
|
6893
7104
|
REBALANCE_TUNA_LP_POSITION_ORCA_DISCRIMINATOR
|
|
6894
7105
|
);
|
|
6895
7106
|
}
|
|
6896
7107
|
function getRebalanceTunaLpPositionOrcaInstructionDataEncoder() {
|
|
6897
|
-
return (0,
|
|
6898
|
-
(0,
|
|
6899
|
-
["discriminator", (0,
|
|
7108
|
+
return (0, import_kit47.transformEncoder)(
|
|
7109
|
+
(0, import_kit47.getStructEncoder)([
|
|
7110
|
+
["discriminator", (0, import_kit47.fixEncoderSize)((0, import_kit47.getBytesEncoder)(), 8)],
|
|
6900
7111
|
["remainingAccountsInfo", getRemainingAccountsInfoEncoder()]
|
|
6901
7112
|
]),
|
|
6902
7113
|
(value) => ({
|
|
@@ -6906,13 +7117,13 @@ function getRebalanceTunaLpPositionOrcaInstructionDataEncoder() {
|
|
|
6906
7117
|
);
|
|
6907
7118
|
}
|
|
6908
7119
|
function getRebalanceTunaLpPositionOrcaInstructionDataDecoder() {
|
|
6909
|
-
return (0,
|
|
6910
|
-
["discriminator", (0,
|
|
7120
|
+
return (0, import_kit47.getStructDecoder)([
|
|
7121
|
+
["discriminator", (0, import_kit47.fixDecoderSize)((0, import_kit47.getBytesDecoder)(), 8)],
|
|
6911
7122
|
["remainingAccountsInfo", getRemainingAccountsInfoDecoder()]
|
|
6912
7123
|
]);
|
|
6913
7124
|
}
|
|
6914
7125
|
function getRebalanceTunaLpPositionOrcaInstructionDataCodec() {
|
|
6915
|
-
return (0,
|
|
7126
|
+
return (0, import_kit47.combineCodec)(
|
|
6916
7127
|
getRebalanceTunaLpPositionOrcaInstructionDataEncoder(),
|
|
6917
7128
|
getRebalanceTunaLpPositionOrcaInstructionDataDecoder()
|
|
6918
7129
|
);
|
|
@@ -7045,7 +7256,7 @@ function parseRebalanceTunaLpPositionOrcaInstruction(instruction) {
|
|
|
7045
7256
|
}
|
|
7046
7257
|
|
|
7047
7258
|
// src/generated/instructions/repayBadDebt.ts
|
|
7048
|
-
var
|
|
7259
|
+
var import_kit48 = require("@solana/kit");
|
|
7049
7260
|
var REPAY_BAD_DEBT_DISCRIMINATOR = new Uint8Array([
|
|
7050
7261
|
112,
|
|
7051
7262
|
144,
|
|
@@ -7057,29 +7268,29 @@ var REPAY_BAD_DEBT_DISCRIMINATOR = new Uint8Array([
|
|
|
7057
7268
|
34
|
|
7058
7269
|
]);
|
|
7059
7270
|
function getRepayBadDebtDiscriminatorBytes() {
|
|
7060
|
-
return (0,
|
|
7271
|
+
return (0, import_kit48.fixEncoderSize)((0, import_kit48.getBytesEncoder)(), 8).encode(
|
|
7061
7272
|
REPAY_BAD_DEBT_DISCRIMINATOR
|
|
7062
7273
|
);
|
|
7063
7274
|
}
|
|
7064
7275
|
function getRepayBadDebtInstructionDataEncoder() {
|
|
7065
|
-
return (0,
|
|
7066
|
-
(0,
|
|
7067
|
-
["discriminator", (0,
|
|
7068
|
-
["funds", (0,
|
|
7069
|
-
["shares", (0,
|
|
7276
|
+
return (0, import_kit48.transformEncoder)(
|
|
7277
|
+
(0, import_kit48.getStructEncoder)([
|
|
7278
|
+
["discriminator", (0, import_kit48.fixEncoderSize)((0, import_kit48.getBytesEncoder)(), 8)],
|
|
7279
|
+
["funds", (0, import_kit48.getU64Encoder)()],
|
|
7280
|
+
["shares", (0, import_kit48.getU64Encoder)()]
|
|
7070
7281
|
]),
|
|
7071
7282
|
(value) => ({ ...value, discriminator: REPAY_BAD_DEBT_DISCRIMINATOR })
|
|
7072
7283
|
);
|
|
7073
7284
|
}
|
|
7074
7285
|
function getRepayBadDebtInstructionDataDecoder() {
|
|
7075
|
-
return (0,
|
|
7076
|
-
["discriminator", (0,
|
|
7077
|
-
["funds", (0,
|
|
7078
|
-
["shares", (0,
|
|
7286
|
+
return (0, import_kit48.getStructDecoder)([
|
|
7287
|
+
["discriminator", (0, import_kit48.fixDecoderSize)((0, import_kit48.getBytesDecoder)(), 8)],
|
|
7288
|
+
["funds", (0, import_kit48.getU64Decoder)()],
|
|
7289
|
+
["shares", (0, import_kit48.getU64Decoder)()]
|
|
7079
7290
|
]);
|
|
7080
7291
|
}
|
|
7081
7292
|
function getRepayBadDebtInstructionDataCodec() {
|
|
7082
|
-
return (0,
|
|
7293
|
+
return (0, import_kit48.combineCodec)(
|
|
7083
7294
|
getRepayBadDebtInstructionDataEncoder(),
|
|
7084
7295
|
getRepayBadDebtInstructionDataDecoder()
|
|
7085
7296
|
);
|
|
@@ -7147,7 +7358,7 @@ function parseRepayBadDebtInstruction(instruction) {
|
|
|
7147
7358
|
}
|
|
7148
7359
|
|
|
7149
7360
|
// src/generated/instructions/repayTunaLpPositionDebt.ts
|
|
7150
|
-
var
|
|
7361
|
+
var import_kit49 = require("@solana/kit");
|
|
7151
7362
|
var REPAY_TUNA_LP_POSITION_DEBT_DISCRIMINATOR = new Uint8Array([
|
|
7152
7363
|
79,
|
|
7153
7364
|
200,
|
|
@@ -7159,16 +7370,16 @@ var REPAY_TUNA_LP_POSITION_DEBT_DISCRIMINATOR = new Uint8Array([
|
|
|
7159
7370
|
8
|
|
7160
7371
|
]);
|
|
7161
7372
|
function getRepayTunaLpPositionDebtDiscriminatorBytes() {
|
|
7162
|
-
return (0,
|
|
7373
|
+
return (0, import_kit49.fixEncoderSize)((0, import_kit49.getBytesEncoder)(), 8).encode(
|
|
7163
7374
|
REPAY_TUNA_LP_POSITION_DEBT_DISCRIMINATOR
|
|
7164
7375
|
);
|
|
7165
7376
|
}
|
|
7166
7377
|
function getRepayTunaLpPositionDebtInstructionDataEncoder() {
|
|
7167
|
-
return (0,
|
|
7168
|
-
(0,
|
|
7169
|
-
["discriminator", (0,
|
|
7170
|
-
["collateralFundsA", (0,
|
|
7171
|
-
["collateralFundsB", (0,
|
|
7378
|
+
return (0, import_kit49.transformEncoder)(
|
|
7379
|
+
(0, import_kit49.getStructEncoder)([
|
|
7380
|
+
["discriminator", (0, import_kit49.fixEncoderSize)((0, import_kit49.getBytesEncoder)(), 8)],
|
|
7381
|
+
["collateralFundsA", (0, import_kit49.getU64Encoder)()],
|
|
7382
|
+
["collateralFundsB", (0, import_kit49.getU64Encoder)()]
|
|
7172
7383
|
]),
|
|
7173
7384
|
(value) => ({
|
|
7174
7385
|
...value,
|
|
@@ -7177,14 +7388,14 @@ function getRepayTunaLpPositionDebtInstructionDataEncoder() {
|
|
|
7177
7388
|
);
|
|
7178
7389
|
}
|
|
7179
7390
|
function getRepayTunaLpPositionDebtInstructionDataDecoder() {
|
|
7180
|
-
return (0,
|
|
7181
|
-
["discriminator", (0,
|
|
7182
|
-
["collateralFundsA", (0,
|
|
7183
|
-
["collateralFundsB", (0,
|
|
7391
|
+
return (0, import_kit49.getStructDecoder)([
|
|
7392
|
+
["discriminator", (0, import_kit49.fixDecoderSize)((0, import_kit49.getBytesDecoder)(), 8)],
|
|
7393
|
+
["collateralFundsA", (0, import_kit49.getU64Decoder)()],
|
|
7394
|
+
["collateralFundsB", (0, import_kit49.getU64Decoder)()]
|
|
7184
7395
|
]);
|
|
7185
7396
|
}
|
|
7186
7397
|
function getRepayTunaLpPositionDebtInstructionDataCodec() {
|
|
7187
|
-
return (0,
|
|
7398
|
+
return (0, import_kit49.combineCodec)(
|
|
7188
7399
|
getRepayTunaLpPositionDebtInstructionDataEncoder(),
|
|
7189
7400
|
getRepayTunaLpPositionDebtInstructionDataDecoder()
|
|
7190
7401
|
);
|
|
@@ -7287,7 +7498,7 @@ function parseRepayTunaLpPositionDebtInstruction(instruction) {
|
|
|
7287
7498
|
}
|
|
7288
7499
|
|
|
7289
7500
|
// src/generated/instructions/resetTunaSpotPosition.ts
|
|
7290
|
-
var
|
|
7501
|
+
var import_kit50 = require("@solana/kit");
|
|
7291
7502
|
var RESET_TUNA_SPOT_POSITION_DISCRIMINATOR = new Uint8Array([
|
|
7292
7503
|
194,
|
|
7293
7504
|
68,
|
|
@@ -7299,14 +7510,14 @@ var RESET_TUNA_SPOT_POSITION_DISCRIMINATOR = new Uint8Array([
|
|
|
7299
7510
|
127
|
|
7300
7511
|
]);
|
|
7301
7512
|
function getResetTunaSpotPositionDiscriminatorBytes() {
|
|
7302
|
-
return (0,
|
|
7513
|
+
return (0, import_kit50.fixEncoderSize)((0, import_kit50.getBytesEncoder)(), 8).encode(
|
|
7303
7514
|
RESET_TUNA_SPOT_POSITION_DISCRIMINATOR
|
|
7304
7515
|
);
|
|
7305
7516
|
}
|
|
7306
7517
|
function getResetTunaSpotPositionInstructionDataEncoder() {
|
|
7307
|
-
return (0,
|
|
7308
|
-
(0,
|
|
7309
|
-
["discriminator", (0,
|
|
7518
|
+
return (0, import_kit50.transformEncoder)(
|
|
7519
|
+
(0, import_kit50.getStructEncoder)([
|
|
7520
|
+
["discriminator", (0, import_kit50.fixEncoderSize)((0, import_kit50.getBytesEncoder)(), 8)],
|
|
7310
7521
|
["positionToken", getPoolTokenEncoder()],
|
|
7311
7522
|
["collateralToken", getPoolTokenEncoder()]
|
|
7312
7523
|
]),
|
|
@@ -7317,14 +7528,14 @@ function getResetTunaSpotPositionInstructionDataEncoder() {
|
|
|
7317
7528
|
);
|
|
7318
7529
|
}
|
|
7319
7530
|
function getResetTunaSpotPositionInstructionDataDecoder() {
|
|
7320
|
-
return (0,
|
|
7321
|
-
["discriminator", (0,
|
|
7531
|
+
return (0, import_kit50.getStructDecoder)([
|
|
7532
|
+
["discriminator", (0, import_kit50.fixDecoderSize)((0, import_kit50.getBytesDecoder)(), 8)],
|
|
7322
7533
|
["positionToken", getPoolTokenDecoder()],
|
|
7323
7534
|
["collateralToken", getPoolTokenDecoder()]
|
|
7324
7535
|
]);
|
|
7325
7536
|
}
|
|
7326
7537
|
function getResetTunaSpotPositionInstructionDataCodec() {
|
|
7327
|
-
return (0,
|
|
7538
|
+
return (0, import_kit50.combineCodec)(
|
|
7328
7539
|
getResetTunaSpotPositionInstructionDataEncoder(),
|
|
7329
7540
|
getResetTunaSpotPositionInstructionDataDecoder()
|
|
7330
7541
|
);
|
|
@@ -7391,7 +7602,7 @@ function parseResetTunaSpotPositionInstruction(instruction) {
|
|
|
7391
7602
|
}
|
|
7392
7603
|
|
|
7393
7604
|
// src/generated/instructions/setAdminAuthority.ts
|
|
7394
|
-
var
|
|
7605
|
+
var import_kit51 = require("@solana/kit");
|
|
7395
7606
|
var SET_ADMIN_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
7396
7607
|
72,
|
|
7397
7608
|
49,
|
|
@@ -7403,27 +7614,27 @@ var SET_ADMIN_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
|
7403
7614
|
174
|
|
7404
7615
|
]);
|
|
7405
7616
|
function getSetAdminAuthorityDiscriminatorBytes() {
|
|
7406
|
-
return (0,
|
|
7617
|
+
return (0, import_kit51.fixEncoderSize)((0, import_kit51.getBytesEncoder)(), 8).encode(
|
|
7407
7618
|
SET_ADMIN_AUTHORITY_DISCRIMINATOR
|
|
7408
7619
|
);
|
|
7409
7620
|
}
|
|
7410
7621
|
function getSetAdminAuthorityInstructionDataEncoder() {
|
|
7411
|
-
return (0,
|
|
7412
|
-
(0,
|
|
7413
|
-
["discriminator", (0,
|
|
7414
|
-
["adminAuthority", (0,
|
|
7622
|
+
return (0, import_kit51.transformEncoder)(
|
|
7623
|
+
(0, import_kit51.getStructEncoder)([
|
|
7624
|
+
["discriminator", (0, import_kit51.fixEncoderSize)((0, import_kit51.getBytesEncoder)(), 8)],
|
|
7625
|
+
["adminAuthority", (0, import_kit51.getAddressEncoder)()]
|
|
7415
7626
|
]),
|
|
7416
7627
|
(value) => ({ ...value, discriminator: SET_ADMIN_AUTHORITY_DISCRIMINATOR })
|
|
7417
7628
|
);
|
|
7418
7629
|
}
|
|
7419
7630
|
function getSetAdminAuthorityInstructionDataDecoder() {
|
|
7420
|
-
return (0,
|
|
7421
|
-
["discriminator", (0,
|
|
7422
|
-
["adminAuthority", (0,
|
|
7631
|
+
return (0, import_kit51.getStructDecoder)([
|
|
7632
|
+
["discriminator", (0, import_kit51.fixDecoderSize)((0, import_kit51.getBytesDecoder)(), 8)],
|
|
7633
|
+
["adminAuthority", (0, import_kit51.getAddressDecoder)()]
|
|
7423
7634
|
]);
|
|
7424
7635
|
}
|
|
7425
7636
|
function getSetAdminAuthorityInstructionDataCodec() {
|
|
7426
|
-
return (0,
|
|
7637
|
+
return (0, import_kit51.combineCodec)(
|
|
7427
7638
|
getSetAdminAuthorityInstructionDataEncoder(),
|
|
7428
7639
|
getSetAdminAuthorityInstructionDataDecoder()
|
|
7429
7640
|
);
|
|
@@ -7470,18 +7681,18 @@ function parseSetAdminAuthorityInstruction(instruction) {
|
|
|
7470
7681
|
}
|
|
7471
7682
|
|
|
7472
7683
|
// src/generated/instructions/setDefaultMaxPercentageOfLeftovers.ts
|
|
7473
|
-
var
|
|
7684
|
+
var import_kit52 = require("@solana/kit");
|
|
7474
7685
|
var SET_DEFAULT_MAX_PERCENTAGE_OF_LEFTOVERS_DISCRIMINATOR = new Uint8Array([37, 179, 107, 65, 203, 141, 183, 27]);
|
|
7475
7686
|
function getSetDefaultMaxPercentageOfLeftoversDiscriminatorBytes() {
|
|
7476
|
-
return (0,
|
|
7687
|
+
return (0, import_kit52.fixEncoderSize)((0, import_kit52.getBytesEncoder)(), 8).encode(
|
|
7477
7688
|
SET_DEFAULT_MAX_PERCENTAGE_OF_LEFTOVERS_DISCRIMINATOR
|
|
7478
7689
|
);
|
|
7479
7690
|
}
|
|
7480
7691
|
function getSetDefaultMaxPercentageOfLeftoversInstructionDataEncoder() {
|
|
7481
|
-
return (0,
|
|
7482
|
-
(0,
|
|
7483
|
-
["discriminator", (0,
|
|
7484
|
-
["maxPercentageOfLeftovers", (0,
|
|
7692
|
+
return (0, import_kit52.transformEncoder)(
|
|
7693
|
+
(0, import_kit52.getStructEncoder)([
|
|
7694
|
+
["discriminator", (0, import_kit52.fixEncoderSize)((0, import_kit52.getBytesEncoder)(), 8)],
|
|
7695
|
+
["maxPercentageOfLeftovers", (0, import_kit52.getU32Encoder)()]
|
|
7485
7696
|
]),
|
|
7486
7697
|
(value) => ({
|
|
7487
7698
|
...value,
|
|
@@ -7490,13 +7701,13 @@ function getSetDefaultMaxPercentageOfLeftoversInstructionDataEncoder() {
|
|
|
7490
7701
|
);
|
|
7491
7702
|
}
|
|
7492
7703
|
function getSetDefaultMaxPercentageOfLeftoversInstructionDataDecoder() {
|
|
7493
|
-
return (0,
|
|
7494
|
-
["discriminator", (0,
|
|
7495
|
-
["maxPercentageOfLeftovers", (0,
|
|
7704
|
+
return (0, import_kit52.getStructDecoder)([
|
|
7705
|
+
["discriminator", (0, import_kit52.fixDecoderSize)((0, import_kit52.getBytesDecoder)(), 8)],
|
|
7706
|
+
["maxPercentageOfLeftovers", (0, import_kit52.getU32Decoder)()]
|
|
7496
7707
|
]);
|
|
7497
7708
|
}
|
|
7498
7709
|
function getSetDefaultMaxPercentageOfLeftoversInstructionDataCodec() {
|
|
7499
|
-
return (0,
|
|
7710
|
+
return (0, import_kit52.combineCodec)(
|
|
7500
7711
|
getSetDefaultMaxPercentageOfLeftoversInstructionDataEncoder(),
|
|
7501
7712
|
getSetDefaultMaxPercentageOfLeftoversInstructionDataDecoder()
|
|
7502
7713
|
);
|
|
@@ -7545,7 +7756,7 @@ function parseSetDefaultMaxPercentageOfLeftoversInstruction(instruction) {
|
|
|
7545
7756
|
}
|
|
7546
7757
|
|
|
7547
7758
|
// src/generated/instructions/setDefaultMaxSwapSlippage.ts
|
|
7548
|
-
var
|
|
7759
|
+
var import_kit53 = require("@solana/kit");
|
|
7549
7760
|
var SET_DEFAULT_MAX_SWAP_SLIPPAGE_DISCRIMINATOR = new Uint8Array([
|
|
7550
7761
|
122,
|
|
7551
7762
|
22,
|
|
@@ -7557,15 +7768,15 @@ var SET_DEFAULT_MAX_SWAP_SLIPPAGE_DISCRIMINATOR = new Uint8Array([
|
|
|
7557
7768
|
181
|
|
7558
7769
|
]);
|
|
7559
7770
|
function getSetDefaultMaxSwapSlippageDiscriminatorBytes() {
|
|
7560
|
-
return (0,
|
|
7771
|
+
return (0, import_kit53.fixEncoderSize)((0, import_kit53.getBytesEncoder)(), 8).encode(
|
|
7561
7772
|
SET_DEFAULT_MAX_SWAP_SLIPPAGE_DISCRIMINATOR
|
|
7562
7773
|
);
|
|
7563
7774
|
}
|
|
7564
7775
|
function getSetDefaultMaxSwapSlippageInstructionDataEncoder() {
|
|
7565
|
-
return (0,
|
|
7566
|
-
(0,
|
|
7567
|
-
["discriminator", (0,
|
|
7568
|
-
["maxSwapSlippage", (0,
|
|
7776
|
+
return (0, import_kit53.transformEncoder)(
|
|
7777
|
+
(0, import_kit53.getStructEncoder)([
|
|
7778
|
+
["discriminator", (0, import_kit53.fixEncoderSize)((0, import_kit53.getBytesEncoder)(), 8)],
|
|
7779
|
+
["maxSwapSlippage", (0, import_kit53.getU32Encoder)()]
|
|
7569
7780
|
]),
|
|
7570
7781
|
(value) => ({
|
|
7571
7782
|
...value,
|
|
@@ -7574,13 +7785,13 @@ function getSetDefaultMaxSwapSlippageInstructionDataEncoder() {
|
|
|
7574
7785
|
);
|
|
7575
7786
|
}
|
|
7576
7787
|
function getSetDefaultMaxSwapSlippageInstructionDataDecoder() {
|
|
7577
|
-
return (0,
|
|
7578
|
-
["discriminator", (0,
|
|
7579
|
-
["maxSwapSlippage", (0,
|
|
7788
|
+
return (0, import_kit53.getStructDecoder)([
|
|
7789
|
+
["discriminator", (0, import_kit53.fixDecoderSize)((0, import_kit53.getBytesDecoder)(), 8)],
|
|
7790
|
+
["maxSwapSlippage", (0, import_kit53.getU32Decoder)()]
|
|
7580
7791
|
]);
|
|
7581
7792
|
}
|
|
7582
7793
|
function getSetDefaultMaxSwapSlippageInstructionDataCodec() {
|
|
7583
|
-
return (0,
|
|
7794
|
+
return (0, import_kit53.combineCodec)(
|
|
7584
7795
|
getSetDefaultMaxSwapSlippageInstructionDataEncoder(),
|
|
7585
7796
|
getSetDefaultMaxSwapSlippageInstructionDataDecoder()
|
|
7586
7797
|
);
|
|
@@ -7629,18 +7840,18 @@ function parseSetDefaultMaxSwapSlippageInstruction(instruction) {
|
|
|
7629
7840
|
}
|
|
7630
7841
|
|
|
7631
7842
|
// src/generated/instructions/setDefaultOraclePriceDeviationThreshold.ts
|
|
7632
|
-
var
|
|
7843
|
+
var import_kit54 = require("@solana/kit");
|
|
7633
7844
|
var SET_DEFAULT_ORACLE_PRICE_DEVIATION_THRESHOLD_DISCRIMINATOR = new Uint8Array([142, 158, 143, 67, 206, 91, 139, 120]);
|
|
7634
7845
|
function getSetDefaultOraclePriceDeviationThresholdDiscriminatorBytes() {
|
|
7635
|
-
return (0,
|
|
7846
|
+
return (0, import_kit54.fixEncoderSize)((0, import_kit54.getBytesEncoder)(), 8).encode(
|
|
7636
7847
|
SET_DEFAULT_ORACLE_PRICE_DEVIATION_THRESHOLD_DISCRIMINATOR
|
|
7637
7848
|
);
|
|
7638
7849
|
}
|
|
7639
7850
|
function getSetDefaultOraclePriceDeviationThresholdInstructionDataEncoder() {
|
|
7640
|
-
return (0,
|
|
7641
|
-
(0,
|
|
7642
|
-
["discriminator", (0,
|
|
7643
|
-
["oraclePriceDeviationThreshold", (0,
|
|
7851
|
+
return (0, import_kit54.transformEncoder)(
|
|
7852
|
+
(0, import_kit54.getStructEncoder)([
|
|
7853
|
+
["discriminator", (0, import_kit54.fixEncoderSize)((0, import_kit54.getBytesEncoder)(), 8)],
|
|
7854
|
+
["oraclePriceDeviationThreshold", (0, import_kit54.getU32Encoder)()]
|
|
7644
7855
|
]),
|
|
7645
7856
|
(value) => ({
|
|
7646
7857
|
...value,
|
|
@@ -7649,13 +7860,13 @@ function getSetDefaultOraclePriceDeviationThresholdInstructionDataEncoder() {
|
|
|
7649
7860
|
);
|
|
7650
7861
|
}
|
|
7651
7862
|
function getSetDefaultOraclePriceDeviationThresholdInstructionDataDecoder() {
|
|
7652
|
-
return (0,
|
|
7653
|
-
["discriminator", (0,
|
|
7654
|
-
["oraclePriceDeviationThreshold", (0,
|
|
7863
|
+
return (0, import_kit54.getStructDecoder)([
|
|
7864
|
+
["discriminator", (0, import_kit54.fixDecoderSize)((0, import_kit54.getBytesDecoder)(), 8)],
|
|
7865
|
+
["oraclePriceDeviationThreshold", (0, import_kit54.getU32Decoder)()]
|
|
7655
7866
|
]);
|
|
7656
7867
|
}
|
|
7657
7868
|
function getSetDefaultOraclePriceDeviationThresholdInstructionDataCodec() {
|
|
7658
|
-
return (0,
|
|
7869
|
+
return (0, import_kit54.combineCodec)(
|
|
7659
7870
|
getSetDefaultOraclePriceDeviationThresholdInstructionDataEncoder(),
|
|
7660
7871
|
getSetDefaultOraclePriceDeviationThresholdInstructionDataDecoder()
|
|
7661
7872
|
);
|
|
@@ -7704,7 +7915,7 @@ function parseSetDefaultOraclePriceDeviationThresholdInstruction(instruction) {
|
|
|
7704
7915
|
}
|
|
7705
7916
|
|
|
7706
7917
|
// src/generated/instructions/setFeeRecipient.ts
|
|
7707
|
-
var
|
|
7918
|
+
var import_kit55 = require("@solana/kit");
|
|
7708
7919
|
var SET_FEE_RECIPIENT_DISCRIMINATOR = new Uint8Array([
|
|
7709
7920
|
227,
|
|
7710
7921
|
18,
|
|
@@ -7716,27 +7927,27 @@ var SET_FEE_RECIPIENT_DISCRIMINATOR = new Uint8Array([
|
|
|
7716
7927
|
66
|
|
7717
7928
|
]);
|
|
7718
7929
|
function getSetFeeRecipientDiscriminatorBytes() {
|
|
7719
|
-
return (0,
|
|
7930
|
+
return (0, import_kit55.fixEncoderSize)((0, import_kit55.getBytesEncoder)(), 8).encode(
|
|
7720
7931
|
SET_FEE_RECIPIENT_DISCRIMINATOR
|
|
7721
7932
|
);
|
|
7722
7933
|
}
|
|
7723
7934
|
function getSetFeeRecipientInstructionDataEncoder() {
|
|
7724
|
-
return (0,
|
|
7725
|
-
(0,
|
|
7726
|
-
["discriminator", (0,
|
|
7727
|
-
["feeRecipient", (0,
|
|
7935
|
+
return (0, import_kit55.transformEncoder)(
|
|
7936
|
+
(0, import_kit55.getStructEncoder)([
|
|
7937
|
+
["discriminator", (0, import_kit55.fixEncoderSize)((0, import_kit55.getBytesEncoder)(), 8)],
|
|
7938
|
+
["feeRecipient", (0, import_kit55.getAddressEncoder)()]
|
|
7728
7939
|
]),
|
|
7729
7940
|
(value) => ({ ...value, discriminator: SET_FEE_RECIPIENT_DISCRIMINATOR })
|
|
7730
7941
|
);
|
|
7731
7942
|
}
|
|
7732
7943
|
function getSetFeeRecipientInstructionDataDecoder() {
|
|
7733
|
-
return (0,
|
|
7734
|
-
["discriminator", (0,
|
|
7735
|
-
["feeRecipient", (0,
|
|
7944
|
+
return (0, import_kit55.getStructDecoder)([
|
|
7945
|
+
["discriminator", (0, import_kit55.fixDecoderSize)((0, import_kit55.getBytesDecoder)(), 8)],
|
|
7946
|
+
["feeRecipient", (0, import_kit55.getAddressDecoder)()]
|
|
7736
7947
|
]);
|
|
7737
7948
|
}
|
|
7738
7949
|
function getSetFeeRecipientInstructionDataCodec() {
|
|
7739
|
-
return (0,
|
|
7950
|
+
return (0, import_kit55.combineCodec)(
|
|
7740
7951
|
getSetFeeRecipientInstructionDataEncoder(),
|
|
7741
7952
|
getSetFeeRecipientInstructionDataDecoder()
|
|
7742
7953
|
);
|
|
@@ -7783,7 +7994,7 @@ function parseSetFeeRecipientInstruction(instruction) {
|
|
|
7783
7994
|
}
|
|
7784
7995
|
|
|
7785
7996
|
// src/generated/instructions/setLiquidatorAuthority.ts
|
|
7786
|
-
var
|
|
7997
|
+
var import_kit56 = require("@solana/kit");
|
|
7787
7998
|
var SET_LIQUIDATOR_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
7788
7999
|
246,
|
|
7789
8000
|
146,
|
|
@@ -7795,15 +8006,15 @@ var SET_LIQUIDATOR_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
|
7795
8006
|
143
|
|
7796
8007
|
]);
|
|
7797
8008
|
function getSetLiquidatorAuthorityDiscriminatorBytes() {
|
|
7798
|
-
return (0,
|
|
8009
|
+
return (0, import_kit56.fixEncoderSize)((0, import_kit56.getBytesEncoder)(), 8).encode(
|
|
7799
8010
|
SET_LIQUIDATOR_AUTHORITY_DISCRIMINATOR
|
|
7800
8011
|
);
|
|
7801
8012
|
}
|
|
7802
8013
|
function getSetLiquidatorAuthorityInstructionDataEncoder() {
|
|
7803
|
-
return (0,
|
|
7804
|
-
(0,
|
|
7805
|
-
["discriminator", (0,
|
|
7806
|
-
["liquidatorAuthority", (0,
|
|
8014
|
+
return (0, import_kit56.transformEncoder)(
|
|
8015
|
+
(0, import_kit56.getStructEncoder)([
|
|
8016
|
+
["discriminator", (0, import_kit56.fixEncoderSize)((0, import_kit56.getBytesEncoder)(), 8)],
|
|
8017
|
+
["liquidatorAuthority", (0, import_kit56.getAddressEncoder)()]
|
|
7807
8018
|
]),
|
|
7808
8019
|
(value) => ({
|
|
7809
8020
|
...value,
|
|
@@ -7812,13 +8023,13 @@ function getSetLiquidatorAuthorityInstructionDataEncoder() {
|
|
|
7812
8023
|
);
|
|
7813
8024
|
}
|
|
7814
8025
|
function getSetLiquidatorAuthorityInstructionDataDecoder() {
|
|
7815
|
-
return (0,
|
|
7816
|
-
["discriminator", (0,
|
|
7817
|
-
["liquidatorAuthority", (0,
|
|
8026
|
+
return (0, import_kit56.getStructDecoder)([
|
|
8027
|
+
["discriminator", (0, import_kit56.fixDecoderSize)((0, import_kit56.getBytesDecoder)(), 8)],
|
|
8028
|
+
["liquidatorAuthority", (0, import_kit56.getAddressDecoder)()]
|
|
7818
8029
|
]);
|
|
7819
8030
|
}
|
|
7820
8031
|
function getSetLiquidatorAuthorityInstructionDataCodec() {
|
|
7821
|
-
return (0,
|
|
8032
|
+
return (0, import_kit56.combineCodec)(
|
|
7822
8033
|
getSetLiquidatorAuthorityInstructionDataEncoder(),
|
|
7823
8034
|
getSetLiquidatorAuthorityInstructionDataDecoder()
|
|
7824
8035
|
);
|
|
@@ -7867,7 +8078,7 @@ function parseSetLiquidatorAuthorityInstruction(instruction) {
|
|
|
7867
8078
|
}
|
|
7868
8079
|
|
|
7869
8080
|
// src/generated/instructions/setOwnerAuthority.ts
|
|
7870
|
-
var
|
|
8081
|
+
var import_kit57 = require("@solana/kit");
|
|
7871
8082
|
var SET_OWNER_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
7872
8083
|
128,
|
|
7873
8084
|
171,
|
|
@@ -7879,27 +8090,27 @@ var SET_OWNER_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
|
7879
8090
|
117
|
|
7880
8091
|
]);
|
|
7881
8092
|
function getSetOwnerAuthorityDiscriminatorBytes() {
|
|
7882
|
-
return (0,
|
|
8093
|
+
return (0, import_kit57.fixEncoderSize)((0, import_kit57.getBytesEncoder)(), 8).encode(
|
|
7883
8094
|
SET_OWNER_AUTHORITY_DISCRIMINATOR
|
|
7884
8095
|
);
|
|
7885
8096
|
}
|
|
7886
8097
|
function getSetOwnerAuthorityInstructionDataEncoder() {
|
|
7887
|
-
return (0,
|
|
7888
|
-
(0,
|
|
7889
|
-
["discriminator", (0,
|
|
7890
|
-
["ownerAuthority", (0,
|
|
8098
|
+
return (0, import_kit57.transformEncoder)(
|
|
8099
|
+
(0, import_kit57.getStructEncoder)([
|
|
8100
|
+
["discriminator", (0, import_kit57.fixEncoderSize)((0, import_kit57.getBytesEncoder)(), 8)],
|
|
8101
|
+
["ownerAuthority", (0, import_kit57.getAddressEncoder)()]
|
|
7891
8102
|
]),
|
|
7892
8103
|
(value) => ({ ...value, discriminator: SET_OWNER_AUTHORITY_DISCRIMINATOR })
|
|
7893
8104
|
);
|
|
7894
8105
|
}
|
|
7895
8106
|
function getSetOwnerAuthorityInstructionDataDecoder() {
|
|
7896
|
-
return (0,
|
|
7897
|
-
["discriminator", (0,
|
|
7898
|
-
["ownerAuthority", (0,
|
|
8107
|
+
return (0, import_kit57.getStructDecoder)([
|
|
8108
|
+
["discriminator", (0, import_kit57.fixDecoderSize)((0, import_kit57.getBytesDecoder)(), 8)],
|
|
8109
|
+
["ownerAuthority", (0, import_kit57.getAddressDecoder)()]
|
|
7899
8110
|
]);
|
|
7900
8111
|
}
|
|
7901
8112
|
function getSetOwnerAuthorityInstructionDataCodec() {
|
|
7902
|
-
return (0,
|
|
8113
|
+
return (0, import_kit57.combineCodec)(
|
|
7903
8114
|
getSetOwnerAuthorityInstructionDataEncoder(),
|
|
7904
8115
|
getSetOwnerAuthorityInstructionDataDecoder()
|
|
7905
8116
|
);
|
|
@@ -7946,7 +8157,7 @@ function parseSetOwnerAuthorityInstruction(instruction) {
|
|
|
7946
8157
|
}
|
|
7947
8158
|
|
|
7948
8159
|
// src/generated/instructions/setSuspendedState.ts
|
|
7949
|
-
var
|
|
8160
|
+
var import_kit58 = require("@solana/kit");
|
|
7950
8161
|
var SET_SUSPENDED_STATE_DISCRIMINATOR = new Uint8Array([
|
|
7951
8162
|
145,
|
|
7952
8163
|
13,
|
|
@@ -7958,33 +8169,33 @@ var SET_SUSPENDED_STATE_DISCRIMINATOR = new Uint8Array([
|
|
|
7958
8169
|
32
|
|
7959
8170
|
]);
|
|
7960
8171
|
function getSetSuspendedStateDiscriminatorBytes() {
|
|
7961
|
-
return (0,
|
|
8172
|
+
return (0, import_kit58.fixEncoderSize)((0, import_kit58.getBytesEncoder)(), 8).encode(
|
|
7962
8173
|
SET_SUSPENDED_STATE_DISCRIMINATOR
|
|
7963
8174
|
);
|
|
7964
8175
|
}
|
|
7965
8176
|
function getSetSuspendedStateInstructionDataEncoder() {
|
|
7966
|
-
return (0,
|
|
7967
|
-
(0,
|
|
7968
|
-
["discriminator", (0,
|
|
7969
|
-
["suspendLendingDeposits", (0,
|
|
7970
|
-
["suspendLendingWithdrawals", (0,
|
|
7971
|
-
["suspendAddLiquidity", (0,
|
|
7972
|
-
["suspendRemoveLiquidity", (0,
|
|
8177
|
+
return (0, import_kit58.transformEncoder)(
|
|
8178
|
+
(0, import_kit58.getStructEncoder)([
|
|
8179
|
+
["discriminator", (0, import_kit58.fixEncoderSize)((0, import_kit58.getBytesEncoder)(), 8)],
|
|
8180
|
+
["suspendLendingDeposits", (0, import_kit58.getBooleanEncoder)()],
|
|
8181
|
+
["suspendLendingWithdrawals", (0, import_kit58.getBooleanEncoder)()],
|
|
8182
|
+
["suspendAddLiquidity", (0, import_kit58.getBooleanEncoder)()],
|
|
8183
|
+
["suspendRemoveLiquidity", (0, import_kit58.getBooleanEncoder)()]
|
|
7973
8184
|
]),
|
|
7974
8185
|
(value) => ({ ...value, discriminator: SET_SUSPENDED_STATE_DISCRIMINATOR })
|
|
7975
8186
|
);
|
|
7976
8187
|
}
|
|
7977
8188
|
function getSetSuspendedStateInstructionDataDecoder() {
|
|
7978
|
-
return (0,
|
|
7979
|
-
["discriminator", (0,
|
|
7980
|
-
["suspendLendingDeposits", (0,
|
|
7981
|
-
["suspendLendingWithdrawals", (0,
|
|
7982
|
-
["suspendAddLiquidity", (0,
|
|
7983
|
-
["suspendRemoveLiquidity", (0,
|
|
8189
|
+
return (0, import_kit58.getStructDecoder)([
|
|
8190
|
+
["discriminator", (0, import_kit58.fixDecoderSize)((0, import_kit58.getBytesDecoder)(), 8)],
|
|
8191
|
+
["suspendLendingDeposits", (0, import_kit58.getBooleanDecoder)()],
|
|
8192
|
+
["suspendLendingWithdrawals", (0, import_kit58.getBooleanDecoder)()],
|
|
8193
|
+
["suspendAddLiquidity", (0, import_kit58.getBooleanDecoder)()],
|
|
8194
|
+
["suspendRemoveLiquidity", (0, import_kit58.getBooleanDecoder)()]
|
|
7984
8195
|
]);
|
|
7985
8196
|
}
|
|
7986
8197
|
function getSetSuspendedStateInstructionDataCodec() {
|
|
7987
|
-
return (0,
|
|
8198
|
+
return (0, import_kit58.combineCodec)(
|
|
7988
8199
|
getSetSuspendedStateInstructionDataEncoder(),
|
|
7989
8200
|
getSetSuspendedStateInstructionDataDecoder()
|
|
7990
8201
|
);
|
|
@@ -8031,7 +8242,7 @@ function parseSetSuspendedStateInstruction(instruction) {
|
|
|
8031
8242
|
}
|
|
8032
8243
|
|
|
8033
8244
|
// src/generated/instructions/setTunaLpPositionFlags.ts
|
|
8034
|
-
var
|
|
8245
|
+
var import_kit59 = require("@solana/kit");
|
|
8035
8246
|
var SET_TUNA_LP_POSITION_FLAGS_DISCRIMINATOR = new Uint8Array([
|
|
8036
8247
|
110,
|
|
8037
8248
|
73,
|
|
@@ -8043,15 +8254,15 @@ var SET_TUNA_LP_POSITION_FLAGS_DISCRIMINATOR = new Uint8Array([
|
|
|
8043
8254
|
57
|
|
8044
8255
|
]);
|
|
8045
8256
|
function getSetTunaLpPositionFlagsDiscriminatorBytes() {
|
|
8046
|
-
return (0,
|
|
8257
|
+
return (0, import_kit59.fixEncoderSize)((0, import_kit59.getBytesEncoder)(), 8).encode(
|
|
8047
8258
|
SET_TUNA_LP_POSITION_FLAGS_DISCRIMINATOR
|
|
8048
8259
|
);
|
|
8049
8260
|
}
|
|
8050
8261
|
function getSetTunaLpPositionFlagsInstructionDataEncoder() {
|
|
8051
|
-
return (0,
|
|
8052
|
-
(0,
|
|
8053
|
-
["discriminator", (0,
|
|
8054
|
-
["flags", (0,
|
|
8262
|
+
return (0, import_kit59.transformEncoder)(
|
|
8263
|
+
(0, import_kit59.getStructEncoder)([
|
|
8264
|
+
["discriminator", (0, import_kit59.fixEncoderSize)((0, import_kit59.getBytesEncoder)(), 8)],
|
|
8265
|
+
["flags", (0, import_kit59.getU32Encoder)()]
|
|
8055
8266
|
]),
|
|
8056
8267
|
(value) => ({
|
|
8057
8268
|
...value,
|
|
@@ -8060,13 +8271,13 @@ function getSetTunaLpPositionFlagsInstructionDataEncoder() {
|
|
|
8060
8271
|
);
|
|
8061
8272
|
}
|
|
8062
8273
|
function getSetTunaLpPositionFlagsInstructionDataDecoder() {
|
|
8063
|
-
return (0,
|
|
8064
|
-
["discriminator", (0,
|
|
8065
|
-
["flags", (0,
|
|
8274
|
+
return (0, import_kit59.getStructDecoder)([
|
|
8275
|
+
["discriminator", (0, import_kit59.fixDecoderSize)((0, import_kit59.getBytesDecoder)(), 8)],
|
|
8276
|
+
["flags", (0, import_kit59.getU32Decoder)()]
|
|
8066
8277
|
]);
|
|
8067
8278
|
}
|
|
8068
8279
|
function getSetTunaLpPositionFlagsInstructionDataCodec() {
|
|
8069
|
-
return (0,
|
|
8280
|
+
return (0, import_kit59.combineCodec)(
|
|
8070
8281
|
getSetTunaLpPositionFlagsInstructionDataEncoder(),
|
|
8071
8282
|
getSetTunaLpPositionFlagsInstructionDataDecoder()
|
|
8072
8283
|
);
|
|
@@ -8115,7 +8326,7 @@ function parseSetTunaLpPositionFlagsInstruction(instruction) {
|
|
|
8115
8326
|
}
|
|
8116
8327
|
|
|
8117
8328
|
// src/generated/instructions/setTunaLpPositionLimitOrders.ts
|
|
8118
|
-
var
|
|
8329
|
+
var import_kit60 = require("@solana/kit");
|
|
8119
8330
|
var SET_TUNA_LP_POSITION_LIMIT_ORDERS_DISCRIMINATOR = new Uint8Array([
|
|
8120
8331
|
65,
|
|
8121
8332
|
128,
|
|
@@ -8127,17 +8338,17 @@ var SET_TUNA_LP_POSITION_LIMIT_ORDERS_DISCRIMINATOR = new Uint8Array([
|
|
|
8127
8338
|
255
|
|
8128
8339
|
]);
|
|
8129
8340
|
function getSetTunaLpPositionLimitOrdersDiscriminatorBytes() {
|
|
8130
|
-
return (0,
|
|
8341
|
+
return (0, import_kit60.fixEncoderSize)((0, import_kit60.getBytesEncoder)(), 8).encode(
|
|
8131
8342
|
SET_TUNA_LP_POSITION_LIMIT_ORDERS_DISCRIMINATOR
|
|
8132
8343
|
);
|
|
8133
8344
|
}
|
|
8134
8345
|
function getSetTunaLpPositionLimitOrdersInstructionDataEncoder() {
|
|
8135
|
-
return (0,
|
|
8136
|
-
(0,
|
|
8137
|
-
["discriminator", (0,
|
|
8138
|
-
["lowerLimitOrderSqrtPrice", (0,
|
|
8139
|
-
["upperLimitOrderSqrtPrice", (0,
|
|
8140
|
-
["swapToTokenOnLimitOrder", (0,
|
|
8346
|
+
return (0, import_kit60.transformEncoder)(
|
|
8347
|
+
(0, import_kit60.getStructEncoder)([
|
|
8348
|
+
["discriminator", (0, import_kit60.fixEncoderSize)((0, import_kit60.getBytesEncoder)(), 8)],
|
|
8349
|
+
["lowerLimitOrderSqrtPrice", (0, import_kit60.getU128Encoder)()],
|
|
8350
|
+
["upperLimitOrderSqrtPrice", (0, import_kit60.getU128Encoder)()],
|
|
8351
|
+
["swapToTokenOnLimitOrder", (0, import_kit60.getU8Encoder)()]
|
|
8141
8352
|
]),
|
|
8142
8353
|
(value) => ({
|
|
8143
8354
|
...value,
|
|
@@ -8146,15 +8357,15 @@ function getSetTunaLpPositionLimitOrdersInstructionDataEncoder() {
|
|
|
8146
8357
|
);
|
|
8147
8358
|
}
|
|
8148
8359
|
function getSetTunaLpPositionLimitOrdersInstructionDataDecoder() {
|
|
8149
|
-
return (0,
|
|
8150
|
-
["discriminator", (0,
|
|
8151
|
-
["lowerLimitOrderSqrtPrice", (0,
|
|
8152
|
-
["upperLimitOrderSqrtPrice", (0,
|
|
8153
|
-
["swapToTokenOnLimitOrder", (0,
|
|
8360
|
+
return (0, import_kit60.getStructDecoder)([
|
|
8361
|
+
["discriminator", (0, import_kit60.fixDecoderSize)((0, import_kit60.getBytesDecoder)(), 8)],
|
|
8362
|
+
["lowerLimitOrderSqrtPrice", (0, import_kit60.getU128Decoder)()],
|
|
8363
|
+
["upperLimitOrderSqrtPrice", (0, import_kit60.getU128Decoder)()],
|
|
8364
|
+
["swapToTokenOnLimitOrder", (0, import_kit60.getU8Decoder)()]
|
|
8154
8365
|
]);
|
|
8155
8366
|
}
|
|
8156
8367
|
function getSetTunaLpPositionLimitOrdersInstructionDataCodec() {
|
|
8157
|
-
return (0,
|
|
8368
|
+
return (0, import_kit60.combineCodec)(
|
|
8158
8369
|
getSetTunaLpPositionLimitOrdersInstructionDataEncoder(),
|
|
8159
8370
|
getSetTunaLpPositionLimitOrdersInstructionDataDecoder()
|
|
8160
8371
|
);
|
|
@@ -8203,18 +8414,18 @@ function parseSetTunaLpPositionLimitOrdersInstruction(instruction) {
|
|
|
8203
8414
|
}
|
|
8204
8415
|
|
|
8205
8416
|
// src/generated/instructions/setTunaLpPositionRebalanceThreshold.ts
|
|
8206
|
-
var
|
|
8417
|
+
var import_kit61 = require("@solana/kit");
|
|
8207
8418
|
var SET_TUNA_LP_POSITION_REBALANCE_THRESHOLD_DISCRIMINATOR = new Uint8Array([244, 174, 185, 58, 90, 150, 162, 51]);
|
|
8208
8419
|
function getSetTunaLpPositionRebalanceThresholdDiscriminatorBytes() {
|
|
8209
|
-
return (0,
|
|
8420
|
+
return (0, import_kit61.fixEncoderSize)((0, import_kit61.getBytesEncoder)(), 8).encode(
|
|
8210
8421
|
SET_TUNA_LP_POSITION_REBALANCE_THRESHOLD_DISCRIMINATOR
|
|
8211
8422
|
);
|
|
8212
8423
|
}
|
|
8213
8424
|
function getSetTunaLpPositionRebalanceThresholdInstructionDataEncoder() {
|
|
8214
|
-
return (0,
|
|
8215
|
-
(0,
|
|
8216
|
-
["discriminator", (0,
|
|
8217
|
-
["rebalanceThresholdTicks", (0,
|
|
8425
|
+
return (0, import_kit61.transformEncoder)(
|
|
8426
|
+
(0, import_kit61.getStructEncoder)([
|
|
8427
|
+
["discriminator", (0, import_kit61.fixEncoderSize)((0, import_kit61.getBytesEncoder)(), 8)],
|
|
8428
|
+
["rebalanceThresholdTicks", (0, import_kit61.getU32Encoder)()]
|
|
8218
8429
|
]),
|
|
8219
8430
|
(value) => ({
|
|
8220
8431
|
...value,
|
|
@@ -8223,13 +8434,13 @@ function getSetTunaLpPositionRebalanceThresholdInstructionDataEncoder() {
|
|
|
8223
8434
|
);
|
|
8224
8435
|
}
|
|
8225
8436
|
function getSetTunaLpPositionRebalanceThresholdInstructionDataDecoder() {
|
|
8226
|
-
return (0,
|
|
8227
|
-
["discriminator", (0,
|
|
8228
|
-
["rebalanceThresholdTicks", (0,
|
|
8437
|
+
return (0, import_kit61.getStructDecoder)([
|
|
8438
|
+
["discriminator", (0, import_kit61.fixDecoderSize)((0, import_kit61.getBytesDecoder)(), 8)],
|
|
8439
|
+
["rebalanceThresholdTicks", (0, import_kit61.getU32Decoder)()]
|
|
8229
8440
|
]);
|
|
8230
8441
|
}
|
|
8231
8442
|
function getSetTunaLpPositionRebalanceThresholdInstructionDataCodec() {
|
|
8232
|
-
return (0,
|
|
8443
|
+
return (0, import_kit61.combineCodec)(
|
|
8233
8444
|
getSetTunaLpPositionRebalanceThresholdInstructionDataEncoder(),
|
|
8234
8445
|
getSetTunaLpPositionRebalanceThresholdInstructionDataDecoder()
|
|
8235
8446
|
);
|
|
@@ -8278,21 +8489,21 @@ function parseSetTunaLpPositionRebalanceThresholdInstruction(instruction) {
|
|
|
8278
8489
|
}
|
|
8279
8490
|
|
|
8280
8491
|
// src/generated/instructions/setTunaSpotPositionLimitOrders.ts
|
|
8281
|
-
var
|
|
8492
|
+
var import_kit62 = require("@solana/kit");
|
|
8282
8493
|
var SET_TUNA_SPOT_POSITION_LIMIT_ORDERS_DISCRIMINATOR = new Uint8Array(
|
|
8283
8494
|
[10, 180, 19, 205, 169, 133, 52, 118]
|
|
8284
8495
|
);
|
|
8285
8496
|
function getSetTunaSpotPositionLimitOrdersDiscriminatorBytes() {
|
|
8286
|
-
return (0,
|
|
8497
|
+
return (0, import_kit62.fixEncoderSize)((0, import_kit62.getBytesEncoder)(), 8).encode(
|
|
8287
8498
|
SET_TUNA_SPOT_POSITION_LIMIT_ORDERS_DISCRIMINATOR
|
|
8288
8499
|
);
|
|
8289
8500
|
}
|
|
8290
8501
|
function getSetTunaSpotPositionLimitOrdersInstructionDataEncoder() {
|
|
8291
|
-
return (0,
|
|
8292
|
-
(0,
|
|
8293
|
-
["discriminator", (0,
|
|
8294
|
-
["lowerLimitOrderSqrtPrice", (0,
|
|
8295
|
-
["upperLimitOrderSqrtPrice", (0,
|
|
8502
|
+
return (0, import_kit62.transformEncoder)(
|
|
8503
|
+
(0, import_kit62.getStructEncoder)([
|
|
8504
|
+
["discriminator", (0, import_kit62.fixEncoderSize)((0, import_kit62.getBytesEncoder)(), 8)],
|
|
8505
|
+
["lowerLimitOrderSqrtPrice", (0, import_kit62.getU128Encoder)()],
|
|
8506
|
+
["upperLimitOrderSqrtPrice", (0, import_kit62.getU128Encoder)()]
|
|
8296
8507
|
]),
|
|
8297
8508
|
(value) => ({
|
|
8298
8509
|
...value,
|
|
@@ -8301,14 +8512,14 @@ function getSetTunaSpotPositionLimitOrdersInstructionDataEncoder() {
|
|
|
8301
8512
|
);
|
|
8302
8513
|
}
|
|
8303
8514
|
function getSetTunaSpotPositionLimitOrdersInstructionDataDecoder() {
|
|
8304
|
-
return (0,
|
|
8305
|
-
["discriminator", (0,
|
|
8306
|
-
["lowerLimitOrderSqrtPrice", (0,
|
|
8307
|
-
["upperLimitOrderSqrtPrice", (0,
|
|
8515
|
+
return (0, import_kit62.getStructDecoder)([
|
|
8516
|
+
["discriminator", (0, import_kit62.fixDecoderSize)((0, import_kit62.getBytesDecoder)(), 8)],
|
|
8517
|
+
["lowerLimitOrderSqrtPrice", (0, import_kit62.getU128Decoder)()],
|
|
8518
|
+
["upperLimitOrderSqrtPrice", (0, import_kit62.getU128Decoder)()]
|
|
8308
8519
|
]);
|
|
8309
8520
|
}
|
|
8310
8521
|
function getSetTunaSpotPositionLimitOrdersInstructionDataCodec() {
|
|
8311
|
-
return (0,
|
|
8522
|
+
return (0, import_kit62.combineCodec)(
|
|
8312
8523
|
getSetTunaSpotPositionLimitOrdersInstructionDataEncoder(),
|
|
8313
8524
|
getSetTunaSpotPositionLimitOrdersInstructionDataDecoder()
|
|
8314
8525
|
);
|
|
@@ -8357,7 +8568,7 @@ function parseSetTunaSpotPositionLimitOrdersInstruction(instruction) {
|
|
|
8357
8568
|
}
|
|
8358
8569
|
|
|
8359
8570
|
// src/generated/instructions/updateMarket.ts
|
|
8360
|
-
var
|
|
8571
|
+
var import_kit63 = require("@solana/kit");
|
|
8361
8572
|
var UPDATE_MARKET_DISCRIMINATOR = new Uint8Array([
|
|
8362
8573
|
153,
|
|
8363
8574
|
39,
|
|
@@ -8369,55 +8580,55 @@ var UPDATE_MARKET_DISCRIMINATOR = new Uint8Array([
|
|
|
8369
8580
|
217
|
|
8370
8581
|
]);
|
|
8371
8582
|
function getUpdateMarketDiscriminatorBytes() {
|
|
8372
|
-
return (0,
|
|
8583
|
+
return (0, import_kit63.fixEncoderSize)((0, import_kit63.getBytesEncoder)(), 8).encode(
|
|
8373
8584
|
UPDATE_MARKET_DISCRIMINATOR
|
|
8374
8585
|
);
|
|
8375
8586
|
}
|
|
8376
8587
|
function getUpdateMarketInstructionDataEncoder() {
|
|
8377
|
-
return (0,
|
|
8378
|
-
(0,
|
|
8379
|
-
["discriminator", (0,
|
|
8380
|
-
["addressLookupTable", (0,
|
|
8381
|
-
["maxLeverage", (0,
|
|
8382
|
-
["protocolFee", (0,
|
|
8383
|
-
["protocolFeeOnCollateral", (0,
|
|
8384
|
-
["liquidationFee", (0,
|
|
8385
|
-
["liquidationThreshold", (0,
|
|
8386
|
-
["limitOrderExecutionFee", (0,
|
|
8387
|
-
["oraclePriceDeviationThreshold", (0,
|
|
8388
|
-
["disabled", (0,
|
|
8389
|
-
["borrowLimitA", (0,
|
|
8390
|
-
["borrowLimitB", (0,
|
|
8391
|
-
["maxSwapSlippage", (0,
|
|
8392
|
-
["rebalanceProtocolFee", (0,
|
|
8393
|
-
["spotPositionSizeLimitA", (0,
|
|
8394
|
-
["spotPositionSizeLimitB", (0,
|
|
8588
|
+
return (0, import_kit63.transformEncoder)(
|
|
8589
|
+
(0, import_kit63.getStructEncoder)([
|
|
8590
|
+
["discriminator", (0, import_kit63.fixEncoderSize)((0, import_kit63.getBytesEncoder)(), 8)],
|
|
8591
|
+
["addressLookupTable", (0, import_kit63.getAddressEncoder)()],
|
|
8592
|
+
["maxLeverage", (0, import_kit63.getU32Encoder)()],
|
|
8593
|
+
["protocolFee", (0, import_kit63.getU16Encoder)()],
|
|
8594
|
+
["protocolFeeOnCollateral", (0, import_kit63.getU16Encoder)()],
|
|
8595
|
+
["liquidationFee", (0, import_kit63.getU32Encoder)()],
|
|
8596
|
+
["liquidationThreshold", (0, import_kit63.getU32Encoder)()],
|
|
8597
|
+
["limitOrderExecutionFee", (0, import_kit63.getU32Encoder)()],
|
|
8598
|
+
["oraclePriceDeviationThreshold", (0, import_kit63.getU32Encoder)()],
|
|
8599
|
+
["disabled", (0, import_kit63.getBooleanEncoder)()],
|
|
8600
|
+
["borrowLimitA", (0, import_kit63.getU64Encoder)()],
|
|
8601
|
+
["borrowLimitB", (0, import_kit63.getU64Encoder)()],
|
|
8602
|
+
["maxSwapSlippage", (0, import_kit63.getU32Encoder)()],
|
|
8603
|
+
["rebalanceProtocolFee", (0, import_kit63.getU32Encoder)()],
|
|
8604
|
+
["spotPositionSizeLimitA", (0, import_kit63.getU64Encoder)()],
|
|
8605
|
+
["spotPositionSizeLimitB", (0, import_kit63.getU64Encoder)()]
|
|
8395
8606
|
]),
|
|
8396
8607
|
(value) => ({ ...value, discriminator: UPDATE_MARKET_DISCRIMINATOR })
|
|
8397
8608
|
);
|
|
8398
8609
|
}
|
|
8399
8610
|
function getUpdateMarketInstructionDataDecoder() {
|
|
8400
|
-
return (0,
|
|
8401
|
-
["discriminator", (0,
|
|
8402
|
-
["addressLookupTable", (0,
|
|
8403
|
-
["maxLeverage", (0,
|
|
8404
|
-
["protocolFee", (0,
|
|
8405
|
-
["protocolFeeOnCollateral", (0,
|
|
8406
|
-
["liquidationFee", (0,
|
|
8407
|
-
["liquidationThreshold", (0,
|
|
8408
|
-
["limitOrderExecutionFee", (0,
|
|
8409
|
-
["oraclePriceDeviationThreshold", (0,
|
|
8410
|
-
["disabled", (0,
|
|
8411
|
-
["borrowLimitA", (0,
|
|
8412
|
-
["borrowLimitB", (0,
|
|
8413
|
-
["maxSwapSlippage", (0,
|
|
8414
|
-
["rebalanceProtocolFee", (0,
|
|
8415
|
-
["spotPositionSizeLimitA", (0,
|
|
8416
|
-
["spotPositionSizeLimitB", (0,
|
|
8611
|
+
return (0, import_kit63.getStructDecoder)([
|
|
8612
|
+
["discriminator", (0, import_kit63.fixDecoderSize)((0, import_kit63.getBytesDecoder)(), 8)],
|
|
8613
|
+
["addressLookupTable", (0, import_kit63.getAddressDecoder)()],
|
|
8614
|
+
["maxLeverage", (0, import_kit63.getU32Decoder)()],
|
|
8615
|
+
["protocolFee", (0, import_kit63.getU16Decoder)()],
|
|
8616
|
+
["protocolFeeOnCollateral", (0, import_kit63.getU16Decoder)()],
|
|
8617
|
+
["liquidationFee", (0, import_kit63.getU32Decoder)()],
|
|
8618
|
+
["liquidationThreshold", (0, import_kit63.getU32Decoder)()],
|
|
8619
|
+
["limitOrderExecutionFee", (0, import_kit63.getU32Decoder)()],
|
|
8620
|
+
["oraclePriceDeviationThreshold", (0, import_kit63.getU32Decoder)()],
|
|
8621
|
+
["disabled", (0, import_kit63.getBooleanDecoder)()],
|
|
8622
|
+
["borrowLimitA", (0, import_kit63.getU64Decoder)()],
|
|
8623
|
+
["borrowLimitB", (0, import_kit63.getU64Decoder)()],
|
|
8624
|
+
["maxSwapSlippage", (0, import_kit63.getU32Decoder)()],
|
|
8625
|
+
["rebalanceProtocolFee", (0, import_kit63.getU32Decoder)()],
|
|
8626
|
+
["spotPositionSizeLimitA", (0, import_kit63.getU64Decoder)()],
|
|
8627
|
+
["spotPositionSizeLimitB", (0, import_kit63.getU64Decoder)()]
|
|
8417
8628
|
]);
|
|
8418
8629
|
}
|
|
8419
8630
|
function getUpdateMarketInstructionDataCodec() {
|
|
8420
|
-
return (0,
|
|
8631
|
+
return (0, import_kit63.combineCodec)(
|
|
8421
8632
|
getUpdateMarketInstructionDataEncoder(),
|
|
8422
8633
|
getUpdateMarketInstructionDataDecoder()
|
|
8423
8634
|
);
|
|
@@ -8467,7 +8678,7 @@ function parseUpdateMarketInstruction(instruction) {
|
|
|
8467
8678
|
}
|
|
8468
8679
|
|
|
8469
8680
|
// src/generated/instructions/updateVault.ts
|
|
8470
|
-
var
|
|
8681
|
+
var import_kit64 = require("@solana/kit");
|
|
8471
8682
|
var UPDATE_VAULT_DISCRIMINATOR = new Uint8Array([
|
|
8472
8683
|
67,
|
|
8473
8684
|
229,
|
|
@@ -8479,33 +8690,33 @@ var UPDATE_VAULT_DISCRIMINATOR = new Uint8Array([
|
|
|
8479
8690
|
60
|
|
8480
8691
|
]);
|
|
8481
8692
|
function getUpdateVaultDiscriminatorBytes() {
|
|
8482
|
-
return (0,
|
|
8693
|
+
return (0, import_kit64.fixEncoderSize)((0, import_kit64.getBytesEncoder)(), 8).encode(
|
|
8483
8694
|
UPDATE_VAULT_DISCRIMINATOR
|
|
8484
8695
|
);
|
|
8485
8696
|
}
|
|
8486
8697
|
function getUpdateVaultInstructionDataEncoder() {
|
|
8487
|
-
return (0,
|
|
8488
|
-
(0,
|
|
8489
|
-
["discriminator", (0,
|
|
8490
|
-
["interestRate", (0,
|
|
8491
|
-
["supplyLimit", (0,
|
|
8492
|
-
["pythOraclePriceUpdate", (0,
|
|
8493
|
-
["pythOracleFeedId", (0,
|
|
8698
|
+
return (0, import_kit64.transformEncoder)(
|
|
8699
|
+
(0, import_kit64.getStructEncoder)([
|
|
8700
|
+
["discriminator", (0, import_kit64.fixEncoderSize)((0, import_kit64.getBytesEncoder)(), 8)],
|
|
8701
|
+
["interestRate", (0, import_kit64.getU64Encoder)()],
|
|
8702
|
+
["supplyLimit", (0, import_kit64.getU64Encoder)()],
|
|
8703
|
+
["pythOraclePriceUpdate", (0, import_kit64.getAddressEncoder)()],
|
|
8704
|
+
["pythOracleFeedId", (0, import_kit64.getAddressEncoder)()]
|
|
8494
8705
|
]),
|
|
8495
8706
|
(value) => ({ ...value, discriminator: UPDATE_VAULT_DISCRIMINATOR })
|
|
8496
8707
|
);
|
|
8497
8708
|
}
|
|
8498
8709
|
function getUpdateVaultInstructionDataDecoder() {
|
|
8499
|
-
return (0,
|
|
8500
|
-
["discriminator", (0,
|
|
8501
|
-
["interestRate", (0,
|
|
8502
|
-
["supplyLimit", (0,
|
|
8503
|
-
["pythOraclePriceUpdate", (0,
|
|
8504
|
-
["pythOracleFeedId", (0,
|
|
8710
|
+
return (0, import_kit64.getStructDecoder)([
|
|
8711
|
+
["discriminator", (0, import_kit64.fixDecoderSize)((0, import_kit64.getBytesDecoder)(), 8)],
|
|
8712
|
+
["interestRate", (0, import_kit64.getU64Decoder)()],
|
|
8713
|
+
["supplyLimit", (0, import_kit64.getU64Decoder)()],
|
|
8714
|
+
["pythOraclePriceUpdate", (0, import_kit64.getAddressDecoder)()],
|
|
8715
|
+
["pythOracleFeedId", (0, import_kit64.getAddressDecoder)()]
|
|
8505
8716
|
]);
|
|
8506
8717
|
}
|
|
8507
8718
|
function getUpdateVaultInstructionDataCodec() {
|
|
8508
|
-
return (0,
|
|
8719
|
+
return (0, import_kit64.combineCodec)(
|
|
8509
8720
|
getUpdateVaultInstructionDataEncoder(),
|
|
8510
8721
|
getUpdateVaultInstructionDataDecoder()
|
|
8511
8722
|
);
|
|
@@ -8555,7 +8766,7 @@ function parseUpdateVaultInstruction(instruction) {
|
|
|
8555
8766
|
}
|
|
8556
8767
|
|
|
8557
8768
|
// src/generated/instructions/withdraw.ts
|
|
8558
|
-
var
|
|
8769
|
+
var import_kit65 = require("@solana/kit");
|
|
8559
8770
|
var WITHDRAW_DISCRIMINATOR = new Uint8Array([
|
|
8560
8771
|
183,
|
|
8561
8772
|
18,
|
|
@@ -8567,27 +8778,27 @@ var WITHDRAW_DISCRIMINATOR = new Uint8Array([
|
|
|
8567
8778
|
34
|
|
8568
8779
|
]);
|
|
8569
8780
|
function getWithdrawDiscriminatorBytes() {
|
|
8570
|
-
return (0,
|
|
8781
|
+
return (0, import_kit65.fixEncoderSize)((0, import_kit65.getBytesEncoder)(), 8).encode(WITHDRAW_DISCRIMINATOR);
|
|
8571
8782
|
}
|
|
8572
8783
|
function getWithdrawInstructionDataEncoder() {
|
|
8573
|
-
return (0,
|
|
8574
|
-
(0,
|
|
8575
|
-
["discriminator", (0,
|
|
8576
|
-
["funds", (0,
|
|
8577
|
-
["shares", (0,
|
|
8784
|
+
return (0, import_kit65.transformEncoder)(
|
|
8785
|
+
(0, import_kit65.getStructEncoder)([
|
|
8786
|
+
["discriminator", (0, import_kit65.fixEncoderSize)((0, import_kit65.getBytesEncoder)(), 8)],
|
|
8787
|
+
["funds", (0, import_kit65.getU64Encoder)()],
|
|
8788
|
+
["shares", (0, import_kit65.getU64Encoder)()]
|
|
8578
8789
|
]),
|
|
8579
8790
|
(value) => ({ ...value, discriminator: WITHDRAW_DISCRIMINATOR })
|
|
8580
8791
|
);
|
|
8581
8792
|
}
|
|
8582
8793
|
function getWithdrawInstructionDataDecoder() {
|
|
8583
|
-
return (0,
|
|
8584
|
-
["discriminator", (0,
|
|
8585
|
-
["funds", (0,
|
|
8586
|
-
["shares", (0,
|
|
8794
|
+
return (0, import_kit65.getStructDecoder)([
|
|
8795
|
+
["discriminator", (0, import_kit65.fixDecoderSize)((0, import_kit65.getBytesDecoder)(), 8)],
|
|
8796
|
+
["funds", (0, import_kit65.getU64Decoder)()],
|
|
8797
|
+
["shares", (0, import_kit65.getU64Decoder)()]
|
|
8587
8798
|
]);
|
|
8588
8799
|
}
|
|
8589
8800
|
function getWithdrawInstructionDataCodec() {
|
|
8590
|
-
return (0,
|
|
8801
|
+
return (0, import_kit65.combineCodec)(
|
|
8591
8802
|
getWithdrawInstructionDataEncoder(),
|
|
8592
8803
|
getWithdrawInstructionDataDecoder()
|
|
8593
8804
|
);
|
|
@@ -8658,11 +8869,11 @@ function parseWithdrawInstruction(instruction) {
|
|
|
8658
8869
|
}
|
|
8659
8870
|
|
|
8660
8871
|
// src/pda.ts
|
|
8661
|
-
var
|
|
8872
|
+
var import_kit67 = require("@solana/kit");
|
|
8662
8873
|
|
|
8663
8874
|
// src/consts.ts
|
|
8664
|
-
var
|
|
8665
|
-
var DEFAULT_ADDRESS = (0,
|
|
8875
|
+
var import_kit66 = require("@solana/kit");
|
|
8876
|
+
var DEFAULT_ADDRESS = (0, import_kit66.address)("11111111111111111111111111111111");
|
|
8666
8877
|
var HUNDRED_PERCENT = 1e6;
|
|
8667
8878
|
var HUNDRED_PERCENTn = 1000000n;
|
|
8668
8879
|
var LEVERAGE_ONE = HUNDRED_PERCENT;
|
|
@@ -8683,48 +8894,48 @@ var TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_B = 1 << 3;
|
|
|
8683
8894
|
var TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD = 1 << 4;
|
|
8684
8895
|
var TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD_WITH_LEVERAGE = 1 << 5;
|
|
8685
8896
|
var TUNA_POSITION_FLAGS_ALLOW_REBALANCING = 1 << 6;
|
|
8686
|
-
var WP_NFT_UPDATE_AUTH = (0,
|
|
8687
|
-
var DEFAULT_PUSH_ORACLE_PROGRAM_ID = (0,
|
|
8688
|
-
var JUPITER_EVENT_AUTHORITY = (0,
|
|
8689
|
-
var JUPITER_PROGRAM_AUTHORITY = (0,
|
|
8897
|
+
var WP_NFT_UPDATE_AUTH = (0, import_kit66.address)("3axbTs2z5GBy6usVbNVoqEgZMng3vZvMnAoX29BFfwhr");
|
|
8898
|
+
var DEFAULT_PUSH_ORACLE_PROGRAM_ID = (0, import_kit66.address)("pythWSnswVUd12oZpeFP8e9CVaEqJg25g1Vtc2biRsT");
|
|
8899
|
+
var JUPITER_EVENT_AUTHORITY = (0, import_kit66.address)("D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf");
|
|
8900
|
+
var JUPITER_PROGRAM_AUTHORITY = (0, import_kit66.address)("9nnLbotNTcUhvbrsA6Mdkx45Sm82G35zo28AqUvjExn8");
|
|
8690
8901
|
var MIN_SQRT_PRICE = 4295048016n;
|
|
8691
8902
|
var MAX_SQRT_PRICE = 79226673515401279992447579055n;
|
|
8692
8903
|
|
|
8693
8904
|
// src/pda.ts
|
|
8694
8905
|
async function getTunaConfigAddress() {
|
|
8695
|
-
return await (0,
|
|
8906
|
+
return await (0, import_kit67.getProgramDerivedAddress)({
|
|
8696
8907
|
programAddress: TUNA_PROGRAM_ADDRESS,
|
|
8697
8908
|
seeds: ["tuna_config"]
|
|
8698
8909
|
});
|
|
8699
8910
|
}
|
|
8700
8911
|
async function getMarketAddress(pool) {
|
|
8701
|
-
return await (0,
|
|
8912
|
+
return await (0, import_kit67.getProgramDerivedAddress)({
|
|
8702
8913
|
programAddress: TUNA_PROGRAM_ADDRESS,
|
|
8703
|
-
seeds: ["market", (0,
|
|
8914
|
+
seeds: ["market", (0, import_kit67.getAddressEncoder)().encode(pool)]
|
|
8704
8915
|
});
|
|
8705
8916
|
}
|
|
8706
8917
|
async function getLendingVaultAddress(mint) {
|
|
8707
|
-
return await (0,
|
|
8918
|
+
return await (0, import_kit67.getProgramDerivedAddress)({
|
|
8708
8919
|
programAddress: TUNA_PROGRAM_ADDRESS,
|
|
8709
|
-
seeds: ["vault", (0,
|
|
8920
|
+
seeds: ["vault", (0, import_kit67.getAddressEncoder)().encode(mint)]
|
|
8710
8921
|
});
|
|
8711
8922
|
}
|
|
8712
8923
|
async function getLendingPositionAddress(authority, mint) {
|
|
8713
|
-
return await (0,
|
|
8924
|
+
return await (0, import_kit67.getProgramDerivedAddress)({
|
|
8714
8925
|
programAddress: TUNA_PROGRAM_ADDRESS,
|
|
8715
|
-
seeds: ["lending_position", (0,
|
|
8926
|
+
seeds: ["lending_position", (0, import_kit67.getAddressEncoder)().encode(authority), (0, import_kit67.getAddressEncoder)().encode(mint)]
|
|
8716
8927
|
});
|
|
8717
8928
|
}
|
|
8718
8929
|
async function getTunaLpPositionAddress(positionMint) {
|
|
8719
|
-
return await (0,
|
|
8930
|
+
return await (0, import_kit67.getProgramDerivedAddress)({
|
|
8720
8931
|
programAddress: TUNA_PROGRAM_ADDRESS,
|
|
8721
|
-
seeds: ["tuna_position", (0,
|
|
8932
|
+
seeds: ["tuna_position", (0, import_kit67.getAddressEncoder)().encode(positionMint)]
|
|
8722
8933
|
});
|
|
8723
8934
|
}
|
|
8724
8935
|
async function getTunaSpotPositionAddress(authority, pool) {
|
|
8725
|
-
return await (0,
|
|
8936
|
+
return await (0, import_kit67.getProgramDerivedAddress)({
|
|
8726
8937
|
programAddress: TUNA_PROGRAM_ADDRESS,
|
|
8727
|
-
seeds: ["tuna_spot_position", (0,
|
|
8938
|
+
seeds: ["tuna_spot_position", (0, import_kit67.getAddressEncoder)().encode(authority), (0, import_kit67.getAddressEncoder)().encode(pool)]
|
|
8728
8939
|
});
|
|
8729
8940
|
}
|
|
8730
8941
|
async function getPythPriceUpdateAccountAddress(shardId, priceFeedId) {
|
|
@@ -8740,23 +8951,23 @@ async function getPythPriceUpdateAccountAddress(shardId, priceFeedId) {
|
|
|
8740
8951
|
}
|
|
8741
8952
|
const shardBuffer = Buffer.alloc(2);
|
|
8742
8953
|
shardBuffer.writeUint16LE(shardId, 0);
|
|
8743
|
-
return await (0,
|
|
8954
|
+
return await (0, import_kit67.getProgramDerivedAddress)({
|
|
8744
8955
|
programAddress: DEFAULT_PUSH_ORACLE_PROGRAM_ID,
|
|
8745
8956
|
seeds: [shardBuffer, priceFeedId]
|
|
8746
8957
|
});
|
|
8747
8958
|
}
|
|
8748
8959
|
|
|
8749
8960
|
// src/gpa/tunaLpPosition.ts
|
|
8750
|
-
var
|
|
8961
|
+
var import_kit69 = require("@solana/kit");
|
|
8751
8962
|
|
|
8752
8963
|
// src/gpa/utils.ts
|
|
8753
|
-
var
|
|
8964
|
+
var import_kit68 = require("@solana/kit");
|
|
8754
8965
|
async function fetchDecodedProgramAccounts(rpc, programAddress, filters, decoder) {
|
|
8755
8966
|
const accountInfos = await rpc.getProgramAccounts(programAddress, {
|
|
8756
8967
|
encoding: "base64",
|
|
8757
8968
|
filters
|
|
8758
8969
|
}).send();
|
|
8759
|
-
const encoder = (0,
|
|
8970
|
+
const encoder = (0, import_kit68.getBase64Encoder)();
|
|
8760
8971
|
const datas = accountInfos.map((x) => encoder.encode(x.account.data[0]));
|
|
8761
8972
|
const decoded = datas.map((x) => decoder.decode(x));
|
|
8762
8973
|
return decoded.map((data, i) => ({
|
|
@@ -8772,7 +8983,7 @@ function tunaLpPositionAuthorityFilter(address4) {
|
|
|
8772
8983
|
return {
|
|
8773
8984
|
memcmp: {
|
|
8774
8985
|
offset: 11n,
|
|
8775
|
-
bytes: (0,
|
|
8986
|
+
bytes: (0, import_kit69.getBase58Decoder)().decode((0, import_kit69.getAddressEncoder)().encode(address4)),
|
|
8776
8987
|
encoding: "base58"
|
|
8777
8988
|
}
|
|
8778
8989
|
};
|
|
@@ -8781,7 +8992,7 @@ function tunaLpPositionPoolFilter(address4) {
|
|
|
8781
8992
|
return {
|
|
8782
8993
|
memcmp: {
|
|
8783
8994
|
offset: 43n,
|
|
8784
|
-
bytes: (0,
|
|
8995
|
+
bytes: (0, import_kit69.getBase58Decoder)().decode((0, import_kit69.getAddressEncoder)().encode(address4)),
|
|
8785
8996
|
encoding: "base58"
|
|
8786
8997
|
}
|
|
8787
8998
|
};
|
|
@@ -8790,7 +9001,7 @@ function tunaLpPositionMintAFilter(address4) {
|
|
|
8790
9001
|
return {
|
|
8791
9002
|
memcmp: {
|
|
8792
9003
|
offset: 75n,
|
|
8793
|
-
bytes: (0,
|
|
9004
|
+
bytes: (0, import_kit69.getBase58Decoder)().decode((0, import_kit69.getAddressEncoder)().encode(address4)),
|
|
8794
9005
|
encoding: "base58"
|
|
8795
9006
|
}
|
|
8796
9007
|
};
|
|
@@ -8799,7 +9010,7 @@ function tunaLpPositionMintBFilter(address4) {
|
|
|
8799
9010
|
return {
|
|
8800
9011
|
memcmp: {
|
|
8801
9012
|
offset: 107n,
|
|
8802
|
-
bytes: (0,
|
|
9013
|
+
bytes: (0, import_kit69.getBase58Decoder)().decode((0, import_kit69.getAddressEncoder)().encode(address4)),
|
|
8803
9014
|
encoding: "base58"
|
|
8804
9015
|
}
|
|
8805
9016
|
};
|
|
@@ -8808,7 +9019,7 @@ function tunaLpPositionMintFilter(address4) {
|
|
|
8808
9019
|
return {
|
|
8809
9020
|
memcmp: {
|
|
8810
9021
|
offset: 139n,
|
|
8811
|
-
bytes: (0,
|
|
9022
|
+
bytes: (0, import_kit69.getBase58Decoder)().decode((0, import_kit69.getAddressEncoder)().encode(address4)),
|
|
8812
9023
|
encoding: "base58"
|
|
8813
9024
|
}
|
|
8814
9025
|
};
|
|
@@ -8817,13 +9028,13 @@ function tunaLpPositionMarketMakerFilter(marketMaker) {
|
|
|
8817
9028
|
return {
|
|
8818
9029
|
memcmp: {
|
|
8819
9030
|
offset: 277n,
|
|
8820
|
-
bytes: (0,
|
|
9031
|
+
bytes: (0, import_kit69.getBase58Decoder)().decode((0, import_kit69.getI8Encoder)().encode(marketMaker)),
|
|
8821
9032
|
encoding: "base58"
|
|
8822
9033
|
}
|
|
8823
9034
|
};
|
|
8824
9035
|
}
|
|
8825
9036
|
async function fetchAllTunaLpPositionWithFilter(rpc, ...filters) {
|
|
8826
|
-
const discriminator = (0,
|
|
9037
|
+
const discriminator = (0, import_kit69.getBase58Decoder)().decode(TUNA_LP_POSITION_DISCRIMINATOR);
|
|
8827
9038
|
const discriminatorFilter = {
|
|
8828
9039
|
memcmp: {
|
|
8829
9040
|
offset: 0n,
|
|
@@ -8840,12 +9051,12 @@ async function fetchAllTunaLpPositionWithFilter(rpc, ...filters) {
|
|
|
8840
9051
|
}
|
|
8841
9052
|
|
|
8842
9053
|
// src/gpa/tunaSpotPosition.ts
|
|
8843
|
-
var
|
|
9054
|
+
var import_kit70 = require("@solana/kit");
|
|
8844
9055
|
function tunaSpotPositionAuthorityFilter(address4) {
|
|
8845
9056
|
return {
|
|
8846
9057
|
memcmp: {
|
|
8847
9058
|
offset: 11n,
|
|
8848
|
-
bytes: (0,
|
|
9059
|
+
bytes: (0, import_kit70.getBase58Decoder)().decode((0, import_kit70.getAddressEncoder)().encode(address4)),
|
|
8849
9060
|
encoding: "base58"
|
|
8850
9061
|
}
|
|
8851
9062
|
};
|
|
@@ -8854,7 +9065,7 @@ function tunaSpotPositionPoolFilter(address4) {
|
|
|
8854
9065
|
return {
|
|
8855
9066
|
memcmp: {
|
|
8856
9067
|
offset: 43n,
|
|
8857
|
-
bytes: (0,
|
|
9068
|
+
bytes: (0, import_kit70.getBase58Decoder)().decode((0, import_kit70.getAddressEncoder)().encode(address4)),
|
|
8858
9069
|
encoding: "base58"
|
|
8859
9070
|
}
|
|
8860
9071
|
};
|
|
@@ -8863,7 +9074,7 @@ function tunaSpotPositionMintAFilter(address4) {
|
|
|
8863
9074
|
return {
|
|
8864
9075
|
memcmp: {
|
|
8865
9076
|
offset: 75n,
|
|
8866
|
-
bytes: (0,
|
|
9077
|
+
bytes: (0, import_kit70.getBase58Decoder)().decode((0, import_kit70.getAddressEncoder)().encode(address4)),
|
|
8867
9078
|
encoding: "base58"
|
|
8868
9079
|
}
|
|
8869
9080
|
};
|
|
@@ -8872,13 +9083,13 @@ function tunaSpotPositionMintBFilter(address4) {
|
|
|
8872
9083
|
return {
|
|
8873
9084
|
memcmp: {
|
|
8874
9085
|
offset: 107n,
|
|
8875
|
-
bytes: (0,
|
|
9086
|
+
bytes: (0, import_kit70.getBase58Decoder)().decode((0, import_kit70.getAddressEncoder)().encode(address4)),
|
|
8876
9087
|
encoding: "base58"
|
|
8877
9088
|
}
|
|
8878
9089
|
};
|
|
8879
9090
|
}
|
|
8880
9091
|
async function fetchAllTunaSpotPositionWithFilter(rpc, ...filters) {
|
|
8881
|
-
const discriminator = (0,
|
|
9092
|
+
const discriminator = (0, import_kit70.getBase58Decoder)().decode(TUNA_SPOT_POSITION_DISCRIMINATOR);
|
|
8882
9093
|
const discriminatorFilter = {
|
|
8883
9094
|
memcmp: {
|
|
8884
9095
|
offset: 0n,
|
|
@@ -8895,12 +9106,12 @@ async function fetchAllTunaSpotPositionWithFilter(rpc, ...filters) {
|
|
|
8895
9106
|
}
|
|
8896
9107
|
|
|
8897
9108
|
// src/gpa/lendingPosition.ts
|
|
8898
|
-
var
|
|
9109
|
+
var import_kit71 = require("@solana/kit");
|
|
8899
9110
|
function lendingPositionAuthorityFilter(address4) {
|
|
8900
9111
|
return {
|
|
8901
9112
|
memcmp: {
|
|
8902
9113
|
offset: 11n,
|
|
8903
|
-
bytes: (0,
|
|
9114
|
+
bytes: (0, import_kit71.getBase58Decoder)().decode((0, import_kit71.getAddressEncoder)().encode(address4)),
|
|
8904
9115
|
encoding: "base58"
|
|
8905
9116
|
}
|
|
8906
9117
|
};
|
|
@@ -8909,13 +9120,13 @@ function lendingPositionMintFilter(address4) {
|
|
|
8909
9120
|
return {
|
|
8910
9121
|
memcmp: {
|
|
8911
9122
|
offset: 43n,
|
|
8912
|
-
bytes: (0,
|
|
9123
|
+
bytes: (0, import_kit71.getBase58Decoder)().decode((0, import_kit71.getAddressEncoder)().encode(address4)),
|
|
8913
9124
|
encoding: "base58"
|
|
8914
9125
|
}
|
|
8915
9126
|
};
|
|
8916
9127
|
}
|
|
8917
9128
|
async function fetchAllLendingPositionWithFilter(rpc, ...filters) {
|
|
8918
|
-
const discriminator = (0,
|
|
9129
|
+
const discriminator = (0, import_kit71.getBase58Decoder)().decode(LENDING_POSITION_DISCRIMINATOR);
|
|
8919
9130
|
const discriminatorFilter = {
|
|
8920
9131
|
memcmp: {
|
|
8921
9132
|
offset: 0n,
|
|
@@ -8932,9 +9143,9 @@ async function fetchAllLendingPositionWithFilter(rpc, ...filters) {
|
|
|
8932
9143
|
}
|
|
8933
9144
|
|
|
8934
9145
|
// src/gpa/market.ts
|
|
8935
|
-
var
|
|
9146
|
+
var import_kit72 = require("@solana/kit");
|
|
8936
9147
|
async function fetchAllMarketWithFilter(rpc, ...filters) {
|
|
8937
|
-
const discriminator = (0,
|
|
9148
|
+
const discriminator = (0, import_kit72.getBase58Decoder)().decode(MARKET_DISCRIMINATOR);
|
|
8938
9149
|
const discriminatorFilter = {
|
|
8939
9150
|
memcmp: {
|
|
8940
9151
|
offset: 0n,
|
|
@@ -9036,11 +9247,11 @@ var FusionUtils = class {
|
|
|
9036
9247
|
};
|
|
9037
9248
|
|
|
9038
9249
|
// src/utils/token.ts
|
|
9039
|
-
var
|
|
9250
|
+
var import_kit73 = require("@solana/kit");
|
|
9040
9251
|
var import_system = require("@solana-program/system");
|
|
9041
9252
|
var import_token = require("@solana-program/token");
|
|
9042
9253
|
var import_token_2022 = require("@solana-program/token-2022");
|
|
9043
|
-
var NATIVE_MINT = (0,
|
|
9254
|
+
var NATIVE_MINT = (0, import_kit73.address)("So11111111111111111111111111111111111111112");
|
|
9044
9255
|
async function getCreateAtaInstruction(mint, owner, payer, tokenProgram = import_token.TOKEN_PROGRAM_ADDRESS) {
|
|
9045
9256
|
const ata = (await (0, import_token.findAssociatedTokenPda)({
|
|
9046
9257
|
mint,
|
|
@@ -9227,7 +9438,7 @@ function calculateProtocolFee(collateralAmount, borrowAmount, protocolFeeRateOnC
|
|
|
9227
9438
|
// src/txbuilder/increaseTunaLpPositionOrca.ts
|
|
9228
9439
|
var import_whirlpools_client2 = require("@orca-so/whirlpools-client");
|
|
9229
9440
|
var import_whirlpools_core2 = require("@orca-so/whirlpools-core");
|
|
9230
|
-
var
|
|
9441
|
+
var import_kit74 = require("@solana/kit");
|
|
9231
9442
|
var import_memo = require("@solana-program/memo");
|
|
9232
9443
|
var import_token_20222 = require("@solana-program/token-2022");
|
|
9233
9444
|
var import_assert = __toESM(require("assert"));
|
|
@@ -9401,16 +9612,16 @@ async function increaseTunaLpPositionOrcaInstruction(authority, tunaPosition, tu
|
|
|
9401
9612
|
tunaPosition.data.tickUpperIndex
|
|
9402
9613
|
);
|
|
9403
9614
|
const remainingAccounts = [
|
|
9404
|
-
{ address: swapTickArrays[0], role:
|
|
9405
|
-
{ address: swapTickArrays[1], role:
|
|
9406
|
-
{ address: swapTickArrays[2], role:
|
|
9407
|
-
{ address: swapTickArrays[3], role:
|
|
9408
|
-
{ address: swapTickArrays[4], role:
|
|
9409
|
-
{ address: lowerTickArrayAddress, role:
|
|
9410
|
-
{ address: upperTickArrayAddress, role:
|
|
9411
|
-
{ address: whirlpool.data.tokenVaultA, role:
|
|
9412
|
-
{ address: whirlpool.data.tokenVaultB, role:
|
|
9413
|
-
{ address: orcaOracleAddress, role:
|
|
9615
|
+
{ address: swapTickArrays[0], role: import_kit74.AccountRole.WRITABLE },
|
|
9616
|
+
{ address: swapTickArrays[1], role: import_kit74.AccountRole.WRITABLE },
|
|
9617
|
+
{ address: swapTickArrays[2], role: import_kit74.AccountRole.WRITABLE },
|
|
9618
|
+
{ address: swapTickArrays[3], role: import_kit74.AccountRole.WRITABLE },
|
|
9619
|
+
{ address: swapTickArrays[4], role: import_kit74.AccountRole.WRITABLE },
|
|
9620
|
+
{ address: lowerTickArrayAddress, role: import_kit74.AccountRole.WRITABLE },
|
|
9621
|
+
{ address: upperTickArrayAddress, role: import_kit74.AccountRole.WRITABLE },
|
|
9622
|
+
{ address: whirlpool.data.tokenVaultA, role: import_kit74.AccountRole.WRITABLE },
|
|
9623
|
+
{ address: whirlpool.data.tokenVaultB, role: import_kit74.AccountRole.WRITABLE },
|
|
9624
|
+
{ address: orcaOracleAddress, role: import_kit74.AccountRole.WRITABLE }
|
|
9414
9625
|
];
|
|
9415
9626
|
const remainingAccountsInfo = {
|
|
9416
9627
|
slices: [
|
|
@@ -9458,7 +9669,7 @@ async function increaseTunaLpPositionOrcaInstruction(authority, tunaPosition, tu
|
|
|
9458
9669
|
// src/txbuilder/increaseTunaLpPositionFusion.ts
|
|
9459
9670
|
var import_fusionamm_client2 = require("@crypticdot/fusionamm-client");
|
|
9460
9671
|
var import_fusionamm_core4 = require("@crypticdot/fusionamm-core");
|
|
9461
|
-
var
|
|
9672
|
+
var import_kit75 = require("@solana/kit");
|
|
9462
9673
|
var import_memo2 = require("@solana-program/memo");
|
|
9463
9674
|
var import_token_20223 = require("@solana-program/token-2022");
|
|
9464
9675
|
var import_assert2 = __toESM(require("assert"));
|
|
@@ -9637,15 +9848,15 @@ async function increaseTunaLpPositionFusionInstruction(authority, tunaPosition,
|
|
|
9637
9848
|
tunaPosition.data.tickUpperIndex
|
|
9638
9849
|
);
|
|
9639
9850
|
const remainingAccounts = [
|
|
9640
|
-
{ address: swapTickArrays[0], role:
|
|
9641
|
-
{ address: swapTickArrays[1], role:
|
|
9642
|
-
{ address: swapTickArrays[2], role:
|
|
9643
|
-
{ address: swapTickArrays[3], role:
|
|
9644
|
-
{ address: swapTickArrays[4], role:
|
|
9645
|
-
{ address: lowerTickArrayAddress, role:
|
|
9646
|
-
{ address: upperTickArrayAddress, role:
|
|
9647
|
-
{ address: fusionPool.data.tokenVaultA, role:
|
|
9648
|
-
{ address: fusionPool.data.tokenVaultB, role:
|
|
9851
|
+
{ address: swapTickArrays[0], role: import_kit75.AccountRole.WRITABLE },
|
|
9852
|
+
{ address: swapTickArrays[1], role: import_kit75.AccountRole.WRITABLE },
|
|
9853
|
+
{ address: swapTickArrays[2], role: import_kit75.AccountRole.WRITABLE },
|
|
9854
|
+
{ address: swapTickArrays[3], role: import_kit75.AccountRole.WRITABLE },
|
|
9855
|
+
{ address: swapTickArrays[4], role: import_kit75.AccountRole.WRITABLE },
|
|
9856
|
+
{ address: lowerTickArrayAddress, role: import_kit75.AccountRole.WRITABLE },
|
|
9857
|
+
{ address: upperTickArrayAddress, role: import_kit75.AccountRole.WRITABLE },
|
|
9858
|
+
{ address: fusionPool.data.tokenVaultA, role: import_kit75.AccountRole.WRITABLE },
|
|
9859
|
+
{ address: fusionPool.data.tokenVaultB, role: import_kit75.AccountRole.WRITABLE }
|
|
9649
9860
|
];
|
|
9650
9861
|
const remainingAccountsInfo = {
|
|
9651
9862
|
slices: [
|
|
@@ -9783,7 +9994,7 @@ async function closeTunaLpPositionFusionInstruction(rpc, authority, positionMint
|
|
|
9783
9994
|
|
|
9784
9995
|
// src/txbuilder/collectAndCompoundFeesOrca.ts
|
|
9785
9996
|
var import_whirlpools_client4 = require("@orca-so/whirlpools-client");
|
|
9786
|
-
var
|
|
9997
|
+
var import_kit76 = require("@solana/kit");
|
|
9787
9998
|
var import_memo3 = require("@solana-program/memo");
|
|
9788
9999
|
var import_token_20226 = require("@solana-program/token-2022");
|
|
9789
10000
|
var import_assert5 = __toESM(require("assert"));
|
|
@@ -9881,16 +10092,16 @@ async function collectAndCompoundFeesOrcaInstruction(authority, tunaConfig, tuna
|
|
|
9881
10092
|
tunaPosition.data.tickUpperIndex
|
|
9882
10093
|
);
|
|
9883
10094
|
const remainingAccounts = [
|
|
9884
|
-
{ address: swapTickArrays[0], role:
|
|
9885
|
-
{ address: swapTickArrays[1], role:
|
|
9886
|
-
{ address: swapTickArrays[2], role:
|
|
9887
|
-
{ address: swapTickArrays[3], role:
|
|
9888
|
-
{ address: swapTickArrays[4], role:
|
|
9889
|
-
{ address: lowerTickArrayAddress, role:
|
|
9890
|
-
{ address: upperTickArrayAddress, role:
|
|
9891
|
-
{ address: whirlpool.data.tokenVaultA, role:
|
|
9892
|
-
{ address: whirlpool.data.tokenVaultB, role:
|
|
9893
|
-
{ address: orcaOracleAddress, role:
|
|
10095
|
+
{ address: swapTickArrays[0], role: import_kit76.AccountRole.WRITABLE },
|
|
10096
|
+
{ address: swapTickArrays[1], role: import_kit76.AccountRole.WRITABLE },
|
|
10097
|
+
{ address: swapTickArrays[2], role: import_kit76.AccountRole.WRITABLE },
|
|
10098
|
+
{ address: swapTickArrays[3], role: import_kit76.AccountRole.WRITABLE },
|
|
10099
|
+
{ address: swapTickArrays[4], role: import_kit76.AccountRole.WRITABLE },
|
|
10100
|
+
{ address: lowerTickArrayAddress, role: import_kit76.AccountRole.WRITABLE },
|
|
10101
|
+
{ address: upperTickArrayAddress, role: import_kit76.AccountRole.WRITABLE },
|
|
10102
|
+
{ address: whirlpool.data.tokenVaultA, role: import_kit76.AccountRole.WRITABLE },
|
|
10103
|
+
{ address: whirlpool.data.tokenVaultB, role: import_kit76.AccountRole.WRITABLE },
|
|
10104
|
+
{ address: orcaOracleAddress, role: import_kit76.AccountRole.WRITABLE }
|
|
9894
10105
|
];
|
|
9895
10106
|
const remainingAccountsInfo = {
|
|
9896
10107
|
slices: [
|
|
@@ -9935,7 +10146,7 @@ async function collectAndCompoundFeesOrcaInstruction(authority, tunaConfig, tuna
|
|
|
9935
10146
|
|
|
9936
10147
|
// src/txbuilder/collectAndCompoundFeesFusion.ts
|
|
9937
10148
|
var import_fusionamm_client4 = require("@crypticdot/fusionamm-client");
|
|
9938
|
-
var
|
|
10149
|
+
var import_kit77 = require("@solana/kit");
|
|
9939
10150
|
var import_memo4 = require("@solana-program/memo");
|
|
9940
10151
|
var import_token_20227 = require("@solana-program/token-2022");
|
|
9941
10152
|
var import_assert6 = __toESM(require("assert"));
|
|
@@ -10032,15 +10243,15 @@ async function collectAndCompoundFeesFusionInstruction(authority, tunaConfig, tu
|
|
|
10032
10243
|
tunaPosition.data.tickUpperIndex
|
|
10033
10244
|
);
|
|
10034
10245
|
const remainingAccounts = [
|
|
10035
|
-
{ address: swapTickArrays[0], role:
|
|
10036
|
-
{ address: swapTickArrays[1], role:
|
|
10037
|
-
{ address: swapTickArrays[2], role:
|
|
10038
|
-
{ address: swapTickArrays[3], role:
|
|
10039
|
-
{ address: swapTickArrays[4], role:
|
|
10040
|
-
{ address: lowerTickArrayAddress, role:
|
|
10041
|
-
{ address: upperTickArrayAddress, role:
|
|
10042
|
-
{ address: fusionPool.data.tokenVaultA, role:
|
|
10043
|
-
{ address: fusionPool.data.tokenVaultB, role:
|
|
10246
|
+
{ address: swapTickArrays[0], role: import_kit77.AccountRole.WRITABLE },
|
|
10247
|
+
{ address: swapTickArrays[1], role: import_kit77.AccountRole.WRITABLE },
|
|
10248
|
+
{ address: swapTickArrays[2], role: import_kit77.AccountRole.WRITABLE },
|
|
10249
|
+
{ address: swapTickArrays[3], role: import_kit77.AccountRole.WRITABLE },
|
|
10250
|
+
{ address: swapTickArrays[4], role: import_kit77.AccountRole.WRITABLE },
|
|
10251
|
+
{ address: lowerTickArrayAddress, role: import_kit77.AccountRole.WRITABLE },
|
|
10252
|
+
{ address: upperTickArrayAddress, role: import_kit77.AccountRole.WRITABLE },
|
|
10253
|
+
{ address: fusionPool.data.tokenVaultA, role: import_kit77.AccountRole.WRITABLE },
|
|
10254
|
+
{ address: fusionPool.data.tokenVaultB, role: import_kit77.AccountRole.WRITABLE }
|
|
10044
10255
|
];
|
|
10045
10256
|
const remainingAccountsInfo = {
|
|
10046
10257
|
slices: [
|
|
@@ -10084,7 +10295,7 @@ async function collectAndCompoundFeesFusionInstruction(authority, tunaConfig, tu
|
|
|
10084
10295
|
|
|
10085
10296
|
// src/txbuilder/collectFeesOrca.ts
|
|
10086
10297
|
var import_whirlpools_client5 = require("@orca-so/whirlpools-client");
|
|
10087
|
-
var
|
|
10298
|
+
var import_kit78 = require("@solana/kit");
|
|
10088
10299
|
var import_memo5 = require("@solana-program/memo");
|
|
10089
10300
|
var import_token_20228 = require("@solana-program/token-2022");
|
|
10090
10301
|
var import_assert7 = __toESM(require("assert"));
|
|
@@ -10160,10 +10371,10 @@ async function collectFeesOrcaInstruction(authority, tunaPosition, mintA, mintB,
|
|
|
10160
10371
|
tunaPosition.data.tickUpperIndex
|
|
10161
10372
|
);
|
|
10162
10373
|
const remainingAccounts = [
|
|
10163
|
-
{ address: lowerTickArrayAddress, role:
|
|
10164
|
-
{ address: upperTickArrayAddress, role:
|
|
10165
|
-
{ address: whirlpool.data.tokenVaultA, role:
|
|
10166
|
-
{ address: whirlpool.data.tokenVaultB, role:
|
|
10374
|
+
{ address: lowerTickArrayAddress, role: import_kit78.AccountRole.WRITABLE },
|
|
10375
|
+
{ address: upperTickArrayAddress, role: import_kit78.AccountRole.WRITABLE },
|
|
10376
|
+
{ address: whirlpool.data.tokenVaultA, role: import_kit78.AccountRole.WRITABLE },
|
|
10377
|
+
{ address: whirlpool.data.tokenVaultB, role: import_kit78.AccountRole.WRITABLE }
|
|
10167
10378
|
];
|
|
10168
10379
|
const remainingAccountsInfo = {
|
|
10169
10380
|
slices: [
|
|
@@ -10198,7 +10409,7 @@ async function collectFeesOrcaInstruction(authority, tunaPosition, mintA, mintB,
|
|
|
10198
10409
|
|
|
10199
10410
|
// src/txbuilder/collectFeesFusion.ts
|
|
10200
10411
|
var import_fusionamm_client5 = require("@crypticdot/fusionamm-client");
|
|
10201
|
-
var
|
|
10412
|
+
var import_kit79 = require("@solana/kit");
|
|
10202
10413
|
var import_memo6 = require("@solana-program/memo");
|
|
10203
10414
|
var import_token_20229 = require("@solana-program/token-2022");
|
|
10204
10415
|
var import_assert8 = __toESM(require("assert"));
|
|
@@ -10274,10 +10485,10 @@ async function collectFeesFusionInstruction(authority, tunaPosition, mintA, mint
|
|
|
10274
10485
|
tunaPosition.data.tickUpperIndex
|
|
10275
10486
|
);
|
|
10276
10487
|
const remainingAccounts = [
|
|
10277
|
-
{ address: lowerTickArrayAddress, role:
|
|
10278
|
-
{ address: upperTickArrayAddress, role:
|
|
10279
|
-
{ address: fusionPool.data.tokenVaultA, role:
|
|
10280
|
-
{ address: fusionPool.data.tokenVaultB, role:
|
|
10488
|
+
{ address: lowerTickArrayAddress, role: import_kit79.AccountRole.WRITABLE },
|
|
10489
|
+
{ address: upperTickArrayAddress, role: import_kit79.AccountRole.WRITABLE },
|
|
10490
|
+
{ address: fusionPool.data.tokenVaultA, role: import_kit79.AccountRole.WRITABLE },
|
|
10491
|
+
{ address: fusionPool.data.tokenVaultB, role: import_kit79.AccountRole.WRITABLE }
|
|
10281
10492
|
];
|
|
10282
10493
|
const remainingAccountsInfo = {
|
|
10283
10494
|
slices: [
|
|
@@ -10388,7 +10599,7 @@ async function openLendingPositionAndDepositInstructions(rpc, authority, mintAdd
|
|
|
10388
10599
|
// src/txbuilder/closeActiveTunaLpPositionOrca.ts
|
|
10389
10600
|
var import_whirlpools_client6 = require("@orca-so/whirlpools-client");
|
|
10390
10601
|
var import_whirlpools_core3 = require("@orca-so/whirlpools-core");
|
|
10391
|
-
var
|
|
10602
|
+
var import_kit80 = require("@solana/kit");
|
|
10392
10603
|
var import_token_202211 = require("@solana-program/token-2022");
|
|
10393
10604
|
var import_assert9 = __toESM(require("assert"));
|
|
10394
10605
|
async function closeActiveTunaLpPositionOrcaInstructions(rpc, authority, positionMint, args) {
|
|
@@ -10409,7 +10620,7 @@ async function closeActiveTunaLpPositionOrcaInstructions(rpc, authority, positio
|
|
|
10409
10620
|
const allMints = [mintA, mintB, ...rewardMints];
|
|
10410
10621
|
(0, import_assert9.default)(mintA.exists, "Token A account not found");
|
|
10411
10622
|
(0, import_assert9.default)(mintB.exists, "Token B account not found");
|
|
10412
|
-
(0,
|
|
10623
|
+
(0, import_kit80.assertAccountsExist)(rewardMints);
|
|
10413
10624
|
const lowerTickArrayStartIndex = (0, import_whirlpools_core3.getTickArrayStartTickIndex)(
|
|
10414
10625
|
tunaPosition.data.tickLowerIndex,
|
|
10415
10626
|
whirlpool.data.tickSpacing
|
|
@@ -10590,7 +10801,7 @@ async function closeActiveTunaLpPositionFusionInstructions(rpc, authority, posit
|
|
|
10590
10801
|
|
|
10591
10802
|
// src/txbuilder/modifyTunaSpotPositionOrca.ts
|
|
10592
10803
|
var import_whirlpools_client7 = require("@orca-so/whirlpools-client");
|
|
10593
|
-
var
|
|
10804
|
+
var import_kit81 = require("@solana/kit");
|
|
10594
10805
|
var import_memo8 = require("@solana-program/memo");
|
|
10595
10806
|
var import_token_202213 = require("@solana-program/token-2022");
|
|
10596
10807
|
var import_assert11 = __toESM(require("assert"));
|
|
@@ -10717,14 +10928,14 @@ async function modifyTunaSpotPositionOrcaInstruction(authority, tunaConfig, mint
|
|
|
10717
10928
|
}))[0];
|
|
10718
10929
|
const swapTickArrays = await OrcaUtils.getSwapTickArrayAddresses(pool);
|
|
10719
10930
|
const remainingAccounts = [
|
|
10720
|
-
{ address: swapTickArrays[0], role:
|
|
10721
|
-
{ address: swapTickArrays[1], role:
|
|
10722
|
-
{ address: swapTickArrays[2], role:
|
|
10723
|
-
{ address: swapTickArrays[3], role:
|
|
10724
|
-
{ address: swapTickArrays[4], role:
|
|
10725
|
-
{ address: pool.data.tokenVaultA, role:
|
|
10726
|
-
{ address: pool.data.tokenVaultB, role:
|
|
10727
|
-
{ address: orcaOracleAddress, role:
|
|
10931
|
+
{ address: swapTickArrays[0], role: import_kit81.AccountRole.WRITABLE },
|
|
10932
|
+
{ address: swapTickArrays[1], role: import_kit81.AccountRole.WRITABLE },
|
|
10933
|
+
{ address: swapTickArrays[2], role: import_kit81.AccountRole.WRITABLE },
|
|
10934
|
+
{ address: swapTickArrays[3], role: import_kit81.AccountRole.WRITABLE },
|
|
10935
|
+
{ address: swapTickArrays[4], role: import_kit81.AccountRole.WRITABLE },
|
|
10936
|
+
{ address: pool.data.tokenVaultA, role: import_kit81.AccountRole.WRITABLE },
|
|
10937
|
+
{ address: pool.data.tokenVaultB, role: import_kit81.AccountRole.WRITABLE },
|
|
10938
|
+
{ address: orcaOracleAddress, role: import_kit81.AccountRole.WRITABLE }
|
|
10728
10939
|
];
|
|
10729
10940
|
const remainingAccountsInfo = {
|
|
10730
10941
|
slices: [
|
|
@@ -10767,7 +10978,7 @@ async function modifyTunaSpotPositionOrcaInstruction(authority, tunaConfig, mint
|
|
|
10767
10978
|
|
|
10768
10979
|
// src/txbuilder/modifyTunaSpotPositionFusion.ts
|
|
10769
10980
|
var import_fusionamm_client7 = require("@crypticdot/fusionamm-client");
|
|
10770
|
-
var
|
|
10981
|
+
var import_kit82 = require("@solana/kit");
|
|
10771
10982
|
var import_memo9 = require("@solana-program/memo");
|
|
10772
10983
|
var import_token_202214 = require("@solana-program/token-2022");
|
|
10773
10984
|
var import_assert12 = __toESM(require("assert"));
|
|
@@ -10893,13 +11104,13 @@ async function modifyTunaSpotPositionFusionInstruction(authority, tunaConfig, mi
|
|
|
10893
11104
|
}))[0];
|
|
10894
11105
|
const swapTickArrays = await FusionUtils.getSwapTickArrayAddresses(pool);
|
|
10895
11106
|
const remainingAccounts = [
|
|
10896
|
-
{ address: swapTickArrays[0], role:
|
|
10897
|
-
{ address: swapTickArrays[1], role:
|
|
10898
|
-
{ address: swapTickArrays[2], role:
|
|
10899
|
-
{ address: swapTickArrays[3], role:
|
|
10900
|
-
{ address: swapTickArrays[4], role:
|
|
10901
|
-
{ address: pool.data.tokenVaultA, role:
|
|
10902
|
-
{ address: pool.data.tokenVaultB, role:
|
|
11107
|
+
{ address: swapTickArrays[0], role: import_kit82.AccountRole.WRITABLE },
|
|
11108
|
+
{ address: swapTickArrays[1], role: import_kit82.AccountRole.WRITABLE },
|
|
11109
|
+
{ address: swapTickArrays[2], role: import_kit82.AccountRole.WRITABLE },
|
|
11110
|
+
{ address: swapTickArrays[3], role: import_kit82.AccountRole.WRITABLE },
|
|
11111
|
+
{ address: swapTickArrays[4], role: import_kit82.AccountRole.WRITABLE },
|
|
11112
|
+
{ address: pool.data.tokenVaultA, role: import_kit82.AccountRole.WRITABLE },
|
|
11113
|
+
{ address: pool.data.tokenVaultB, role: import_kit82.AccountRole.WRITABLE }
|
|
10903
11114
|
];
|
|
10904
11115
|
const remainingAccountsInfo = {
|
|
10905
11116
|
slices: [
|
|
@@ -10943,7 +11154,6 @@ async function modifyTunaSpotPositionFusionInstruction(authority, tunaConfig, mi
|
|
|
10943
11154
|
var import_fusionamm_client8 = require("@crypticdot/fusionamm-client");
|
|
10944
11155
|
|
|
10945
11156
|
// ../../node_modules/.pnpm/@crypticdot+jupiter-solana-client@1.0.0_fastestsmallesttextencoderdecoder@1.0.22_typesc_c15ee540b6a974c893a6f86bc9defff2/node_modules/@crypticdot/jupiter-solana-client/dist/index.mjs
|
|
10946
|
-
var import_kit82 = require("@solana/kit");
|
|
10947
11157
|
var import_kit83 = require("@solana/kit");
|
|
10948
11158
|
var import_kit84 = require("@solana/kit");
|
|
10949
11159
|
var import_kit85 = require("@solana/kit");
|
|
@@ -10977,6 +11187,7 @@ var import_kit112 = require("@solana/kit");
|
|
|
10977
11187
|
var import_kit113 = require("@solana/kit");
|
|
10978
11188
|
var import_kit114 = require("@solana/kit");
|
|
10979
11189
|
var import_kit115 = require("@solana/kit");
|
|
11190
|
+
var import_kit116 = require("@solana/kit");
|
|
10980
11191
|
var TOKEN_LEDGER_DISCRIMINATOR = new Uint8Array([
|
|
10981
11192
|
156,
|
|
10982
11193
|
247,
|
|
@@ -11435,7 +11646,7 @@ async function createVaultInstructions(authority, mint, args) {
|
|
|
11435
11646
|
|
|
11436
11647
|
// src/txbuilder/liquidateTunaLpPositionOrca.ts
|
|
11437
11648
|
var import_whirlpools_client9 = require("@orca-so/whirlpools-client");
|
|
11438
|
-
var
|
|
11649
|
+
var import_kit117 = require("@solana/kit");
|
|
11439
11650
|
var import_memo11 = require("@solana-program/memo");
|
|
11440
11651
|
var import_token_202218 = require("@solana-program/token-2022");
|
|
11441
11652
|
async function liquidateTunaLpPositionOrcaInstructions(authority, tunaPosition, tunaConfig, mintA, mintB, vaultA, vaultB, whirlpool, decreasePercent) {
|
|
@@ -11522,16 +11733,16 @@ async function liquidateTunaLpPositionOrcaInstruction(authority, tunaPosition, t
|
|
|
11522
11733
|
tunaPosition.data.tickUpperIndex
|
|
11523
11734
|
);
|
|
11524
11735
|
const remainingAccounts = [
|
|
11525
|
-
{ address: swapTickArrays[0], role:
|
|
11526
|
-
{ address: swapTickArrays[1], role:
|
|
11527
|
-
{ address: swapTickArrays[2], role:
|
|
11528
|
-
{ address: swapTickArrays[3], role:
|
|
11529
|
-
{ address: swapTickArrays[4], role:
|
|
11530
|
-
{ address: lowerTickArrayAddress, role:
|
|
11531
|
-
{ address: upperTickArrayAddress, role:
|
|
11532
|
-
{ address: whirlpool.data.tokenVaultA, role:
|
|
11533
|
-
{ address: whirlpool.data.tokenVaultB, role:
|
|
11534
|
-
{ address: orcaOracleAddress, role:
|
|
11736
|
+
{ address: swapTickArrays[0], role: import_kit117.AccountRole.WRITABLE },
|
|
11737
|
+
{ address: swapTickArrays[1], role: import_kit117.AccountRole.WRITABLE },
|
|
11738
|
+
{ address: swapTickArrays[2], role: import_kit117.AccountRole.WRITABLE },
|
|
11739
|
+
{ address: swapTickArrays[3], role: import_kit117.AccountRole.WRITABLE },
|
|
11740
|
+
{ address: swapTickArrays[4], role: import_kit117.AccountRole.WRITABLE },
|
|
11741
|
+
{ address: lowerTickArrayAddress, role: import_kit117.AccountRole.WRITABLE },
|
|
11742
|
+
{ address: upperTickArrayAddress, role: import_kit117.AccountRole.WRITABLE },
|
|
11743
|
+
{ address: whirlpool.data.tokenVaultA, role: import_kit117.AccountRole.WRITABLE },
|
|
11744
|
+
{ address: whirlpool.data.tokenVaultB, role: import_kit117.AccountRole.WRITABLE },
|
|
11745
|
+
{ address: orcaOracleAddress, role: import_kit117.AccountRole.WRITABLE }
|
|
11535
11746
|
];
|
|
11536
11747
|
const remainingAccountsInfo = {
|
|
11537
11748
|
slices: [
|
|
@@ -11576,7 +11787,7 @@ async function liquidateTunaLpPositionOrcaInstruction(authority, tunaPosition, t
|
|
|
11576
11787
|
|
|
11577
11788
|
// src/txbuilder/liquidateTunaLpPositionFusion.ts
|
|
11578
11789
|
var import_fusionamm_client9 = require("@crypticdot/fusionamm-client");
|
|
11579
|
-
var
|
|
11790
|
+
var import_kit118 = require("@solana/kit");
|
|
11580
11791
|
var import_memo12 = require("@solana-program/memo");
|
|
11581
11792
|
var import_token_202219 = require("@solana-program/token-2022");
|
|
11582
11793
|
async function liquidateTunaLpPositionFusionInstructions(authority, tunaPosition, tunaConfig, mintA, mintB, vaultA, vaultB, whirlpool, decreasePercent) {
|
|
@@ -11662,15 +11873,15 @@ async function liquidateTunaLpPositionFusionInstruction(authority, tunaPosition,
|
|
|
11662
11873
|
tunaPosition.data.tickUpperIndex
|
|
11663
11874
|
);
|
|
11664
11875
|
const remainingAccounts = [
|
|
11665
|
-
{ address: swapTickArrays[0], role:
|
|
11666
|
-
{ address: swapTickArrays[1], role:
|
|
11667
|
-
{ address: swapTickArrays[2], role:
|
|
11668
|
-
{ address: swapTickArrays[3], role:
|
|
11669
|
-
{ address: swapTickArrays[4], role:
|
|
11670
|
-
{ address: lowerTickArrayAddress, role:
|
|
11671
|
-
{ address: upperTickArrayAddress, role:
|
|
11672
|
-
{ address: fusionPool.data.tokenVaultA, role:
|
|
11673
|
-
{ address: fusionPool.data.tokenVaultB, role:
|
|
11876
|
+
{ address: swapTickArrays[0], role: import_kit118.AccountRole.WRITABLE },
|
|
11877
|
+
{ address: swapTickArrays[1], role: import_kit118.AccountRole.WRITABLE },
|
|
11878
|
+
{ address: swapTickArrays[2], role: import_kit118.AccountRole.WRITABLE },
|
|
11879
|
+
{ address: swapTickArrays[3], role: import_kit118.AccountRole.WRITABLE },
|
|
11880
|
+
{ address: swapTickArrays[4], role: import_kit118.AccountRole.WRITABLE },
|
|
11881
|
+
{ address: lowerTickArrayAddress, role: import_kit118.AccountRole.WRITABLE },
|
|
11882
|
+
{ address: upperTickArrayAddress, role: import_kit118.AccountRole.WRITABLE },
|
|
11883
|
+
{ address: fusionPool.data.tokenVaultA, role: import_kit118.AccountRole.WRITABLE },
|
|
11884
|
+
{ address: fusionPool.data.tokenVaultB, role: import_kit118.AccountRole.WRITABLE }
|
|
11674
11885
|
];
|
|
11675
11886
|
const remainingAccountsInfo = {
|
|
11676
11887
|
slices: [
|
|
@@ -11714,23 +11925,22 @@ async function liquidateTunaLpPositionFusionInstruction(authority, tunaPosition,
|
|
|
11714
11925
|
|
|
11715
11926
|
// src/txbuilder/liquidateTunaSpotPositionFusion.ts
|
|
11716
11927
|
var import_fusionamm_client10 = require("@crypticdot/fusionamm-client");
|
|
11717
|
-
var
|
|
11928
|
+
var import_kit119 = require("@solana/kit");
|
|
11718
11929
|
var import_memo13 = require("@solana-program/memo");
|
|
11719
11930
|
var import_token_202220 = require("@solana-program/token-2022");
|
|
11720
|
-
async function liquidateTunaSpotPositionFusionInstructions(authority, tunaPosition, tunaConfig, mintA, mintB, vaultA, vaultB, fusionPool,
|
|
11931
|
+
async function liquidateTunaSpotPositionFusionInstructions(authority, tunaPosition, tunaConfig, mintA, mintB, vaultA, vaultB, fusionPool, decreasePercent) {
|
|
11721
11932
|
const instructions = [];
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
}
|
|
11933
|
+
const collateralTokenMint = tunaPosition.data.collateralToken == 0 /* A */ ? mintA : mintB;
|
|
11934
|
+
const useNativeSol = collateralTokenMint.address == NATIVE_MINT && decreasePercent == HUNDRED_PERCENT;
|
|
11935
|
+
if (!useNativeSol) {
|
|
11936
|
+
const createPositionOwnerAtaInstructions = await getCreateAtaInstructions(
|
|
11937
|
+
void 0,
|
|
11938
|
+
authority,
|
|
11939
|
+
collateralTokenMint.address,
|
|
11940
|
+
tunaPosition.data.authority,
|
|
11941
|
+
collateralTokenMint.programAddress
|
|
11942
|
+
);
|
|
11943
|
+
instructions.push(...createPositionOwnerAtaInstructions.init);
|
|
11734
11944
|
}
|
|
11735
11945
|
const createFeeRecipientAtaAInstructions = await getCreateAtaInstructions(
|
|
11736
11946
|
void 0,
|
|
@@ -11806,13 +12016,13 @@ async function liquidateTunaSpotPositionFusionInstruction(authority, tunaPositio
|
|
|
11806
12016
|
}))[0];
|
|
11807
12017
|
const swapTickArrays = await FusionUtils.getSwapTickArrayAddresses(fusionPool);
|
|
11808
12018
|
const remainingAccounts = [
|
|
11809
|
-
{ address: swapTickArrays[0], role:
|
|
11810
|
-
{ address: swapTickArrays[1], role:
|
|
11811
|
-
{ address: swapTickArrays[2], role:
|
|
11812
|
-
{ address: swapTickArrays[3], role:
|
|
11813
|
-
{ address: swapTickArrays[4], role:
|
|
11814
|
-
{ address: fusionPool.data.tokenVaultA, role:
|
|
11815
|
-
{ address: fusionPool.data.tokenVaultB, role:
|
|
12019
|
+
{ address: swapTickArrays[0], role: import_kit119.AccountRole.WRITABLE },
|
|
12020
|
+
{ address: swapTickArrays[1], role: import_kit119.AccountRole.WRITABLE },
|
|
12021
|
+
{ address: swapTickArrays[2], role: import_kit119.AccountRole.WRITABLE },
|
|
12022
|
+
{ address: swapTickArrays[3], role: import_kit119.AccountRole.WRITABLE },
|
|
12023
|
+
{ address: swapTickArrays[4], role: import_kit119.AccountRole.WRITABLE },
|
|
12024
|
+
{ address: fusionPool.data.tokenVaultA, role: import_kit119.AccountRole.WRITABLE },
|
|
12025
|
+
{ address: fusionPool.data.tokenVaultB, role: import_kit119.AccountRole.WRITABLE }
|
|
11816
12026
|
];
|
|
11817
12027
|
const remainingAccountsInfo = {
|
|
11818
12028
|
slices: [
|
|
@@ -11855,23 +12065,22 @@ async function liquidateTunaSpotPositionFusionInstruction(authority, tunaPositio
|
|
|
11855
12065
|
|
|
11856
12066
|
// src/txbuilder/liquidateTunaSpotPositionOrca.ts
|
|
11857
12067
|
var import_whirlpools_client10 = require("@orca-so/whirlpools-client");
|
|
11858
|
-
var
|
|
12068
|
+
var import_kit120 = require("@solana/kit");
|
|
11859
12069
|
var import_memo14 = require("@solana-program/memo");
|
|
11860
12070
|
var import_token_202221 = require("@solana-program/token-2022");
|
|
11861
|
-
async function liquidateTunaSpotPositionOrcaInstructions(authority, tunaPosition, tunaConfig, mintA, mintB, vaultA, vaultB, whirlpool,
|
|
12071
|
+
async function liquidateTunaSpotPositionOrcaInstructions(authority, tunaPosition, tunaConfig, mintA, mintB, vaultA, vaultB, whirlpool, decreasePercent) {
|
|
11862
12072
|
const instructions = [];
|
|
11863
|
-
|
|
11864
|
-
|
|
11865
|
-
|
|
11866
|
-
|
|
11867
|
-
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
}
|
|
12073
|
+
const collateralTokenMint = tunaPosition.data.collateralToken == 0 /* A */ ? mintA : mintB;
|
|
12074
|
+
const useNativeSol = collateralTokenMint.address == NATIVE_MINT && decreasePercent == HUNDRED_PERCENT;
|
|
12075
|
+
if (!useNativeSol) {
|
|
12076
|
+
const createPositionOwnerAtaInstructions = await getCreateAtaInstructions(
|
|
12077
|
+
void 0,
|
|
12078
|
+
authority,
|
|
12079
|
+
collateralTokenMint.address,
|
|
12080
|
+
tunaPosition.data.authority,
|
|
12081
|
+
collateralTokenMint.programAddress
|
|
12082
|
+
);
|
|
12083
|
+
instructions.push(...createPositionOwnerAtaInstructions.init);
|
|
11875
12084
|
}
|
|
11876
12085
|
const createFeeRecipientAtaAInstructions = await getCreateAtaInstructions(
|
|
11877
12086
|
void 0,
|
|
@@ -11948,14 +12157,14 @@ async function liquidateTunaSpotPositionOrcaInstruction(authority, tunaPosition,
|
|
|
11948
12157
|
}))[0];
|
|
11949
12158
|
const swapTickArrays = await OrcaUtils.getSwapTickArrayAddresses(whirlpool);
|
|
11950
12159
|
const remainingAccounts = [
|
|
11951
|
-
{ address: swapTickArrays[0], role:
|
|
11952
|
-
{ address: swapTickArrays[1], role:
|
|
11953
|
-
{ address: swapTickArrays[2], role:
|
|
11954
|
-
{ address: swapTickArrays[3], role:
|
|
11955
|
-
{ address: swapTickArrays[4], role:
|
|
11956
|
-
{ address: whirlpool.data.tokenVaultA, role:
|
|
11957
|
-
{ address: whirlpool.data.tokenVaultB, role:
|
|
11958
|
-
{ address: orcaOracleAddress, role:
|
|
12160
|
+
{ address: swapTickArrays[0], role: import_kit120.AccountRole.WRITABLE },
|
|
12161
|
+
{ address: swapTickArrays[1], role: import_kit120.AccountRole.WRITABLE },
|
|
12162
|
+
{ address: swapTickArrays[2], role: import_kit120.AccountRole.WRITABLE },
|
|
12163
|
+
{ address: swapTickArrays[3], role: import_kit120.AccountRole.WRITABLE },
|
|
12164
|
+
{ address: swapTickArrays[4], role: import_kit120.AccountRole.WRITABLE },
|
|
12165
|
+
{ address: whirlpool.data.tokenVaultA, role: import_kit120.AccountRole.WRITABLE },
|
|
12166
|
+
{ address: whirlpool.data.tokenVaultB, role: import_kit120.AccountRole.WRITABLE },
|
|
12167
|
+
{ address: orcaOracleAddress, role: import_kit120.AccountRole.WRITABLE }
|
|
11959
12168
|
];
|
|
11960
12169
|
const remainingAccountsInfo = {
|
|
11961
12170
|
slices: [
|
|
@@ -12101,7 +12310,7 @@ async function openTunaLpPositionFusionInstruction(rpc, authority, positionMint,
|
|
|
12101
12310
|
// src/txbuilder/openAndIncreaseTunaLpPositionOrca.ts
|
|
12102
12311
|
var import_whirlpools_client12 = require("@orca-so/whirlpools-client");
|
|
12103
12312
|
var import_whirlpools_core4 = require("@orca-so/whirlpools-core");
|
|
12104
|
-
var
|
|
12313
|
+
var import_kit121 = require("@solana/kit");
|
|
12105
12314
|
var import_sysvars = require("@solana/sysvars");
|
|
12106
12315
|
var import_memo15 = require("@solana-program/memo");
|
|
12107
12316
|
var import_token_202224 = require("@solana-program/token-2022");
|
|
@@ -12123,7 +12332,7 @@ async function openAndIncreaseTunaLpPositionOrcaInstructions(rpc, authority, whi
|
|
|
12123
12332
|
if (!cleanupInstructions) cleanupInstructions = instructions;
|
|
12124
12333
|
const rent = await (0, import_sysvars.fetchSysvarRent)(rpc);
|
|
12125
12334
|
let nonRefundableRent = 0n;
|
|
12126
|
-
const positionMint = await (0,
|
|
12335
|
+
const positionMint = await (0, import_kit121.generateKeyPairSigner)();
|
|
12127
12336
|
const tunaConfig = await fetchTunaConfig(rpc, (await getTunaConfigAddress())[0]);
|
|
12128
12337
|
const whirlpool = await (0, import_whirlpools_client12.fetchMaybeWhirlpool)(rpc, whirlpoolAddress);
|
|
12129
12338
|
if (!whirlpool.exists) throw new Error("Whirlpool account not found");
|
|
@@ -12232,7 +12441,7 @@ async function openAndIncreaseTunaLpPositionOrcaInstructions(rpc, authority, whi
|
|
|
12232
12441
|
return {
|
|
12233
12442
|
instructions,
|
|
12234
12443
|
positionMint: positionMint.address,
|
|
12235
|
-
initializationCost: (0,
|
|
12444
|
+
initializationCost: (0, import_kit121.lamports)(nonRefundableRent)
|
|
12236
12445
|
};
|
|
12237
12446
|
}
|
|
12238
12447
|
async function openAndIncreaseTunaLpPositionOrcaInstruction(authority, positionMint, tunaConfig, mintA, mintB, vaultA, vaultB, whirlpool, args) {
|
|
@@ -12289,16 +12498,16 @@ async function openAndIncreaseTunaLpPositionOrcaInstruction(authority, positionM
|
|
|
12289
12498
|
const lowerTickArrayAddress = await OrcaUtils.getTickArrayAddressFromTickIndex(whirlpool, args.tickLowerIndex);
|
|
12290
12499
|
const upperTickArrayAddress = await OrcaUtils.getTickArrayAddressFromTickIndex(whirlpool, args.tickUpperIndex);
|
|
12291
12500
|
const remainingAccounts = [
|
|
12292
|
-
{ address: swapTickArrays[0], role:
|
|
12293
|
-
{ address: swapTickArrays[1], role:
|
|
12294
|
-
{ address: swapTickArrays[2], role:
|
|
12295
|
-
{ address: swapTickArrays[3], role:
|
|
12296
|
-
{ address: swapTickArrays[4], role:
|
|
12297
|
-
{ address: lowerTickArrayAddress, role:
|
|
12298
|
-
{ address: upperTickArrayAddress, role:
|
|
12299
|
-
{ address: whirlpool.data.tokenVaultA, role:
|
|
12300
|
-
{ address: whirlpool.data.tokenVaultB, role:
|
|
12301
|
-
{ address: orcaOracleAddress, role:
|
|
12501
|
+
{ address: swapTickArrays[0], role: import_kit121.AccountRole.WRITABLE },
|
|
12502
|
+
{ address: swapTickArrays[1], role: import_kit121.AccountRole.WRITABLE },
|
|
12503
|
+
{ address: swapTickArrays[2], role: import_kit121.AccountRole.WRITABLE },
|
|
12504
|
+
{ address: swapTickArrays[3], role: import_kit121.AccountRole.WRITABLE },
|
|
12505
|
+
{ address: swapTickArrays[4], role: import_kit121.AccountRole.WRITABLE },
|
|
12506
|
+
{ address: lowerTickArrayAddress, role: import_kit121.AccountRole.WRITABLE },
|
|
12507
|
+
{ address: upperTickArrayAddress, role: import_kit121.AccountRole.WRITABLE },
|
|
12508
|
+
{ address: whirlpool.data.tokenVaultA, role: import_kit121.AccountRole.WRITABLE },
|
|
12509
|
+
{ address: whirlpool.data.tokenVaultB, role: import_kit121.AccountRole.WRITABLE },
|
|
12510
|
+
{ address: orcaOracleAddress, role: import_kit121.AccountRole.WRITABLE }
|
|
12302
12511
|
];
|
|
12303
12512
|
const remainingAccountsInfo = {
|
|
12304
12513
|
slices: [
|
|
@@ -12350,7 +12559,7 @@ async function openAndIncreaseTunaLpPositionOrcaInstruction(authority, positionM
|
|
|
12350
12559
|
// src/txbuilder/openAndIncreaseTunaLpPositionFusion.ts
|
|
12351
12560
|
var import_fusionamm_client13 = require("@crypticdot/fusionamm-client");
|
|
12352
12561
|
var import_fusionamm_core5 = require("@crypticdot/fusionamm-core");
|
|
12353
|
-
var
|
|
12562
|
+
var import_kit122 = require("@solana/kit");
|
|
12354
12563
|
var import_sysvars2 = require("@solana/sysvars");
|
|
12355
12564
|
var import_memo16 = require("@solana-program/memo");
|
|
12356
12565
|
var import_token_202225 = require("@solana-program/token-2022");
|
|
@@ -12361,7 +12570,7 @@ async function openAndIncreaseTunaLpPositionFusionInstructions(rpc, authority, f
|
|
|
12361
12570
|
if (!cleanupInstructions) cleanupInstructions = instructions;
|
|
12362
12571
|
const rent = await (0, import_sysvars2.fetchSysvarRent)(rpc);
|
|
12363
12572
|
let nonRefundableRent = 0n;
|
|
12364
|
-
const positionMint = await (0,
|
|
12573
|
+
const positionMint = await (0, import_kit122.generateKeyPairSigner)();
|
|
12365
12574
|
const tunaConfig = await fetchTunaConfig(rpc, (await getTunaConfigAddress())[0]);
|
|
12366
12575
|
const fusionPool = await (0, import_fusionamm_client13.fetchMaybeFusionPool)(rpc, fusionPoolAddress);
|
|
12367
12576
|
if (!fusionPool.exists) throw new Error("FusionPool account not found");
|
|
@@ -12468,7 +12677,7 @@ async function openAndIncreaseTunaLpPositionFusionInstructions(rpc, authority, f
|
|
|
12468
12677
|
return {
|
|
12469
12678
|
instructions,
|
|
12470
12679
|
positionMint: positionMint.address,
|
|
12471
|
-
initializationCost: (0,
|
|
12680
|
+
initializationCost: (0, import_kit122.lamports)(nonRefundableRent)
|
|
12472
12681
|
};
|
|
12473
12682
|
}
|
|
12474
12683
|
async function openAndIncreaseTunaLpPositionFusionInstruction(authority, positionMint, tunaConfig, mintA, mintB, vaultA, vaultB, fusionPool, args) {
|
|
@@ -12524,15 +12733,15 @@ async function openAndIncreaseTunaLpPositionFusionInstruction(authority, positio
|
|
|
12524
12733
|
const lowerTickArrayAddress = await FusionUtils.getTickArrayAddressFromTickIndex(fusionPool, args.tickLowerIndex);
|
|
12525
12734
|
const upperTickArrayAddress = await FusionUtils.getTickArrayAddressFromTickIndex(fusionPool, args.tickUpperIndex);
|
|
12526
12735
|
const remainingAccounts = [
|
|
12527
|
-
{ address: swapTickArrays[0], role:
|
|
12528
|
-
{ address: swapTickArrays[1], role:
|
|
12529
|
-
{ address: swapTickArrays[2], role:
|
|
12530
|
-
{ address: swapTickArrays[3], role:
|
|
12531
|
-
{ address: swapTickArrays[4], role:
|
|
12532
|
-
{ address: lowerTickArrayAddress, role:
|
|
12533
|
-
{ address: upperTickArrayAddress, role:
|
|
12534
|
-
{ address: fusionPool.data.tokenVaultA, role:
|
|
12535
|
-
{ address: fusionPool.data.tokenVaultB, role:
|
|
12736
|
+
{ address: swapTickArrays[0], role: import_kit122.AccountRole.WRITABLE },
|
|
12737
|
+
{ address: swapTickArrays[1], role: import_kit122.AccountRole.WRITABLE },
|
|
12738
|
+
{ address: swapTickArrays[2], role: import_kit122.AccountRole.WRITABLE },
|
|
12739
|
+
{ address: swapTickArrays[3], role: import_kit122.AccountRole.WRITABLE },
|
|
12740
|
+
{ address: swapTickArrays[4], role: import_kit122.AccountRole.WRITABLE },
|
|
12741
|
+
{ address: lowerTickArrayAddress, role: import_kit122.AccountRole.WRITABLE },
|
|
12742
|
+
{ address: upperTickArrayAddress, role: import_kit122.AccountRole.WRITABLE },
|
|
12743
|
+
{ address: fusionPool.data.tokenVaultA, role: import_kit122.AccountRole.WRITABLE },
|
|
12744
|
+
{ address: fusionPool.data.tokenVaultB, role: import_kit122.AccountRole.WRITABLE }
|
|
12536
12745
|
];
|
|
12537
12746
|
const remainingAccountsInfo = {
|
|
12538
12747
|
slices: [
|
|
@@ -12583,17 +12792,17 @@ async function openAndIncreaseTunaLpPositionFusionInstruction(authority, positio
|
|
|
12583
12792
|
// src/txbuilder/openTunaSpotPosition.ts
|
|
12584
12793
|
var import_fusionamm_client14 = require("@crypticdot/fusionamm-client");
|
|
12585
12794
|
var import_whirlpools_client13 = require("@orca-so/whirlpools-client");
|
|
12586
|
-
var
|
|
12795
|
+
var import_kit123 = require("@solana/kit");
|
|
12587
12796
|
var import_token_202226 = require("@solana-program/token-2022");
|
|
12588
12797
|
var import_assert19 = __toESM(require("assert"));
|
|
12589
12798
|
async function openTunaSpotPositionInstructions(rpc, authority, poolAddress, args) {
|
|
12590
|
-
const poolAccount = await (0,
|
|
12799
|
+
const poolAccount = await (0, import_kit123.fetchEncodedAccount)(rpc, poolAddress);
|
|
12591
12800
|
(0, import_assert19.default)(poolAccount.exists, "Pool account not found");
|
|
12592
12801
|
let pool;
|
|
12593
12802
|
if (poolAccount.programAddress == import_fusionamm_client14.FUSIONAMM_PROGRAM_ADDRESS) {
|
|
12594
|
-
pool = (0,
|
|
12803
|
+
pool = (0, import_kit123.decodeAccount)(poolAccount, (0, import_fusionamm_client14.getFusionPoolDecoder)());
|
|
12595
12804
|
} else if (poolAccount.programAddress == import_whirlpools_client13.WHIRLPOOL_PROGRAM_ADDRESS) {
|
|
12596
|
-
pool = (0,
|
|
12805
|
+
pool = (0, import_kit123.decodeAccount)(poolAccount, (0, import_whirlpools_client13.getWhirlpoolDecoder)());
|
|
12597
12806
|
} else {
|
|
12598
12807
|
throw new Error("Incorrect Fusion or Orca pool account");
|
|
12599
12808
|
}
|
|
@@ -12633,7 +12842,7 @@ async function openTunaSpotPositionInstruction(authority, mintA, mintB, poolAddr
|
|
|
12633
12842
|
// src/txbuilder/decreaseTunaLpPositionOrca.ts
|
|
12634
12843
|
var import_whirlpools_client14 = require("@orca-so/whirlpools-client");
|
|
12635
12844
|
var import_whirlpools_core5 = require("@orca-so/whirlpools-core");
|
|
12636
|
-
var
|
|
12845
|
+
var import_kit124 = require("@solana/kit");
|
|
12637
12846
|
var import_memo17 = require("@solana-program/memo");
|
|
12638
12847
|
var import_token_202227 = require("@solana-program/token-2022");
|
|
12639
12848
|
var import_assert20 = __toESM(require("assert"));
|
|
@@ -12655,7 +12864,7 @@ async function decreaseTunaLpPositionOrcaInstructions(rpc, authority, positionMi
|
|
|
12655
12864
|
const allMints = [mintA, mintB, ...rewardMints];
|
|
12656
12865
|
(0, import_assert20.default)(mintA.exists, "Token A account not found");
|
|
12657
12866
|
(0, import_assert20.default)(mintB.exists, "Token B account not found");
|
|
12658
|
-
(0,
|
|
12867
|
+
(0, import_kit124.assertAccountsExist)(rewardMints);
|
|
12659
12868
|
const lowerTickArrayStartIndex = (0, import_whirlpools_core5.getTickArrayStartTickIndex)(
|
|
12660
12869
|
tunaPosition.data.tickLowerIndex,
|
|
12661
12870
|
whirlpool.data.tickSpacing
|
|
@@ -12768,16 +12977,16 @@ async function decreaseTunaLpPositionOrcaInstruction(authority, tunaPosition, mi
|
|
|
12768
12977
|
tunaPosition.data.tickUpperIndex
|
|
12769
12978
|
);
|
|
12770
12979
|
const remainingAccounts = [
|
|
12771
|
-
{ address: swapTickArrays[0], role:
|
|
12772
|
-
{ address: swapTickArrays[1], role:
|
|
12773
|
-
{ address: swapTickArrays[2], role:
|
|
12774
|
-
{ address: swapTickArrays[3], role:
|
|
12775
|
-
{ address: swapTickArrays[4], role:
|
|
12776
|
-
{ address: lowerTickArrayAddress, role:
|
|
12777
|
-
{ address: upperTickArrayAddress, role:
|
|
12778
|
-
{ address: whirlpool.data.tokenVaultA, role:
|
|
12779
|
-
{ address: whirlpool.data.tokenVaultB, role:
|
|
12780
|
-
{ address: orcaOracleAddress, role:
|
|
12980
|
+
{ address: swapTickArrays[0], role: import_kit124.AccountRole.WRITABLE },
|
|
12981
|
+
{ address: swapTickArrays[1], role: import_kit124.AccountRole.WRITABLE },
|
|
12982
|
+
{ address: swapTickArrays[2], role: import_kit124.AccountRole.WRITABLE },
|
|
12983
|
+
{ address: swapTickArrays[3], role: import_kit124.AccountRole.WRITABLE },
|
|
12984
|
+
{ address: swapTickArrays[4], role: import_kit124.AccountRole.WRITABLE },
|
|
12985
|
+
{ address: lowerTickArrayAddress, role: import_kit124.AccountRole.WRITABLE },
|
|
12986
|
+
{ address: upperTickArrayAddress, role: import_kit124.AccountRole.WRITABLE },
|
|
12987
|
+
{ address: whirlpool.data.tokenVaultA, role: import_kit124.AccountRole.WRITABLE },
|
|
12988
|
+
{ address: whirlpool.data.tokenVaultB, role: import_kit124.AccountRole.WRITABLE },
|
|
12989
|
+
{ address: orcaOracleAddress, role: import_kit124.AccountRole.WRITABLE }
|
|
12781
12990
|
];
|
|
12782
12991
|
for (const rewardIndex of rewardIndicesToClaim) {
|
|
12783
12992
|
const rewardInfo = whirlpool.data.rewardInfos[rewardIndex];
|
|
@@ -12788,10 +12997,10 @@ async function decreaseTunaLpPositionOrcaInstruction(authority, tunaPosition, mi
|
|
|
12788
12997
|
mint: rewardMint.address,
|
|
12789
12998
|
tokenProgram: rewardMint.programAddress
|
|
12790
12999
|
});
|
|
12791
|
-
remainingAccounts.push({ address: rewardMint.address, role:
|
|
12792
|
-
remainingAccounts.push({ address: rewardMint.programAddress, role:
|
|
12793
|
-
remainingAccounts.push({ address: ownerAta[0], role:
|
|
12794
|
-
remainingAccounts.push({ address: rewardInfo.vault, role:
|
|
13000
|
+
remainingAccounts.push({ address: rewardMint.address, role: import_kit124.AccountRole.READONLY });
|
|
13001
|
+
remainingAccounts.push({ address: rewardMint.programAddress, role: import_kit124.AccountRole.READONLY });
|
|
13002
|
+
remainingAccounts.push({ address: ownerAta[0], role: import_kit124.AccountRole.WRITABLE });
|
|
13003
|
+
remainingAccounts.push({ address: rewardInfo.vault, role: import_kit124.AccountRole.WRITABLE });
|
|
12795
13004
|
}
|
|
12796
13005
|
const remainingAccountsInfo = {
|
|
12797
13006
|
slices: [
|
|
@@ -12839,7 +13048,7 @@ async function decreaseTunaLpPositionOrcaInstruction(authority, tunaPosition, mi
|
|
|
12839
13048
|
|
|
12840
13049
|
// src/txbuilder/decreaseTunaLpPositionFusion.ts
|
|
12841
13050
|
var import_fusionamm_client15 = require("@crypticdot/fusionamm-client");
|
|
12842
|
-
var
|
|
13051
|
+
var import_kit125 = require("@solana/kit");
|
|
12843
13052
|
var import_memo18 = require("@solana-program/memo");
|
|
12844
13053
|
var import_token_202228 = require("@solana-program/token-2022");
|
|
12845
13054
|
var import_assert21 = __toESM(require("assert"));
|
|
@@ -12940,15 +13149,15 @@ async function decreaseTunaLpPositionFusionInstruction(authority, tunaPosition,
|
|
|
12940
13149
|
tunaPosition.data.tickUpperIndex
|
|
12941
13150
|
);
|
|
12942
13151
|
const remainingAccounts = [
|
|
12943
|
-
{ address: swapTickArrays[0], role:
|
|
12944
|
-
{ address: swapTickArrays[1], role:
|
|
12945
|
-
{ address: swapTickArrays[2], role:
|
|
12946
|
-
{ address: swapTickArrays[3], role:
|
|
12947
|
-
{ address: swapTickArrays[4], role:
|
|
12948
|
-
{ address: lowerTickArrayAddress, role:
|
|
12949
|
-
{ address: upperTickArrayAddress, role:
|
|
12950
|
-
{ address: fusionPool.data.tokenVaultA, role:
|
|
12951
|
-
{ address: fusionPool.data.tokenVaultB, role:
|
|
13152
|
+
{ address: swapTickArrays[0], role: import_kit125.AccountRole.WRITABLE },
|
|
13153
|
+
{ address: swapTickArrays[1], role: import_kit125.AccountRole.WRITABLE },
|
|
13154
|
+
{ address: swapTickArrays[2], role: import_kit125.AccountRole.WRITABLE },
|
|
13155
|
+
{ address: swapTickArrays[3], role: import_kit125.AccountRole.WRITABLE },
|
|
13156
|
+
{ address: swapTickArrays[4], role: import_kit125.AccountRole.WRITABLE },
|
|
13157
|
+
{ address: lowerTickArrayAddress, role: import_kit125.AccountRole.WRITABLE },
|
|
13158
|
+
{ address: upperTickArrayAddress, role: import_kit125.AccountRole.WRITABLE },
|
|
13159
|
+
{ address: fusionPool.data.tokenVaultA, role: import_kit125.AccountRole.WRITABLE },
|
|
13160
|
+
{ address: fusionPool.data.tokenVaultB, role: import_kit125.AccountRole.WRITABLE }
|
|
12952
13161
|
];
|
|
12953
13162
|
const remainingAccountsInfo = {
|
|
12954
13163
|
slices: [
|
|
@@ -13153,7 +13362,7 @@ async function withdrawInstruction(authority, mint, funds, shares) {
|
|
|
13153
13362
|
// src/txbuilder/createMarketLookupTable.ts
|
|
13154
13363
|
var import_fusionamm_client16 = require("@crypticdot/fusionamm-client");
|
|
13155
13364
|
var import_whirlpools_client15 = require("@orca-so/whirlpools-client");
|
|
13156
|
-
var
|
|
13365
|
+
var import_kit126 = require("@solana/kit");
|
|
13157
13366
|
var import_address_lookup_table2 = require("@solana-program/address-lookup-table");
|
|
13158
13367
|
var import_memo21 = require("@solana-program/memo");
|
|
13159
13368
|
var import_system2 = require("@solana-program/system");
|
|
@@ -13193,7 +13402,7 @@ async function getAddressesForMarketLookupTable(rpc, poolAddress, marketMaker) {
|
|
|
13193
13402
|
}))[0];
|
|
13194
13403
|
const addresses = [
|
|
13195
13404
|
import_system2.SYSTEM_PROGRAM_ADDRESS,
|
|
13196
|
-
(0,
|
|
13405
|
+
(0, import_kit126.address)("SysvarRent111111111111111111111111111111111"),
|
|
13197
13406
|
import_token_202232.ASSOCIATED_TOKEN_PROGRAM_ADDRESS,
|
|
13198
13407
|
import_token2.TOKEN_PROGRAM_ADDRESS,
|
|
13199
13408
|
import_token_202232.TOKEN_2022_PROGRAM_ADDRESS,
|
|
@@ -13355,7 +13564,7 @@ async function repayTunaLpPositionDebtInstruction(authority, positionMint, mintA
|
|
|
13355
13564
|
|
|
13356
13565
|
// src/txbuilder/rebalanceTunaLpPositionOrca.ts
|
|
13357
13566
|
var import_whirlpools_client16 = require("@orca-so/whirlpools-client");
|
|
13358
|
-
var
|
|
13567
|
+
var import_kit127 = require("@solana/kit");
|
|
13359
13568
|
var import_sysvars3 = require("@solana/sysvars");
|
|
13360
13569
|
var import_memo23 = require("@solana-program/memo");
|
|
13361
13570
|
var import_token_202234 = require("@solana-program/token-2022");
|
|
@@ -13438,7 +13647,7 @@ async function rebalanceTunaLpPositionOrcaInstructions(rpc, authority, positionM
|
|
|
13438
13647
|
cleanupInstructions.push(...internalCleanupInstructions);
|
|
13439
13648
|
return {
|
|
13440
13649
|
instructions,
|
|
13441
|
-
initializationCost: (0,
|
|
13650
|
+
initializationCost: (0, import_kit127.lamports)(nonRefundableRent)
|
|
13442
13651
|
};
|
|
13443
13652
|
}
|
|
13444
13653
|
async function rebalanceTunaLpPositionOrcaInstruction(authority, tunaPosition, tunaConfig, mintA, mintB, vaultA, vaultB, whirlpool) {
|
|
@@ -13482,18 +13691,18 @@ async function rebalanceTunaLpPositionOrcaInstruction(authority, tunaPosition, t
|
|
|
13482
13691
|
);
|
|
13483
13692
|
const secondaryTickArrays = await OrcaUtils.getTickArraysForRebalancedPosition(whirlpool, tunaPosition);
|
|
13484
13693
|
const remainingAccounts = [
|
|
13485
|
-
{ address: swapTickArrays[0], role:
|
|
13486
|
-
{ address: swapTickArrays[1], role:
|
|
13487
|
-
{ address: swapTickArrays[2], role:
|
|
13488
|
-
{ address: swapTickArrays[3], role:
|
|
13489
|
-
{ address: swapTickArrays[4], role:
|
|
13490
|
-
{ address: lowerTickArrayAddress, role:
|
|
13491
|
-
{ address: upperTickArrayAddress, role:
|
|
13492
|
-
{ address: secondaryTickArrays.lowerTickArrayAddress, role:
|
|
13493
|
-
{ address: secondaryTickArrays.upperTickArrayAddress, role:
|
|
13494
|
-
{ address: whirlpool.data.tokenVaultA, role:
|
|
13495
|
-
{ address: whirlpool.data.tokenVaultB, role:
|
|
13496
|
-
{ address: orcaOracleAddress, role:
|
|
13694
|
+
{ address: swapTickArrays[0], role: import_kit127.AccountRole.WRITABLE },
|
|
13695
|
+
{ address: swapTickArrays[1], role: import_kit127.AccountRole.WRITABLE },
|
|
13696
|
+
{ address: swapTickArrays[2], role: import_kit127.AccountRole.WRITABLE },
|
|
13697
|
+
{ address: swapTickArrays[3], role: import_kit127.AccountRole.WRITABLE },
|
|
13698
|
+
{ address: swapTickArrays[4], role: import_kit127.AccountRole.WRITABLE },
|
|
13699
|
+
{ address: lowerTickArrayAddress, role: import_kit127.AccountRole.WRITABLE },
|
|
13700
|
+
{ address: upperTickArrayAddress, role: import_kit127.AccountRole.WRITABLE },
|
|
13701
|
+
{ address: secondaryTickArrays.lowerTickArrayAddress, role: import_kit127.AccountRole.WRITABLE },
|
|
13702
|
+
{ address: secondaryTickArrays.upperTickArrayAddress, role: import_kit127.AccountRole.WRITABLE },
|
|
13703
|
+
{ address: whirlpool.data.tokenVaultA, role: import_kit127.AccountRole.WRITABLE },
|
|
13704
|
+
{ address: whirlpool.data.tokenVaultB, role: import_kit127.AccountRole.WRITABLE },
|
|
13705
|
+
{ address: orcaOracleAddress, role: import_kit127.AccountRole.WRITABLE }
|
|
13497
13706
|
];
|
|
13498
13707
|
const remainingAccountsInfo = {
|
|
13499
13708
|
slices: [
|
|
@@ -13537,7 +13746,7 @@ async function rebalanceTunaLpPositionOrcaInstruction(authority, tunaPosition, t
|
|
|
13537
13746
|
|
|
13538
13747
|
// src/txbuilder/rebalanceTunaLpPositionFusion.ts
|
|
13539
13748
|
var import_fusionamm_client17 = require("@crypticdot/fusionamm-client");
|
|
13540
|
-
var
|
|
13749
|
+
var import_kit128 = require("@solana/kit");
|
|
13541
13750
|
var import_sysvars4 = require("@solana/sysvars");
|
|
13542
13751
|
var import_memo24 = require("@solana-program/memo");
|
|
13543
13752
|
var import_token_202235 = require("@solana-program/token-2022");
|
|
@@ -13616,7 +13825,7 @@ async function rebalanceTunaLpPositionFusionInstructions(rpc, authority, positio
|
|
|
13616
13825
|
instructions.push(ix);
|
|
13617
13826
|
return {
|
|
13618
13827
|
instructions,
|
|
13619
|
-
initializationCost: (0,
|
|
13828
|
+
initializationCost: (0, import_kit128.lamports)(nonRefundableRent)
|
|
13620
13829
|
};
|
|
13621
13830
|
}
|
|
13622
13831
|
async function rebalanceTunaLpPositionFusionInstruction(authority, tunaPosition, tunaConfig, mintA, mintB, vaultA, vaultB, fusionPool) {
|
|
@@ -13659,17 +13868,17 @@ async function rebalanceTunaLpPositionFusionInstruction(authority, tunaPosition,
|
|
|
13659
13868
|
);
|
|
13660
13869
|
const secondaryTickArrays = await FusionUtils.getTickArraysForRebalancedPosition(fusionPool, tunaPosition);
|
|
13661
13870
|
const remainingAccounts = [
|
|
13662
|
-
{ address: swapTickArrays[0], role:
|
|
13663
|
-
{ address: swapTickArrays[1], role:
|
|
13664
|
-
{ address: swapTickArrays[2], role:
|
|
13665
|
-
{ address: swapTickArrays[3], role:
|
|
13666
|
-
{ address: swapTickArrays[4], role:
|
|
13667
|
-
{ address: lowerTickArrayAddress, role:
|
|
13668
|
-
{ address: upperTickArrayAddress, role:
|
|
13669
|
-
{ address: secondaryTickArrays.lowerTickArrayAddress, role:
|
|
13670
|
-
{ address: secondaryTickArrays.upperTickArrayAddress, role:
|
|
13671
|
-
{ address: fusionPool.data.tokenVaultA, role:
|
|
13672
|
-
{ address: fusionPool.data.tokenVaultB, role:
|
|
13871
|
+
{ address: swapTickArrays[0], role: import_kit128.AccountRole.WRITABLE },
|
|
13872
|
+
{ address: swapTickArrays[1], role: import_kit128.AccountRole.WRITABLE },
|
|
13873
|
+
{ address: swapTickArrays[2], role: import_kit128.AccountRole.WRITABLE },
|
|
13874
|
+
{ address: swapTickArrays[3], role: import_kit128.AccountRole.WRITABLE },
|
|
13875
|
+
{ address: swapTickArrays[4], role: import_kit128.AccountRole.WRITABLE },
|
|
13876
|
+
{ address: lowerTickArrayAddress, role: import_kit128.AccountRole.WRITABLE },
|
|
13877
|
+
{ address: upperTickArrayAddress, role: import_kit128.AccountRole.WRITABLE },
|
|
13878
|
+
{ address: secondaryTickArrays.lowerTickArrayAddress, role: import_kit128.AccountRole.WRITABLE },
|
|
13879
|
+
{ address: secondaryTickArrays.upperTickArrayAddress, role: import_kit128.AccountRole.WRITABLE },
|
|
13880
|
+
{ address: fusionPool.data.tokenVaultA, role: import_kit128.AccountRole.WRITABLE },
|
|
13881
|
+
{ address: fusionPool.data.tokenVaultB, role: import_kit128.AccountRole.WRITABLE }
|
|
13673
13882
|
];
|
|
13674
13883
|
const remainingAccountsInfo = {
|
|
13675
13884
|
slices: [
|
|
@@ -13742,6 +13951,7 @@ async function rebalanceTunaLpPositionFusionInstruction(authority, tunaPosition,
|
|
|
13742
13951
|
LIQUIDATE_TUNA_LP_POSITION_FUSION_DISCRIMINATOR,
|
|
13743
13952
|
LIQUIDATE_TUNA_LP_POSITION_ORCA_DISCRIMINATOR,
|
|
13744
13953
|
LIQUIDATE_TUNA_SPOT_POSITION_FUSION_DISCRIMINATOR,
|
|
13954
|
+
LIQUIDATE_TUNA_SPOT_POSITION_JUPITER_DISCRIMINATOR,
|
|
13745
13955
|
LIQUIDATE_TUNA_SPOT_POSITION_ORCA_DISCRIMINATOR,
|
|
13746
13956
|
MARKET_DISCRIMINATOR,
|
|
13747
13957
|
MAX_LEVERAGE,
|
|
@@ -14040,6 +14250,11 @@ async function rebalanceTunaLpPositionFusionInstruction(authority, tunaPosition,
|
|
|
14040
14250
|
getLiquidateTunaSpotPositionFusionInstructionDataCodec,
|
|
14041
14251
|
getLiquidateTunaSpotPositionFusionInstructionDataDecoder,
|
|
14042
14252
|
getLiquidateTunaSpotPositionFusionInstructionDataEncoder,
|
|
14253
|
+
getLiquidateTunaSpotPositionJupiterDiscriminatorBytes,
|
|
14254
|
+
getLiquidateTunaSpotPositionJupiterInstruction,
|
|
14255
|
+
getLiquidateTunaSpotPositionJupiterInstructionDataCodec,
|
|
14256
|
+
getLiquidateTunaSpotPositionJupiterInstructionDataDecoder,
|
|
14257
|
+
getLiquidateTunaSpotPositionJupiterInstructionDataEncoder,
|
|
14043
14258
|
getLiquidateTunaSpotPositionOrcaDiscriminatorBytes,
|
|
14044
14259
|
getLiquidateTunaSpotPositionOrcaInstruction,
|
|
14045
14260
|
getLiquidateTunaSpotPositionOrcaInstructionDataCodec,
|
|
@@ -14289,6 +14504,7 @@ async function rebalanceTunaLpPositionFusionInstruction(authority, tunaPosition,
|
|
|
14289
14504
|
parseLiquidateTunaLpPositionFusionInstruction,
|
|
14290
14505
|
parseLiquidateTunaLpPositionOrcaInstruction,
|
|
14291
14506
|
parseLiquidateTunaSpotPositionFusionInstruction,
|
|
14507
|
+
parseLiquidateTunaSpotPositionJupiterInstruction,
|
|
14292
14508
|
parseLiquidateTunaSpotPositionOrcaInstruction,
|
|
14293
14509
|
parseModifyTunaSpotPositionFusionInstruction,
|
|
14294
14510
|
parseModifyTunaSpotPositionJupiterInstruction,
|