GithubHelp home page GithubHelp logo

charlesthompson3 / streams Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iotaledger/streams

0.0 0.0 0.0 12.13 MB

IOTA Streams, a framework for cryptographic protocols called Applications. Replaces Masked Authenticated Messaging (MAM). Alpha version.

License: Apache License 2.0

Rust 88.20% CMake 0.40% Batchfile 0.02% C 5.24% JavaScript 2.98% HTML 1.24% CSS 0.77% TypeScript 1.15%

streams's Introduction


A cryptographic framework for building secure messaging protocols

Developer documentation portal

Discord StackExchange Apache 2.0 license

AboutPrerequisitesInstallationGetting startedAPI referenceExamplesSupporting the projectJoining the discussion


About

IOTA Streams is a work-in-progress framework for building cryptographic messaging protocols. Streams ships with a built-in protocol called Channels for sending authenticated messages between two or more parties on the Tangle.

As a framework, Streams allows developers to build protocols for their specific needs.

This process will be documented as the development progresses. However, since this crate is in an alpha stage of development it is still likely to change.

At the moment, IOTA Streams includes the following crates:

Prerequisites

To use IOTA Streams, you need the following:

We also recommend updating Rust to the latest stable version:

rustup update stable

Installation

To use the library in your crate you need to add it as a dependency in the Cargo.toml file.

Because the library is not on crates.io, you need to use the Git repository either remotely or locally.

no_std is currently supported. However cargo nightly must be used to build with no_std feature.

Getting started

If you don't have a rust project setup yet you can create one by running,

cargo new my-library

Remote Add the following to your Cargo.toml file:

[dependencies]
anyhow = { version = "1.0", default-features = false }
iota-streams = { git = "https://github.com/iotaledger/streams", branch  = "develop"}

Local

  1. Clone this repository

    git clone https://github.com/iotaledger/streams
  2. Add the following to your Cargo.toml file:

    [dependencies]
    iota-streams = { version = "0.1.2", path = "../streams" }

Getting started

After you've installed the library, you can use it in your own Cargo project.

For example, you may want to use the Channels protocol to create a new author and subscriber like so:

use iota_streams::app_channels::api::tangle::{Author, Subscriber};
use iota_streams::app::transport::tangle::PAYLOAD_BYTES;
use iota_streams::app::transport::tangle::client::Client;

fn main() {
    let node = "http://localhost:14265";
    let client = Client::new_from_url(node);

    let encoding = "utf-8";
    let multi_branching_flag = true;

    let mut author = Author::new("AUTHORSSEED", encoding, PAYLOAD_BYTES, multi_branching_flag, client);
    
    let mut subscriber = Subscriber::new("MYSUBSCRIBERSECRETSTRING", encoding, PAYLOAD_BYTES, client);
}

For a more detailed guide, go to our documentation portal.

API reference

To generate the API reference and display it in a web browser, do the following:

cargo doc --open

Examples

We have an example in the examples directory, which you can use as a reference when developing your own protocols with IOTA Streams.

A no_std version can be found in iota-streams-app-channels-example directory

Supporting the project

Please see our contribution guidelines for all the ways in which you can contribute.

Running tests

We use code comments to write tests. You can run all tests by doing the following from the streams directory:

cargo test --all

Updating documentation

If you want to improve the code comments, please do so according to the guidelines in RFC 1574.

Joining the discussion

If you want to get involved in discussions about this technology, or you're looking for support, go to the #streams-discussion channel on Discord.

streams's People

Contributors

dyrellc avatar semenov-vladyslav avatar arnauorriols avatar jlvandenhout avatar lucas-tortora avatar dependabot[bot] avatar huhn511 avatar galman21 avatar dr-electron avatar jakescahill avatar jakubcech avatar tsangares avatar thoralf-m avatar kwek20 avatar goodengineer avatar atomicmsr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.