File tree Expand file tree Collapse file tree 5 files changed +35
-0
lines changed
Expand file tree Collapse file tree 5 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,8 @@ import getSanctumApyAction from "./sanctum/getApy";
129129import getSanctumTvlAction from "./sanctum/getTvl" ;
130130import sanctumAddLiquidityAction from "./sanctum/addLiquidity" ;
131131import sanctumRemoveLiquidityAction from "./sanctum/removeLiquidity" ;
132+ import sanctumGetOwnedLstAction from "./sanctum/getOwnedLst" ;
133+ import sanctumSwapLstAction from "./sanctum/swapLst" ;
132134
133135export const ACTIONS = {
134136 GET_INFO_ACTION : getInfoAction ,
@@ -266,6 +268,8 @@ export const ACTIONS = {
266268 SANCTUM_GET_TVL_ACTION : getSanctumTvlAction ,
267269 SANCTUM_ADD_LIQUIDITY_ACTION : sanctumAddLiquidityAction ,
268270 SANCTUM_REMOVE_LIQUIDITY_ACTION : sanctumRemoveLiquidityAction ,
271+ SANCTUM_GET_OWNED_LST_ACTION : sanctumGetOwnedLstAction ,
272+ SANCTUM_SWAP_LST_ACTION : sanctumSwapLstAction ,
269273} ;
270274
271275export type { Action , ActionExample , Handler } from "../types/action" ;
Original file line number Diff line number Diff line change @@ -153,6 +153,8 @@ import {
153153 get_tvl as getSanctumLSTTvl ,
154154 add_liquidity as addSanctumLSTLiquidity ,
155155 remove_liquidity as removeSanctumLSTLiquidity ,
156+ get_owned_lst as getSanctumOwnedLst ,
157+ swap_lst as swapLst ,
156158} from "../tools" ;
157159import {
158160 Config ,
@@ -1478,6 +1480,10 @@ export class SolanaAgentKit {
14781480 return getSanctumLSTTvl ( inputs ) ;
14791481 }
14801482
1483+ async getSanctumOwnedLst ( ) {
1484+ return getSanctumOwnedLst ( this ) ;
1485+ }
1486+
14811487 async addSanctumLiquidity (
14821488 lstMint : string ,
14831489 amount : string ,
@@ -1507,4 +1513,21 @@ export class SolanaAgentKit {
15071513 priorityFee ,
15081514 ) ;
15091515 }
1516+
1517+ async swapSanctumLst (
1518+ inputLstMint : string ,
1519+ amount : string ,
1520+ quotedAmount : string ,
1521+ priorityFee : number ,
1522+ outputLstMint : string ,
1523+ ) {
1524+ return swapLst (
1525+ this ,
1526+ inputLstMint ,
1527+ amount ,
1528+ quotedAmount ,
1529+ priorityFee ,
1530+ outputLstMint ,
1531+ ) ;
1532+ }
15101533}
Original file line number Diff line number Diff line change @@ -174,6 +174,8 @@ import {
174174 SanctumGetTvlTool ,
175175 SanctumAddLiquidityTool ,
176176 SanctumRemoveLiquidityTool ,
177+ SanctumGetOwnedLstTool ,
178+ SanctumSwapLstTool ,
177179} from "./index" ;
178180import {
179181 SolanaCancelLimitOrdersTool ,
@@ -320,5 +322,7 @@ export function createSolanaTools(solanaKit: SolanaAgentKit) {
320322 new SanctumGetTvlTool ( solanaKit ) ,
321323 new SanctumAddLiquidityTool ( solanaKit ) ,
322324 new SanctumRemoveLiquidityTool ( solanaKit ) ,
325+ new SanctumGetOwnedLstTool ( solanaKit ) ,
326+ new SanctumSwapLstTool ( solanaKit ) ,
323327 ] ;
324328}
Original file line number Diff line number Diff line change @@ -3,3 +3,5 @@ export * from "./get_apy";
33export * from "./get_tvl" ;
44export * from "./add_liquidity" ;
55export * from "./remove_liquidity" ;
6+ export * from "./get_owned_lst" ;
7+ export * from "./swap_lst" ;
Original file line number Diff line number Diff line change @@ -3,3 +3,5 @@ export * from "./get_apy";
33export * from "./get_tvl" ;
44export * from "./add_liquidity" ;
55export * from "./remove_liquidity" ;
6+ export * from "./get_owned_lst" ;
7+ export * from "./swap_lst" ;
You can’t perform that action at this time.
0 commit comments