Code's organization: How are IOTA's libraries structured?

Good news: it's getting easier!

To remind you: it is not the task of this tutorial to explain the libraries in detail. The purpose of the listed modules and features will become clearer when you create a project and use them. It's your responsibility to dive deep into it.

A big step in the right direction

πŸ‘‰ Β  Wiki - IOTA SDK

The IOTA SDK consolidates the two deprecated libraries and It also addresses the issue with rocksdb, making it easier for us to use on Android and iOS.




In order to better analyze the code, I recommend:

  1. Downloading the latest version of the source code (either by downloading and extracting the zip file or using git clone) and opening it in your IDE.
  2. Creating the Rust Docs as described in the chapter Create Rust Docs.

Take a look inside the src/ folder. You'll find the client and wallet directories there.



Structure of the IOTA SDK

Structure of the IOTA SDK

clientA general purpose IOTA client for interaction with the IOTA network (Tangle). High-level functions are accessible via the Client struct.
walletThe IOTA Wallet Library to create and use Accounts which can be secured by Stronghold and can be persisted in a database (rocksdb). Needed to send and receive values.
powProvides proof of work implementations and scoring for the IOTA protocol as a means to rate-limit the network. See Message PoW.
utilsUtility functions for serialization and deserialization.
typesΒ Common types required by nodes and clients APIs like blocks, responses and DTOs.

Your task: Review the feature definitions in sdk/Cargo.toml. Upon inspection, you'll notice that enabling the wallet feature will inherently incorporate the client feature.

Compare your insights with the source code in sdk/src/

The modules client, wallet and pow can be switch on and off

The modules client, wallet and pow can be "switched on and off"

The source code of the modules client, wallet and pow can be included or excluded from the IOTA SDK Library, depending on the definition in YOUR PROJECT's Cargo.toml.

πŸ‘‰ Β  GitHub -

The main package of this workspace is located in the identity_iota/ directory. This package will be built as a crate with the name "identity_iota" (use this name to search for it in The other packages of this workspace are dependencies of the main package.

Project Structure of

Project Structure of

πŸ‘‰ Β  Complete latest Documentation

πŸ‘‰ Β  Wiki - IOTA's Identity Framework

The main module "identity_iota" contains the IOTA DID method implementation for the IOTA ledger. It implements the W3C Decentralized Identifiers (DID) and Verifiable Credentials specifications.

πŸ‘‰ Β  Decentralized Identifiers (DID)

πŸ‘‰ Β  Verifiable Credentials

A look at identity_iota/Cargo.toml reveals the features of the library crate.

Features of identity_iota

Features of identity_iota