solana_kit_rpc_subscriptions_channel_websocket 0.2.0 copy "solana_kit_rpc_subscriptions_channel_websocket: ^0.2.0" to clipboard
solana_kit_rpc_subscriptions_channel_websocket: ^0.2.0 copied to clipboard

WebSocket channel for RPC subscriptions for the Solana Kit Dart SDK.

example/main.dart

// Examples intentionally print CLI output for demonstration purposes.
// ignore_for_file: avoid_print

import 'package:solana_kit_rpc_subscriptions_channel_websocket/solana_kit_rpc_subscriptions_channel_websocket.dart';

void main() {
  final controller = AbortController();
  final config = WebSocketChannelConfig(
    url: Uri.parse('wss://api.mainnet-beta.solana.com'),
    signal: controller.signal,
  );

  print('WebSocket URL: ${config.url}');
  print('Aborted before close: ${config.signal?.isAborted}');

  controller.abort('example complete');
  print('Aborted after close: ${config.signal?.isAborted}');
}
0
likes
160
points
210
downloads

Publisher

unverified uploader

Weekly Downloads

WebSocket channel for RPC subscriptions for the Solana Kit Dart SDK.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

solana_kit_errors, solana_kit_subscribable, web_socket_channel

More

Packages that depend on solana_kit_rpc_subscriptions_channel_websocket