identity_iota/
lib.rs

1// Copyright 2020-2023 IOTA Stiftung
2// SPDX-License-Identifier: Apache-2.0
3
4#![cfg_attr(docsrs, feature(doc_cfg))]
5#![forbid(unsafe_code)]
6#![doc = include_str!("./../README.md")]
7#![allow(clippy::upper_case_acronyms)]
8#![warn(
9  rust_2018_idioms,
10  unreachable_pub,
11  missing_docs,
12  rustdoc::missing_crate_level_docs,
13  rustdoc::broken_intra_doc_links,
14  rustdoc::private_intra_doc_links,
15  rustdoc::private_doc_tests,
16  clippy::missing_safety_doc,
17  clippy::missing_errors_doc
18)]
19
20pub use iota_interaction;
21
22pub mod core {
23  //! Core Traits and Types
24
25  pub use identity_core::common::*;
26  pub use identity_core::convert::*;
27  pub use identity_core::error::*;
28
29  #[doc(inline)]
30  pub use identity_core::json;
31}
32
33pub mod credential {
34  //! Verifiable Credentials
35  //!
36  //! [Specification](https://www.w3.org/TR/vc-data-model/)
37
38  pub use identity_credential::credential::*;
39  #[cfg(feature = "domain-linkage")]
40  pub use identity_credential::domain_linkage::*;
41  pub use identity_credential::error::*;
42  pub use identity_credential::presentation::*;
43  #[cfg(feature = "revocation-bitmap")]
44  pub use identity_credential::revocation::*;
45  #[cfg(feature = "sd-jwt-vc")]
46  pub use identity_credential::sd_jwt_vc;
47  pub use identity_credential::validator::*;
48}
49
50pub mod did {
51  //! Decentralized Identifiers
52  //!
53  //! [Specification](https://www.w3.org/TR/did-core/)
54  pub use identity_did::*;
55}
56pub mod document {
57  //! DID Documents
58  //!
59  //! [Specification](https://www.w3.org/TR/did-core/)
60
61  pub use identity_document::document::*;
62  pub use identity_document::error::*;
63
64  pub use identity_document::service::*;
65  pub use identity_document::utils::*;
66
67  pub use identity_document::verifiable;
68}
69
70pub mod iota {
71  //! The IOTA DID method implementation for the IOTA ledger.
72
73  pub use identity_iota_core::*;
74}
75
76pub mod prelude {
77  //! Prelude of commonly used types
78
79  pub use identity_iota_core::IotaDID;
80  pub use identity_iota_core::IotaDocument;
81
82  #[cfg(all(feature = "resolver", not(target_arch = "wasm32")))]
83  #[cfg_attr(docsrs, doc(cfg(all(feature = "resolver", not(target_arch = "wasm32")))))]
84  pub use identity_iota_core::DidResolutionHandler;
85
86  #[cfg(feature = "resolver")]
87  #[cfg_attr(docsrs, doc(cfg(feature = "resolver")))]
88  pub use identity_resolver::Resolver;
89}
90
91#[cfg(feature = "resolver")]
92#[cfg_attr(docsrs, doc(cfg(feature = "resolver")))]
93pub mod resolver {
94  //! DID resolution utilities
95  pub use identity_resolver::*;
96}
97
98pub mod verification {
99  //! Types for verifiable data
100  pub use identity_verification::*;
101}
102
103pub mod storage {
104  //! Storage traits.
105  /// KeyIdStorage types and functionalities.
106  pub mod key_id_storage {
107    pub use identity_storage::key_id_storage::*;
108  }
109  /// KeyStorage types and functionalities.
110  pub mod key_storage {
111    pub use identity_storage::key_storage::public_modules::*;
112  }
113  /// Storage types and functionalities.
114  #[allow(clippy::module_inception)]
115  pub mod storage {
116    pub use identity_storage::storage::*;
117  }
118  pub use identity_storage::key_id_storage::*;
119  pub use identity_storage::key_storage::*;
120  pub use identity_storage::storage::*;
121}
122
123#[cfg(feature = "sd-jwt")]
124pub mod sd_jwt_payload {
125  //! Expose the selective disclosure crate.
126  pub use identity_credential::sd_jwt_payload::*;
127}
128
129// Exposes the reworked version of the selective disclosure crate
130// which is needed for selectively disclosable credentials.
131#[cfg(feature = "sd-jwt-vc")]
132pub use identity_credential::sd_jwt_v2 as sd_jwt_rework;