The main API used to interact with Streamr.
Gets a stream, creating one if it does not exist.
the stream id to get or create. Field
partitions is only used if creating the stream.
Gets a stream.
rejects if the stream is not found
Publishes a message to a stream partition in the network.
the published message (note: the field content is encrypted if the stream is private)
the stream or stream partition to publish the message to
the content (the payload) of the message (must be JSON serializable)
provide additional metadata to be included in the message or to control the publishing process
Performs a resend of stored historical data.
a MessageStream that provides an alternative way of iterating messages. Rejects if the stream is not stored (i.e. is not assigned to a storage node).
Subscribes to a stream partition in the network.
a Subscription that can be used to manage the subscription etc.
the stream or stream partition to subscribe to, additionally a resend can be performed by providing resend options
callback will be invoked for each message received in subscription
Adds an encryption key for a given stream to the key store.
Keys will be added to the store automatically by the client as encountered. This method can be used to manually add some known keys into the store.
Assigns a stream to a storage node.
Used to manually initialize the network stack and connect to the network.
Connecting is handled automatically by the client. Generally this method need not be called by the user.
Deletes a stream.
Destroys an instance of a StreamrClient by disconnecting from peers, clearing any pending tasks, and freeing up resources. This should be called once a user is done with the instance.
As the name implies, the client instance (or any streams or subscriptions returned by it) should not be used after calling this method.
This in an internal method
Returns the list of all permissions in effect for a given stream.
Gets the metadata of a storage node from the storage node registry.
rejects if the storage node is not found
Gets a list of storage nodes.
if a stream is given, returns the list of storage nodes the stream has been assigned to;
undefined to return all storage nodes
Grants permissions on a given stream.
Checks whether the given permission is in effect.
Checks whether a stream is assigned to a storage node.
Checks whether a given ethereum address has PUBLISH permission to a stream.
Checks whether a given ethereum address has SUBSCRIBE permission to a stream.
Unassigns a stream from a storage node.
Revokes permissions on a given stream.
Sets a list of permissions to be in effect.
Can be used to set the permissions of multiple streams in one transaction. Great for doing bulk operations and saving gas costs. Notice that the behaviour is overwriting, therefore any existing permissions not defined will be removed (per stream).
Manually updates the encryption key used when publishing messages to a given stream.
Waits for a message to be stored by a storage node.
rejects if message was found in storage before timeout
the message to be awaited for
additional options for controlling waiting and message matching
Controls size of internal resend used in polling.
Determines how often should storage node be polled.
Timeout after which to give up if message was not seen.
Generated using TypeDoc