import { RainCoreConfig } from '../types.js'; import { EnterOptionEventData, OrderEventData, OrderFilledEventData, DisputeOpenedEventData, AppealOpenedEventData, DisputeTimeExtendedEventData, DisputeWinnerEventData, AppealWinnerEventData, ClaimRewardEventData } from './types.js'; export declare class RainSocket { private socket; constructor(config?: RainCoreConfig); get connected(): boolean; onConnect(callback: () => void): void; onDisconnect(callback: () => void): void; /** * Subscribe to the enter-option event for a specific market. * Fires when a user buys into a market option. * Returns an unsubscribe function — call it to stop listening. */ onEnterOption(marketId: string, callback: (data: EnterOptionEventData) => void): () => void; /** * Subscribe to the order-created event for a specific market. * Fires when a new limit order is placed. */ onOrderCreated(marketId: string, callback: (data: OrderEventData) => void): () => void; /** * Subscribe to the order-cancelled event for a specific market. * Fires when an open order is cancelled. */ onOrderCancelled(marketId: string, callback: (data: OrderEventData) => void): () => void; /** * Subscribe to the order-filled event for a specific market. * Fires when an order is partially or fully filled. */ onOrderFilled(marketId: string, callback: (data: OrderFilledEventData) => void): () => void; /** * Subscribe to the dispute-opened event for a specific market. */ onDisputeOpened(marketId: string, callback: (data: DisputeOpenedEventData) => void): () => void; /** * Subscribe to the appeal-opened event for a specific market. */ onAppealOpened(marketId: string, callback: (data: AppealOpenedEventData) => void): () => void; /** * Subscribe to the dispute-time-extented event for a specific market. * Note: event name matches the backend spelling ("extented"). */ onDisputeTimeExtended(marketId: string, callback: (data: DisputeTimeExtendedEventData) => void): () => void; /** * Subscribe to the dispute-winner event for a specific market. * Fires when a dispute winner is decided. */ onDisputeWinner(marketId: string, callback: (data: DisputeWinnerEventData) => void): () => void; /** * Subscribe to the appeal-winner event for a specific market. * Fires when an appeal winner is finalized. */ onAppealWinner(marketId: string, callback: (data: AppealWinnerEventData) => void): () => void; /** * Subscribe to the claim-reward event for a specific market and user. * Fires when a user's reward claim is confirmed. */ onClaimReward(marketId: string, userId: string, callback: (data: ClaimRewardEventData) => void): () => void; disconnect(): void; }