slotSubscribe method

Future<WebsocketSubscription<SlotNotification>> slotSubscribe(
  1. String signature, {
  2. WebsocketOnDataHandler<SlotNotification>? onData,
  3. WebsocketOnErrorHandler? onError,
  4. WebsocketOnDoneHandler? onDone,
  5. bool cancelOnError = false,
  6. Duration? timeLimit,
})

Subscribes to receive notification anytime a slot is processed by the validator.

Implementation

Future<WebsocketSubscription<SlotNotification>> slotSubscribe(
  final String signature, {
  final WebsocketOnDataHandler<SlotNotification>? onData,
  final WebsocketOnErrorHandler? onError,
  final WebsocketOnDoneHandler? onDone,
  final bool cancelOnError = false,
  final Duration? timeLimit,
}) =>
    subscribe(
      const SlotSubscribe(),
      SlotNotification.fromJson,
      onData: onData,
      onError: onError,
      onDone: onDone,
      timeLimit: timeLimit,
      cancelOnError: cancelOnError,
    );