diff --git a/identity-did/src/lib.rs b/identity-did/src/lib.rs index 2712b0b607..bea68dfe12 100644 --- a/identity-did/src/lib.rs +++ b/identity-did/src/lib.rs @@ -2,19 +2,22 @@ // SPDX-License-Identifier: Apache-2.0 //! Agnostic implementation of the Decentralized Identifiers (DID) standard from W3C. -//! -//! Decentralized Identifiers (DID) is a proposed standard from the World Wide Web Consortium (W3C) to enable a verifiable and decentralized identity. -//! The standard provides a unique identifier (DID), which can be used to look up more information about the associated identity in the form of a DID Document. -//! The DID Document contains public keys, to prove control over the identity, and service endpoints which are URI's that can be resolved to find more public information about the identity. -//! Often the DID Documents are stored on an Distributed Ledger Technology (DLT) such as Bitcoin, Ethereum and IOTA, but this is not a requirement. -//! +//! +//! Decentralized Identifiers (DID) is a proposed standard from the World Wide Web Consortium (W3C) to enable a +//! verifiable and decentralized identity. The standard provides a unique identifier (DID), which can be used to look up +//! more information about the associated identity in the form of a DID Document. The DID Document contains public keys, +//! to prove control over the identity, and service endpoints which are URI's that can be resolved to find more public +//! information about the identity. Often the DID Documents are stored on an Distributed Ledger Technology (DLT) such as +//! Bitcoin, Ethereum and IOTA, but this is not a requirement. +//! //! This is an agnostic implementation of the [DID specifications v1.0 Working Draft 20200731](https://www.w3.org/TR/2020/WD-did-core-20200731/). -//! +//! //! It has been implemented in the following DID Methods: -//! -//! - [IOTA Identity](https://github.com/iotaledger/identity.rs/tree/dev/identity-iota): Developed and maintained by the IOTA Foundation, utilizing the IOTA Tangle. -//! -//! See [our documentation portal](https://identity.docs.iota.org/overview/did.html) for additional documentations, conceptual explainations and usage examples. +//! +//! - [IOTA Identity](https://github.com/iotaledger/identity.rs/tree/dev/identity-iota): Developed and maintained by the +//! IOTA Foundation, utilizing the IOTA Tangle. +//! +//! See [our documentation portal](https://identity.docs.iota.org/overview/did.html) for additional documentations, conceptual explainations and usage examples. #![warn( rust_2018_idioms, diff --git a/identity/src/lib.rs b/identity/src/lib.rs index 9ad1eee117..502202c94e 100644 --- a/identity/src/lib.rs +++ b/identity/src/lib.rs @@ -7,14 +7,13 @@ //! //! # Example //! ``` +//! use identity::crypto::KeyPair; //! use identity::iota::Client; //! use identity::iota::IotaDocument; -//! use identity::crypto::KeyPair; //! use identity::iota::Result; //! //! #[smol_potat::main] //! async fn main() -> Result<()> { -//! //! // Create a client to interact with the IOTA Tangle. //! let client: Client = Client::new()?; //! @@ -29,23 +28,25 @@ //! //! // Use the client to publish the DID Document to the IOTA Tangle. //! let transaction: _ = client.publish_document(&document).await?; -//! +//! //! // Print the DID Document transaction link. //! println!("DID Document Transaction > {}", client.transaction_url(&transaction)); //! //! Ok(()) //! } -//! //! ``` -//! +//! //! **Output**: Example DID Document in the [Tangle Explorer](https://explorer.iota.org/mainnet/transaction/LESUXJUMJCOWGHU9CQQUIHCIPYELOBMHZT9CHCYHJPO9BONQ9IQIFJSREYNOCTYCTQYBHBMBBWJJZ9999). -//! +//! //! # Documentation & Community Resources //! - [identity.rs](https://github.com/iotaledger/identity.rs): Rust source code of this library on GitHub. -//! - [Identity Documentation Pages](https://identity.docs.iota.org/welcome.html): Supplementing documentation with simple examples on library usage to get you started. -//! - [More Examples](https://github.com/iotaledger/identity.rs/tree/dev/examples): Practical examples to get started with the library. -//! - [IOTA Identity Experience Team Website](https://iota-community.github.io/X-Team_IOTA_Identity/): Website of aforementioned team. -//! +//! - [Identity Documentation Pages](https://identity.docs.iota.org/welcome.html): Supplementing documentation with +//! simple examples on library usage to get you started. +//! - [More Examples](https://github.com/iotaledger/identity.rs/tree/dev/examples): Practical examples to get started +//! with the library. +//! - [IOTA Identity Experience Team Website](https://iota-community.github.io/X-Team_IOTA_Identity/): Website of +//! aforementioned team. +//! //! # Structure (Temporary) //! //! - Resources @@ -53,9 +54,7 @@ //! - X-Team //! - Simple Example //! - Architecture/Overview -//! - Get -//! -//! +//! - Get #![warn( rust_2018_idioms,