8 releases (2 stable)

1.0.1 Jul 1, 2021
1.0.0 Jun 11, 2021
0.5.0-alpha.3 Jul 8, 2020
0.5.0-alpha.2 May 23, 2020
0.1.0 Jun 20, 2019
Download history 21/week @ 2021-03-22 19/week @ 2021-03-29 21/week @ 2021-04-05 35/week @ 2021-04-12 16/week @ 2021-04-19 10/week @ 2021-04-26 13/week @ 2021-05-03 4/week @ 2021-05-10 12/week @ 2021-05-17 8/week @ 2021-05-24 4/week @ 2021-05-31 28/week @ 2021-06-07 11/week @ 2021-06-14 5/week @ 2021-06-21 26/week @ 2021-06-28 14/week @ 2021-07-05

59 downloads per month
Used in iota-lib-rs

Apache-2.0

185KB
3.5K SLoC

iota-client

A general purpose IOTA client library for interaction with the IOTA network (Tangle).

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

For value transfers we recommend to use 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

Requirements

To use the library, we recommend you update Rust to latest stable version $ rustup update stable. Nightly should be fine but some changes might not be compatible.

Using the library

Using the library is easy, just add it as dependency in Cargo.toml:

[dependencies]
iota-client = "1.0"

or for the latest changes

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

And then you can use the library in your code with use iota_client;.

When using the "MQTT" feature, connecting to a MQTT broker using raw ip doesn't work with TCP. This is a limitation of rustls.

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

Examples

You can see the examples in the examples directory and try them like:

cargo run --example 01_get_info

For the examples where a seed is required you have to rename .env.example to .env.

Dependencies

~12–21MB
~431K SLoC