Skip to main content
Provides reactive stream utilities for handling asynchronous data flows. Used internally by @cosmjs/tendermint-rpc for WebSocket subscriptions.

DefaultValueProducer

An xstream Producer that stores a current value and emits updates. start and stop implement the xstream Producer contract and are normally called by the stream, not application code.
The exported identifier DefaultValueProducerCallsbacks contains a spelling typo (“Callsbacks”) that is preserved for backwards compatibility.

ValueAndUpdates

Wraps a DefaultValueProducer to expose both the current value and a MemoryStream of updates. waitFor resolves with the first value matching the predicate (or strict-equal match when a value is passed).

Promise Utilities

Stream Operators

Reducer

Utilities for applying reducer patterns to streams.