55 TokenListItem ,
66 fromUiAmount ,
77} from "@glamsystems/glam-sdk" ;
8+ import { PublicKey } from "@solana/web3.js" ;
89import { Command } from "commander" ;
910import {
1011 CliContext ,
@@ -207,12 +208,19 @@ export function installJupiterCommands(program: Command, context: CliContext) {
207208 )
208209 . option ( "--use-v1" , "Use v1 instruction (default: v2)" , false )
209210 . option ( "-d, --only-direct-routes" , "Direct routes only" )
211+ . option ( "-t, --tracking-account <pubkey>" , "Tracking account public key" )
210212 . option ( "-y, --yes" , "Skip confirmation" , false )
211213 . action ( async ( from , to , amount , options ) => {
212214 const jupApi = context . glamClient . jupiterSwap . jupApi ;
213215 const tokenFrom = await findToken ( jupApi , from ) ;
214216 const tokenTo = await findToken ( jupApi , to ) ;
215- const { maxAccounts, slippageBps, onlyDirectRoutes, useV1 } = options ;
217+ const {
218+ maxAccounts,
219+ slippageBps,
220+ onlyDirectRoutes,
221+ useV1,
222+ trackingAccount,
223+ } = options ;
216224
217225 const quoteParams = {
218226 inputMint : tokenFrom . address ,
@@ -230,7 +238,12 @@ export function installJupiterCommands(program: Command, context: CliContext) {
230238 await executeTxWithErrorHandling (
231239 ( ) =>
232240 context . glamClient . jupiterSwap . swap (
233- { quoteParams } ,
241+ {
242+ quoteParams,
243+ trackingAccount : trackingAccount
244+ ? new PublicKey ( trackingAccount )
245+ : undefined ,
246+ } ,
234247 context . txOptions ,
235248 ) ,
236249 {
0 commit comments