3️Integrate Data Union & Stream

Installation

You will need two node packages:

The data union client is a js node package that enables you and your users to interact with your data union.

The Streamr client is a js node package that enables you to interact with your data streams.

The client comes also in python, java, and go.

Enable Your Users To Publish Data

Read more about streams here.

You might also want to grant the members permission to publish data to the stream. Read more about this here.

Member Joins Data Union

Either Add members manually as the joinPart agent...

Or let members join themselves via our default join server by providing a shared secret:

Withdraw Earnings

When the contract receives revenue in DATA token you need to refresh the contract manually with the contract function refreshRevenue(). The Streamr marketplace will do this automatically for you.

After this transaction your users will be able to see and withdraw their earnings. With every withdraw transaction the revenue will get refreshed automatically. Read more here.

Last updated

Was this helpful?