solana_kit_rpc_subscriptions_api

pub package docs website CI coverage

Subscription method type definitions and parameter builders for all Solana RPC subscription methods in the Solana Kit Dart SDK.

This package defines the request and response shapes for slotSubscribe, accountSubscribe, signatureSubscribe, logsSubscribe, programSubscribe, and the rest. solana_kit_rpc_subscriptions composes these into the streaming client you call directly.

Installation

Install the package directly:

dependencies:
  "solana_kit_rpc_subscriptions_api": ^0.9.3

If your app uses several Solana Kit packages together, you can also depend on the umbrella package instead:

dart pub add solana_kit

Inside this monorepo, Dart workspace resolution uses the local package automatically.

Documentation

For architecture notes, getting-started guides, and cross-package examples, start with the workspace docs site and then drill down into the package README and API reference.

Usage

Building subscription parameters

Each subscription method has a params builder. slotNotificationsParams takes no arguments; account, signature, logs, and program subscriptions take a target plus an optional config.

import 'package:solana_kit_addresses/solana_kit_addresses.dart';
import 'package:solana_kit_rpc_subscriptions_api/solana_kit_rpc_subscriptions_api.dart';
import 'package:solana_kit_rpc_types/solana_kit_rpc_types.dart';

void main() {
  final slotParams = slotNotificationsParams();
  print(slotParams); // []

  const target = Address('11111111111111111111111111111111');
  final accountParams = accountNotificationsParams(
    target,
    const AccountNotificationsConfig(commitment: Commitment.confirmed),
  );
  print(accountParams);
}

Key APIs

  • Params builders: slotNotificationsParams, accountNotificationsParams, signatureNotificationsParams, logsNotificationsParams, programNotificationsParams, and the rest.
  • Config classes: AccountNotificationsConfig, SignatureNotificationsConfig, LogsNotificationsConfig, ProgramNotificationsConfig.
  • Notification types for each subscription.

Example

Use example/main.dart as a runnable starting point for solana_kit_rpc_subscriptions_api.

  • Import path: package:solana_kit_rpc_subscriptions_api/solana_kit_rpc_subscriptions_api.dart
  • This section is centrally maintained with mdt to keep package guidance aligned.
  • After updating shared docs templates, run docs:update from the repo root.

Maintenance

  • Validate docs in CI and locally with docs:check.
  • Keep examples focused on one workflow and reference package README sections for deeper API details.

Libraries

solana_kit_rpc_subscriptions_api
Subscription method type definitions and API composition for the Solana Kit Dart SDK.