/** * @premarket/core * Core library for WhalesMarket */ // Types & Interfaces export interface WhalesMarketConfig { apiKey: string; apiUrl?: string; } export interface WhalesMarketProduct { id: string; name: string; price: number; description?: string; imageUrl?: string; } export interface WhalesMarketClient { getProducts(): Promise; getProduct(id: string): Promise; } // Utilities export function createClient(config: WhalesMarketConfig): WhalesMarketClient { const { apiKey, apiUrl = 'https://api.whalesmarket.com' } = config; return { async getProducts(): Promise { // Mock implementation for now console.log(`Fetching products from ${apiUrl} with API key ${apiKey}`); return [ { id: '1', name: 'Product 1', price: 100, description: 'This is product 1', imageUrl: 'https://example.com/product1.jpg' }, { id: '2', name: 'Product 2', price: 200, description: 'This is product 2', imageUrl: 'https://example.com/product2.jpg' } ]; }, async getProduct(id: string): Promise { // Mock implementation for now console.log(`Fetching product ${id} from ${apiUrl} with API key ${apiKey}`); const products = await this.getProducts(); return products.find(product => product.id === id) || null; } }; } // Version export const VERSION = '0.1.0'; export * from "./base"; export * from "./pre-markets"; export * from "./utils/helpers"; export * from "./utils/transaction"; export * from "./managers";