import { getMarket } from '../services/market'; import { getMedianSlotDurationInMsFromLastEpochs } from '../../classes/utils'; import { address, Address, Rpc, SolanaRpcApi } from '@solana/kit'; export async function printReserve( rpc: Rpc, marketAddress: Address, programId: Address, reserve: string ): Promise { const kaminoMarket = await getMarket(rpc, marketAddress, programId, await getMedianSlotDurationInMsFromLastEpochs()); const result = kaminoMarket.getReserveByAddress(address(reserve)); console.log(result); console.log(result?.stats?.reserveDepositLimit.toString()); }