@crypticdot/defituna-client 3.0.4 → 3.1.1
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 +123 -134
- package/dist/index.d.ts +123 -134
- package/dist/index.js +195 -153
- package/dist/index.mjs +196 -154
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -688,12 +688,10 @@ function getTunaSpotPositionEncoder() {
|
|
|
688
688
|
["pool", getAddressEncoder5()],
|
|
689
689
|
["mintA", getAddressEncoder5()],
|
|
690
690
|
["mintB", getAddressEncoder5()],
|
|
691
|
-
["positionMint", getAddressEncoder5()],
|
|
692
691
|
["marketMaker", getMarketMakerEncoder()],
|
|
693
692
|
["positionToken", getPoolTokenEncoder()],
|
|
694
693
|
["collateralToken", getPoolTokenEncoder()],
|
|
695
694
|
["flags", getU32Encoder4()],
|
|
696
|
-
["state", getTunaPositionStateEncoder()],
|
|
697
695
|
["amount", getU64Encoder4()],
|
|
698
696
|
["loanShares", getU64Encoder4()],
|
|
699
697
|
["loanFunds", getU64Encoder4()],
|
|
@@ -714,12 +712,10 @@ function getTunaSpotPositionDecoder() {
|
|
|
714
712
|
["pool", getAddressDecoder5()],
|
|
715
713
|
["mintA", getAddressDecoder5()],
|
|
716
714
|
["mintB", getAddressDecoder5()],
|
|
717
|
-
["positionMint", getAddressDecoder5()],
|
|
718
715
|
["marketMaker", getMarketMakerDecoder()],
|
|
719
716
|
["positionToken", getPoolTokenDecoder()],
|
|
720
717
|
["collateralToken", getPoolTokenDecoder()],
|
|
721
718
|
["flags", getU32Decoder4()],
|
|
722
|
-
["state", getTunaPositionStateDecoder()],
|
|
723
719
|
["amount", getU64Decoder4()],
|
|
724
720
|
["loanShares", getU64Decoder4()],
|
|
725
721
|
["loanFunds", getU64Decoder4()],
|
|
@@ -766,7 +762,7 @@ async function fetchAllMaybeTunaSpotPosition(rpc, addresses, config) {
|
|
|
766
762
|
);
|
|
767
763
|
}
|
|
768
764
|
function getTunaSpotPositionSize() {
|
|
769
|
-
return
|
|
765
|
+
return 346;
|
|
770
766
|
}
|
|
771
767
|
|
|
772
768
|
// src/generated/accounts/vault.ts
|
|
@@ -5721,6 +5717,18 @@ function getLiquidateTunaSpotPositionFusionInstruction(input, config) {
|
|
|
5721
5717
|
value: input.feeRecipientAtaB ?? null,
|
|
5722
5718
|
isWritable: true
|
|
5723
5719
|
},
|
|
5720
|
+
tunaPositionOwner: {
|
|
5721
|
+
value: input.tunaPositionOwner ?? null,
|
|
5722
|
+
isWritable: true
|
|
5723
|
+
},
|
|
5724
|
+
tunaPositionOwnerAtaA: {
|
|
5725
|
+
value: input.tunaPositionOwnerAtaA ?? null,
|
|
5726
|
+
isWritable: true
|
|
5727
|
+
},
|
|
5728
|
+
tunaPositionOwnerAtaB: {
|
|
5729
|
+
value: input.tunaPositionOwnerAtaB ?? null,
|
|
5730
|
+
isWritable: true
|
|
5731
|
+
},
|
|
5724
5732
|
pythOraclePriceFeedA: {
|
|
5725
5733
|
value: input.pythOraclePriceFeedA ?? null,
|
|
5726
5734
|
isWritable: false
|
|
@@ -5761,6 +5769,9 @@ function getLiquidateTunaSpotPositionFusionInstruction(input, config) {
|
|
|
5761
5769
|
getAccountMeta(accounts.tunaPositionAtaB),
|
|
5762
5770
|
getAccountMeta(accounts.feeRecipientAtaA),
|
|
5763
5771
|
getAccountMeta(accounts.feeRecipientAtaB),
|
|
5772
|
+
getAccountMeta(accounts.tunaPositionOwner),
|
|
5773
|
+
getAccountMeta(accounts.tunaPositionOwnerAtaA),
|
|
5774
|
+
getAccountMeta(accounts.tunaPositionOwnerAtaB),
|
|
5764
5775
|
getAccountMeta(accounts.pythOraclePriceFeedA),
|
|
5765
5776
|
getAccountMeta(accounts.pythOraclePriceFeedB),
|
|
5766
5777
|
getAccountMeta(accounts.fusionammProgram),
|
|
@@ -5776,7 +5787,7 @@ function getLiquidateTunaSpotPositionFusionInstruction(input, config) {
|
|
|
5776
5787
|
return instruction;
|
|
5777
5788
|
}
|
|
5778
5789
|
function parseLiquidateTunaSpotPositionFusionInstruction(instruction) {
|
|
5779
|
-
if (instruction.accounts.length <
|
|
5790
|
+
if (instruction.accounts.length < 25) {
|
|
5780
5791
|
throw new Error("Not enough accounts");
|
|
5781
5792
|
}
|
|
5782
5793
|
let accountIndex = 0;
|
|
@@ -5785,6 +5796,10 @@ function parseLiquidateTunaSpotPositionFusionInstruction(instruction) {
|
|
|
5785
5796
|
accountIndex += 1;
|
|
5786
5797
|
return accountMeta;
|
|
5787
5798
|
};
|
|
5799
|
+
const getNextOptionalAccount = () => {
|
|
5800
|
+
const accountMeta = getNextAccount();
|
|
5801
|
+
return accountMeta.address === TUNA_PROGRAM_ADDRESS ? void 0 : accountMeta;
|
|
5802
|
+
};
|
|
5788
5803
|
return {
|
|
5789
5804
|
programAddress: instruction.programAddress,
|
|
5790
5805
|
accounts: {
|
|
@@ -5804,6 +5819,9 @@ function parseLiquidateTunaSpotPositionFusionInstruction(instruction) {
|
|
|
5804
5819
|
tunaPositionAtaB: getNextAccount(),
|
|
5805
5820
|
feeRecipientAtaA: getNextAccount(),
|
|
5806
5821
|
feeRecipientAtaB: getNextAccount(),
|
|
5822
|
+
tunaPositionOwner: getNextAccount(),
|
|
5823
|
+
tunaPositionOwnerAtaA: getNextOptionalAccount(),
|
|
5824
|
+
tunaPositionOwnerAtaB: getNextOptionalAccount(),
|
|
5807
5825
|
pythOraclePriceFeedA: getNextAccount(),
|
|
5808
5826
|
pythOraclePriceFeedB: getNextAccount(),
|
|
5809
5827
|
fusionammProgram: getNextAccount(),
|
|
@@ -5902,6 +5920,18 @@ function getLiquidateTunaSpotPositionOrcaInstruction(input, config) {
|
|
|
5902
5920
|
value: input.feeRecipientAtaB ?? null,
|
|
5903
5921
|
isWritable: true
|
|
5904
5922
|
},
|
|
5923
|
+
tunaPositionOwner: {
|
|
5924
|
+
value: input.tunaPositionOwner ?? null,
|
|
5925
|
+
isWritable: true
|
|
5926
|
+
},
|
|
5927
|
+
tunaPositionOwnerAtaA: {
|
|
5928
|
+
value: input.tunaPositionOwnerAtaA ?? null,
|
|
5929
|
+
isWritable: true
|
|
5930
|
+
},
|
|
5931
|
+
tunaPositionOwnerAtaB: {
|
|
5932
|
+
value: input.tunaPositionOwnerAtaB ?? null,
|
|
5933
|
+
isWritable: true
|
|
5934
|
+
},
|
|
5905
5935
|
pythOraclePriceFeedA: {
|
|
5906
5936
|
value: input.pythOraclePriceFeedA ?? null,
|
|
5907
5937
|
isWritable: false
|
|
@@ -5942,6 +5972,9 @@ function getLiquidateTunaSpotPositionOrcaInstruction(input, config) {
|
|
|
5942
5972
|
getAccountMeta(accounts.tunaPositionAtaB),
|
|
5943
5973
|
getAccountMeta(accounts.feeRecipientAtaA),
|
|
5944
5974
|
getAccountMeta(accounts.feeRecipientAtaB),
|
|
5975
|
+
getAccountMeta(accounts.tunaPositionOwner),
|
|
5976
|
+
getAccountMeta(accounts.tunaPositionOwnerAtaA),
|
|
5977
|
+
getAccountMeta(accounts.tunaPositionOwnerAtaB),
|
|
5945
5978
|
getAccountMeta(accounts.pythOraclePriceFeedA),
|
|
5946
5979
|
getAccountMeta(accounts.pythOraclePriceFeedB),
|
|
5947
5980
|
getAccountMeta(accounts.whirlpoolProgram),
|
|
@@ -5957,7 +5990,7 @@ function getLiquidateTunaSpotPositionOrcaInstruction(input, config) {
|
|
|
5957
5990
|
return instruction;
|
|
5958
5991
|
}
|
|
5959
5992
|
function parseLiquidateTunaSpotPositionOrcaInstruction(instruction) {
|
|
5960
|
-
if (instruction.accounts.length <
|
|
5993
|
+
if (instruction.accounts.length < 25) {
|
|
5961
5994
|
throw new Error("Not enough accounts");
|
|
5962
5995
|
}
|
|
5963
5996
|
let accountIndex = 0;
|
|
@@ -5966,6 +5999,10 @@ function parseLiquidateTunaSpotPositionOrcaInstruction(instruction) {
|
|
|
5966
5999
|
accountIndex += 1;
|
|
5967
6000
|
return accountMeta;
|
|
5968
6001
|
};
|
|
6002
|
+
const getNextOptionalAccount = () => {
|
|
6003
|
+
const accountMeta = getNextAccount();
|
|
6004
|
+
return accountMeta.address === TUNA_PROGRAM_ADDRESS ? void 0 : accountMeta;
|
|
6005
|
+
};
|
|
5969
6006
|
return {
|
|
5970
6007
|
programAddress: instruction.programAddress,
|
|
5971
6008
|
accounts: {
|
|
@@ -5985,6 +6022,9 @@ function parseLiquidateTunaSpotPositionOrcaInstruction(instruction) {
|
|
|
5985
6022
|
tunaPositionAtaB: getNextAccount(),
|
|
5986
6023
|
feeRecipientAtaA: getNextAccount(),
|
|
5987
6024
|
feeRecipientAtaB: getNextAccount(),
|
|
6025
|
+
tunaPositionOwner: getNextAccount(),
|
|
6026
|
+
tunaPositionOwnerAtaA: getNextOptionalAccount(),
|
|
6027
|
+
tunaPositionOwnerAtaB: getNextOptionalAccount(),
|
|
5988
6028
|
pythOraclePriceFeedA: getNextAccount(),
|
|
5989
6029
|
pythOraclePriceFeedB: getNextAccount(),
|
|
5990
6030
|
whirlpoolProgram: getNextAccount(),
|
|
@@ -6560,10 +6600,6 @@ function getOpenAndIncreaseTunaSpotPositionFusionInstruction(input, config) {
|
|
|
6560
6600
|
vaultAAta: { value: input.vaultAAta ?? null, isWritable: true },
|
|
6561
6601
|
vaultBAta: { value: input.vaultBAta ?? null, isWritable: true },
|
|
6562
6602
|
tunaPosition: { value: input.tunaPosition ?? null, isWritable: true },
|
|
6563
|
-
tunaPositionMint: {
|
|
6564
|
-
value: input.tunaPositionMint ?? null,
|
|
6565
|
-
isWritable: false
|
|
6566
|
-
},
|
|
6567
6603
|
tunaPositionAtaA: {
|
|
6568
6604
|
value: input.tunaPositionAtaA ?? null,
|
|
6569
6605
|
isWritable: true
|
|
@@ -6628,7 +6664,6 @@ function getOpenAndIncreaseTunaSpotPositionFusionInstruction(input, config) {
|
|
|
6628
6664
|
getAccountMeta(accounts.vaultAAta),
|
|
6629
6665
|
getAccountMeta(accounts.vaultBAta),
|
|
6630
6666
|
getAccountMeta(accounts.tunaPosition),
|
|
6631
|
-
getAccountMeta(accounts.tunaPositionMint),
|
|
6632
6667
|
getAccountMeta(accounts.tunaPositionAtaA),
|
|
6633
6668
|
getAccountMeta(accounts.tunaPositionAtaB),
|
|
6634
6669
|
getAccountMeta(accounts.tunaPositionOwnerAtaA),
|
|
@@ -6651,7 +6686,7 @@ function getOpenAndIncreaseTunaSpotPositionFusionInstruction(input, config) {
|
|
|
6651
6686
|
return instruction;
|
|
6652
6687
|
}
|
|
6653
6688
|
function parseOpenAndIncreaseTunaSpotPositionFusionInstruction(instruction) {
|
|
6654
|
-
if (instruction.accounts.length <
|
|
6689
|
+
if (instruction.accounts.length < 25) {
|
|
6655
6690
|
throw new Error("Not enough accounts");
|
|
6656
6691
|
}
|
|
6657
6692
|
let accountIndex = 0;
|
|
@@ -6679,7 +6714,6 @@ function parseOpenAndIncreaseTunaSpotPositionFusionInstruction(instruction) {
|
|
|
6679
6714
|
vaultAAta: getNextAccount(),
|
|
6680
6715
|
vaultBAta: getNextAccount(),
|
|
6681
6716
|
tunaPosition: getNextAccount(),
|
|
6682
|
-
tunaPositionMint: getNextAccount(),
|
|
6683
6717
|
tunaPositionAtaA: getNextAccount(),
|
|
6684
6718
|
tunaPositionAtaB: getNextAccount(),
|
|
6685
6719
|
tunaPositionOwnerAtaA: getNextOptionalAccount(),
|
|
@@ -6778,10 +6812,6 @@ function getOpenAndIncreaseTunaSpotPositionOrcaInstruction(input, config) {
|
|
|
6778
6812
|
vaultAAta: { value: input.vaultAAta ?? null, isWritable: true },
|
|
6779
6813
|
vaultBAta: { value: input.vaultBAta ?? null, isWritable: true },
|
|
6780
6814
|
tunaPosition: { value: input.tunaPosition ?? null, isWritable: true },
|
|
6781
|
-
tunaPositionMint: {
|
|
6782
|
-
value: input.tunaPositionMint ?? null,
|
|
6783
|
-
isWritable: false
|
|
6784
|
-
},
|
|
6785
6815
|
tunaPositionAtaA: {
|
|
6786
6816
|
value: input.tunaPositionAtaA ?? null,
|
|
6787
6817
|
isWritable: true
|
|
@@ -6846,7 +6876,6 @@ function getOpenAndIncreaseTunaSpotPositionOrcaInstruction(input, config) {
|
|
|
6846
6876
|
getAccountMeta(accounts.vaultAAta),
|
|
6847
6877
|
getAccountMeta(accounts.vaultBAta),
|
|
6848
6878
|
getAccountMeta(accounts.tunaPosition),
|
|
6849
|
-
getAccountMeta(accounts.tunaPositionMint),
|
|
6850
6879
|
getAccountMeta(accounts.tunaPositionAtaA),
|
|
6851
6880
|
getAccountMeta(accounts.tunaPositionAtaB),
|
|
6852
6881
|
getAccountMeta(accounts.tunaPositionOwnerAtaA),
|
|
@@ -6869,7 +6898,7 @@ function getOpenAndIncreaseTunaSpotPositionOrcaInstruction(input, config) {
|
|
|
6869
6898
|
return instruction;
|
|
6870
6899
|
}
|
|
6871
6900
|
function parseOpenAndIncreaseTunaSpotPositionOrcaInstruction(instruction) {
|
|
6872
|
-
if (instruction.accounts.length <
|
|
6901
|
+
if (instruction.accounts.length < 25) {
|
|
6873
6902
|
throw new Error("Not enough accounts");
|
|
6874
6903
|
}
|
|
6875
6904
|
let accountIndex = 0;
|
|
@@ -6897,7 +6926,6 @@ function parseOpenAndIncreaseTunaSpotPositionOrcaInstruction(instruction) {
|
|
|
6897
6926
|
vaultAAta: getNextAccount(),
|
|
6898
6927
|
vaultBAta: getNextAccount(),
|
|
6899
6928
|
tunaPosition: getNextAccount(),
|
|
6900
|
-
tunaPositionMint: getNextAccount(),
|
|
6901
6929
|
tunaPositionAtaA: getNextAccount(),
|
|
6902
6930
|
tunaPositionAtaB: getNextAccount(),
|
|
6903
6931
|
tunaPositionOwnerAtaA: getNextOptionalAccount(),
|
|
@@ -7448,10 +7476,6 @@ function getOpenTunaSpotPositionFusionInstruction(input, config) {
|
|
|
7448
7476
|
tokenProgramA: { value: input.tokenProgramA ?? null, isWritable: false },
|
|
7449
7477
|
tokenProgramB: { value: input.tokenProgramB ?? null, isWritable: false },
|
|
7450
7478
|
tunaPosition: { value: input.tunaPosition ?? null, isWritable: true },
|
|
7451
|
-
tunaPositionMint: {
|
|
7452
|
-
value: input.tunaPositionMint ?? null,
|
|
7453
|
-
isWritable: false
|
|
7454
|
-
},
|
|
7455
7479
|
tunaPositionAtaA: {
|
|
7456
7480
|
value: input.tunaPositionAtaA ?? null,
|
|
7457
7481
|
isWritable: true
|
|
@@ -7481,7 +7505,6 @@ function getOpenTunaSpotPositionFusionInstruction(input, config) {
|
|
|
7481
7505
|
getAccountMeta(accounts.tokenProgramA),
|
|
7482
7506
|
getAccountMeta(accounts.tokenProgramB),
|
|
7483
7507
|
getAccountMeta(accounts.tunaPosition),
|
|
7484
|
-
getAccountMeta(accounts.tunaPositionMint),
|
|
7485
7508
|
getAccountMeta(accounts.tunaPositionAtaA),
|
|
7486
7509
|
getAccountMeta(accounts.tunaPositionAtaB),
|
|
7487
7510
|
getAccountMeta(accounts.fusionPool),
|
|
@@ -7496,7 +7519,7 @@ function getOpenTunaSpotPositionFusionInstruction(input, config) {
|
|
|
7496
7519
|
return instruction;
|
|
7497
7520
|
}
|
|
7498
7521
|
function parseOpenTunaSpotPositionFusionInstruction(instruction) {
|
|
7499
|
-
if (instruction.accounts.length <
|
|
7522
|
+
if (instruction.accounts.length < 11) {
|
|
7500
7523
|
throw new Error("Not enough accounts");
|
|
7501
7524
|
}
|
|
7502
7525
|
let accountIndex = 0;
|
|
@@ -7514,7 +7537,6 @@ function parseOpenTunaSpotPositionFusionInstruction(instruction) {
|
|
|
7514
7537
|
tokenProgramA: getNextAccount(),
|
|
7515
7538
|
tokenProgramB: getNextAccount(),
|
|
7516
7539
|
tunaPosition: getNextAccount(),
|
|
7517
|
-
tunaPositionMint: getNextAccount(),
|
|
7518
7540
|
tunaPositionAtaA: getNextAccount(),
|
|
7519
7541
|
tunaPositionAtaB: getNextAccount(),
|
|
7520
7542
|
fusionPool: getNextAccount(),
|
|
@@ -7598,10 +7620,6 @@ function getOpenTunaSpotPositionOrcaInstruction(input, config) {
|
|
|
7598
7620
|
tokenProgramA: { value: input.tokenProgramA ?? null, isWritable: false },
|
|
7599
7621
|
tokenProgramB: { value: input.tokenProgramB ?? null, isWritable: false },
|
|
7600
7622
|
tunaPosition: { value: input.tunaPosition ?? null, isWritable: true },
|
|
7601
|
-
tunaPositionMint: {
|
|
7602
|
-
value: input.tunaPositionMint ?? null,
|
|
7603
|
-
isWritable: false
|
|
7604
|
-
},
|
|
7605
7623
|
tunaPositionAtaA: {
|
|
7606
7624
|
value: input.tunaPositionAtaA ?? null,
|
|
7607
7625
|
isWritable: true
|
|
@@ -7631,7 +7649,6 @@ function getOpenTunaSpotPositionOrcaInstruction(input, config) {
|
|
|
7631
7649
|
getAccountMeta(accounts.tokenProgramA),
|
|
7632
7650
|
getAccountMeta(accounts.tokenProgramB),
|
|
7633
7651
|
getAccountMeta(accounts.tunaPosition),
|
|
7634
|
-
getAccountMeta(accounts.tunaPositionMint),
|
|
7635
7652
|
getAccountMeta(accounts.tunaPositionAtaA),
|
|
7636
7653
|
getAccountMeta(accounts.tunaPositionAtaB),
|
|
7637
7654
|
getAccountMeta(accounts.whirlpool),
|
|
@@ -7646,7 +7663,7 @@ function getOpenTunaSpotPositionOrcaInstruction(input, config) {
|
|
|
7646
7663
|
return instruction;
|
|
7647
7664
|
}
|
|
7648
7665
|
function parseOpenTunaSpotPositionOrcaInstruction(instruction) {
|
|
7649
|
-
if (instruction.accounts.length <
|
|
7666
|
+
if (instruction.accounts.length < 11) {
|
|
7650
7667
|
throw new Error("Not enough accounts");
|
|
7651
7668
|
}
|
|
7652
7669
|
let accountIndex = 0;
|
|
@@ -7664,7 +7681,6 @@ function parseOpenTunaSpotPositionOrcaInstruction(instruction) {
|
|
|
7664
7681
|
tokenProgramA: getNextAccount(),
|
|
7665
7682
|
tokenProgramB: getNextAccount(),
|
|
7666
7683
|
tunaPosition: getNextAccount(),
|
|
7667
|
-
tunaPositionMint: getNextAccount(),
|
|
7668
7684
|
tunaPositionAtaA: getNextAccount(),
|
|
7669
7685
|
tunaPositionAtaB: getNextAccount(),
|
|
7670
7686
|
whirlpool: getNextAccount(),
|
|
@@ -9897,10 +9913,10 @@ async function getLendingVaultAddress(mint) {
|
|
|
9897
9913
|
seeds: ["vault", getAddressEncoder16().encode(mint)]
|
|
9898
9914
|
});
|
|
9899
9915
|
}
|
|
9900
|
-
async function getLendingPositionAddress(
|
|
9916
|
+
async function getLendingPositionAddress(authority, mint) {
|
|
9901
9917
|
return await getProgramDerivedAddress({
|
|
9902
9918
|
programAddress: TUNA_PROGRAM_ADDRESS,
|
|
9903
|
-
seeds: ["lending_position", getAddressEncoder16().encode(
|
|
9919
|
+
seeds: ["lending_position", getAddressEncoder16().encode(authority), getAddressEncoder16().encode(mint)]
|
|
9904
9920
|
});
|
|
9905
9921
|
}
|
|
9906
9922
|
async function getTunaLpPositionAddress(positionMint) {
|
|
@@ -9909,10 +9925,10 @@ async function getTunaLpPositionAddress(positionMint) {
|
|
|
9909
9925
|
seeds: ["tuna_position", getAddressEncoder16().encode(positionMint)]
|
|
9910
9926
|
});
|
|
9911
9927
|
}
|
|
9912
|
-
async function getTunaSpotPositionAddress(
|
|
9928
|
+
async function getTunaSpotPositionAddress(authority, pool) {
|
|
9913
9929
|
return await getProgramDerivedAddress({
|
|
9914
9930
|
programAddress: TUNA_PROGRAM_ADDRESS,
|
|
9915
|
-
seeds: ["tuna_spot_position", getAddressEncoder16().encode(
|
|
9931
|
+
seeds: ["tuna_spot_position", getAddressEncoder16().encode(authority), getAddressEncoder16().encode(pool)]
|
|
9916
9932
|
});
|
|
9917
9933
|
}
|
|
9918
9934
|
async function getPythPriceUpdateAccountAddress(shardId, priceFeedId) {
|
|
@@ -10072,15 +10088,6 @@ function tunaSpotPositionMintBFilter(address4) {
|
|
|
10072
10088
|
}
|
|
10073
10089
|
};
|
|
10074
10090
|
}
|
|
10075
|
-
function tunaSpotPositionMintFilter(address4) {
|
|
10076
|
-
return {
|
|
10077
|
-
memcmp: {
|
|
10078
|
-
offset: 139n,
|
|
10079
|
-
bytes: getBase58Decoder2().decode(getAddressEncoder18().encode(address4)),
|
|
10080
|
-
encoding: "base58"
|
|
10081
|
-
}
|
|
10082
|
-
};
|
|
10083
|
-
}
|
|
10084
10091
|
async function fetchAllTunaSpotPositionWithFilter(rpc, ...filters) {
|
|
10085
10092
|
const discriminator = getBase58Decoder2().decode(TUNA_SPOT_POSITION_DISCRIMINATOR);
|
|
10086
10093
|
const discriminatorFilter = {
|
|
@@ -10321,7 +10328,7 @@ async function createAddressLookupTableInstructions(authority, addresses, recent
|
|
|
10321
10328
|
return { instructions: [createInstruction, extendInstruction], lookupTableAddress: pda[0] };
|
|
10322
10329
|
}
|
|
10323
10330
|
|
|
10324
|
-
// src/utils/
|
|
10331
|
+
// src/utils/lpPositionMath.ts
|
|
10325
10332
|
import {
|
|
10326
10333
|
positionRatioX64,
|
|
10327
10334
|
tickIndexToSqrtPrice,
|
|
@@ -10331,8 +10338,7 @@ import {
|
|
|
10331
10338
|
tryGetTokenAFromLiquidity,
|
|
10332
10339
|
tryGetTokenBFromLiquidity
|
|
10333
10340
|
} from "@crypticdot/fusionamm-core";
|
|
10334
|
-
|
|
10335
|
-
function getLiquidityIncreaseQuote(args) {
|
|
10341
|
+
function getIncreaseLpPositionQuote(args) {
|
|
10336
10342
|
const { protocolFeeRate, protocolFeeRateOnCollateral, swapFeeRate, sqrtPrice, tickLowerIndex, tickUpperIndex } = args;
|
|
10337
10343
|
let { collateralA, collateralB, borrowA, borrowB } = args;
|
|
10338
10344
|
if (tickLowerIndex > tickUpperIndex) {
|
|
@@ -10344,7 +10350,7 @@ function getLiquidityIncreaseQuote(args) {
|
|
|
10344
10350
|
if (args.collateralA == COMPUTED_AMOUNT && args.collateralB == COMPUTED_AMOUNT) {
|
|
10345
10351
|
throw new Error("Both collateral amounts can't be set to COMPUTED_AMOUNT");
|
|
10346
10352
|
}
|
|
10347
|
-
const maxAmountSlippage =
|
|
10353
|
+
const maxAmountSlippage = BigInt(args.maxAmountSlippage);
|
|
10348
10354
|
let maxCollateralA = BigInt(collateralA);
|
|
10349
10355
|
let maxCollateralB = BigInt(collateralB);
|
|
10350
10356
|
const lowerSqrtPrice = tickIndexToSqrtPrice(tickLowerIndex);
|
|
@@ -10473,7 +10479,7 @@ async function increaseTunaLpPositionOrcaInstructions(rpc, authority, positionMi
|
|
|
10473
10479
|
const [mintA, mintB] = await fetchAllMaybeMint(rpc, [whirlpool.data.tokenMintA, whirlpool.data.tokenMintB]);
|
|
10474
10480
|
assert(mintA.exists, "Token A not found");
|
|
10475
10481
|
assert(mintB.exists, "Token B not found");
|
|
10476
|
-
const increaseAmounts =
|
|
10482
|
+
const increaseAmounts = getIncreaseLpPositionQuote({
|
|
10477
10483
|
collateralA: BigInt(args.collateralA),
|
|
10478
10484
|
collateralB: BigInt(args.collateralB),
|
|
10479
10485
|
borrowA: BigInt(args.borrowA),
|
|
@@ -10717,7 +10723,7 @@ async function increaseTunaLpPositionFusionInstructions(rpc, authority, position
|
|
|
10717
10723
|
const [mintA, mintB] = await fetchAllMaybeMint2(rpc, [fusionPool.data.tokenMintA, fusionPool.data.tokenMintB]);
|
|
10718
10724
|
assert2(mintA.exists, "Token A not found");
|
|
10719
10725
|
assert2(mintB.exists, "Token B not found");
|
|
10720
|
-
const increaseAmounts =
|
|
10726
|
+
const increaseAmounts = getIncreaseLpPositionQuote({
|
|
10721
10727
|
collateralA: BigInt(args.collateralA),
|
|
10722
10728
|
collateralB: BigInt(args.collateralB),
|
|
10723
10729
|
borrowA: BigInt(args.borrowA),
|
|
@@ -11888,8 +11894,9 @@ import {
|
|
|
11888
11894
|
import { MEMO_PROGRAM_ADDRESS as MEMO_PROGRAM_ADDRESS8 } from "@solana-program/memo";
|
|
11889
11895
|
import { fetchAllMaybeMint as fetchAllMaybeMint11, findAssociatedTokenPda as findAssociatedTokenPda13 } from "@solana-program/token-2022";
|
|
11890
11896
|
import assert11 from "assert";
|
|
11891
|
-
async function closeActiveTunaSpotPositionFusionInstructions(rpc, authority,
|
|
11892
|
-
const
|
|
11897
|
+
async function closeActiveTunaSpotPositionFusionInstructions(rpc, authority, fusionPoolAddress, args, createInstructions, cleanupInstructions) {
|
|
11898
|
+
const tunaPositionAddress = (await getTunaSpotPositionAddress(authority.address, fusionPoolAddress))[0];
|
|
11899
|
+
const tunaPosition = await fetchMaybeTunaSpotPosition(rpc, tunaPositionAddress);
|
|
11893
11900
|
if (!tunaPosition.exists) throw new Error("Tuna position account not found");
|
|
11894
11901
|
const fusionPool = await fetchMaybeFusionPool6(rpc, tunaPosition.data.pool);
|
|
11895
11902
|
if (!fusionPool.exists) throw new Error("FusionPool account not found");
|
|
@@ -12017,8 +12024,9 @@ import {
|
|
|
12017
12024
|
import { MEMO_PROGRAM_ADDRESS as MEMO_PROGRAM_ADDRESS9 } from "@solana-program/memo";
|
|
12018
12025
|
import { fetchAllMaybeMint as fetchAllMaybeMint12, findAssociatedTokenPda as findAssociatedTokenPda14 } from "@solana-program/token-2022";
|
|
12019
12026
|
import assert12 from "assert";
|
|
12020
|
-
async function closeActiveTunaSpotPositionOrcaInstructions(rpc, authority,
|
|
12021
|
-
const
|
|
12027
|
+
async function closeActiveTunaSpotPositionOrcaInstructions(rpc, authority, whirlpoolAddress, args, createInstructions, cleanupInstructions) {
|
|
12028
|
+
const tunaPositionAddress = (await getTunaSpotPositionAddress(authority.address, whirlpoolAddress))[0];
|
|
12029
|
+
const tunaPosition = await fetchMaybeTunaSpotPosition(rpc, tunaPositionAddress);
|
|
12022
12030
|
if (!tunaPosition.exists) throw new Error("Tuna position account not found");
|
|
12023
12031
|
const whirlpool = await fetchMaybeWhirlpool6(rpc, tunaPosition.data.pool);
|
|
12024
12032
|
if (!whirlpool.exists) throw new Error("Whirlpool account not found");
|
|
@@ -12145,11 +12153,12 @@ import {
|
|
|
12145
12153
|
import { MEMO_PROGRAM_ADDRESS as MEMO_PROGRAM_ADDRESS10 } from "@solana-program/memo";
|
|
12146
12154
|
import { fetchAllMaybeMint as fetchAllMaybeMint13, findAssociatedTokenPda as findAssociatedTokenPda15 } from "@solana-program/token-2022";
|
|
12147
12155
|
import assert13 from "assert";
|
|
12148
|
-
async function increaseTunaSpotPositionOrcaInstructions(rpc, authority,
|
|
12156
|
+
async function increaseTunaSpotPositionOrcaInstructions(rpc, authority, whirlpoolAddress, args, createInstructions, cleanupInstructions) {
|
|
12149
12157
|
const instructions = [];
|
|
12150
12158
|
if (!createInstructions) createInstructions = instructions;
|
|
12151
12159
|
if (!cleanupInstructions) cleanupInstructions = instructions;
|
|
12152
|
-
const
|
|
12160
|
+
const tunaPositionAddress = (await getTunaSpotPositionAddress(authority.address, whirlpoolAddress))[0];
|
|
12161
|
+
const tunaPosition = await fetchMaybeTunaSpotPosition(rpc, tunaPositionAddress);
|
|
12153
12162
|
if (!tunaPosition.exists) throw new Error("Tuna position account not found");
|
|
12154
12163
|
const tunaConfig = await fetchTunaConfig(rpc, (await getTunaConfigAddress())[0]);
|
|
12155
12164
|
const whirlpool = await fetchWhirlpool(rpc, tunaPosition.data.pool);
|
|
@@ -12302,11 +12311,12 @@ import {
|
|
|
12302
12311
|
import { MEMO_PROGRAM_ADDRESS as MEMO_PROGRAM_ADDRESS11 } from "@solana-program/memo";
|
|
12303
12312
|
import { fetchAllMaybeMint as fetchAllMaybeMint14, findAssociatedTokenPda as findAssociatedTokenPda16 } from "@solana-program/token-2022";
|
|
12304
12313
|
import assert14 from "assert";
|
|
12305
|
-
async function increaseTunaSpotPositionFusionInstructions(rpc, authority,
|
|
12314
|
+
async function increaseTunaSpotPositionFusionInstructions(rpc, authority, fusionPoolAddress, args, createInstructions, cleanupInstructions) {
|
|
12306
12315
|
const instructions = [];
|
|
12307
12316
|
if (!createInstructions) createInstructions = instructions;
|
|
12308
12317
|
if (!cleanupInstructions) cleanupInstructions = instructions;
|
|
12309
|
-
const
|
|
12318
|
+
const tunaPositionAddress = (await getTunaSpotPositionAddress(authority.address, fusionPoolAddress))[0];
|
|
12319
|
+
const tunaPosition = await fetchMaybeTunaSpotPosition(rpc, tunaPositionAddress);
|
|
12310
12320
|
if (!tunaPosition.exists) throw new Error("Tuna position account not found");
|
|
12311
12321
|
const tunaConfig = await fetchTunaConfig(rpc, (await getTunaConfigAddress())[0]);
|
|
12312
12322
|
const fusionPool = await fetchFusionPool(rpc, tunaPosition.data.pool);
|
|
@@ -12456,11 +12466,12 @@ import {
|
|
|
12456
12466
|
import { MEMO_PROGRAM_ADDRESS as MEMO_PROGRAM_ADDRESS12 } from "@solana-program/memo";
|
|
12457
12467
|
import { fetchAllMaybeMint as fetchAllMaybeMint15, fetchAllToken, findAssociatedTokenPda as findAssociatedTokenPda17 } from "@solana-program/token-2022";
|
|
12458
12468
|
import assert15 from "assert";
|
|
12459
|
-
async function decreaseTunaSpotPositionOrcaInstructions(rpc, authority,
|
|
12469
|
+
async function decreaseTunaSpotPositionOrcaInstructions(rpc, authority, whirlpoolAddress, args, createInstructions, cleanupInstructions) {
|
|
12460
12470
|
const instructions = [];
|
|
12461
12471
|
if (!createInstructions) createInstructions = instructions;
|
|
12462
12472
|
if (!cleanupInstructions) cleanupInstructions = instructions;
|
|
12463
|
-
const
|
|
12473
|
+
const tunaPositionAddress = (await getTunaSpotPositionAddress(authority.address, whirlpoolAddress))[0];
|
|
12474
|
+
const tunaPosition = await fetchMaybeTunaSpotPosition(rpc, tunaPositionAddress);
|
|
12464
12475
|
if (!tunaPosition.exists) throw new Error("Tuna position account not found");
|
|
12465
12476
|
const tunaConfig = await fetchTunaConfig(rpc, (await getTunaConfigAddress())[0]);
|
|
12466
12477
|
const whirlpool = await fetchWhirlpool2(rpc, tunaPosition.data.pool);
|
|
@@ -12611,11 +12622,12 @@ import {
|
|
|
12611
12622
|
import { MEMO_PROGRAM_ADDRESS as MEMO_PROGRAM_ADDRESS13 } from "@solana-program/memo";
|
|
12612
12623
|
import { fetchAllMaybeMint as fetchAllMaybeMint16, fetchAllToken as fetchAllToken2, findAssociatedTokenPda as findAssociatedTokenPda18 } from "@solana-program/token-2022";
|
|
12613
12624
|
import assert16 from "assert";
|
|
12614
|
-
async function decreaseTunaSpotPositionFusionInstructions(rpc, authority,
|
|
12625
|
+
async function decreaseTunaSpotPositionFusionInstructions(rpc, authority, fusionPoolAddress, args, createInstructions, cleanupInstructions) {
|
|
12615
12626
|
const instructions = [];
|
|
12616
12627
|
if (!createInstructions) createInstructions = instructions;
|
|
12617
12628
|
if (!cleanupInstructions) cleanupInstructions = instructions;
|
|
12618
|
-
const
|
|
12629
|
+
const tunaPositionAddress = (await getTunaSpotPositionAddress(authority.address, fusionPoolAddress))[0];
|
|
12630
|
+
const tunaPosition = await fetchMaybeTunaSpotPosition(rpc, tunaPositionAddress);
|
|
12619
12631
|
if (!tunaPosition.exists) throw new Error("Tuna position account not found");
|
|
12620
12632
|
const tunaConfig = await fetchTunaConfig(rpc, (await getTunaConfigAddress())[0]);
|
|
12621
12633
|
const fusionPool = await fetchFusionPool2(rpc, tunaPosition.data.pool);
|
|
@@ -12758,17 +12770,18 @@ async function decreaseTunaSpotPositionFusionInstruction(authority, tunaPosition
|
|
|
12758
12770
|
// src/txbuilder/closeTunaSpotPosition.ts
|
|
12759
12771
|
import { fetchAllMaybeMint as fetchAllMaybeMint17, findAssociatedTokenPda as findAssociatedTokenPda19 } from "@solana-program/token-2022";
|
|
12760
12772
|
import assert17 from "assert";
|
|
12761
|
-
async function closeTunaSpotPositionInstructions(rpc, authority,
|
|
12762
|
-
const tunaPositionAddress = (await getTunaSpotPositionAddress(
|
|
12763
|
-
const tunaPosition = await
|
|
12773
|
+
async function closeTunaSpotPositionInstructions(rpc, authority, poolAddress) {
|
|
12774
|
+
const tunaPositionAddress = (await getTunaSpotPositionAddress(authority.address, poolAddress))[0];
|
|
12775
|
+
const tunaPosition = await fetchMaybeTunaSpotPosition(rpc, tunaPositionAddress);
|
|
12776
|
+
if (!tunaPosition.exists) throw new Error("Tuna position account not found");
|
|
12764
12777
|
const [mintA, mintB] = await fetchAllMaybeMint17(rpc, [tunaPosition.data.mintA, tunaPosition.data.mintB]);
|
|
12765
12778
|
assert17(mintA.exists, "Token A account not found");
|
|
12766
12779
|
assert17(mintB.exists, "Token B account not found");
|
|
12767
|
-
const ix = await closeTunaSpotPositionInstruction(authority,
|
|
12780
|
+
const ix = await closeTunaSpotPositionInstruction(authority, poolAddress, mintA, mintB);
|
|
12768
12781
|
return [ix];
|
|
12769
12782
|
}
|
|
12770
|
-
async function closeTunaSpotPositionInstruction(authority,
|
|
12771
|
-
const tunaPositionAddress = (await getTunaSpotPositionAddress(
|
|
12783
|
+
async function closeTunaSpotPositionInstruction(authority, poolAddress, mintA, mintB) {
|
|
12784
|
+
const tunaPositionAddress = (await getTunaSpotPositionAddress(authority.address, poolAddress))[0];
|
|
12772
12785
|
const tunaPositionAtaA = (await findAssociatedTokenPda19({
|
|
12773
12786
|
owner: tunaPositionAddress,
|
|
12774
12787
|
mint: mintA.address,
|
|
@@ -13125,20 +13138,40 @@ import { FUSIONAMM_PROGRAM_ADDRESS as FUSIONAMM_PROGRAM_ADDRESS10 } from "@crypt
|
|
|
13125
13138
|
import { AccountRole as AccountRole16 } from "@solana/kit";
|
|
13126
13139
|
import { MEMO_PROGRAM_ADDRESS as MEMO_PROGRAM_ADDRESS16 } from "@solana-program/memo";
|
|
13127
13140
|
import { findAssociatedTokenPda as findAssociatedTokenPda23 } from "@solana-program/token-2022";
|
|
13128
|
-
async function liquidateTunaSpotPositionFusionInstructions(authority, tunaPosition, tunaConfig, mintA, mintB, vaultA, vaultB, fusionPool, withdrawPercent) {
|
|
13141
|
+
async function liquidateTunaSpotPositionFusionInstructions(authority, tunaPosition, tunaConfig, mintA, mintB, vaultA, vaultB, fusionPool, createTunaPositionOwnerAta, withdrawPercent) {
|
|
13129
13142
|
const instructions = [];
|
|
13130
|
-
|
|
13131
|
-
|
|
13143
|
+
if (createTunaPositionOwnerAta) {
|
|
13144
|
+
const collateralTokenMint = tunaPosition.data.collateralToken == 0 /* A */ ? mintA : mintB;
|
|
13145
|
+
if (collateralTokenMint.address != NATIVE_MINT) {
|
|
13146
|
+
const createPositionOwnerAtaInstructions = await getCreateAtaInstructions(
|
|
13147
|
+
void 0,
|
|
13148
|
+
authority,
|
|
13149
|
+
collateralTokenMint.address,
|
|
13150
|
+
tunaPosition.data.authority,
|
|
13151
|
+
collateralTokenMint.programAddress
|
|
13152
|
+
);
|
|
13153
|
+
instructions.push(...createPositionOwnerAtaInstructions.init);
|
|
13154
|
+
}
|
|
13155
|
+
}
|
|
13156
|
+
const createFeeRecipientAtaAInstructions = await getCreateAtaInstructions(
|
|
13132
13157
|
void 0,
|
|
13133
13158
|
authority,
|
|
13134
|
-
|
|
13159
|
+
mintA.address,
|
|
13135
13160
|
tunaConfig.data.feeRecipient,
|
|
13136
|
-
|
|
13161
|
+
mintA.programAddress
|
|
13137
13162
|
);
|
|
13138
|
-
instructions.push(...
|
|
13163
|
+
instructions.push(...createFeeRecipientAtaAInstructions.init);
|
|
13164
|
+
const createFeeRecipientAtaBInstructions = await getCreateAtaInstructions(
|
|
13165
|
+
void 0,
|
|
13166
|
+
authority,
|
|
13167
|
+
mintB.address,
|
|
13168
|
+
tunaConfig.data.feeRecipient,
|
|
13169
|
+
mintB.programAddress
|
|
13170
|
+
);
|
|
13171
|
+
instructions.push(...createFeeRecipientAtaBInstructions.init);
|
|
13139
13172
|
const ix = await liquidateTunaSpotPositionFusionInstruction(
|
|
13140
13173
|
authority,
|
|
13141
|
-
tunaPosition
|
|
13174
|
+
tunaPosition,
|
|
13142
13175
|
tunaConfig,
|
|
13143
13176
|
mintA,
|
|
13144
13177
|
mintB,
|
|
@@ -13150,16 +13183,25 @@ async function liquidateTunaSpotPositionFusionInstructions(authority, tunaPositi
|
|
|
13150
13183
|
instructions.push(ix);
|
|
13151
13184
|
return instructions;
|
|
13152
13185
|
}
|
|
13153
|
-
async function liquidateTunaSpotPositionFusionInstruction(authority,
|
|
13154
|
-
const tunaPositionAddress = (await getTunaSpotPositionAddress(positionMint))[0];
|
|
13186
|
+
async function liquidateTunaSpotPositionFusionInstruction(authority, tunaPosition, tunaConfig, mintA, mintB, vaultA, vaultB, fusionPool, withdrawPercent) {
|
|
13155
13187
|
const marketAddress = (await getMarketAddress(fusionPool.address))[0];
|
|
13188
|
+
const tunaPositionOwnerAtaA = (await findAssociatedTokenPda23({
|
|
13189
|
+
owner: tunaPosition.data.authority,
|
|
13190
|
+
mint: mintA.address,
|
|
13191
|
+
tokenProgram: mintA.programAddress
|
|
13192
|
+
}))[0];
|
|
13193
|
+
const tunaPositionOwnerAtaB = (await findAssociatedTokenPda23({
|
|
13194
|
+
owner: tunaPosition.data.authority,
|
|
13195
|
+
mint: mintB.address,
|
|
13196
|
+
tokenProgram: mintB.programAddress
|
|
13197
|
+
}))[0];
|
|
13156
13198
|
const tunaPositionAtaA = (await findAssociatedTokenPda23({
|
|
13157
|
-
owner:
|
|
13199
|
+
owner: tunaPosition.address,
|
|
13158
13200
|
mint: mintA.address,
|
|
13159
13201
|
tokenProgram: mintA.programAddress
|
|
13160
13202
|
}))[0];
|
|
13161
13203
|
const tunaPositionAtaB = (await findAssociatedTokenPda23({
|
|
13162
|
-
owner:
|
|
13204
|
+
owner: tunaPosition.address,
|
|
13163
13205
|
mint: mintB.address,
|
|
13164
13206
|
tokenProgram: mintB.programAddress
|
|
13165
13207
|
}))[0];
|
|
@@ -13214,9 +13256,12 @@ async function liquidateTunaSpotPositionFusionInstruction(authority, positionMin
|
|
|
13214
13256
|
vaultAAta,
|
|
13215
13257
|
vaultB: vaultB.address,
|
|
13216
13258
|
vaultBAta,
|
|
13217
|
-
tunaPosition:
|
|
13259
|
+
tunaPosition: tunaPosition.address,
|
|
13218
13260
|
tunaPositionAtaA,
|
|
13219
13261
|
tunaPositionAtaB,
|
|
13262
|
+
tunaPositionOwner: tunaPosition.data.authority,
|
|
13263
|
+
tunaPositionOwnerAtaA: tunaPosition.data.collateralToken == 0 /* A */ && mintA.address != NATIVE_MINT ? tunaPositionOwnerAtaA : void 0,
|
|
13264
|
+
tunaPositionOwnerAtaB: tunaPosition.data.collateralToken == 1 /* B */ && mintB.address != NATIVE_MINT ? tunaPositionOwnerAtaB : void 0,
|
|
13220
13265
|
feeRecipientAtaA,
|
|
13221
13266
|
feeRecipientAtaB,
|
|
13222
13267
|
fusionPool: fusionPool.address,
|
|
@@ -13234,20 +13279,40 @@ import { getOracleAddress as getOracleAddress7, WHIRLPOOL_PROGRAM_ADDRESS as WHI
|
|
|
13234
13279
|
import { AccountRole as AccountRole17 } from "@solana/kit";
|
|
13235
13280
|
import { MEMO_PROGRAM_ADDRESS as MEMO_PROGRAM_ADDRESS17 } from "@solana-program/memo";
|
|
13236
13281
|
import { findAssociatedTokenPda as findAssociatedTokenPda24 } from "@solana-program/token-2022";
|
|
13237
|
-
async function liquidateTunaSpotPositionOrcaInstructions(authority, tunaPosition, tunaConfig, mintA, mintB, vaultA, vaultB, whirlpool, withdrawPercent) {
|
|
13282
|
+
async function liquidateTunaSpotPositionOrcaInstructions(authority, tunaPosition, tunaConfig, mintA, mintB, vaultA, vaultB, whirlpool, createTunaPositionOwnerAta, withdrawPercent) {
|
|
13238
13283
|
const instructions = [];
|
|
13239
|
-
|
|
13240
|
-
|
|
13284
|
+
if (createTunaPositionOwnerAta) {
|
|
13285
|
+
const collateralTokenMint = tunaPosition.data.collateralToken == 0 /* A */ ? mintA : mintB;
|
|
13286
|
+
if (collateralTokenMint.address != NATIVE_MINT) {
|
|
13287
|
+
const createPositionOwnerAtaInstructions = await getCreateAtaInstructions(
|
|
13288
|
+
void 0,
|
|
13289
|
+
authority,
|
|
13290
|
+
collateralTokenMint.address,
|
|
13291
|
+
tunaPosition.data.authority,
|
|
13292
|
+
collateralTokenMint.programAddress
|
|
13293
|
+
);
|
|
13294
|
+
instructions.push(...createPositionOwnerAtaInstructions.init);
|
|
13295
|
+
}
|
|
13296
|
+
}
|
|
13297
|
+
const createFeeRecipientAtaAInstructions = await getCreateAtaInstructions(
|
|
13298
|
+
void 0,
|
|
13299
|
+
authority,
|
|
13300
|
+
mintA.address,
|
|
13301
|
+
tunaConfig.data.feeRecipient,
|
|
13302
|
+
mintA.programAddress
|
|
13303
|
+
);
|
|
13304
|
+
instructions.push(...createFeeRecipientAtaAInstructions.init);
|
|
13305
|
+
const createFeeRecipientAtaBInstructions = await getCreateAtaInstructions(
|
|
13241
13306
|
void 0,
|
|
13242
13307
|
authority,
|
|
13243
|
-
|
|
13308
|
+
mintB.address,
|
|
13244
13309
|
tunaConfig.data.feeRecipient,
|
|
13245
|
-
|
|
13310
|
+
mintB.programAddress
|
|
13246
13311
|
);
|
|
13247
|
-
instructions.push(...
|
|
13312
|
+
instructions.push(...createFeeRecipientAtaBInstructions.init);
|
|
13248
13313
|
const ix = await liquidateTunaSpotPositionOrcaInstruction(
|
|
13249
13314
|
authority,
|
|
13250
|
-
tunaPosition
|
|
13315
|
+
tunaPosition,
|
|
13251
13316
|
tunaConfig,
|
|
13252
13317
|
mintA,
|
|
13253
13318
|
mintB,
|
|
@@ -13259,17 +13324,26 @@ async function liquidateTunaSpotPositionOrcaInstructions(authority, tunaPosition
|
|
|
13259
13324
|
instructions.push(ix);
|
|
13260
13325
|
return instructions;
|
|
13261
13326
|
}
|
|
13262
|
-
async function liquidateTunaSpotPositionOrcaInstruction(authority,
|
|
13263
|
-
const tunaPositionAddress = (await getTunaSpotPositionAddress(positionMint))[0];
|
|
13327
|
+
async function liquidateTunaSpotPositionOrcaInstruction(authority, tunaPosition, tunaConfig, mintA, mintB, vaultA, vaultB, whirlpool, withdrawPercent) {
|
|
13264
13328
|
const marketAddress = (await getMarketAddress(whirlpool.address))[0];
|
|
13265
13329
|
const orcaOracleAddress = (await getOracleAddress7(whirlpool.address))[0];
|
|
13330
|
+
const tunaPositionOwnerAtaA = (await findAssociatedTokenPda24({
|
|
13331
|
+
owner: tunaPosition.data.authority,
|
|
13332
|
+
mint: mintA.address,
|
|
13333
|
+
tokenProgram: mintA.programAddress
|
|
13334
|
+
}))[0];
|
|
13335
|
+
const tunaPositionOwnerAtaB = (await findAssociatedTokenPda24({
|
|
13336
|
+
owner: tunaPosition.data.authority,
|
|
13337
|
+
mint: mintB.address,
|
|
13338
|
+
tokenProgram: mintB.programAddress
|
|
13339
|
+
}))[0];
|
|
13266
13340
|
const tunaPositionAtaA = (await findAssociatedTokenPda24({
|
|
13267
|
-
owner:
|
|
13341
|
+
owner: tunaPosition.address,
|
|
13268
13342
|
mint: mintA.address,
|
|
13269
13343
|
tokenProgram: mintA.programAddress
|
|
13270
13344
|
}))[0];
|
|
13271
13345
|
const tunaPositionAtaB = (await findAssociatedTokenPda24({
|
|
13272
|
-
owner:
|
|
13346
|
+
owner: tunaPosition.address,
|
|
13273
13347
|
mint: mintB.address,
|
|
13274
13348
|
tokenProgram: mintB.programAddress
|
|
13275
13349
|
}))[0];
|
|
@@ -13326,9 +13400,12 @@ async function liquidateTunaSpotPositionOrcaInstruction(authority, positionMint,
|
|
|
13326
13400
|
vaultAAta,
|
|
13327
13401
|
vaultB: vaultB.address,
|
|
13328
13402
|
vaultBAta,
|
|
13329
|
-
tunaPosition:
|
|
13403
|
+
tunaPosition: tunaPosition.address,
|
|
13330
13404
|
tunaPositionAtaA,
|
|
13331
13405
|
tunaPositionAtaB,
|
|
13406
|
+
tunaPositionOwner: tunaPosition.data.authority,
|
|
13407
|
+
tunaPositionOwnerAtaA: tunaPosition.data.collateralToken == 0 /* A */ && mintA.address != NATIVE_MINT ? tunaPositionOwnerAtaA : void 0,
|
|
13408
|
+
tunaPositionOwnerAtaB: tunaPosition.data.collateralToken == 1 /* B */ && mintB.address != NATIVE_MINT ? tunaPositionOwnerAtaB : void 0,
|
|
13332
13409
|
feeRecipientAtaA,
|
|
13333
13410
|
feeRecipientAtaB,
|
|
13334
13411
|
whirlpool: whirlpool.address,
|
|
@@ -13508,7 +13585,7 @@ async function openAndIncreaseTunaLpPositionOrcaInstructions(rpc, authority, whi
|
|
|
13508
13585
|
(await getLendingVaultAddress(whirlpool.data.tokenMintA))[0],
|
|
13509
13586
|
(await getLendingVaultAddress(whirlpool.data.tokenMintB))[0]
|
|
13510
13587
|
]);
|
|
13511
|
-
const increaseAmounts =
|
|
13588
|
+
const increaseAmounts = getIncreaseLpPositionQuote({
|
|
13512
13589
|
collateralA: BigInt(args.collateralA),
|
|
13513
13590
|
collateralB: BigInt(args.collateralB),
|
|
13514
13591
|
borrowA: BigInt(args.borrowA),
|
|
@@ -13764,7 +13841,7 @@ async function openAndIncreaseTunaLpPositionFusionInstructions(rpc, authority, f
|
|
|
13764
13841
|
(await getLendingVaultAddress(fusionPool.data.tokenMintA))[0],
|
|
13765
13842
|
(await getLendingVaultAddress(fusionPool.data.tokenMintB))[0]
|
|
13766
13843
|
]);
|
|
13767
|
-
const increaseAmounts =
|
|
13844
|
+
const increaseAmounts = getIncreaseLpPositionQuote({
|
|
13768
13845
|
collateralA: BigInt(args.collateralA),
|
|
13769
13846
|
collateralB: BigInt(args.collateralB),
|
|
13770
13847
|
borrowA: BigInt(args.borrowA),
|
|
@@ -13973,8 +14050,7 @@ async function openAndIncreaseTunaLpPositionFusionInstruction(authority, positio
|
|
|
13973
14050
|
// src/txbuilder/openAndIncreaseTunaSpotPositionFusion.ts
|
|
13974
14051
|
import { fetchMaybeFusionPool as fetchMaybeFusionPool9, FUSIONAMM_PROGRAM_ADDRESS as FUSIONAMM_PROGRAM_ADDRESS13 } from "@crypticdot/fusionamm-client";
|
|
13975
14052
|
import {
|
|
13976
|
-
AccountRole as AccountRole20
|
|
13977
|
-
generateKeyPairSigner as generateKeyPairSigner3
|
|
14053
|
+
AccountRole as AccountRole20
|
|
13978
14054
|
} from "@solana/kit";
|
|
13979
14055
|
import { MEMO_PROGRAM_ADDRESS as MEMO_PROGRAM_ADDRESS20 } from "@solana-program/memo";
|
|
13980
14056
|
import {
|
|
@@ -13987,7 +14063,6 @@ async function openAndIncreaseTunaSpotPositionFusionInstructions(rpc, authority,
|
|
|
13987
14063
|
const instructions = [];
|
|
13988
14064
|
if (!createInstructions) createInstructions = instructions;
|
|
13989
14065
|
if (!cleanupInstructions) cleanupInstructions = instructions;
|
|
13990
|
-
const positionMint = await generateKeyPairSigner3();
|
|
13991
14066
|
const tunaConfig = await fetchTunaConfig(rpc, (await getTunaConfigAddress())[0]);
|
|
13992
14067
|
const fusionPool = await fetchMaybeFusionPool9(rpc, fusionPoolAddress);
|
|
13993
14068
|
if (!fusionPool.exists) throw new Error("FusionPool account not found");
|
|
@@ -14026,7 +14101,6 @@ async function openAndIncreaseTunaSpotPositionFusionInstructions(rpc, authority,
|
|
|
14026
14101
|
createInstructions.push(...createFeeRecipientAtaBInstructions.init);
|
|
14027
14102
|
const ix = await openAndIncreaseTunaSpotPositionFusionInstruction(
|
|
14028
14103
|
authority,
|
|
14029
|
-
positionMint,
|
|
14030
14104
|
tunaConfig,
|
|
14031
14105
|
mintA,
|
|
14032
14106
|
mintB,
|
|
@@ -14037,13 +14111,10 @@ async function openAndIncreaseTunaSpotPositionFusionInstructions(rpc, authority,
|
|
|
14037
14111
|
);
|
|
14038
14112
|
instructions.push(ix);
|
|
14039
14113
|
cleanupInstructions.push(...createUserAtaInstructions.cleanup);
|
|
14040
|
-
return
|
|
14041
|
-
instructions,
|
|
14042
|
-
positionMint: positionMint.address
|
|
14043
|
-
};
|
|
14114
|
+
return instructions;
|
|
14044
14115
|
}
|
|
14045
|
-
async function openAndIncreaseTunaSpotPositionFusionInstruction(authority,
|
|
14046
|
-
const tunaPositionAddress = (await getTunaSpotPositionAddress(
|
|
14116
|
+
async function openAndIncreaseTunaSpotPositionFusionInstruction(authority, tunaConfig, mintA, mintB, vaultA, vaultB, fusionPool, args) {
|
|
14117
|
+
const tunaPositionAddress = (await getTunaSpotPositionAddress(authority.address, fusionPool.address))[0];
|
|
14047
14118
|
const marketAddress = (await getMarketAddress(fusionPool.address))[0];
|
|
14048
14119
|
const tunaPositionOwnerAtaA = (await findAssociatedTokenPda29({
|
|
14049
14120
|
owner: authority.address,
|
|
@@ -14117,7 +14188,6 @@ async function openAndIncreaseTunaSpotPositionFusionInstruction(authority, posit
|
|
|
14117
14188
|
vaultB: vaultB.address,
|
|
14118
14189
|
vaultBAta,
|
|
14119
14190
|
tunaPosition: tunaPositionAddress,
|
|
14120
|
-
tunaPositionMint: positionMint,
|
|
14121
14191
|
tunaPositionAtaA,
|
|
14122
14192
|
tunaPositionAtaB,
|
|
14123
14193
|
tunaPositionOwnerAtaA: args.collateralToken == 0 /* A */ ? tunaPositionOwnerAtaA : void 0,
|
|
@@ -14142,8 +14212,7 @@ import {
|
|
|
14142
14212
|
WHIRLPOOL_PROGRAM_ADDRESS as WHIRLPOOL_PROGRAM_ADDRESS13
|
|
14143
14213
|
} from "@orca-so/whirlpools-client";
|
|
14144
14214
|
import {
|
|
14145
|
-
AccountRole as AccountRole21
|
|
14146
|
-
generateKeyPairSigner as generateKeyPairSigner4
|
|
14215
|
+
AccountRole as AccountRole21
|
|
14147
14216
|
} from "@solana/kit";
|
|
14148
14217
|
import { MEMO_PROGRAM_ADDRESS as MEMO_PROGRAM_ADDRESS21 } from "@solana-program/memo";
|
|
14149
14218
|
import {
|
|
@@ -14156,7 +14225,6 @@ async function openAndIncreaseTunaSpotPositionOrcaInstructions(rpc, authority, w
|
|
|
14156
14225
|
const instructions = [];
|
|
14157
14226
|
if (!createInstructions) createInstructions = instructions;
|
|
14158
14227
|
if (!cleanupInstructions) cleanupInstructions = instructions;
|
|
14159
|
-
const positionMint = await generateKeyPairSigner4();
|
|
14160
14228
|
const tunaConfig = await fetchTunaConfig(rpc, (await getTunaConfigAddress())[0]);
|
|
14161
14229
|
const whirlpool = await fetchMaybeWhirlpool9(rpc, whirlpoolAddress);
|
|
14162
14230
|
if (!whirlpool.exists) throw new Error("Whirlpool account not found");
|
|
@@ -14195,7 +14263,6 @@ async function openAndIncreaseTunaSpotPositionOrcaInstructions(rpc, authority, w
|
|
|
14195
14263
|
createInstructions.push(...createFeeRecipientAtaBInstructions.init);
|
|
14196
14264
|
const ix = await openAndIncreaseTunaSpotPositionOrcaInstruction(
|
|
14197
14265
|
authority,
|
|
14198
|
-
positionMint,
|
|
14199
14266
|
tunaConfig,
|
|
14200
14267
|
mintA,
|
|
14201
14268
|
mintB,
|
|
@@ -14206,13 +14273,10 @@ async function openAndIncreaseTunaSpotPositionOrcaInstructions(rpc, authority, w
|
|
|
14206
14273
|
);
|
|
14207
14274
|
instructions.push(ix);
|
|
14208
14275
|
cleanupInstructions.push(...createUserAtaInstructions.cleanup);
|
|
14209
|
-
return
|
|
14210
|
-
instructions,
|
|
14211
|
-
positionMint: positionMint.address
|
|
14212
|
-
};
|
|
14276
|
+
return instructions;
|
|
14213
14277
|
}
|
|
14214
|
-
async function openAndIncreaseTunaSpotPositionOrcaInstruction(authority,
|
|
14215
|
-
const tunaPositionAddress = (await getTunaSpotPositionAddress(
|
|
14278
|
+
async function openAndIncreaseTunaSpotPositionOrcaInstruction(authority, tunaConfig, mintA, mintB, vaultA, vaultB, whirlpool, args) {
|
|
14279
|
+
const tunaPositionAddress = (await getTunaSpotPositionAddress(authority.address, whirlpool.address))[0];
|
|
14216
14280
|
const marketAddress = (await getMarketAddress(whirlpool.address))[0];
|
|
14217
14281
|
const orcaOracleAddress = (await getOracleAddress9(whirlpool.address))[0];
|
|
14218
14282
|
const tunaPositionOwnerAtaA = (await findAssociatedTokenPda30({
|
|
@@ -14289,7 +14353,6 @@ async function openAndIncreaseTunaSpotPositionOrcaInstruction(authority, positio
|
|
|
14289
14353
|
vaultB: vaultB.address,
|
|
14290
14354
|
vaultBAta,
|
|
14291
14355
|
tunaPosition: tunaPositionAddress,
|
|
14292
|
-
tunaPositionMint: positionMint,
|
|
14293
14356
|
tunaPositionAtaA,
|
|
14294
14357
|
tunaPositionAtaB,
|
|
14295
14358
|
tunaPositionOwnerAtaA: args.collateralToken == 0 /* A */ ? tunaPositionOwnerAtaA : void 0,
|
|
@@ -14315,24 +14378,17 @@ import {
|
|
|
14315
14378
|
findAssociatedTokenPda as findAssociatedTokenPda31
|
|
14316
14379
|
} from "@solana-program/token-2022";
|
|
14317
14380
|
import assert24 from "assert";
|
|
14318
|
-
async function openTunaSpotPositionFusionInstructions(rpc, authority,
|
|
14381
|
+
async function openTunaSpotPositionFusionInstructions(rpc, authority, fusionPoolAddress, args) {
|
|
14319
14382
|
const fusionPool = await fetchMaybeFusionPool10(rpc, fusionPoolAddress);
|
|
14320
14383
|
if (!fusionPool.exists) throw new Error("FusionPool account not found");
|
|
14321
14384
|
const [mintA, mintB] = await fetchAllMaybeMint24(rpc, [fusionPool.data.tokenMintA, fusionPool.data.tokenMintB]);
|
|
14322
14385
|
assert24(mintA.exists, "Token A account not found");
|
|
14323
14386
|
assert24(mintB.exists, "Token B account not found");
|
|
14324
|
-
const ix = await openTunaSpotPositionFusionInstruction(
|
|
14325
|
-
authority,
|
|
14326
|
-
positionMint,
|
|
14327
|
-
mintA,
|
|
14328
|
-
mintB,
|
|
14329
|
-
fusionPoolAddress,
|
|
14330
|
-
args
|
|
14331
|
-
);
|
|
14387
|
+
const ix = await openTunaSpotPositionFusionInstruction(authority, mintA, mintB, fusionPoolAddress, args);
|
|
14332
14388
|
return [ix];
|
|
14333
14389
|
}
|
|
14334
|
-
async function openTunaSpotPositionFusionInstruction(authority,
|
|
14335
|
-
const tunaPositionAddress = (await getTunaSpotPositionAddress(
|
|
14390
|
+
async function openTunaSpotPositionFusionInstruction(authority, mintA, mintB, fusionPoolAddress, args) {
|
|
14391
|
+
const tunaPositionAddress = (await getTunaSpotPositionAddress(authority.address, fusionPoolAddress))[0];
|
|
14336
14392
|
const tunaPositionAtaA = (await findAssociatedTokenPda31({
|
|
14337
14393
|
owner: tunaPositionAddress,
|
|
14338
14394
|
mint: mintA.address,
|
|
@@ -14350,7 +14406,6 @@ async function openTunaSpotPositionFusionInstruction(authority, positionMint, mi
|
|
|
14350
14406
|
tokenProgramA: mintA.programAddress,
|
|
14351
14407
|
tokenProgramB: mintB.programAddress,
|
|
14352
14408
|
tunaPosition: tunaPositionAddress,
|
|
14353
|
-
tunaPositionMint: positionMint,
|
|
14354
14409
|
tunaPositionAtaA,
|
|
14355
14410
|
tunaPositionAtaB,
|
|
14356
14411
|
fusionPool: fusionPoolAddress,
|
|
@@ -14367,17 +14422,17 @@ import {
|
|
|
14367
14422
|
findAssociatedTokenPda as findAssociatedTokenPda32
|
|
14368
14423
|
} from "@solana-program/token-2022";
|
|
14369
14424
|
import assert25 from "assert";
|
|
14370
|
-
async function openTunaSpotPositionOrcaInstructions(rpc, authority,
|
|
14425
|
+
async function openTunaSpotPositionOrcaInstructions(rpc, authority, whirlpoolAddress, args) {
|
|
14371
14426
|
const whirlpool = await fetchMaybeWhirlpool10(rpc, whirlpoolAddress);
|
|
14372
14427
|
if (!whirlpool.exists) throw new Error("Whirlpool account not found");
|
|
14373
14428
|
const [mintA, mintB] = await fetchAllMaybeMint25(rpc, [whirlpool.data.tokenMintA, whirlpool.data.tokenMintB]);
|
|
14374
14429
|
assert25(mintA.exists, "Token A account not found");
|
|
14375
14430
|
assert25(mintB.exists, "Token B account not found");
|
|
14376
|
-
const ix = await openTunaSpotPositionOrcaInstruction(authority,
|
|
14431
|
+
const ix = await openTunaSpotPositionOrcaInstruction(authority, mintA, mintB, whirlpoolAddress, args);
|
|
14377
14432
|
return [ix];
|
|
14378
14433
|
}
|
|
14379
|
-
async function openTunaSpotPositionOrcaInstruction(authority,
|
|
14380
|
-
const tunaPositionAddress = (await getTunaSpotPositionAddress(
|
|
14434
|
+
async function openTunaSpotPositionOrcaInstruction(authority, mintA, mintB, whirlpoolAddress, args) {
|
|
14435
|
+
const tunaPositionAddress = (await getTunaSpotPositionAddress(authority.address, whirlpoolAddress))[0];
|
|
14381
14436
|
const tunaPositionAtaA = (await findAssociatedTokenPda32({
|
|
14382
14437
|
owner: tunaPositionAddress,
|
|
14383
14438
|
mint: mintA.address,
|
|
@@ -14395,7 +14450,6 @@ async function openTunaSpotPositionOrcaInstruction(authority, positionMint, mint
|
|
|
14395
14450
|
tokenProgramA: mintA.programAddress,
|
|
14396
14451
|
tokenProgramB: mintB.programAddress,
|
|
14397
14452
|
tunaPosition: tunaPositionAddress,
|
|
14398
|
-
tunaPositionMint: positionMint,
|
|
14399
14453
|
tunaPositionAtaA,
|
|
14400
14454
|
tunaPositionAtaB,
|
|
14401
14455
|
whirlpool: whirlpoolAddress,
|
|
@@ -14837,13 +14891,8 @@ async function setTunaLpPositionLimitOrdersInstruction(authority, args, position
|
|
|
14837
14891
|
}
|
|
14838
14892
|
|
|
14839
14893
|
// src/txbuilder/setTunaSpotPositionLimitOrders.ts
|
|
14840
|
-
async function setTunaSpotPositionLimitOrdersInstruction(authority,
|
|
14841
|
-
|
|
14842
|
-
if (positionMint === void 0) {
|
|
14843
|
-
throw new Error("At least one of 'positionMint' or 'tunaPositionAddress' must be provided.");
|
|
14844
|
-
}
|
|
14845
|
-
tunaPositionAddress = (await getTunaSpotPositionAddress(positionMint))[0];
|
|
14846
|
-
}
|
|
14894
|
+
async function setTunaSpotPositionLimitOrdersInstruction(authority, poolAddress, args) {
|
|
14895
|
+
const tunaPositionAddress = (await getTunaSpotPositionAddress(authority.address, poolAddress))[0];
|
|
14847
14896
|
return getSetTunaSpotPositionLimitOrdersInstruction({
|
|
14848
14897
|
...args,
|
|
14849
14898
|
authority,
|
|
@@ -14854,13 +14903,8 @@ async function setTunaSpotPositionLimitOrdersInstruction(authority, args, positi
|
|
|
14854
14903
|
// src/txbuilder/resetTunaSpotPosition.ts
|
|
14855
14904
|
import { fetchAllMaybeMint as fetchAllMaybeMint28, findAssociatedTokenPda as findAssociatedTokenPda36 } from "@solana-program/token-2022";
|
|
14856
14905
|
import assert28 from "assert";
|
|
14857
|
-
async function resetTunaSpotPositionInstruction(rpc, authority,
|
|
14858
|
-
|
|
14859
|
-
if (positionMint === void 0) {
|
|
14860
|
-
throw new Error("At least one of 'positionMint' or 'tunaPositionAddress' must be provided.");
|
|
14861
|
-
}
|
|
14862
|
-
tunaPositionAddress = (await getTunaSpotPositionAddress(positionMint))[0];
|
|
14863
|
-
}
|
|
14906
|
+
async function resetTunaSpotPositionInstruction(rpc, authority, poolAddress, args) {
|
|
14907
|
+
const tunaPositionAddress = (await getTunaSpotPositionAddress(authority.address, poolAddress))[0];
|
|
14864
14908
|
const tunaPosition = await fetchTunaSpotPosition(rpc, tunaPositionAddress);
|
|
14865
14909
|
const [mintA, mintB] = await fetchAllMaybeMint28(rpc, [tunaPosition.data.mintA, tunaPosition.data.mintB]);
|
|
14866
14910
|
assert28(mintA.exists, "Token A not found");
|
|
@@ -15561,7 +15605,6 @@ export {
|
|
|
15561
15605
|
DECREASE_TUNA_SPOT_POSITION_FUSION_DISCRIMINATOR,
|
|
15562
15606
|
DECREASE_TUNA_SPOT_POSITION_ORCA_DISCRIMINATOR,
|
|
15563
15607
|
DEFAULT_ADDRESS,
|
|
15564
|
-
DEFAULT_MAX_AMOUNT_SLIPPAGE,
|
|
15565
15608
|
DEFAULT_MAX_SWAP_SLIPPAGE,
|
|
15566
15609
|
DEFAULT_PUSH_ORACLE_PROGRAM_ID,
|
|
15567
15610
|
DEPOSIT_DISCRIMINATOR,
|
|
@@ -15861,6 +15904,7 @@ export {
|
|
|
15861
15904
|
getDepositInstructionDataCodec,
|
|
15862
15905
|
getDepositInstructionDataDecoder,
|
|
15863
15906
|
getDepositInstructionDataEncoder,
|
|
15907
|
+
getIncreaseLpPositionQuote,
|
|
15864
15908
|
getIncreaseTunaLpPositionFusionDiscriminatorBytes,
|
|
15865
15909
|
getIncreaseTunaLpPositionFusionInstruction,
|
|
15866
15910
|
getIncreaseTunaLpPositionFusionInstructionDataCodec,
|
|
@@ -15908,7 +15952,6 @@ export {
|
|
|
15908
15952
|
getLiquidateTunaSpotPositionOrcaInstructionDataCodec,
|
|
15909
15953
|
getLiquidateTunaSpotPositionOrcaInstructionDataDecoder,
|
|
15910
15954
|
getLiquidateTunaSpotPositionOrcaInstructionDataEncoder,
|
|
15911
|
-
getLiquidityIncreaseQuote,
|
|
15912
15955
|
getMarketAddress,
|
|
15913
15956
|
getMarketCodec,
|
|
15914
15957
|
getMarketDecoder,
|
|
@@ -16211,7 +16254,6 @@ export {
|
|
|
16211
16254
|
tunaSpotPositionAuthorityFilter,
|
|
16212
16255
|
tunaSpotPositionMintAFilter,
|
|
16213
16256
|
tunaSpotPositionMintBFilter,
|
|
16214
|
-
tunaSpotPositionMintFilter,
|
|
16215
16257
|
tunaSpotPositionPoolFilter,
|
|
16216
16258
|
updateMarketInstruction,
|
|
16217
16259
|
updateVaultInstruction,
|