Giter Site home page Giter Site logo

pelumi-ajayi / iota.rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iotaledger/iota.rs

0.0 0.0 0.0 34.81 MB

Official IOTA Rust library.

License: Apache License 2.0

Shell 0.15% JavaScript 7.34% Python 5.79% Java 3.00% Rust 83.68% HTML 0.02% CMake 0.02%

iota.rs's Introduction

iota.rs (iota-client)

The official, general-purpose IOTA client library in Rust for interaction with the IOTA network (Tangle).

The goal of this library is to have one source code of truth, which means that there is one implementation in Rust and bindings to other programming languages.

For value transfers we recommend using wallet.rs.

This library allows you to do the following:

  • Create messages with indexation and transaction payloads
  • Get messages and outputs
  • Sign transactions
  • Generate addresses
  • Interact with an IOTA node

Branching structure for development

This library follows the following branching strategy:

Branch Description
develop Ongoing development for future releases of the networks. This branch gets merged into staging on releases.
legacy Deprecated, contains legacy releases supporting pre-Chrysalis features.
production The latest releases for the IOTA networks.
staging The latest releases for the Shimmer networks.
other Other branches that may reflect current projects. Similar to develop, they will find their way into staging once they are ready.

Using the library

We recommend you to first update the Rust compiler to the latest stable version:

rustup update stable

The nightly Rust compiler should be fine but some changes might not be compatible.

Add iota-client as a dependency in Cargo.toml:

[dependencies]
iota-client = "1.1.1"

Or, for the latest changes:

[dependencies]
iota-client = { git = "https://github.com/iotaledger/iota.rs", branch = "dev" }

Then, use the library in code with:

// Note that the hyphen is replaced with an underscore
use iota_client;

Limitations

  • no_std is not currently supported, but we are working on it in bee, and will provide it as feature once the new implementation is ready.
  • When using the mqtt feature, connecting to a MQTT broker using raw IP doesn't work with TCP. This is a limitation of rustls.

Examples

You can see examples using the library in the examples directory. Try them with:

# cargo run --example <name of the example without .rs>
cargo run --example 01_get_info

For examples where a seed is required (e.g. 03_generate_addresses) you need to create a .env file under the current directory. You can do so by renaming .env.example to .env.

API reference

You can read the API reference here, or generate it yourself.

If you'd like to explore the implementation in more depth, the following command generates docs for the whole crate, including private modules:

cargo doc --document-private-items --no-deps --open

Bindings

Bindings to other programming languages are available under the folder bindings.

Joining the discussion

If you want to get involved in the community, need help with setting up, have any issues or just want to discuss IOTA with other people, feel free to join our Discord in the #client-libraries and #client-discussion channels.

License

The Apache 2.0 license can be found here.

iota.rs's People

Contributors

thoralf-m avatar bingyanglin avatar lucasfernog avatar njaremko avatar hribek25 avatar melatron avatar github-actions[bot] avatar jyhi avatar rajivshah3 avatar dependabot[bot] avatar lucas-tortora avatar cvarley100 avatar samuel-rufi avatar huhn511 avatar fijter avatar dr-electron avatar goodengineer avatar jkuruvilla avatar r-c-k avatar laumair avatar bernardoaraujor avatar adrian-grassl avatar alex6323 avatar dyrellc avatar phyloiota avatar mayjs avatar jlvandenhout avatar imilas avatar gson88 avatar vince205 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.