Crates.io | iota-client |
lib.rs | iota-client |
version | 1.4.0 |
source | src |
created_at | 2019-06-20 01:38:44.547966 |
updated_at | 2023-03-28 13:34:30.574946 |
description | The official, general-purpose IOTA client library in Rust for interaction with the IOTA network (Tangle) |
homepage | https://www.iota.org/ |
repository | https://github.com/iotaledger/iota.rs |
max_upload_size | |
id | 142247 |
size | 5,543,492 |
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:
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. |
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.4.0"
Or, for the latest changes:
[dependencies]
iota-client = { git = "https://github.com/iotaledger/iota.rs", branch = "production" }
Then, use the library in code with:
// Note that the hyphen is replaced with an underscore
use iota_client;
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.mqtt
feature, connecting to a MQTT broker using raw IP doesn't work with TCP. This is a limitation of rustls
.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
.
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 to other programming languages are available under the folder bindings.
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.
The Apache 2.0 license can be found here.