CreateReactiveStoreWithInitialValueAndSlotTrackingConfig

type CreateReactiveStoreWithInitialValueAndSlotTrackingConfig<TRpcValue, TSubscriptionValue, TItem> = Readonly<{
  abortSignal: AbortSignal;
  rpcRequest: PendingRpcRequest<SolanaRpcResponse<TRpcValue>>;
  rpcSubscriptionRequest: PendingRpcSubscriptionsRequest<SolanaRpcResponse<TSubscriptionValue>>;
  rpcSubscriptionValueMapper: (value) => TItem;
  rpcValueMapper: (value) => TItem;
}>;

Configuration for createReactiveStoreWithInitialValueAndSlotTracking. Pairs a one-shot RPC fetch with an ongoing subscription so the resulting store can hydrate from the initial response and keep up to date with notifications, slot-deduplicating the two streams.

Type Parameters

Type ParameterDescription
TRpcValueThe value type returned by rpcRequest (inside the SolanaRpcResponse envelope).
TSubscriptionValueThe value type emitted by rpcSubscriptionRequest (inside the SolanaRpcResponse envelope).
TItemThe unified item type the store holds, produced by the two value mappers.

See

createReactiveStoreWithInitialValueAndSlotTracking

On this page