@@ -114,6 +114,7 @@ import {
114
114
voltrGetPositionValues ,
115
115
voltrDepositStrategy ,
116
116
voltrWithdrawStrategy ,
117
+ createMeteoraDlmmLpPosition ,
117
118
} from "../tools" ;
118
119
import {
119
120
Config ,
@@ -450,6 +451,13 @@ export class SolanaAgentKit {
450
451
) ;
451
452
}
452
453
454
+ async createMeteoraDlmmLpPosition (
455
+ pool : PublicKey ,
456
+ totalXAmount : BN ,
457
+ ) : Promise < string > {
458
+ return createMeteoraDlmmLpPosition ( this , pool , totalXAmount ) ;
459
+ }
460
+
453
461
async orcaClosePosition ( positionMintAddress : PublicKey ) {
454
462
return orcaClosePosition ( this , positionMintAddress ) ;
455
463
}
@@ -654,6 +662,7 @@ export class SolanaAgentKit {
654
662
) {
655
663
return rock_paper_scissor ( this , amount , choice ) ;
656
664
}
665
+
657
666
async createTiplink ( amount : number , splmintAddress ?: PublicKey ) {
658
667
return create_TipLink ( this , amount , splmintAddress ) ;
659
668
}
@@ -698,9 +707,11 @@ export class SolanaAgentKit {
698
707
async flashCloseTrade ( params : FlashCloseTradeParams ) : Promise < string > {
699
708
return flashCloseTrade ( this , params ) ;
700
709
}
710
+
701
711
async heliusParseTransactions ( transactionId : string ) : Promise < any > {
702
712
return parseTransaction ( this , transactionId ) ;
703
713
}
714
+
704
715
async getAllAssetsbyOwner ( owner : PublicKey , limit : number ) : Promise < any > {
705
716
return getAssetsByOwner ( this , owner , limit ) ;
706
717
}
@@ -746,6 +757,7 @@ export class SolanaAgentKit {
746
757
) ;
747
758
return `Transaction: ${ tx } ` ;
748
759
}
760
+
749
761
async sendTranctionWithPriority (
750
762
priorityLevel : string ,
751
763
amount : number ,
@@ -805,15 +817,18 @@ export class SolanaAgentKit {
805
817
) : Promise < string > {
806
818
return multisig_execute_proposal ( this , transactionIndex ) ;
807
819
}
820
+
808
821
async CreateWebhook (
809
822
accountAddresses : string [ ] ,
810
823
webhookURL : string ,
811
824
) : Promise < HeliusWebhookResponse > {
812
825
return create_HeliusWebhook ( this , accountAddresses , webhookURL ) ;
813
826
}
827
+
814
828
async getWebhook ( id : string ) : Promise < HeliusWebhookIdResponse > {
815
829
return getHeliusWebhook ( this , id ) ;
816
830
}
831
+
817
832
async deleteWebhook ( webhookID : string ) : Promise < any > {
818
833
return deleteHeliusWebhook ( this , webhookID ) ;
819
834
}
@@ -839,25 +854,31 @@ export class SolanaAgentKit {
839
854
async depositIntoDriftVault ( amount : number , vault : string ) {
840
855
return await depositIntoVault ( this , amount , vault ) ;
841
856
}
857
+
842
858
async depositToDriftUserAccount (
843
859
amount : number ,
844
860
symbol : string ,
845
861
isRepayment ?: boolean ,
846
862
) {
847
863
return await depositToDriftUserAccount ( this , amount , symbol , isRepayment ) ;
848
864
}
865
+
849
866
async deriveDriftVaultAddress ( name : string ) {
850
867
return await getVaultAddress ( this , name ) ;
851
868
}
869
+
852
870
async doesUserHaveDriftAccount ( ) {
853
871
return await doesUserHaveDriftAccount ( this ) ;
854
872
}
873
+
855
874
async driftUserAccountInfo ( ) {
856
875
return await driftUserAccountInfo ( this ) ;
857
876
}
877
+
858
878
async requestWithdrawalFromDriftVault ( amount : number , vault : string ) {
859
879
return await requestWithdrawalFromVault ( this , amount , vault ) ;
860
880
}
881
+
861
882
async tradeUsingDelegatedDriftVault (
862
883
vault : string ,
863
884
amount : number ,
@@ -876,6 +897,7 @@ export class SolanaAgentKit {
876
897
price ,
877
898
) ;
878
899
}
900
+
879
901
async tradeUsingDriftPerpAccount (
880
902
amount : number ,
881
903
symbol : string ,
@@ -885,6 +907,7 @@ export class SolanaAgentKit {
885
907
) {
886
908
return await driftPerpTrade ( this , { action, amount, symbol, type, price } ) ;
887
909
}
910
+
888
911
async updateDriftVault (
889
912
vaultAddress : string ,
890
913
params : {
@@ -901,19 +924,23 @@ export class SolanaAgentKit {
901
924
) {
902
925
return await updateVault ( this , vaultAddress , params ) ;
903
926
}
927
+
904
928
async getDriftVaultInfo ( vaultName : string ) {
905
929
return await getVaultInfo ( this , vaultName ) ;
906
930
}
931
+
907
932
async withdrawFromDriftAccount (
908
933
amount : number ,
909
934
symbol : string ,
910
935
isBorrow ?: boolean ,
911
936
) {
912
937
return await withdrawFromDriftUserAccount ( this , amount , symbol , isBorrow ) ;
913
938
}
939
+
914
940
async withdrawFromDriftVault ( vault : string ) {
915
941
return await withdrawFromDriftVault ( this , vault ) ;
916
942
}
943
+
917
944
async updateDriftVaultDelegate ( vaultAddress : string , delegate : string ) {
918
945
return await updateVaultDelegate ( this , vaultAddress , delegate ) ;
919
946
}
@@ -931,15 +958,19 @@ export class SolanaAgentKit {
931
958
} ;
932
959
}
933
960
}
961
+
934
962
async stakeToDriftInsuranceFund ( amount : number , symbol : string ) {
935
963
return await stakeToDriftInsuranceFund ( this , amount , symbol ) ;
936
964
}
965
+
937
966
async requestUnstakeFromDriftInsuranceFund ( amount : number , symbol : string ) {
938
967
return await requestUnstakeFromDriftInsuranceFund ( this , amount , symbol ) ;
939
968
}
969
+
940
970
async unstakeFromDriftInsuranceFund ( symbol : string ) {
941
971
return await unstakeFromDriftInsuranceFund ( this , symbol ) ;
942
972
}
973
+
943
974
async driftSpotTokenSwap (
944
975
params : {
945
976
fromSymbol : string ;
@@ -962,19 +993,22 @@ export class SolanaAgentKit {
962
993
slippage : params . slippage ,
963
994
} ) ;
964
995
}
996
+
965
997
async getPerpMarketFundingRate (
966
998
symbol : `${string } -PERP`,
967
999
period : "year" | "hour" = "year" ,
968
1000
) {
969
1001
return calculatePerpMarketFundingRate ( this , symbol , period ) ;
970
1002
}
1003
+
971
1004
async getEntryQuoteOfPerpTrade (
972
1005
amount : number ,
973
1006
symbol : `${string } -PERP`,
974
1007
action : "short" | "long" ,
975
1008
) {
976
1009
return getEntryQuoteOfPerpTrade ( symbol , amount , action ) ;
977
1010
}
1011
+
978
1012
async getLendAndBorrowAPY ( symbol : string ) {
979
1013
return getLendingAndBorrowAPY ( this , symbol ) ;
980
1014
}
0 commit comments