{"bugs":{"url":"https://github.com/streamr-dev/streamr-client/issues"},"dist":{"shasum":"64a052f95c3acd4b42dc111e1653bf2567750bdc","tarball":"https://registry.npmjs.org/streamr-client/-/streamr-client-5.0.0-beta.1.tgz","fileCount":116,"integrity":"sha512-pvWClZoGDviOPO2/h1AyDfJ2fGbonyR4Bn7eaYgEl+CfmAIVuf8JHfi8qGdoRfOw5osZY1QgTCdcfF0aeoeAYg==","signatures":[{"sig":"MEUCIQDlMUGBS6QHjcbkhW6Sh8EH1yckIFZp61Lai9y//LaDxQIgfU3kX/ePOm/Z/siU3xRxe6wXWqUupb1XKK1yt3C+e8w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14154060,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3Py3CRA9TVsSAnZWagAA7SkP/00UAGVX3fhES6jkpLZH\n2hl/AELxGqmFo1+qPOypmdEgHe7tD2UVhxRAPHgO9DlVHhAGIZaFQdp0lszx\nW4pJDqjrY14OMzw2i+TYF6ud6vWY3nCA2G/Gel5DTnc45jLly5L5BEC/WOio\nltfmsygg5R3aJzTKDUWK7/XPZmCLvQlRNzftNCjmwKqQXi3ka+8cSQKVnSAo\nZAxZ47gssQIFPR+3E6/ffyaa1HJz1w/4eUX2bVcFKcgH6+U8rv5AtwZvjFEC\n3eOznF8KIiEjUWNYRKbGgItOfCUGikKIoZbfKrv80jq24mA3Z+3f/fbHNmpc\n8b8IqNXMaEq/VVQopfKbt/eWJ6e/8nHv1a+V/OmCrSbGf6aP7XTE6vJi9IDx\ngm0tCPuEEvHmjXrzskteRcNsSUvvIrFlUXA7Hg6KjHRllzwP6tz0eY6aDCYg\n+c4X/iZZh4wfS86DiCbcyD2yjMgtbiRXbcvQa5XQIcnMJ0onS5NsAo82AJrE\n6JyVQusXE9tfx2/7Za5HLGjooe14Q2jTf79QPxOAUsXn0raqvkhz08ikR7Zm\nXyWHYrdbBoHCWWlC4gxgpPcMzs7TolvOPcMbMVqnWIKYs4qkWEJd/wRdvZOy\n0B+U43rrcy441gN2ItAMMEU4iuGKo50p6DoDSIMN+8ukOlytlPGCHg+UI7NI\nEZxo\r\n=OwVj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/streamr-client.nodejs.js","name":"streamr-client","author":{"name":"Streamr"},"readme":"<p align=\"center\">\n  <a href=\"https://streamr.network\">\n    <img alt=\"Streamr\" src=\"https://raw.githubusercontent.com/streamr-dev/streamr-client-javascript/master/readme-header-img.png\" width=\"1320\" />\n  </a>\n</p>\n<h1 align=\"left\">\n  Streamr JavaScript Client\n</h1>\n\n\nBy 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.\n\nThe client uses websockets for producing and consuming messages to/from streams. It should work in all modern browsers.\n\n[![Build Status](https://travis-ci.com/streamr-dev/streamr-client-javascript.svg?branch=master)](https://travis-ci.com/streamr-dev/streamr-client-javascript)\n\n## Breaking changes notice\n- Dec 31st 2020: Email/password login will be removed. **Connect your email account to an Ethereum address before the deadline!**\n- Dec 31st 2020: Stream storage becomes opt-in and freely choosable.\n- Dec 31st 2020: Support for API keys will end.\n- Date TBD: Support for unsigned data will be dropped.\n\n[Installation](#installation) · [Usage](#usage) · [Client options](#client-options) · [Authentication options](#authentication-options) · [Message handler callback](#message-handler-callback) · [StreamrClient object](#streamrclient-object) · [Stream object](#stream-object) · [Subscription options](#subscription-options) · [Data Unions](#data-unions) · [Utility functions](#utility-functions) · [Events](#binding-to-events) · [Partitioning](#partitioning) · [Logging](#logging) · [NPM Publishing](#publishing-latest)\n\n## Installation\n\nThe client is available on [npm](https://www.npmjs.com/package/streamr-client) and can be installed simply by:\n\n`npm install streamr-client`\n\n## Usage\n\nHere 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).\n\nIf 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.\n\n#### Creating a StreamrClient instance\n\n```javascript\nconst client = new StreamrClient({\n    auth: {\n        privateKey: 'your-private-key'\n    }\n})\n```\n\nWhen using Node.js remember to require the library with:\n\n```javascript\nconst StreamrClient = require('streamr-client')\n```\n\n#### Subscribing to real-time events in a stream\n\n```javascript\nconst sub = client.subscribe(\n    {\n        stream: 'streamId',\n        partition: 0,           // Optional, defaults to zero. Use for partitioned streams to select partition.\n        // optional resend options here\n    },\n    (message, metadata) => {\n        // This is the message handler which gets called for every incoming message in the stream.\n        // Do something with the message here!\n    }\n)\n```\n\n#### Resending historical data\n\n```javascript\nconst sub = await client.resend(\n    {\n        stream: 'streamId',\n        resend: {\n            last: 5,\n        },\n    },\n    (message) => {\n        // This is the message handler which gets called for every received message in the stream.\n        // Do something with the message here!\n    }\n)\n```\n\nSee \"Subscription options\" for resend options\n\n#### Programmatically creating a stream\n\n```javascript\nclient.getOrCreateStream({\n    name: 'My awesome stream created via the API',\n})\n    .then((stream) => {\n        console.log(`Stream ${stream.id} has been created!`)\n        // Do something with the stream, for example call stream.publish(message)\n    })\n```\n\n#### Publishing data points to a stream\n\n```javascript\n// Here's our example data point\nconst msg = {\n    temperature: 25.4,\n    humidity: 10,\n    happy: true\n}\n\n// Publish using the stream id only\nclient.publish('my-stream-id', msg)\n\n// The first argument can also be the stream object\nclient.publish(stream, msg)\n\n// Publish with a specific timestamp as a Date object (default is now)\nclient.publish('my-stream-id', msg, new Date(54365472))\n\n// Publish with a specific timestamp in ms\nclient.publish('my-stream-id', msg, 54365472)\n\n// Publish with a specific timestamp as a ISO8601 string\nclient.publish('my-stream-id', msg, '2019-01-01T00:00:00.123Z')\n\n// Publish with a specific partition key (read more about partitioning further down this readme)\nclient.publish('my-stream-id', msg, Date.now(), 'my-partition-key')\n\n// For convenience, stream.publish(...) equals client.publish(stream, ...)\nstream.publish(msg)\n```\n\n## Client options\n\n| Option                   | Default value                   | Description                                                  |\n| :------------------------ | :------------------------------- | :------------------------------------------------------------ |\n| url                      | wss://streamr.network/api/v1/ws | Address of the Streamr websocket endpoint to connect to.     |\n| restUrl                  | https://streamr.network/api/v1  | Base URL of the Streamr REST API.                            |\n| auth                     | {}                              | Object that can contain different information to authenticate. More details below. |\n| publishWithSignature     | 'auto'                          | Determines if data points published to streams are signed or not. Possible values are: 'auto', 'always' and 'never'. Signing requires `auth.privateKey` or `auth.provider`.  'auto' will sign only if one of them is set. 'always' will throw an exception if none of them is set. |\n| verifySignatures         | 'auto'                          | Determines under which conditions signed and unsigned data points are accepted or rejected. 'always' accepts only signed and verified data points. 'never' accepts all data points. 'auto' verifies all signed data points before accepting them and accepts unsigned data points only for streams not supposed to contain signed data. |\n| autoConnect              | true                            | If set to `true`, the client connects automatically on the first call to `subscribe()`. Otherwise an explicit call to `connect()` is required. |\n| autoDisconnect           | true                            | If set to `true`, the client automatically disconnects when the last stream is unsubscribed. Otherwise the connection is left open and can be disconnected explicitly by calling `disconnect()`. |\n| orderMessages            | true                            | If set to `true`, the subscriber handles messages in the correct order, requests missing messages and drops duplicates. Otherwise, the subscriber processes messages as they arrive without any check. |\n| maxPublishQueueSize      | 10000                           | Only in effect when `autoConnect = true`. Controls the maximum number of messages to retain in internal queue when client has disconnected and is reconnecting to Streamr. |\n| publisherGroupKeys       | {}                              | Object defining the group key as a hex string used to encrypt for each stream id. |\n| publisherStoreKeyHistory | true                            | If `true`, the client will locally store every key used to encrypt messages at some point. If set to `false`, the client will not be able to answer subscribers asking for historical keys during resend requests. |\n| subscriberGroupKeys      | {}                              | Object defining, for each stream id, an object containing the group key used to decrypt for each publisher id. Not needed if `keyExchange` is defined. |\n| keyExchange              | {}                              | Defines RSA key pair to use for group key exchange. Can define `publicKey` and `privateKey` fields as strings in the PEM format, or stay empty to generate a key pair automatically. Can be set to `null` if no key exchange is required. |\n\n## Authentication options\n\n**Authenticating with an API key has been deprecated.** \n\n**Support for email/password authentication will be dropped in the future and cryptographic keys/wallets will be the only supported method.**\n\nIf 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.\n\nAuthenticating with Ethereum also automatically creates an associated Streamr user, even if it doesn't already exist. Under the hood, the client will cryptographically sign a challenge to authenticate you as a Streamr user:\n\n```javascript\nnew StreamrClient({\n    auth: {\n        privateKey: 'your-private-key'\n    }\n})\n```\n\nAuthenticating with an Ethereum private key contained in an Ethereum (web3) provider:\n\n```javascript\nnew StreamrClient({\n    auth: {\n        provider: window.ethereum,\n    }\n})\n```\n\n(Authenticating with a pre-existing session token, for internal use by the Streamr app):\n\n```javascript\nnew StreamrClient({\n    auth: {\n        sessionToken: 'session-token'\n    }\n})\n```\n\n## Message handler callback\n\nThe second argument to `client.subscribe(options, callback)` is the callback function that will be called for each message as they arrive. Its arguments are as follows:\n\n| Argument      | Description                                                  |\n| :------------- | :------------------------------------------------------------ |\n| payload       | A JS object containing the message payload itself            |\n| streamMessage | The whole [StreamMessage](https://github.com/streamr-dev/streamr-client-protocol-js/blob/master/src/protocol/message_layer/StreamMessage.js) object containing various metadata, for example `streamMessage.getTimestamp()` etc. |\n\n## StreamrClient object\n\n#### Connecting\n\n| Name                 | Description                                                  |\n| :-------------------- | :------------------------------------------------------------ |\n| connect()            | Connects to the server, and also subscribes to any streams for which `subscribe()` has been called before calling `connect()`. Returns a Promise. Rejects if already connected or connecting. |\n| disconnect()         | Disconnects from the server, clearing all subscriptions. Returns a Promise.  Rejects if already disconnected or disconnecting. |\n| pause()              | Disconnects from the server without clearing subscriptions.  |\n| ensureConnected()    | Safely connects if not connected. Returns a promise. Resolves immediately if already connected. Only rejects if an error occurs during connection. |\n| ensureDisconnected() | Safely disconnects if not disconnected. Returns a promise. Resolves immediately if already disconnected. Only rejects if an error occurs during disconnection. |\n\n#### Managing subscriptions\n\n| Name                         | Description                                                  |\n| :---------------------------- | :------------------------------------------------------------ |\n| subscribe(options, callback) | Subscribes to a stream. Messages in this stream are passed to the `callback` function. See below for subscription options. Returns a `Subscription` object. |\n| unsubscribe(Subscription)    | Unsubscribes the given `Subscription`.                       |\n| unsubscribeAll(`streamId`)   | Unsubscribes all `Subscriptions` for `streamId`.             |\n| getSubscriptions(`streamId`) | Returns a list of `Subscriptions` for `streamId`.            |\n\n#### Stream API\n\nAll the below functions return a Promise which gets resolved with the result.\n\n| Name                                                | Description                                                  |\n| :--------------------------------------------------- | :------------------------------------------------------------ |\n| getStream(streamId)                                 | Fetches a stream object from the API.                        |\n| listStreams(query)                                  | Fetches an array of stream objects from the API. For the query params, consult the [API docs](https://api-explorer.streamr.com). |\n| getStreamByName(name)                               | Fetches a stream which exactly matches the given name.       |\n| createStream(properties)                            | Creates a stream with the given properties. For more information on the stream properties, consult the [API docs](https://api-explorer.streamr.com). |\n| getOrCreateStream(properties)                       | Gets a stream with the id or name given in `properties`, or creates it if one is not found. |\n| publish(streamId, message, timestamp, partitionKey) | Publishes a new message to the given stream.                 |\n\n#### Listening to state changes of the client\n\non(eventName, function) | Binds a `function` to an event called `eventName`\nonce(eventName, function) | Binds a `function` to an event called `eventName`. It gets called once and then removed.\nremoveListener(eventName, function) | Unbinds the `function` from events called `eventName`\n\n## Stream object\n\nAll the below functions return a Promise which gets resolved with the result.\n\n| Name                                      | Description                                                  |\n| :----------------------------------------- | :------------------------------------------------------------ |\n| update()                                  | Updates the properties of this stream object by sending them to the API. |\n| delete()                                  | Deletes this stream.                                         |\n| getPermissions()                          | Returns the list of permissions for this stream.             |\n| hasPermission(operation, user)            | Returns a permission object, or null if no such permission was found. Valid `operation` values for streams are: stream_get, stream_edit, stream_delete, stream_publish, stream_subscribe, and stream_share. `user` is the username of a user, or null for public permissions. |\n| grantPermission(operation, user)          | Grants the permission to do `operation` to `user`, which are defined as above. |\n| revokePermission(permissionId)            | Revokes a permission identified by its `id`.                 |\n| detectFields()                            | Updates the stream field config (schema) to match the latest data point in the stream. |\n| publish(message, timestamp, partitionKey) | Publishes a new message to this stream.                      |\n\n## Subscription options\n\nNote that only one of the resend options can be used for a particular subscription. The default functionality is to resend nothing, only subscribe to messages from the subscription moment onwards.\n\n| Name      | Description                                                  |\n| :--------- | :------------------------------------------------------------ |\n| stream    | Stream id to subscribe to                                    |\n| partition | Partition number to subscribe to. Defaults to partition 0.   |\n| resend    | Object defining the resend options. Below are examples of its contents. |\n| groupKeys | Object defining the group key as a hex string for each publisher id of the stream. |\n\n```javascript\n// Resend N most recent messages\nresend: {\n    last: 10,\n}\n\n// Resend from a specific message reference up to the newest message\nresend: {\n    from: {\n        timestamp: 12345,\n        sequenceNumber: 0, // optional\n    }\n    publisher: 'publisherId', // optional\n    msgChainId: 'msgChainId', // optional\n}\n\n// Resend a limited range of messages\nresend: {\n    from: {\n        timestamp: 12345,\n        sequenceNumber: 0, // optional\n    },\n    to: {\n        timestamp: 54321,\n        sequenceNumber: 0, // optional\n    },\n    publisher: 'publisherId', // optional\n    msgChainId: 'msgChainId', // optional\n}\n```\n\nIf you choose one of the above resend options when subscribing, you can listen on the completion of this resend by doing the following:\n\n```javascript\nconst sub = client.subscribe(...)\nsub.on('initial_resend_done', () => {\n    console.log('All caught up and received all requested historical messages! Now switching to real time!')\n})\n```\n\n## Data Unions\n\nThis library provides functions for working with Data Unions. All of the below methods return a Promise.\n\n#### Admin functions\n\n| Name                                                    | Returns     | Description                                                |\n| :------------------------------------------------------- | :----------- | :---------------------------------------------------------- |\n| deployDataUnion()                                       | Transaction | Deploy a new Data Union                                    |\n| createSecret(dataUnionContractAddress, secret[, name])  |             | Create a secret for a Data Union                           |\n| dataUnionIsReady(address)                               |             | Wait until a new Data Union is initialized by its Operator |\n| addMembers(dataUnionContractAddress, memberAddressList) |             | Add members                                                |\n| kick(dataUnionContractAddress, memberAddressList)       |             | Kick members out from Data Union                           |\n\n```javascript\nconst dataUnion = await client.deployDataUnion()\ndataUnion.address           // already available before deployment\nawait dataUnion.deployed()  // waits until contract is deployed\nawait dataUnion.isReady()   // waits until data union is operated\n```\n\n#### Member functions\n\n| Name                                                         | Returns     | Description                                                  |\n| :------------------------------------------------------------ | :----------- | :------------------------------------------------------------ |\n| joinDataUnion(dataUnionContractAddress[, secret])            | JoinRequest | Join a Data Union                                            |\n| hasJoined(dataUnionContractAddress[, memberAddress])         |             | Wait until member has been accepted                          |\n| validateProof(dataUnionContractAddress, options)             | true/false  | Check that server is giving a proof that allows withdrawing  |\n| withdraw(dataUnionContractAddress, options)                  | Receipt     | Withdraw funds from Data Union                               |\n| withdrawFor(memberAddress, dataUnionContractAddress, options) | Receipt     | Pay for withdraw transaction on behalf of a Data Union member |\n| withdrawTo(recipientAddress, dataUnionContractAddress, options) | Receipt     | Donate/move your earnings to recipientAddress instead of your memberAddress |\n\nThe options object for withdraw functions above may contain following overrides:\n\n| Property      | Default   | Description                                                  |\n| :------------- | :--------- | :------------------------------------------------------------ |\n| wallet        | auth      | ethers.js Wallet object to use to sign and send withdraw transaction |\n| provider      | mainnet   | ethers.js Provider to use if wallet wasn't provided          |\n| confirmations | 1         | Number of blocks to wait after the withdraw transaction is mined |\n| gasPrice      | ethers.js | Probably uses the network estimate                           |\n\n#### Query functions\n\nThese are available for everyone and anyone, to query publicly available info from a Data Union:\n\n| Name                                                      | Returns                           | Description                 |\n| :--------------------------------------------------------- | :--------------------------------- | :--------------------------- |\n| getMemberStats(dataUnionContractAddress[, memberAddress]) | {earnings, proof, ...}            | Get member's stats          |\n| getDataUnionStats(dataUnionContractAddress)               | {memberCount, totalEarnings, ...} | Get Data Union's statistics |\n| getMembers(dataUnionContractAddress)                      | [{address, earnings}, ...]        | Get Data Union's members    |\n\n## Utility functions\n\n| Name                                    | Description                                                  |\n| :--------------------------------------- | :------------------------------------------------------------ |\n| StreamrClient.generateEthereumAccount() | Generates a random Ethereum private key and returns an object with fields `address` and privateKey. Note that this private key can be used to authenticate to the Streamr API by passing it in the authentication options, as described earlier in this document. |\n\n## Events\n\n#### Binding to events\n\nThe client and the subscriptions can fire events as detailed below. You can bind to them using `on`:\n\n```javascript\n    // The StreamrClient emits various events\n\tclient.on('connected', () => {\n\t    console.log('Yeah, we are connected now!')\n\t})\n\n    // So does the Subscription object\n\tconst sub = client.subscribe(...)\n\tsub.on('subscribed', () => {\n\t    console.log(`Subscribed to ${sub.streamId}`)\n\t})\n```\n\n#### Events on the StreamrClient instance\n\n| Name         | Handler Arguments | Description                                           |\n| :------------ | :----------------- | :----------------------------------------------------- |\n| connected    |                   | Fired when the client has connected (or reconnected). |\n| disconnected |                   | Fired when the client has disconnected (or paused).   |\n\n#### Events on the Subscription object\n\n| Name         | Handler Arguments                                            | Description                                                  |\n| :------------ | :------------------------------------------------------------ | :------------------------------------------------------------ |\n| subscribed   |                                                              | Fired when a subscription request is acknowledged by the server. |\n| unsubscribed |                                                              | Fired when an unsubscription is acknowledged by the server.  |\n| resending    | [ResendResponseResending](https://github.com/streamr-dev/streamr-client-protocol-js/blob/master/src/protocol/control_layer/resend_response_resending/ResendResponseResendingV1.js) | Fired when the subscription starts resending. Followed by the `resent` event to mark completion of the resend after resent messages have been processed by the message handler function. |\n| 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. |\n| no_resend    | [ResendResponseNoResend](https://github.com/streamr-dev/streamr-client-protocol-js/blob/master/src/protocol/control_layer/resend_response_no_resend/ResendResponseNoResendV1.js) | This will occur instead of the `resending` - `resent` sequence in case there were no messages to resend. |\n| error        | Error object                                                 | Reports errors, for example problems with message content    |\n\n## Partitioning\n\nPartitioning (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).\n\n#### Creating partitioned streams\n\nBy default, streams only have 1 partition when they are created. The partition count can be set to any positive number (1-100 is reasonable). An example of creating a partitioned stream using the JS client:\n\n```javascript\nclient.createStream({\n    name: 'My partitioned stream',\n    partitions: 10,\n}).then(stream => {\n    console.log(`Stream created: ${stream.id}. It has ${stream.partitions} partitions.`)\n})\n```\n\n#### Publishing to partitioned streams\n\nIn most use cases, a user wants related events (e.g. events from a particular device) to be assigned to the same partition, so that the events retain a deterministic order and reach the same subscriber(s) to allow them to compute stateful aggregates correctly.\n\nThe library allows the user to choose a *partition key*, which simplifies publishing to partitioned streams by not requiring the user to assign a partition number explicitly. The same partition key always maps to the same partition. In an IoT use case, the device id can be used as partition key; in user interaction data it could be the user id, and so on.\n\nThe partition key can be given as an argument to the `publish` methods, and the library assigns a deterministic partition number automatically:\n\n```javascript\nclient.publish('my-stream-id', msg, Date.now(), msg.vehicleId)\n\n// or, equivalently\nstream.publish(msg, Date.now(), msg.vehicleId)\n```\n\n#### Subscribing to partitioned streams\n\nBy default, the JS client subscribes to the first partition (partition `0`) in a stream. The partition number can be explicitly given in the subscribe call:\n\n```javascript\nclient.subscribe(\n    {\n        stream: 'my-stream-id',\n        partition: 4, // defaults to 0\n    },\n    (payload) => {\n        console.log(`Got message ${JSON.stringify(payload)}`)\n    },\n)\n```\n\nOr, to subscribe to multiple partitions, if the subscriber can handle the volume:\n\n```javascript\nconst handler = (payload, streamMessage) => {\n    console.log(`Got message ${JSON.stringify(payload)} from partition ${streamMessage.getStreamPartition()}`)\n}\n\n[2,3,4].forEach(partition => {\n    client.subscribe(\n        {\n            stream: 'my-stream-id',\n            partition: partition,\n        },\n        handler,\n    )\n})\n```\n\n## Logging\n\nThe Streamr JS client library supports [debug](https://github.com/visionmedia/debug) for logging.\n\nIn node.js, start your app like this: `DEBUG=StreamrClient* node your-app.js`\n\nIn the browser, include `debug.js` and set `localStorage.debug = 'StreamrClient'`\n\n\n## Publishing\n\nPublishing to NPM is automated via Github Actions. Follow the steps below to publish `latest` or `beta`.\n\n#### Publishing `latest`:\n\n1. Update version with either `npm version [patch|minor|major]`. Use semantic versioning\n   https://semver.org/. Files package.json and package-lock.json will be automatically updated, and an appropriate git commit and tag created.\n2. `git push --follow-tags`\n3. Wait for Github Actions to run tests\n4. If tests passed, Github Actions will publish the new version to NPM\n\n#### Publishing `beta`:\n\n1. Update version with either `npm version [prepatch|preminor|premajor] --preid=beta`. Use semantic versioning\n   https://semver.org/. Files package.json and package-lock.json will be automatically updated, and an appropriate git commit and tag created.\n2. `git push --follow-tags`\n3. Wait for Github Actions to run tests\n4. If tests passed, Github Actions will publish the new version to NPM\n","browser":"dist/streamr-client.web.min.js","engines":{"node":">= 12"},"gitHead":"9383af01c630b9d859557ed4977bf1d9b232a1fe","license":"Apache-2.0","scripts":{"dev":"webpack --progress --colors --watch --mode=development","test":"jest --detectOpenHandles","build":"rm dist/*; NODE_ENV=production webpack --mode=production --progress","eslint":"eslint --cache-location=node_modules/.cache/.eslintcache/ . ","prepack":"npm run build","coverage":"jest --coverage","prebuild":"npm run eslint -- --cache","benchmark":"npm run benchmarks","test-unit":"jest test/unit --detectOpenHandles","benchmarks":"node test/benchmarks/publish.js && node test/benchmarks/subscribe.js","clear-cache":"rm -rf node_modules/.cache; rm -rf .cache; rm -rf dist; jest --clearCache;","test-flakey":"jest --forceExit test/flakey","test-browser":"node ./test/browser/server.js & node node_modules/nightwatch/bin/nightwatch ./test/browser/browser.js && pkill -f server.js","build-example":"cd examples/webpack && npm run build-with-parent","benchmark-build":"npm run build-benchmark","build-benchmark":"npm run benchmarks","install-example":"cd examples/webpack && npm ci","test-integration":"jest --forceExit test/integration","prebuild-benchmark":"npm run build -- --config-name=node-lib"},"_npmUser":{"name":"timoxley","email":"secoif@gmail.com"},"homepage":"https://github.com/streamr-dev/streamr-client#readme","#IMPORTANT":"babel-runtime must be in dependencies, not devDependencies","deprecated":"This is an unsupported beta version. Please use streamr-client@5.2.1 and above.","repository":{"url":"git://github.com/streamr-dev/streamr-client.git","type":"git"},"_npmVersion":"6.14.8","description":"JavaScript client library for Streamr","directories":{"test":"test"},"maintainers":[{"name":"kare","email":"kare.nuorteva@me.com"},{"name":"juhah","email":"juha.haavisto@streamr.com"},{"name":"fonty1","email":"mr.matto@gmail.com"},{"name":"hpihkala","email":"henri.pihkala@streamr.com"},{"name":"tumppi","email":"tuomas.koponen@streamr.com"},{"name":"timoxley","email":"secoif@gmail.com"},{"name":"harbu","email":"harbuzen@gmail.com"},{"name":"mariusz_io","email":"mariusz@mariusz.io"},{"name":"pzsavola","email":"petri.savolainen@spaceify.net"},{"name":"mmartinmo","email":"martin.moravek@streamr.com"},{"name":"juslesan","email":"santeri.juslenius@gmail.com"},{"name":"jtakalai","email":"juuso.takalainen@streamr.com"},{"name":"jwolff","email":"jwolff@isentropy.com"},{"name":"streamr-dev","email":"devtools@streamr.com"},{"name":"teogeb","email":"teo@streamr.com"}],"_nodeVersion":"14.15.1","dependencies":{"qs":"^6.9.4","ws":"^7.4.0","mem":"^8.0.0","once":"^1.4.0","uuid":"^8.3.1","debug":"^4.3.1","ethers":"^5.0.21","p-limit":"^3.0.2","p-queue":"^6.6.2","p-memoize":"^4.0.1","quick-lru":"^5.1.1","bufferutil":"^4.0.2","node-fetch":"^2.6.1","eventemitter3":"^4.0.7","@babel/runtime":"^7.12.5","utf-8-validate":"^5.0.3","lodash.uniqueid":"^4.0.1","promise-memoize":"^1.2.1","readable-stream":"^3.6.0","node-webcrypto-ossl":"^2.1.2","node-abort-controller":"^1.1.0","webpack-node-externals":"^2.5.2","streamr-client-protocol":"^7.0.0-alpha.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","sinon":"^9.2.1","eslint":"^7.14.0","core-js":"^3.7.0","express":"^4.17.1","webpack":"^4.44.1","benchmark":"^2.1.4","@babel/cli":"^7.12.7","nightwatch":"^1.5.1","@babel/core":"^7.12.7","geckodriver":"^1.21.0","jest-circus":"^26.6.3","webpack-cli":"^4.2.0","babel-eslint":"^10.1.0","babel-loader":"^8.2.1","chromedriver":"^86.0.0","eslint-loader":"^4.0.2","webpack-merge":"^5.4.0","@babel/preset-env":"^7.12.7","streamr-test-utils":"^1.1.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-promise":"^4.2.1","terser-webpack-plugin":"^4.2.3","webpack-bundle-analyzer":"^4.2.0","eslint-config-streamr-nodejs":"^1.3.0","@babel/plugin-transform-classes":"^7.12.1","@babel/plugin-transform-runtime":"^7.12.1","babel-plugin-add-module-exports":"^1.0.4","@babel/plugin-proposal-class-properties":"^7.12.1","babel-plugin-transform-class-properties":"^6.24.1","@babel/plugin-transform-modules-commonjs":"^7.12.1"},"optionalDependencies":{"bufferutil":"^4.0.2","utf-8-validate":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/streamr-client_5.0.0-beta.1_1608318134632_0.6331992536776729","host":"s3://npm-registry-packages"},"_id":"streamr-client@5.0.0-beta.1","version":"5.0.0-beta.1"}