1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// Copyright 2020-2022 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

#![cfg_attr(docsrs, feature(doc_cfg))]
#![forbid(unsafe_code)]
#![allow(deprecated)]
#![doc = include_str!("./../README.md")]
#![allow(clippy::upper_case_acronyms)]
#![warn(
  rust_2018_idioms,
  unreachable_pub,
  missing_docs,
  rustdoc::missing_crate_level_docs,
  rustdoc::broken_intra_doc_links,
  rustdoc::private_intra_doc_links,
  rustdoc::private_doc_tests,
  clippy::missing_safety_doc,
  clippy::missing_errors_doc
)]

pub mod core {
  //! Core Traits and Types

  pub use identity_core::common::*;
  pub use identity_core::convert::*;
  pub use identity_core::error::*;
  pub use identity_core::utils::*;

  #[deprecated(since = "0.5.0", note = "diff chain features are slated for removal")]
  #[doc(inline)]
  pub use identity_core::diff;

  #[doc(inline)]
  pub use identity_core::json;
}

pub mod crypto {
  //! Cryptographic Utilities

  pub use identity_core::crypto::*;
}

pub mod credential {
  //! Verifiable Credentials
  //!
  //! [Specification](https://www.w3.org/TR/vc-data-model/)

  pub use identity_credential::credential::*;
  pub use identity_credential::error::*;
  pub use identity_credential::presentation::*;
}

pub mod did {
  //! Decentralized Identifiers
  //!
  //! [Specification](https://www.w3.org/TR/did-core/)

  pub use identity_did::document::*;
  pub use identity_did::error::*;
  pub use identity_did::revocation::*;
  pub use identity_did::service::*;
  pub use identity_did::utils::*;
  pub use identity_did::verification::*;

  pub use identity_did::did::*;

  pub use identity_did::verifiable;
}

pub mod client {
  //! IOTA DID Tangle client and validators.

  pub use identity_iota_client::chain::*;
  pub use identity_iota_client::credential::*;
  pub use identity_iota_client::document::*;
  pub use identity_iota_client::tangle::*;

  pub use identity_iota_client::Error;
  pub use identity_iota_client::Result;
}

pub mod iota_core {
  //! IOTA Core Traits and Types definitions

  pub use identity_iota_core::did::*;
  pub use identity_iota_core::diff::*;
  pub use identity_iota_core::document::*;
  pub use identity_iota_core::tangle::*;

  pub use identity_iota_core::Error;
  pub use identity_iota_core::Result;

  #[doc(inline)]
  pub use identity_iota_core::try_construct_did;
}

#[cfg(feature = "account")]
#[cfg_attr(docsrs, doc(cfg(feature = "account")))]
pub mod account {
  //! Secure storage for Decentralized Identifiers

  pub use identity_account::account::*;
  pub use identity_account::error::*;
  pub use identity_account::types::*;
  pub use identity_account::updates::*;
}

#[cfg(feature = "account")]
#[cfg_attr(docsrs, doc(cfg(feature = "account")))]
pub mod account_storage {
  //! Storage Trait and Types definitions

  pub use identity_account_storage::crypto::*;
  pub use identity_account_storage::error::*;
  pub use identity_account_storage::identity::*;
  pub use identity_account_storage::storage::*;
  pub use identity_account_storage::types::*;
  pub use identity_account_storage::utils::*;
}

// #[cfg(feature = "comm")]
// #[cfg_attr(docsrs, doc(cfg(feature = "comm")))]
// pub mod comm {
//   //! DID Communications Message Specification
//   //!
//   //! [Specification](https://github.com/iotaledger/identity.rs/tree/dev/docs/DID%20Communications%20Research%20and%20Specification)

//   pub use identity_comm::envelope::*;
//   pub use identity_comm::error::*;
//   pub use identity_comm::message::*;
// }

pub mod prelude {
  //! Prelude of commonly used types

  pub use identity_core::crypto::KeyPair;
  pub use identity_core::crypto::KeyType;
  pub use identity_iota_client::tangle::Client;
  pub use identity_iota_client::Result;
  pub use identity_iota_core::document::IotaDocument;
}