Introduction
IOTA Identity is a Rust implementation of decentralized digital identity, also known as Self-Sovereign Identity (SSI). It implements the W3C Decentralized Identifiers (DID) and Verifiable Credentials specifications. This library can be used to create, resolve and authenticate digital identities and to create verifiable credentials and presentations in order to share information in a verifiable manner and establish trust in the digital world. It does so while supporting secure storage of cryptographic keys, which can be implemented for your preferred key management system. Many of the individual libraries (Rust crates) are agnostic over the concrete DID method, with the exception of some libraries dedicated to implement the IOTA DID method, which is an implementation of decentralized digital identity on the IOTA and Shimmer networks. Written in stable Rust, IOTA Identity has strong guarantees of memory safety and process integrity while maintaining exceptional performance.
Bindings
Foreign Function Interface (FFI) Bindings of this Rust library to other programming languages:
- Web Assembly (JavaScript/TypeScript)
Documentation and Resources
- API References:
- Rust API Reference: Package documentation (cargo docs).
- Wasm API Reference: Wasm Package documentation.
- Identity Documentation Pages: Supplementing documentation with context around identity and simple examples on library usage.
- Examples: Practical code snippets to get you started with the library.
Prerequisites
Getting Started
If you want to include IOTA Identity in your project, simply add it as a dependency in your Cargo.toml
:
[]
= { = "1.0.0-rc" }
To try out the examples, you can also do this:
- Clone the repository, e.g. through
git clone https://github.com/iotaledger/identity.rs
- Start a private Tangle as described in the next section
- Run the example to create a DID using
cargo run --release --example 0_create_did
Example: Creating an Identity
The following code creates and publishes a new IOTA DID Document to a locally running private network. See the instructions on running your own private network.
Cargo.toml
[]
= "iota_identity_example"
= "1.0.0"
= "2021"
[]
= { = "1.0.0-rc" }
= { = "1.0.2", = true, = ["tls", "client", "stronghold"] }
= { = "1", = ["full"] }
_main._rs
use ToJson;
use IotaClientExt;
use IotaDocument;
use IotaIdentityClientExt;
use NetworkName;
use JwkDocumentExt;
use JwkMemStore;
use KeyIdMemstore;
use Storage;
use JwsAlgorithm;
use MethodScope;
use GetAddressesOptions;
use StrongholdSecretManager;
use SecretManager;
use Client;
use bip39;
use Bech32Address;
use AliasOutput;
use AliasOutputDto;
use AsyncReadExt;
// The endpoint of the IOTA node to use.
static API_ENDPOINT: &str = "http://127.0.0.1:14265";
/// Demonstrates how to create a DID Document and publish it in a new Alias Output.
async
Example output
Roadmap and Milestones
For detailed development progress, see the IOTA Identity development kanban board.
Contributing
We would love to have you help us with the development of IOTA Identity. Each and every contribution is greatly valued!
Please review the contribution and workflow sections in the IOTA Wiki.
To contribute directly to the repository, simply fork the project, push your changes to your fork and create a pull request to get them included!
The best place to get involved in discussions about this library or to look for support at is the #identity
channel on the IOTA Discord. You can also ask questions on our Stack Exchange.