import RemoteUtil, { MarketInfo, PublicAccountInfo, PublicData, AccountType } from './remoteUtil'; import { DataAndSlot, DriftClientAccountEvents, AccountSubscriber, } from './types'; import { SpotMarketAccount, PerpMarketAccount, StateAccount, OracleSource, isVariant } from '../types'; import { OracleInfo, OraclePriceData } from '../oracles/types'; import { formatStateAccount, formatPerpMarketAccount, formatSpotMarketAccount, formatOraclePriceData } from './remoteFormat'; import { PublicKey } from '@solana/web3.js'; import { BN } from '../'; import StrictEventEmitter from 'strict-event-emitter-types'; import { EventEmitter } from 'events'; const main = async () => { const eventEmitter = new EventEmitter(); const perpMarketAccountSubscribers = new Map>(); const spotMarketAccountSubscribers = new Map>(); const oracleSubscribers = new Map>(); const remoteUtil = new RemoteUtil( eventEmitter, perpMarketAccountSubscribers, spotMarketAccountSubscribers, oracleSubscribers ); const publicAccountInfo: PublicAccountInfo = await remoteUtil.getPublicAccountInfo(); console.log(JSON.stringify(publicAccountInfo)); // await remoteUtil.connect(); }; main();