import { SubscriptionTopic, SubscriptionData, SubscriptionArgs, RawSubscriptionData } from "@onflow/typedefs"; export type SubscribeParams = { /** * The topic to subscribe to. */ topic: T; /** * The arguments for the subscription. */ args: SubscriptionArgs; /** * The callback to call when data is received. */ onData: (data: SubscriptionData) => void; /** * The callback to call when a fatal error occurs. */ onError: (error: Error) => void; }; export type SubscribeRawParams = { /** * The topic to subscribe to. */ topic: T; /** * The arguments for the subscription. */ args: SubscriptionArgs; /** * The callback to call when data is received. */ onData: (data: RawSubscriptionData) => void; /** * The callback to call when a fatal error occurs. */ onError: (error: Error) => void; };