3️Integrate Data Union & Stream

Installation

You will need two node packages:

circle-info

The data union clientarrow-up-right is a js node package that enables you and your users to interact with your data union.

circle-info

The Streamr clientarrow-up-right is a js node package that enables you to interact with your data streams.

The client comes also in pythonarrow-up-right, javaarrow-up-right, and goarrow-up-right.

Enable Your Users To Publish Data

circle-info

Read more about streams herearrow-up-right.

You might also want to grant the members permission to publish data to the stream. Read more about this herearrow-up-right.

Member Joins Data Union

Either Add members manually as the joinPart agent...

circle-exclamation

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

Withdraw Earnings

circle-info

When the contract receives revenue in DATA token you need to refresh the contract manually with the contract function refreshRevenue(). The Streamr marketplace arrow-up-rightwill 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?