https://github.com/vourhey/streamr_agent
An example of Robonomics agent with non-XRT token
https://github.com/vourhey/streamr_agent
robonomics ros streamr
Last synced: 3 months ago
JSON representation
An example of Robonomics agent with non-XRT token
- Host: GitHub
- URL: https://github.com/vourhey/streamr_agent
- Owner: Vourhey
- License: bsd-3-clause
- Created: 2019-09-04T19:07:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-08T09:35:35.000Z (over 5 years ago)
- Last Synced: 2025-02-03T14:47:53.870Z (4 months ago)
- Topics: robonomics, ros, streamr
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Streamr Agent
An example of Robonomics agent dealing with "foreign" payment token.
Specifically Streamr's [DATACoin](https://etherscan.io/token/0x0cf0ee63788a0849fe5297f3407f701e122cc023) in this case.To get familiar with Streamr project have a look at the [docs](https://streamr.network/docs/introduction).
## Scenario
The agent waits for a new liability contract. At the moment it receives one the parameters (see below) are read and the publishing is begun.
For a simplicity the agent publishes random numbers but it's not a problem to turn it into something more useful.
A user specifies how long he/she desires to receive the data in seconds and the agent creates a thread and performs the task.
The user pays in proportion to the amount of time.
> Note! The stream ID must be created on a user side
In the end of the task the whole history is stored in the result message which could be read via the link sent by email.
## Objective:
* `/period` - the amount of time in seconds
* `/stream_id` - Stream ID
* `/email` - email of the user## Build
NixOS way:
```
nix bulid -f release.nix
source result/setup.bash (zsh)
```ROS common way:
```
mkdir -p ws/src && cd ws/src
git clone https://github.com/vourhey/streamr_agent && cd ..
catkin_make
source devel/setup.bash (zsh)
```## Launch
```
roslaunch streamr_agent agent.launch login:="" email_password:="" auth_token:=""
```## Test
There is the `robonomics/promisee_node.py` file for testing purpose only. Have a look at the content to figure out how it works
## Dapp
There is a [Dapp](https://github.com/vol4tim/dapp-streamr) for the project. Check it out!