import type { PolyNodeEvent } from './events.js'; import type { SubscriptionType, EventType } from './enums.js'; export interface SubscribeMessage { action: 'subscribe'; type?: SubscriptionType; filters?: SubscriptionFilters; } export interface SubscriptionFilters { wallets?: string[]; tokens?: string[]; slugs?: string[]; condition_ids?: string[]; side?: string; status?: string; min_size?: number; max_size?: number; event_types?: EventType[]; snapshot_count?: number; feeds?: string[]; } export interface UnsubscribeMessage { action: 'unsubscribe'; subscription_id?: string; } export interface PingMessage { action: 'ping'; } export interface WsEventMessage { type: string; timestamp: number; data: PolyNodeEvent; } export interface WsSnapshotMessage { type: 'snapshot'; count: number; events: Array<{ type: string; timestamp: number; data: PolyNodeEvent; }>; } export interface WsSubscribedMessage { type: 'subscribed'; subscriber_id: string; subscription_id: string; subscription_type: string; warnings?: string[]; } export interface WsUnsubscribedMessage { type: 'unsubscribed'; subscriber_id: string; subscription_id?: string; } export interface WsHeartbeatMessage { type: 'heartbeat'; ts: number; } export interface WsPongMessage { type: 'pong'; } export interface WsErrorMessage { type: 'error'; code?: string; message: string; } export type WsServerMessage = WsEventMessage | WsSnapshotMessage | WsSubscribedMessage | WsUnsubscribedMessage | WsHeartbeatMessage | WsPongMessage | WsErrorMessage; export interface WsOptions { compress?: boolean; autoReconnect?: boolean; maxReconnectAttempts?: number; reconnectBaseDelay?: number; reconnectMaxDelay?: number; } //# sourceMappingURL=ws.d.ts.map