solana_kit_rpc_subscriptions_api library

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

This package defines the parameter types and API surface for all Solana RPC subscription methods. It is a Dart port of the TypeScript @solana/rpc-subscriptions-api package.

Classes

AccountNotificationsConfig
Configuration for the accountSubscribe RPC subscription method.
BlockFilterAll
Filter that matches all transactions in a block.
BlockFilterMentionsAccountOrProgram
Filter that matches transactions mentioning a specific account or program.
BlockNotificationsConfig
Configuration for the blockSubscribe RPC subscription method.
BlockNotificationsFilter
The filter for block subscription notifications.
LogsFilter
The filter for logs subscription notifications.
LogsFilterAll
Filter that matches all non-vote transactions.
LogsFilterAllWithVotes
Filter that matches all transactions including vote transactions.
LogsFilterMentions
Filter that matches transactions mentioning a specific address.
LogsNotificationsConfig
Configuration for the logsSubscribe RPC subscription method.
ProgramNotificationsConfig
Configuration for the programSubscribe RPC subscription method.
SignatureNotificationsConfig
Configuration for the signatureSubscribe RPC subscription method.

Constants

solanaRpcSubscriptionsMethodsStable → const List<String>
The set of all stable Solana RPC subscription method names.
solanaRpcSubscriptionsMethodsUnstable → const List<String>
The set of all Solana RPC subscription method names, including unstable methods.
solanaRpcSubscriptionsNotificationsStable → const List<String>
The set of all stable Solana RPC subscription notification names.
solanaRpcSubscriptionsNotificationsUnstable → const List<String>
The set of all Solana RPC subscription notification names, including unstable ones.

Functions

accountNotificationsParams(Address address, [AccountNotificationsConfig? config]) List<Object?>
Builds the JSON-RPC params list for accountSubscribe.
blockNotificationsParams(BlockNotificationsFilter filter, [BlockNotificationsConfig? config]) List<Object?>
Builds the JSON-RPC params list for blockSubscribe.
isSolanaRpcSubscriptionMethod(String methodName) bool
Returns true if methodName is a Solana RPC subscription method (stable or unstable).
isSolanaRpcSubscriptionMethodStable(String methodName) bool
Returns true if methodName is a stable Solana RPC subscription method.
logsNotificationsParams(LogsFilter filter, [LogsNotificationsConfig? config]) List<Object?>
Builds the JSON-RPC params list for logsSubscribe.
notificationNameToSubscribeMethod(String notificationName) String
Transforms a notification name to its corresponding subscribe method name.
notificationNameToUnsubscribeMethod(String notificationName) String
Transforms a notification name to its corresponding unsubscribe method name.
programNotificationsParams(Address programId, [ProgramNotificationsConfig? config]) List<Object?>
Builds the JSON-RPC params list for programSubscribe.
rootNotificationsParams() List<Object?>
Builds the JSON-RPC params list for rootSubscribe.
signatureNotificationsParams(Signature signature, [SignatureNotificationsConfig? config]) List<Object?>
Builds the JSON-RPC params list for signatureSubscribe.
slotNotificationsParams() List<Object?>
Builds the JSON-RPC params list for slotSubscribe.
slotsUpdatesNotificationsParams() List<Object?>
Builds the JSON-RPC params list for slotsUpdatesSubscribe.
voteNotificationsParams() List<Object?>
Builds the JSON-RPC params list for voteSubscribe.