You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 21, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+12-18Lines changed: 12 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@
7
7
Streamr JavaScript Client
8
8
</h1>
9
9
10
-
By using this client, you can easily interact with the [Streamr](https://streamr.network) API from JavaScript-based environments, such as browsers and [node.js](https://nodejs.org). You can, for example, subscribe to real-time data in streams, produce new data to streams, and create new streams.
10
+
By using this client, you can easily interact with the [Streamr](https://streamr.network) API from JavaScript-based environments, such as browsers and [node.js](https://nodejs.org). You can, for example, subscribe to real-time data in streams, produce new data to streams, and create new streams. The client uses websockets for producing and consuming messages to/from streams. It should work in all modern browsers.
11
11
12
-
The client uses websockets for producing and consuming messages to/from streams. It should work in all modern browsers.
12
+
Please see the [API Docs](https://streamr-dev.github.io/streamr-client-javascript/) for more detailed documentation.
Node v14 or higher is recommended if you intend to use the client in a Node environment. For example, inside a script.
36
36
37
-
## API Docs
38
-
39
-
We have automatically generated API documentation available [here](https://streamr-dev.github.io/streamr-client-javascript/). These docs are generated from the repository TypeScript source code. They can also be rebuilt locally via:
40
-
41
-
```
42
-
npm run docs
43
-
```
44
-
45
37
## Usage
46
38
47
39
Here are some quick examples. More detailed examples for the browser and node.js can be found [here](https://github.com/streamr-dev/streamr-client/tree/master/examples).
@@ -139,9 +131,13 @@ await stream.publish(msg)
139
131
140
132
----
141
133
142
-
# Docs
134
+
## API Docs
143
135
144
-
Please see the [API Docs](https://streamr-dev.github.io/streamr-client-javascript/) for auto-generated documentation.
136
+
The [API docs](https://streamr-dev.github.io/streamr-client-javascript/) are automatically generated from the TypeScript source code. They can also be rebuilt locally via:
137
+
138
+
```
139
+
npm run docs
140
+
```
145
141
146
142
## Client options
147
143
@@ -163,9 +159,7 @@ Please see the [API Docs](https://streamr-dev.github.io/streamr-client-javascrip
163
159
164
160
## Authentication options
165
161
166
-
Note: **Authenticating with an API key has been deprecated.**
167
-
168
-
Note: **Support for email/password authentication will be dropped in the future and cryptographic keys/wallets will be the only supported method.**
162
+
Note: **Authenticating with an API key has been deprecated. Cryptographic keys/wallets is the only supported authentication method.**
169
163
170
164
If you don't have an Ethereum account you can use the utility function `StreamrClient.generateEthereumAccount()`, which returns the address and private key of a fresh Ethereum account.
171
165
@@ -347,7 +341,7 @@ All the below functions return a Promise which gets resolved with the result.
347
341
348
342
## Data Unions
349
343
350
-
This library provides functions for working with Data Unions.
344
+
This library provides functions for working with Data Unions. Please see the [API Docs](https://streamr-dev.github.io/streamr-client-javascript/) for auto-generated documentation on each Data Union endpoint.
351
345
352
346
To deploy a new DataUnion with default [deployment options](#deployment-options):
| resent |[ResendResponseResent](https://github.com/streamr-dev/streamr-client-protocol-js/blob/master/src/protocol/control_layer/resend_response_resent/ResendResponseResentV1.js)| Fired after `resending` when the subscription has finished resending and message has been processed |
554
548
| error | Error object | Reports errors, for example problems with message content |
555
549
556
-
## Partitioning
550
+
## Stream Partitioning
557
551
558
552
Partitioning (sharding) enables streams to scale horizontally. This section describes how to use partitioned streams via this library. To learn the basics of partitioning, see [the docs](https://streamr.network/docs/streams#partitioning).
0 commit comments