Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit 672420b

Browse files
committed
Merge branch 'master' into 5.x
* master: Update chromedriver to Chrome 88 Update README.md Update node-example-subscribe.js Update node-example-produce.js Update web-example-produce.html
2 parents 42221ed + ace88cf commit 672420b

File tree

5 files changed

+20
-13
lines changed

5 files changed

+20
-13
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ The client is available on [npm](https://www.npmjs.com/package/streamr-client) a
2828

2929
`npm install streamr-client`
3030

31+
Node v14 or higher is recommended if you intend to use the client in a Node environment. For example, inside a script.
32+
3133
## Usage
3234

3335
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).

examples/node/node-example-produce.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ const StreamrClient = require('streamr-client')
33
// Create the client and supply either an API key or an Ethereum private key to authenticate
44
const client = new StreamrClient({
55
auth: {
6-
apiKey: 'YOUR-API-KEY',
7-
// Or to cryptographically authenticate with Ethereum and enable data signing:
8-
// privateKey: 'ETHEREUM-PRIVATE-KEY',
6+
privateKey: 'ETHEREUM-PRIVATE-KEY',
97
},
108
})
119

examples/node/node-example-subscribe.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ const StreamrClient = require('streamr-client')
33
// Create the client and supply either an API key or an Ethereum private key to authenticate
44
const client = new StreamrClient({
55
auth: {
6-
apiKey: 'YOUR-API-KEY',
7-
// Or to cryptographically authenticate with Ethereum and enable data signing:
8-
// privateKey: 'ETHEREUM-PRIVATE-KEY',
6+
privateKey: 'ETHEREUM-PRIVATE-KEY',
97
},
108
})
119

examples/web/web-example-produce.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<head>
33
<!-- For debug messages, include debug.js and set localStorage.debug = 'StreamrClient'. See from https://github.com/visionmedia/debug -->
44
<script src="../../dist/streamr-client.web.js"></script>
5+
<!-- Or use unpkg, e.g. https://unpkg.com/browse/streamr-client@4.1.6/dist/streamr-client.web.js -->
56

67
<script>
78
const log = (msg) => {
@@ -12,12 +13,11 @@
1213

1314
// register and get from https://streamr.network/signup
1415
const STREAM_ID = 'MY-STREAM-ID'
15-
const API_KEY = 'MY-API-KEY'
1616

17-
// Create the client and give the API key to use by default
17+
// Create the client and give the API key to use by default
1818
const client = new StreamrClient({
1919
auth: {
20-
apiKey: API_KEY,
20+
privateKey: 'your-private-key',
2121
}
2222
})
2323

package-lock.json

Lines changed: 13 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)