@hawksightco/hawk-sdk 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/functions.d.ts.map +1 -1
- package/dist/src/functions.js +3 -1
- package/dist/src/hsToMeteora.js +160 -65
- package/dist/src/idl/iyf-extension-idl.d.ts +196 -0
- package/dist/src/idl/iyf-extension-idl.d.ts.map +1 -1
- package/dist/src/idl/iyf-extension-idl.js +196 -0
- package/dist/src/ixGenerator/IyfMainIxGenerator.d.ts.map +1 -1
- package/dist/src/ixGenerator/IyfMainIxGenerator.js +2 -1
- package/dist/src/meteora.d.ts.map +1 -1
- package/dist/src/meteora.js +49 -12
- package/dist/src/types.d.ts +1 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +6 -6
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/functions.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,gBAAgB,EAChB,yBAAyB,EACzB,6BAA6B,EAC7B,WAAW,EACX,mBAAmB,EACnB,SAAS,EAET,YAAY,EACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAc1D,OAAO,EAAE,MAAM,OAAO,CAAC;AAMvB,OAAO,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvE,eAAO,MAAM,eAAe,gCAAgC,CAAC;AAE7D;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CACpC,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,MAAM,EACb,I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,CAAC,CAAC,CAqB9I;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,GAAG,CAAC,mBAAmB,EAAE,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,CAenJ"}
|
package/dist/src/functions.js
CHANGED
|
@@ -472,7 +472,9 @@ function getMintsFromInstruction({ instructions, find, }) {
|
|
|
472
472
|
for (const id in find) {
|
|
473
473
|
// Check if the instruction data matches the sighash and the program ID matches
|
|
474
474
|
try {
|
|
475
|
-
|
|
475
|
+
const _sighash = sighash(id, undefined, find[id].manualSnakeCase);
|
|
476
|
+
console.log(`id: ${id}, ix.data: ${ix.data.subarray(0, 8).join(',')}, sighash(id): ${_sighash.join(',')}, ix.programId: ${ix.programId}, match: ${sighashMatch(ix.data, _sighash)}`);
|
|
477
|
+
if (sighashMatch(ix.data, _sighash) &&
|
|
476
478
|
ix.programId.toBase58() == find[id].programId) {
|
|
477
479
|
// Iterate through each mint index specified in the find record
|
|
478
480
|
for (const index of find[id].mintIndices) {
|
package/dist/src/hsToMeteora.js
CHANGED
|
@@ -164,7 +164,7 @@ class HawksightMeteoraCpi {
|
|
|
164
164
|
.next(new AddLiquidityByStrategy2(ix, userPda, authority))
|
|
165
165
|
.next(new RemoveLiquidity(ix, userPda, authority, util.sighash("RemoveLiquidity"), opt))
|
|
166
166
|
.next(new RemoveLiquidityByRange(ix, userPda, authority, opt))
|
|
167
|
-
.next(new RemoveLiquidity2(ix, userPda, authority, util.sighash("
|
|
167
|
+
.next(new RemoveLiquidity2(ix, userPda, authority, util.sighash("remove_liquidity2", undefined, true), opt))
|
|
168
168
|
.next(new RemoveLiquidityByRange2(ix, userPda, authority, opt))
|
|
169
169
|
.next(new ClaimFee(ix, userPda, authority, opt))
|
|
170
170
|
.next(new ClaimFee2(ix, userPda, authority, opt))
|
|
@@ -386,7 +386,7 @@ class AddLiquidityByStrategy2 extends AddLiquidityByStrategy {
|
|
|
386
386
|
* @param userPda The user's program-derived address (PDA) as a public key.
|
|
387
387
|
* @param authority The authority public key that has signing capabilities over the transaction.
|
|
388
388
|
*/
|
|
389
|
-
constructor(ix, userPda, authority, sighash = util.sighash("
|
|
389
|
+
constructor(ix, userPda, authority, sighash = util.sighash("add_liquidity_by_strategy2", undefined, true)) {
|
|
390
390
|
super(ix, userPda, authority, sighash);
|
|
391
391
|
}
|
|
392
392
|
replaceSender() {
|
|
@@ -491,7 +491,7 @@ class AddLiquidityOneSidePrecise2 extends HawksightMeteoraCpi {
|
|
|
491
491
|
* @param authority The authority public key that has signing capabilities over the transaction.
|
|
492
492
|
*/
|
|
493
493
|
constructor(ix, userPda, authority, opt) {
|
|
494
|
-
super(ix, userPda, authority, util.sighash("
|
|
494
|
+
super(ix, userPda, authority, util.sighash("add_liquidity_one_side_precise2", undefined, true), opt);
|
|
495
495
|
}
|
|
496
496
|
/**
|
|
497
497
|
* Alters the transaction keys for adding liquidity, ensuring the user's PDA is correctly configured.
|
|
@@ -619,7 +619,7 @@ class RemoveLiquidity2 extends RemoveLiquidity {
|
|
|
619
619
|
* @param userPda The user's program-derived address (PDA) as a public key.
|
|
620
620
|
* @param authority The authority public key that has signing capabilities over the transaction.
|
|
621
621
|
*/
|
|
622
|
-
constructor(ix, userPda, authority, sighash = util.sighash("
|
|
622
|
+
constructor(ix, userPda, authority, sighash = util.sighash("remove_liquidity2", undefined, true), opt) {
|
|
623
623
|
super(ix, userPda, authority, sighash, opt);
|
|
624
624
|
}
|
|
625
625
|
replaceSigner() {
|
|
@@ -654,7 +654,8 @@ class RemoveLiquidityByRange2 extends RemoveLiquidity2 {
|
|
|
654
654
|
* @param authority The authority public key that has signing capabilities over the transaction.
|
|
655
655
|
*/
|
|
656
656
|
constructor(ix, userPda, authority, opt) {
|
|
657
|
-
|
|
657
|
+
console.log('RemoveLiquidityByRange2 constructor...');
|
|
658
|
+
super(ix, userPda, authority, util.sighash("remove_liquidity_by_range2", undefined, true), opt);
|
|
658
659
|
}
|
|
659
660
|
}
|
|
660
661
|
/**
|
|
@@ -713,26 +714,13 @@ class ClaimFee extends HawksightMeteoraCpi {
|
|
|
713
714
|
throw new Error("Unexpected error: Mint A or B not found in cache.");
|
|
714
715
|
}
|
|
715
716
|
}
|
|
716
|
-
|
|
717
|
-
* Overrides default add hawksight cpi to use meteoraDlmmClaimFee instead of meteoraDynamicCpi
|
|
718
|
-
*/
|
|
719
|
-
addHawksightCpi() {
|
|
717
|
+
generateMeteoraDlmmClaimFeeIx(ownerFeeX, ownerFeeY) {
|
|
720
718
|
return __awaiter(this, void 0, void 0, function* () {
|
|
721
719
|
// Common parameters
|
|
722
720
|
const farm = addresses_1.USDC_FARM;
|
|
723
721
|
const userPda = this.userPda;
|
|
724
722
|
const authority = this.authority;
|
|
725
723
|
const iyfProgram = addresses_1.IYF_MAIN;
|
|
726
|
-
// Get token mints X and Y
|
|
727
|
-
const [tokenXMint, tokenYMint] = this.getMints();
|
|
728
|
-
const tokenXMintInfo = AccountCache_1.AccountCache.get(tokenXMint);
|
|
729
|
-
const tokenYMintInfo = AccountCache_1.AccountCache.get(tokenYMint);
|
|
730
|
-
if (!(!!tokenXMintInfo && !!tokenYMintInfo)) {
|
|
731
|
-
throw new Error("Unexpected error: Mint X or Y not found in cache.");
|
|
732
|
-
}
|
|
733
|
-
// Generate owner fee X and Y ATA
|
|
734
|
-
const ownerFeeX = util.generateAta(addresses_1.SITE_FEE_OWNER, tokenXMint, tokenXMintInfo.info.owner);
|
|
735
|
-
const ownerFeeY = util.generateAta(addresses_1.SITE_FEE_OWNER, tokenYMint, tokenYMintInfo.info.owner);
|
|
736
724
|
// Generate IX via extension contract
|
|
737
725
|
// @ts-ignore
|
|
738
726
|
const claimFeeIx = yield anchor_1.Anchor.instance().iyfExtension.methods
|
|
@@ -758,7 +746,6 @@ class ClaimFee extends HawksightMeteoraCpi {
|
|
|
758
746
|
ownerFeeX,
|
|
759
747
|
ownerFeeY,
|
|
760
748
|
}).instruction();
|
|
761
|
-
// Instruction via main hawksight contract
|
|
762
749
|
// @ts-ignore
|
|
763
750
|
const ix = yield anchor_1.Anchor.instance().iyfMain.methods
|
|
764
751
|
.iyfExtensionExecute(claimFeeIx.data)
|
|
@@ -787,6 +774,27 @@ class ClaimFee extends HawksightMeteoraCpi {
|
|
|
787
774
|
claimFeeIx.keys[18],
|
|
788
775
|
])
|
|
789
776
|
.instruction();
|
|
777
|
+
return ix;
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Overrides default add hawksight cpi to use meteoraDlmmClaimFee instead of meteoraDynamicCpi
|
|
782
|
+
*/
|
|
783
|
+
addHawksightCpi() {
|
|
784
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
785
|
+
// Get token mints X and Y
|
|
786
|
+
const [tokenXMint, tokenYMint] = this.getMints();
|
|
787
|
+
const tokenXMintInfo = AccountCache_1.AccountCache.get(tokenXMint);
|
|
788
|
+
const tokenYMintInfo = AccountCache_1.AccountCache.get(tokenYMint);
|
|
789
|
+
if (!(!!tokenXMintInfo && !!tokenYMintInfo)) {
|
|
790
|
+
throw new Error("Unexpected error: Mint X or Y not found in cache.");
|
|
791
|
+
}
|
|
792
|
+
// Generate owner fee X and Y ATA
|
|
793
|
+
const ownerFeeX = util.generateAta(addresses_1.SITE_FEE_OWNER, tokenXMint, tokenXMintInfo.info.owner);
|
|
794
|
+
const ownerFeeY = util.generateAta(addresses_1.SITE_FEE_OWNER, tokenYMint, tokenYMintInfo.info.owner);
|
|
795
|
+
// Generate claim fee instruction
|
|
796
|
+
// @ts-ignore
|
|
797
|
+
const ix = yield this.generateMeteoraDlmmClaimFeeIx(ownerFeeX, ownerFeeY);
|
|
790
798
|
// Override the instruction
|
|
791
799
|
this.ix.programId = ix.programId;
|
|
792
800
|
this.ix.data = ix.data;
|
|
@@ -808,7 +816,8 @@ class ClaimFee2 extends ClaimFee {
|
|
|
808
816
|
* @param userPda The user's program-derived address (PDA) as a public key.
|
|
809
817
|
* @param authority The authority public key that has signing capabilities over the transaction.
|
|
810
818
|
*/
|
|
811
|
-
constructor(ix, userPda, authority, opt, sighash = util.sighash("
|
|
819
|
+
constructor(ix, userPda, authority, opt, sighash = util.sighash("claim_fee2", undefined, true)) {
|
|
820
|
+
console.log('ClaimFee2 constructor...');
|
|
812
821
|
super(ix, userPda, authority, opt, sighash);
|
|
813
822
|
}
|
|
814
823
|
getMints() {
|
|
@@ -825,6 +834,52 @@ class ClaimFee2 extends ClaimFee {
|
|
|
825
834
|
this.ix.keys[5].pubkey = tokenA;
|
|
826
835
|
this.ix.keys[6].pubkey = tokenB;
|
|
827
836
|
}
|
|
837
|
+
generateMeteoraDlmmClaimFeeIx(ownerFeeX, ownerFeeY) {
|
|
838
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
839
|
+
// Common parameters
|
|
840
|
+
const userPda = this.userPda;
|
|
841
|
+
const authority = this.authority;
|
|
842
|
+
const minBinId = this.ix.data.readInt32LE(8);
|
|
843
|
+
const maxBinId = this.ix.data.readInt32LE(12);
|
|
844
|
+
const remainingAccountsInfo = this.ix.data.subarray(16);
|
|
845
|
+
// Generate IX via extension contract
|
|
846
|
+
// @ts-ignore
|
|
847
|
+
const claimFeeIx = yield anchor_1.Anchor.instance().iyfExtension.methods
|
|
848
|
+
.meteoraDlmmClaimFee2(minBinId, maxBinId, remainingAccountsInfo)
|
|
849
|
+
.accounts({
|
|
850
|
+
userPda,
|
|
851
|
+
authority,
|
|
852
|
+
meteoraDlmmProgram: this.ix.keys[13].pubkey,
|
|
853
|
+
lbPair: this.ix.keys[0].pubkey,
|
|
854
|
+
position: this.ix.keys[1].pubkey,
|
|
855
|
+
reserveX: this.ix.keys[3].pubkey,
|
|
856
|
+
reserveY: this.ix.keys[4].pubkey,
|
|
857
|
+
userTokenX: this.ix.keys[5].pubkey,
|
|
858
|
+
userTokenY: this.ix.keys[6].pubkey,
|
|
859
|
+
tokenXMint: this.ix.keys[7].pubkey,
|
|
860
|
+
tokenYMint: this.ix.keys[8].pubkey,
|
|
861
|
+
tokenProgramX: this.ix.keys[9].pubkey,
|
|
862
|
+
tokenProgramY: this.ix.keys[10].pubkey,
|
|
863
|
+
memoProgram: this.ix.keys[11].pubkey,
|
|
864
|
+
eventAuthority: this.ix.keys[12].pubkey,
|
|
865
|
+
ownerFeeX,
|
|
866
|
+
ownerFeeY,
|
|
867
|
+
}).remainingAccounts(this.ix.keys.slice(14)).instruction();
|
|
868
|
+
const sighash = util.sighash("meteora_dlmm_claim_fee_2");
|
|
869
|
+
claimFeeIx.data.set(sighash, 0);
|
|
870
|
+
// @ts-ignore
|
|
871
|
+
const ix = yield anchor_1.Anchor.instance().iyfMain.methods
|
|
872
|
+
.iyfExtensionExecuteV2(claimFeeIx.data)
|
|
873
|
+
.accounts({
|
|
874
|
+
userPda,
|
|
875
|
+
authority,
|
|
876
|
+
iyfExtensionProgram: addresses_1.IYF_EXTENSION,
|
|
877
|
+
})
|
|
878
|
+
.remainingAccounts(claimFeeIx.keys.slice(2))
|
|
879
|
+
.instruction();
|
|
880
|
+
return ix;
|
|
881
|
+
});
|
|
882
|
+
}
|
|
828
883
|
}
|
|
829
884
|
/**
|
|
830
885
|
* Manages the claiming of rewards in blockchain operations, typically associated with staking or similar activities.
|
|
@@ -876,72 +931,64 @@ class ClaimReward extends HawksightMeteoraCpi {
|
|
|
876
931
|
throw new Error("Unexpected error: Mint not found in cache.");
|
|
877
932
|
}
|
|
878
933
|
}
|
|
879
|
-
|
|
880
|
-
* Overrides default add hawksight cpi to use meteoraDlmmClaimReward instead of meteoraDynamicCpi
|
|
881
|
-
*/
|
|
882
|
-
addHawksightCpi() {
|
|
934
|
+
generateMeteoraDlmmClaimRewardIx(ownerFee) {
|
|
883
935
|
return __awaiter(this, void 0, void 0, function* () {
|
|
884
936
|
// Common parameters
|
|
885
|
-
const farm = addresses_1.USDC_FARM;
|
|
886
937
|
const userPda = this.userPda;
|
|
887
938
|
const authority = this.authority;
|
|
888
|
-
const iyfProgram = addresses_1.IYF_MAIN;
|
|
889
|
-
// Get token mint
|
|
890
|
-
const rewardMint = this.getMint();
|
|
891
|
-
const mintInfo = AccountCache_1.AccountCache.get(rewardMint);
|
|
892
|
-
if (!mintInfo) {
|
|
893
|
-
throw new Error("Unexpected error: Reward mint not found in cache.");
|
|
894
|
-
}
|
|
895
|
-
// Generate owner fee X and Y ATA
|
|
896
|
-
const ownerFee = util.generateAta(addresses_1.SITE_FEE_OWNER, rewardMint, mintInfo.info.owner);
|
|
897
939
|
// Get reward index from parameter
|
|
898
940
|
const rewardIndex = new bn_js_1.default(this.ix.data.readBigInt64LE(8).toString());
|
|
899
941
|
// Generate IX via extension contract
|
|
900
942
|
// @ts-ignore
|
|
901
943
|
const claimReward = yield anchor_1.Anchor.instance().iyfExtension.methods
|
|
902
|
-
.
|
|
944
|
+
.meteoraDlmmClaimReward2(rewardIndex)
|
|
903
945
|
.accounts({
|
|
904
|
-
farm,
|
|
905
946
|
userPda,
|
|
906
947
|
authority,
|
|
907
|
-
|
|
948
|
+
meteoraDlmmProgram: this.ix.keys[10].pubkey,
|
|
908
949
|
lbPair: this.ix.keys[0].pubkey,
|
|
909
950
|
position: this.ix.keys[1].pubkey,
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
meteoraDlmmProgram: this.ix.keys[10].pubkey,
|
|
951
|
+
rewardVault: this.ix.keys[3].pubkey,
|
|
952
|
+
rewardMint: this.ix.keys[4].pubkey,
|
|
953
|
+
userTokenAccount: this.ix.keys[5].pubkey,
|
|
954
|
+
tokenProgram: this.ix.keys[6].pubkey,
|
|
955
|
+
memoProgram: this.ix.keys[7].pubkey,
|
|
956
|
+
eventAuthority: this.ix.keys[8].pubkey,
|
|
957
|
+
program: this.ix.keys[9].pubkey,
|
|
918
958
|
ownerFee,
|
|
919
|
-
})
|
|
959
|
+
})
|
|
960
|
+
.remainingAccounts(this.ix.keys.slice(11))
|
|
961
|
+
.instruction();
|
|
920
962
|
// Instruction via main hawksight contract
|
|
921
963
|
// @ts-ignore
|
|
922
964
|
const ix = yield anchor_1.Anchor.instance().iyfMain.methods
|
|
923
|
-
.
|
|
965
|
+
.iyfExtensionExecuteV2(claimReward.data)
|
|
924
966
|
.accounts({
|
|
925
|
-
farm,
|
|
926
967
|
userPda,
|
|
927
968
|
authority,
|
|
928
|
-
iyfProgram,
|
|
929
969
|
iyfExtensionProgram: addresses_1.IYF_EXTENSION,
|
|
930
970
|
})
|
|
931
|
-
.remainingAccounts(
|
|
932
|
-
claimReward.keys[4],
|
|
933
|
-
claimReward.keys[5],
|
|
934
|
-
claimReward.keys[6],
|
|
935
|
-
claimReward.keys[7],
|
|
936
|
-
claimReward.keys[8],
|
|
937
|
-
claimReward.keys[9],
|
|
938
|
-
claimReward.keys[10],
|
|
939
|
-
claimReward.keys[11],
|
|
940
|
-
claimReward.keys[12],
|
|
941
|
-
claimReward.keys[13],
|
|
942
|
-
claimReward.keys[14],
|
|
943
|
-
])
|
|
971
|
+
.remainingAccounts(claimReward.keys.slice(2))
|
|
944
972
|
.instruction();
|
|
973
|
+
return ix;
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
/**
|
|
977
|
+
* Overrides default add hawksight cpi to use meteoraDlmmClaimReward instead of meteoraDynamicCpi
|
|
978
|
+
*/
|
|
979
|
+
addHawksightCpi() {
|
|
980
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
981
|
+
// Get token mint
|
|
982
|
+
const rewardMint = this.getMint();
|
|
983
|
+
const mintInfo = AccountCache_1.AccountCache.get(rewardMint);
|
|
984
|
+
if (!mintInfo) {
|
|
985
|
+
throw new Error("Unexpected error: Reward mint not found in cache.");
|
|
986
|
+
}
|
|
987
|
+
// Generate owner fee X and Y ATA
|
|
988
|
+
const ownerFee = util.generateAta(addresses_1.SITE_FEE_OWNER, rewardMint, mintInfo.info.owner);
|
|
989
|
+
// Create claim reward instruction
|
|
990
|
+
// @ts-ignore
|
|
991
|
+
const ix = yield this.generateMeteoraDlmmClaimRewardIx(ownerFee);
|
|
945
992
|
// Override the instruction
|
|
946
993
|
this.ix.programId = ix.programId;
|
|
947
994
|
this.ix.data = ix.data;
|
|
@@ -960,7 +1007,7 @@ class ClaimReward2 extends ClaimReward {
|
|
|
960
1007
|
* @param userPda The user's program-derived address (PDA) as a public key.
|
|
961
1008
|
* @param authority The authority public key that has signing capabilities over the transaction.
|
|
962
1009
|
*/
|
|
963
|
-
constructor(ix, userPda, authority, opt, sighash = util.sighash("
|
|
1010
|
+
constructor(ix, userPda, authority, opt, sighash = util.sighash("claim_reward2", undefined, true)) {
|
|
964
1011
|
super(ix, userPda, authority, opt, sighash);
|
|
965
1012
|
}
|
|
966
1013
|
getMint() {
|
|
@@ -973,6 +1020,53 @@ class ClaimReward2 extends ClaimReward {
|
|
|
973
1020
|
replaceTokenInputs(token) {
|
|
974
1021
|
this.ix.keys[6].pubkey = token;
|
|
975
1022
|
}
|
|
1023
|
+
generateMeteoraDlmmClaimRewardIx(ownerFee) {
|
|
1024
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1025
|
+
// Common parameters
|
|
1026
|
+
const userPda = this.userPda;
|
|
1027
|
+
const authority = this.authority;
|
|
1028
|
+
// New meteora parameters
|
|
1029
|
+
const minBinId = this.ix.data.readInt32LE(12);
|
|
1030
|
+
const maxBinId = this.ix.data.readInt32LE(16);
|
|
1031
|
+
const remainingAccountsInfo = this.ix.data.subarray(24);
|
|
1032
|
+
// Get reward index from parameter
|
|
1033
|
+
const rewardIndex = Number(this.ix.data.readBigInt64LE(8).toString());
|
|
1034
|
+
// Generate IX via extension contract
|
|
1035
|
+
// @ts-ignore
|
|
1036
|
+
const claimReward = yield anchor_1.Anchor.instance().iyfExtension.methods
|
|
1037
|
+
.meteoraDlmmClaimReward2(rewardIndex, minBinId, maxBinId, remainingAccountsInfo)
|
|
1038
|
+
.accounts({
|
|
1039
|
+
userPda,
|
|
1040
|
+
authority,
|
|
1041
|
+
lbPair: this.ix.keys[0].pubkey,
|
|
1042
|
+
position: this.ix.keys[1].pubkey,
|
|
1043
|
+
rewardVault: this.ix.keys[3].pubkey,
|
|
1044
|
+
rewardMint: this.ix.keys[4].pubkey,
|
|
1045
|
+
userTokenAccount: this.ix.keys[5].pubkey,
|
|
1046
|
+
tokenProgram: this.ix.keys[6].pubkey,
|
|
1047
|
+
memoProgram: this.ix.keys[7].pubkey,
|
|
1048
|
+
eventAuthority: this.ix.keys[8].pubkey,
|
|
1049
|
+
meteoraDlmmProgram: this.ix.keys[9].pubkey,
|
|
1050
|
+
ownerFee,
|
|
1051
|
+
})
|
|
1052
|
+
.remainingAccounts(this.ix.keys.slice(10))
|
|
1053
|
+
.instruction();
|
|
1054
|
+
const sighash = util.sighash("meteora_dlmm_claim_reward_2");
|
|
1055
|
+
claimReward.data.set(sighash, 0);
|
|
1056
|
+
// Instruction via main hawksight contract
|
|
1057
|
+
// @ts-ignore
|
|
1058
|
+
const ix = yield anchor_1.Anchor.instance().iyfMain.methods
|
|
1059
|
+
.iyfExtensionExecuteV2(claimReward.data)
|
|
1060
|
+
.accounts({
|
|
1061
|
+
userPda,
|
|
1062
|
+
authority,
|
|
1063
|
+
iyfExtensionProgram: addresses_1.IYF_EXTENSION,
|
|
1064
|
+
})
|
|
1065
|
+
.remainingAccounts(claimReward.keys.slice(2))
|
|
1066
|
+
.instruction();
|
|
1067
|
+
return ix;
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
976
1070
|
}
|
|
977
1071
|
/**
|
|
978
1072
|
* Handles the closure of a position within a blockchain transaction.
|
|
@@ -1014,7 +1108,7 @@ class ClosePosition2 extends ClosePosition {
|
|
|
1014
1108
|
* @param userPda The user's program-derived address (PDA) as a public key.
|
|
1015
1109
|
* @param authority The authority public key that has signing capabilities over the transaction.
|
|
1016
1110
|
*/
|
|
1017
|
-
constructor(ix, userPda, authority, opt, sighash = util.sighash("
|
|
1111
|
+
constructor(ix, userPda, authority, opt, sighash = util.sighash("close_position2", undefined, true)) {
|
|
1018
1112
|
super(ix, userPda, authority, opt, sighash);
|
|
1019
1113
|
}
|
|
1020
1114
|
replaceSigner() {
|
|
@@ -1902,6 +1996,7 @@ class ClaimRewardAutomation extends HawksightMeteoraAutomationCpi {
|
|
|
1902
1996
|
ownerFee,
|
|
1903
1997
|
}).instruction();
|
|
1904
1998
|
// Instruction via main hawksight contract
|
|
1999
|
+
// @ts-ignore
|
|
1905
2000
|
const ix = yield anchor_1.Anchor.instance().iyfMain.methods
|
|
1906
2001
|
.iyfExtensionExecute(claimRewardIx.data)
|
|
1907
2002
|
.accounts({
|
|
@@ -2144,6 +2144,111 @@ export type IyfExtension = {
|
|
|
2144
2144
|
];
|
|
2145
2145
|
"args": [];
|
|
2146
2146
|
},
|
|
2147
|
+
{
|
|
2148
|
+
"name": "meteoraDlmmClaimFee2";
|
|
2149
|
+
"docs": [
|
|
2150
|
+
"Meteora DLMM Claim Fee v2 IX"
|
|
2151
|
+
];
|
|
2152
|
+
"discriminator": [
|
|
2153
|
+
97,
|
|
2154
|
+
148,
|
|
2155
|
+
61,
|
|
2156
|
+
148,
|
|
2157
|
+
137,
|
|
2158
|
+
137,
|
|
2159
|
+
200,
|
|
2160
|
+
71
|
|
2161
|
+
];
|
|
2162
|
+
"accounts": [
|
|
2163
|
+
{
|
|
2164
|
+
"name": "userPda";
|
|
2165
|
+
"docs": [
|
|
2166
|
+
"Hawksight user pda"
|
|
2167
|
+
];
|
|
2168
|
+
},
|
|
2169
|
+
{
|
|
2170
|
+
"name": "authority";
|
|
2171
|
+
"docs": [
|
|
2172
|
+
"User wallet"
|
|
2173
|
+
];
|
|
2174
|
+
"signer": true;
|
|
2175
|
+
"relations": [
|
|
2176
|
+
"userPda"
|
|
2177
|
+
];
|
|
2178
|
+
},
|
|
2179
|
+
{
|
|
2180
|
+
"name": "meteoraDlmmProgram";
|
|
2181
|
+
"docs": [
|
|
2182
|
+
"Meteora DLMM program to invoke"
|
|
2183
|
+
];
|
|
2184
|
+
"address": "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo";
|
|
2185
|
+
},
|
|
2186
|
+
{
|
|
2187
|
+
"name": "lbPair";
|
|
2188
|
+
"writable": true;
|
|
2189
|
+
},
|
|
2190
|
+
{
|
|
2191
|
+
"name": "position";
|
|
2192
|
+
"writable": true;
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
"name": "reserveX";
|
|
2196
|
+
"writable": true;
|
|
2197
|
+
},
|
|
2198
|
+
{
|
|
2199
|
+
"name": "reserveY";
|
|
2200
|
+
"writable": true;
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
"name": "userTokenX";
|
|
2204
|
+
"writable": true;
|
|
2205
|
+
},
|
|
2206
|
+
{
|
|
2207
|
+
"name": "userTokenY";
|
|
2208
|
+
"writable": true;
|
|
2209
|
+
},
|
|
2210
|
+
{
|
|
2211
|
+
"name": "tokenXMint";
|
|
2212
|
+
},
|
|
2213
|
+
{
|
|
2214
|
+
"name": "tokenYMint";
|
|
2215
|
+
},
|
|
2216
|
+
{
|
|
2217
|
+
"name": "tokenProgramX";
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
"name": "tokenProgramY";
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
"name": "memoProgram";
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
"name": "eventAuthority";
|
|
2227
|
+
},
|
|
2228
|
+
{
|
|
2229
|
+
"name": "ownerFeeX";
|
|
2230
|
+
"writable": true;
|
|
2231
|
+
},
|
|
2232
|
+
{
|
|
2233
|
+
"name": "ownerFeeY";
|
|
2234
|
+
"writable": true;
|
|
2235
|
+
}
|
|
2236
|
+
];
|
|
2237
|
+
"args": [
|
|
2238
|
+
{
|
|
2239
|
+
"name": "minBinId";
|
|
2240
|
+
"type": "i32";
|
|
2241
|
+
},
|
|
2242
|
+
{
|
|
2243
|
+
"name": "maxBinId";
|
|
2244
|
+
"type": "i32";
|
|
2245
|
+
},
|
|
2246
|
+
{
|
|
2247
|
+
"name": "remainingAccountsInfo";
|
|
2248
|
+
"type": "bytes";
|
|
2249
|
+
}
|
|
2250
|
+
];
|
|
2251
|
+
},
|
|
2147
2252
|
{
|
|
2148
2253
|
"name": "meteoraDlmmClaimFeeAutomation";
|
|
2149
2254
|
"docs": [
|
|
@@ -2412,6 +2517,97 @@ export type IyfExtension = {
|
|
|
2412
2517
|
}
|
|
2413
2518
|
];
|
|
2414
2519
|
},
|
|
2520
|
+
{
|
|
2521
|
+
"name": "meteoraDlmmClaimReward2";
|
|
2522
|
+
"docs": [
|
|
2523
|
+
"Meteora DLMM Claim Reward v2 IX"
|
|
2524
|
+
];
|
|
2525
|
+
"discriminator": [
|
|
2526
|
+
98,
|
|
2527
|
+
140,
|
|
2528
|
+
64,
|
|
2529
|
+
62,
|
|
2530
|
+
152,
|
|
2531
|
+
138,
|
|
2532
|
+
217,
|
|
2533
|
+
189
|
|
2534
|
+
];
|
|
2535
|
+
"accounts": [
|
|
2536
|
+
{
|
|
2537
|
+
"name": "userPda";
|
|
2538
|
+
"docs": [
|
|
2539
|
+
"Hawksight user pda"
|
|
2540
|
+
];
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
"name": "authority";
|
|
2544
|
+
"docs": [
|
|
2545
|
+
"User wallet"
|
|
2546
|
+
];
|
|
2547
|
+
"signer": true;
|
|
2548
|
+
"relations": [
|
|
2549
|
+
"userPda"
|
|
2550
|
+
];
|
|
2551
|
+
},
|
|
2552
|
+
{
|
|
2553
|
+
"name": "meteoraDlmmProgram";
|
|
2554
|
+
"docs": [
|
|
2555
|
+
"Meteora DLMM program to invoke"
|
|
2556
|
+
];
|
|
2557
|
+
"address": "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo";
|
|
2558
|
+
},
|
|
2559
|
+
{
|
|
2560
|
+
"name": "lbPair";
|
|
2561
|
+
"writable": true;
|
|
2562
|
+
},
|
|
2563
|
+
{
|
|
2564
|
+
"name": "position";
|
|
2565
|
+
"writable": true;
|
|
2566
|
+
},
|
|
2567
|
+
{
|
|
2568
|
+
"name": "rewardVault";
|
|
2569
|
+
"writable": true;
|
|
2570
|
+
},
|
|
2571
|
+
{
|
|
2572
|
+
"name": "rewardMint";
|
|
2573
|
+
},
|
|
2574
|
+
{
|
|
2575
|
+
"name": "userTokenAccount";
|
|
2576
|
+
"writable": true;
|
|
2577
|
+
},
|
|
2578
|
+
{
|
|
2579
|
+
"name": "tokenProgram";
|
|
2580
|
+
},
|
|
2581
|
+
{
|
|
2582
|
+
"name": "memoProgram";
|
|
2583
|
+
},
|
|
2584
|
+
{
|
|
2585
|
+
"name": "eventAuthority";
|
|
2586
|
+
},
|
|
2587
|
+
{
|
|
2588
|
+
"name": "ownerFee";
|
|
2589
|
+
"writable": true;
|
|
2590
|
+
}
|
|
2591
|
+
];
|
|
2592
|
+
"args": [
|
|
2593
|
+
{
|
|
2594
|
+
"name": "rewardIndex";
|
|
2595
|
+
"type": "u8";
|
|
2596
|
+
},
|
|
2597
|
+
{
|
|
2598
|
+
"name": "minBinId";
|
|
2599
|
+
"type": "i32";
|
|
2600
|
+
},
|
|
2601
|
+
{
|
|
2602
|
+
"name": "maxBinId";
|
|
2603
|
+
"type": "i32";
|
|
2604
|
+
},
|
|
2605
|
+
{
|
|
2606
|
+
"name": "remainingAccountsInfo";
|
|
2607
|
+
"type": "bytes";
|
|
2608
|
+
}
|
|
2609
|
+
];
|
|
2610
|
+
},
|
|
2415
2611
|
{
|
|
2416
2612
|
"name": "meteoraDlmmClaimRewardAutomation";
|
|
2417
2613
|
"docs": [
|