programSubscribe method
      
Future<WebsocketSubscription<ProgramAccount> > 
programSubscribe(
    
- Pubkey programId, {
- WebsocketOnDataHandler<ProgramAccount> ? onData,
- WebsocketOnErrorHandler? onError,
- WebsocketOnDoneHandler? onDone,
- bool cancelOnError = false,
- Duration? timeLimit,
- ProgramSubscribeConfig? config,
Subscribes to a program to receive notifications when the lamports or data for an account owned by the given program changes.
Implementation
Future<WebsocketSubscription<ProgramAccount>> programSubscribe(
  final Pubkey programId, {
  final WebsocketOnDataHandler<ProgramAccount>? onData,
  final WebsocketOnErrorHandler? onError,
  final WebsocketOnDoneHandler? onDone,
  final bool cancelOnError = false,
  final Duration? timeLimit,
  final ProgramSubscribeConfig? config,
}) => subscribe(
  ProgramSubscribe(programId, config: config),
  _contextDecoder(ProgramAccount.fromJson),
  onData: onData,
  onError: onError,
  onDone: onDone,
  timeLimit: timeLimit,
  cancelOnError: cancelOnError,
);