diff --git a/.github/actions/release/bump-versions/action.yml b/.github/actions/release/bump-versions/action.yml index 0e7be3d571..da119ef373 100644 --- a/.github/actions/release/bump-versions/action.yml +++ b/.github/actions/release/bump-versions/action.yml @@ -31,23 +31,23 @@ runs: command: install args: -f --no-default-features --features "add set-version" --version ^0.8 cargo-edit - - name: Replace identity version in Wasm bindings + - name: Replace identity_iota version in Wasm bindings shell: bash if: ${{inputs.release-target == 'rust'}} working-directory: bindings/wasm run: | - cargo add identity@=${{ inputs.version }} --path=../../identity - - - name: Replace identity version in stronghold nodejs bindings + cargo add identity_iota@=${{ inputs.version }} --path=../../identity_iota + + - name: Replace identity versions in stronghold nodejs bindings shell: bash if: ${{inputs.release-target == 'rust'}} working-directory: bindings/stronghold-nodejs run: | - cargo add identity-core@=${{ inputs.version }} --path=../../identity-core - cargo add identity-iota-core@=${{ inputs.version }} --path=../../identity-iota-core - cargo add identity-account-storage@=${{ inputs.version }} --path=../../identity-account-storage - - - name: Bump Rust crate version + cargo add identity_core@=${{ inputs.version }} --path=../../identity_core + cargo add identity_iota_core@=${{ inputs.version }} --path=../../identity_iota_core + cargo add identity_account_storage@=${{ inputs.version }} --path=../../identity_account_storage + + - name: Bump Rust crate versions shell: bash if: ${{inputs.release-target == 'rust'}} run: | @@ -88,4 +88,4 @@ runs: run: | npm version ${{ inputs.version }} # set peer dependency version - echo "`jq '.peerDependencies."@iota/identity-wasm"="${{ inputs.version }}"' package.json`" > package.json \ No newline at end of file + echo "`jq '.peerDependencies."@iota/identity-wasm"="${{ inputs.version }}"' package.json`" > package.json diff --git a/Cargo.toml b/Cargo.toml index c3778d98e8..e35afd0a33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,16 +1,16 @@ [workspace] resolver = "2" members = [ - "identity", - # "identity-comm", - "identity-account", - "identity-account-storage", - "identity-core", - "identity-credential", - "identity-did", - "identity-diff", - "identity-iota", - "identity-iota-core", + # "identity_comm", + "identity_account", + "identity_account_storage", + "identity_core", + "identity_credential", + "identity_did", + "identity_diff", + "identity_iota", + "identity_iota_client", + "identity_iota_core", "examples", ] diff --git a/README.md b/README.md index 945d1b80cc..6ec6af4a61 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ The individual libraries are developed to be agnostic about the utilized [Distri If you want to include IOTA Identity in your project, simply add it as a dependency in your `Cargo.toml`: ```toml [dependencies] -identity = { version = "0.6" } +identity_iota = { version = "0.6" } ``` To try out the [examples](https://github.com/iotaledger/identity.rs/blob/HEAD/examples), you can also do this: @@ -78,18 +78,18 @@ version = "1.0.0" edition = "2021" [dependencies] -identity = { version = "0.6" } +identity_iota = { version = "0.6" } tokio = { version = "1", features = ["full"] } ``` *main.**rs* ```rust,no_run -use identity::account::Account; -use identity::account::IdentitySetup; -use identity::account::Result; -use identity::account_storage::Stronghold; -use identity::core::ToJson; -use identity::iota::ExplorerUrl; -use identity::iota::ResolvedIotaDocument; +use identity_iota::account::Account; +use identity_iota::account::IdentitySetup; +use identity_iota::account::Result; +use identity_iota::account_storage::Stronghold; +use identity_iota::core::ToJson; +use identity_iota::client::ExplorerUrl; +use identity_iota::client::ResolvedIotaDocument; #[tokio::main] async fn main() -> Result<()> { diff --git a/bindings/stronghold-nodejs/Cargo.lock b/bindings/stronghold-nodejs/Cargo.lock index 888fd11cc3..989f3b1093 100644 --- a/bindings/stronghold-nodejs/Cargo.lock +++ b/bindings/stronghold-nodejs/Cargo.lock @@ -198,12 +198,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - [[package]] name = "bumpalo" version = "3.10.0" @@ -617,15 +611,6 @@ dependencies = [ "serde", ] -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "heck" version = "0.4.0" @@ -668,41 +653,64 @@ dependencies = [ ] [[package]] -name = "identity-account-storage" +name = "identity-diff" +version = "0.5.0" +dependencies = [ + "serde", + "serde_json", + "strum", + "thiserror", +] + +[[package]] +name = "identity-stronghold-nodejs" +version = "0.5.0" +dependencies = [ + "identity_account_storage", + "identity_core", + "identity_iota_core", + "napi", + "napi-build", + "napi-derive", + "serde", + "serde_json", +] + +[[package]] +name = "identity_account_storage" version = "0.5.0" dependencies = [ "async-trait", "futures", "hashbrown", - "identity-core", - "identity-did", - "identity-iota-core", - "iota-crypto 0.9.1", + "identity_core", + "identity_did", + "identity_iota_core", + "iota-crypto 0.8.0", "iota_stronghold", "once_cell", "parking_lot", "rand", "seahash", "serde", - "strum 0.24.0", + "strum", "thiserror", "tokio", "zeroize", ] [[package]] -name = "identity-core" +name = "identity_core" version = "0.5.0" dependencies = [ - "bs58", "identity-diff", - "iota-crypto 0.9.1", + "iota-crypto 0.8.0", "js-sys", "multibase", "serde", "serde_jcs", "serde_json", - "strum 0.21.0", + "strum", "thiserror", "time", "url", @@ -710,57 +718,32 @@ dependencies = [ ] [[package]] -name = "identity-did" +name = "identity_did" version = "0.5.0" dependencies = [ - "async-trait", "did_url", "form_urlencoded", - "identity-core", + "identity_core", "indexmap", "serde", - "strum 0.21.0", + "strum", "thiserror", ] [[package]] -name = "identity-diff" -version = "0.5.0" -dependencies = [ - "serde", - "serde_json", - "strum 0.21.0", - "thiserror", -] - -[[package]] -name = "identity-iota-core" +name = "identity_iota_core" version = "0.5.0" dependencies = [ "bee-message", - "identity-core", - "identity-did", - "iota-crypto 0.9.1", + "identity_core", + "identity_did", + "iota-crypto 0.8.0", "lazy_static", "serde", - "strum 0.24.0", + "strum", "thiserror", ] -[[package]] -name = "identity-stronghold-nodejs" -version = "0.5.0" -dependencies = [ - "identity-account-storage", - "identity-core", - "identity-iota-core", - "napi", - "napi-build", - "napi-derive", - "serde", - "serde_json", -] - [[package]] name = "idna" version = "0.2.3" @@ -790,6 +773,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee273ae67ff1bc7c59317c0ab280e0e76259e6bd83e140ac4c2ecebec994f740" dependencies = [ "aead", + "aes", "aes-gcm", "blake2", "chacha20poly1305", @@ -812,26 +796,18 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c98a3248cde6b42cb479a52089fe4fc20d12de51b8edd923294cd5240ec89b0" dependencies = [ - "aead", - "aes-gcm", "bee-ternary", "blake2", - "curve25519-dalek", "digest", "ed25519-zebra", - "generic-array", - "getrandom 0.2.6", - "hmac", "lazy_static", - "pbkdf2", - "sha2", - "x25519-dalek", ] [[package]] name = "iota_stronghold" -version = "0.4.0" -source = "git+https://github.com/iotaledger/stronghold.rs?rev=629466da83a677925904b2e733ef7bfad5a42864#629466da83a677925904b2e733ef7bfad5a42864" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "273197e986052cac7fed586142e40497ffec2e3536a7416d23bf694f90068b96" dependencies = [ "bincode", "hkdf", @@ -1336,8 +1312,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "stronghold-derive" -version = "0.2.0" -source = "git+https://github.com/iotaledger/stronghold.rs?rev=629466da83a677925904b2e733ef7bfad5a42864#629466da83a677925904b2e733ef7bfad5a42864" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bac933fa00ab0d0f1d6327ab9198a95aaaca3458dae09f0b8e1cd69fee2a7eaf" dependencies = [ "proc-macro2", "quote", @@ -1346,8 +1323,9 @@ dependencies = [ [[package]] name = "stronghold-rlu" -version = "0.1.0" -source = "git+https://github.com/iotaledger/stronghold.rs?rev=629466da83a677925904b2e733ef7bfad5a42864#629466da83a677925904b2e733ef7bfad5a42864" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1441b94679d035a7f883515e283c0166bab3d87079bbe0cc76f11699c4c336d9" dependencies = [ "atom", "lazy_static", @@ -1358,8 +1336,9 @@ dependencies = [ [[package]] name = "stronghold-runtime" -version = "0.1.0" -source = "git+https://github.com/iotaledger/stronghold.rs?rev=629466da83a677925904b2e733ef7bfad5a42864#629466da83a677925904b2e733ef7bfad5a42864" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8845d2c5a4270ecdf542f489ff16b2a6fec245ad001c6afe098c2e6ea0211d6c" dependencies = [ "dirs", "iota-crypto 0.8.0", @@ -1372,8 +1351,9 @@ dependencies = [ [[package]] name = "stronghold-utils" -version = "0.3.0" -source = "git+https://github.com/iotaledger/stronghold.rs?rev=629466da83a677925904b2e733ef7bfad5a42864#629466da83a677925904b2e733ef7bfad5a42864" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d8493a083506300a7a112d927f48068e4c733f0b46c63569dea6ab6dfe175c" dependencies = [ "rand", "stronghold-derive", @@ -1381,8 +1361,9 @@ dependencies = [ [[package]] name = "stronghold_engine" -version = "0.4.0" -source = "git+https://github.com/iotaledger/stronghold.rs?rev=629466da83a677925904b2e733ef7bfad5a42864#629466da83a677925904b2e733ef7bfad5a42864" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd4131515d37c48994295d0dd7f99bb178332fe8c4cf0ab361a7ee7d4d62c2da" dependencies = [ "anyhow", "dirs-next", @@ -1396,34 +1377,13 @@ dependencies = [ "zeroize", ] -[[package]] -name = "strum" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf86bbcfd1fa9670b7a129f64fc0c9fcbbfe4f1bc4210e9e98fe71ffc12cde2" -dependencies = [ - "strum_macros 0.21.1", -] - [[package]] name = "strum" version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e96acfc1b70604b8b2f1ffa4c57e59176c7dbb05d556c71ecd2f5498a1dee7f8" dependencies = [ - "strum_macros 0.24.0", -] - -[[package]] -name = "strum_macros" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec" -dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", - "syn", + "strum_macros", ] [[package]] @@ -1432,7 +1392,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6878079b17446e4d3eba6192bb0a2950d5b14f0ed8424b852310e5a94345d0ef" dependencies = [ - "heck 0.4.0", + "heck", "proc-macro2", "quote", "rustversion", @@ -1562,12 +1522,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" - [[package]] name = "unicode-xid" version = "0.2.3" diff --git a/bindings/stronghold-nodejs/Cargo.toml b/bindings/stronghold-nodejs/Cargo.toml index 7a61ce8bc8..8df1eb1677 100644 --- a/bindings/stronghold-nodejs/Cargo.toml +++ b/bindings/stronghold-nodejs/Cargo.toml @@ -7,9 +7,9 @@ publish = false crate-type = ["cdylib"] [dependencies] -identity-account-storage = { version = "=0.5.0", path = "../../identity-account-storage", default-features = false, features = ["stronghold", "send-sync-storage", "encryption"] } -identity-core = { version = "=0.5.0", path = "../../identity-core", default-features = false } -identity-iota-core = { version = "=0.5.0", path = "../../identity-iota-core", default-features = false } +identity_account_storage = { version = "=0.5.0", path = "../../identity_account_storage", default-features = false, features = ["stronghold", "send-sync-storage", "encryption"] } +identity_core = { version = "=0.5.0", path = "../../identity_core", default-features = false } +identity_iota_core = { version = "=0.5.0", path = "../../identity_iota_core", default-features = false } napi = { version = "2.4.3", default-features = false, features = ["napi4", "tokio_rt", "serde-json"] } napi-derive = { version = "2.4.1", default-features = false, features = ["compat-mode", "full"] } serde = { version = "1.0", default-features = false, features = ["derive"] } diff --git a/bindings/wasm/Cargo.toml b/bindings/wasm/Cargo.toml index cb20625412..eaf1f47ea6 100644 --- a/bindings/wasm/Cargo.toml +++ b/bindings/wasm/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "identity-wasm" +name = "identity_wasm" version = "0.5.0" authors = ["IOTA Stiftung"] edition = "2021" @@ -20,16 +20,16 @@ async-trait = { version = "0.1", default-features = false } console_error_panic_hook = { version = "0.1" } futures = { version = "0.3" } js-sys = { version = "0.3" } -proc-typescript = { version = "0.1.0", path = "./proc-typescript" } +proc_typescript = { version = "0.1.0", path = "./proc_typescript" } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0", default-features = false } serde_repr = { version = "0.1", default-features = false } wasm-bindgen = { version = "0.2", features = ["serde-serialize"] } wasm-bindgen-futures = { version = "0.4", default-features = false } -[dependencies.identity] +[dependencies.identity_iota] version = "=0.5.0" -path = "../../identity" +path = "../../identity_iota" default-features = false features = ["account", "storage-test-suite", "unstable-encryption", "revocation-bitmap"] diff --git a/bindings/wasm/proc-typescript/Cargo.toml b/bindings/wasm/proc_typescript/Cargo.toml similarity index 96% rename from bindings/wasm/proc-typescript/Cargo.toml rename to bindings/wasm/proc_typescript/Cargo.toml index 25087086c5..6d973e3571 100644 --- a/bindings/wasm/proc-typescript/Cargo.toml +++ b/bindings/wasm/proc_typescript/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "proc-typescript" +name = "proc_typescript" version = "0.1.0" authors = ["IOTA Stiftung"] edition = "2021" diff --git a/bindings/wasm/proc-typescript/src/lib.rs b/bindings/wasm/proc_typescript/src/lib.rs similarity index 100% rename from bindings/wasm/proc-typescript/src/lib.rs rename to bindings/wasm/proc_typescript/src/lib.rs diff --git a/bindings/wasm/src/account/identity/chain_state.rs b/bindings/wasm/src/account/identity/chain_state.rs index d95be3ac99..2c4ef63ccf 100644 --- a/bindings/wasm/src/account/identity/chain_state.rs +++ b/bindings/wasm/src/account/identity/chain_state.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::account_storage::ChainState; +use identity_iota::account_storage::ChainState; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/account/storage/test_suite.rs b/bindings/wasm/src/account/storage/test_suite.rs index 51f4902652..aa6660da53 100644 --- a/bindings/wasm/src/account/storage/test_suite.rs +++ b/bindings/wasm/src/account/storage/test_suite.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::account_storage::StorageTestSuite; +use identity_iota::account_storage::StorageTestSuite; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; use wasm_bindgen_futures::future_to_promise; diff --git a/bindings/wasm/src/account/storage/traits.rs b/bindings/wasm/src/account/storage/traits.rs index 028fe2ed6f..aec23609f8 100644 --- a/bindings/wasm/src/account/storage/traits.rs +++ b/bindings/wasm/src/account/storage/traits.rs @@ -4,21 +4,21 @@ use core::fmt::Debug; use core::fmt::Formatter; -use identity::account_storage::CekAlgorithm; -use identity::account_storage::ChainState; -use identity::account_storage::EncryptedData; -use identity::account_storage::EncryptionAlgorithm; -use identity::account_storage::Error as AccountStorageError; -use identity::account_storage::KeyLocation; -use identity::account_storage::Result as AccountStorageResult; -use identity::account_storage::Signature; -use identity::account_storage::Storage; -use identity::crypto::PrivateKey; -use identity::crypto::PublicKey; -use identity::iota_core::IotaDID; -use identity::iota_core::NetworkName; -use identity::prelude::IotaDocument; -use identity::prelude::KeyType; +use identity_iota::account_storage::CekAlgorithm; +use identity_iota::account_storage::ChainState; +use identity_iota::account_storage::EncryptedData; +use identity_iota::account_storage::EncryptionAlgorithm; +use identity_iota::account_storage::Error as AccountStorageError; +use identity_iota::account_storage::KeyLocation; +use identity_iota::account_storage::Result as AccountStorageResult; +use identity_iota::account_storage::Signature; +use identity_iota::account_storage::Storage; +use identity_iota::crypto::PrivateKey; +use identity_iota::crypto::PublicKey; +use identity_iota::iota_core::IotaDID; +use identity_iota::iota_core::NetworkName; +use identity_iota::prelude::IotaDocument; +use identity_iota::prelude::KeyType; use js_sys::Array; use js_sys::Promise; use js_sys::Uint8Array; @@ -367,9 +367,9 @@ interface Storage { didCreate: (network: string, fragment: string, privateKey?: Uint8Array) => Promise<[DID, KeyLocation]>; /** Removes the keys and any other state for the given `did`. - + This operation is idempotent: it does not fail if the given `did` does not (or no longer) exist. - + Returns `true` if the did and its associated data was removed, `false` if nothing was done. */ didPurge: (did: DID) => Promise; @@ -384,7 +384,7 @@ interface Storage { keyGenerate: (did: DID, keyType: KeyType, fragment: string) => Promise; /** Inserts a private key at the specified `location`. - + If a key at `location` exists, it is overwritten. */ keyInsert: (did: DID, keyLocation: KeyLocation, privateKey: Uint8Array) => Promise; @@ -392,9 +392,9 @@ interface Storage { keyPublic: (did: DID, keyLocation: KeyLocation) => Promise; /** Deletes the key at `location`. - + This operation is idempotent: it does not fail if the key does not exist. - + Returns `true` if it removed the key, `false` if nothing was done. */ keyDelete: (did: DID, keyLocation: KeyLocation) => Promise; @@ -405,13 +405,13 @@ interface Storage { keyExists: (did: DID, keyLocation: KeyLocation) => Promise; /** Encrypts the given `plaintext` with the specified `encryptionAlgorithm` and `cekAlgorithm`. - * + * * Returns an `EncryptedData` instance. */ dataEncrypt: (did: DID, plaintext: Uint8Array, associatedData: Uint8Array, encryptionAlgorithm: EncryptionAlgorithm, cekAlgorithm: CekAlgorithm, publicKey: Uint8Array) => Promise; /** Decrypts the given `data` with the specified `encryptionAlgorithm` and `cekAlgorithm`. - * + * * Returns the decrypted text. */ dataDecrypt: (did: DID, data: EncryptedData, encryptionAlgorithm: EncryptionAlgorithm, cekAlgorithm: CekAlgorithm, privateKey: KeyLocation) => Promise; diff --git a/bindings/wasm/src/account/types/agreement_info.rs b/bindings/wasm/src/account/types/agreement_info.rs index 3d2758870c..a7814f6350 100644 --- a/bindings/wasm/src/account/types/agreement_info.rs +++ b/bindings/wasm/src/account/types/agreement_info.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::account_storage::AgreementInfo; +use identity_iota::account_storage::AgreementInfo; use serde::Deserialize; use serde::Serialize; use wasm_bindgen::prelude::*; diff --git a/bindings/wasm/src/account/types/auto_save.rs b/bindings/wasm/src/account/types/auto_save.rs index 1d84ff9bd0..ae846d670c 100644 --- a/bindings/wasm/src/account/types/auto_save.rs +++ b/bindings/wasm/src/account/types/auto_save.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::account::AutoSave; +use identity_iota::account::AutoSave; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/account/types/cek_algorithm.rs b/bindings/wasm/src/account/types/cek_algorithm.rs index 9ec1004b13..59a3d12f47 100644 --- a/bindings/wasm/src/account/types/cek_algorithm.rs +++ b/bindings/wasm/src/account/types/cek_algorithm.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::account_storage::CekAlgorithm; +use identity_iota::account_storage::CekAlgorithm; use serde::Deserialize; use serde::Serialize; use wasm_bindgen::prelude::*; diff --git a/bindings/wasm/src/account/types/encrypted_data.rs b/bindings/wasm/src/account/types/encrypted_data.rs index 0544eb7311..b17b9a9073 100644 --- a/bindings/wasm/src/account/types/encrypted_data.rs +++ b/bindings/wasm/src/account/types/encrypted_data.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::account_storage::EncryptedData; +use identity_iota::account_storage::EncryptedData; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/account/types/encryption_algorithm.rs b/bindings/wasm/src/account/types/encryption_algorithm.rs index 211d6d50f2..252b6a66a0 100644 --- a/bindings/wasm/src/account/types/encryption_algorithm.rs +++ b/bindings/wasm/src/account/types/encryption_algorithm.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::account_storage::EncryptionAlgorithm; +use identity_iota::account_storage::EncryptionAlgorithm; use serde::Deserialize; use serde::Serialize; use wasm_bindgen::prelude::*; diff --git a/bindings/wasm/src/account/types/identity_setup.rs b/bindings/wasm/src/account/types/identity_setup.rs index 897dce5400..300a70b166 100644 --- a/bindings/wasm/src/account/types/identity_setup.rs +++ b/bindings/wasm/src/account/types/identity_setup.rs @@ -1,8 +1,8 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::account::IdentitySetup; -use identity::crypto::PrivateKey; +use identity_iota::account::IdentitySetup; +use identity_iota::crypto::PrivateKey; use wasm_bindgen::prelude::*; #[wasm_bindgen] diff --git a/bindings/wasm/src/account/types/key_location.rs b/bindings/wasm/src/account/types/key_location.rs index d900422794..de7ce72614 100644 --- a/bindings/wasm/src/account/types/key_location.rs +++ b/bindings/wasm/src/account/types/key_location.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::account_storage::KeyLocation; +use identity_iota::account_storage::KeyLocation; use wasm_bindgen::prelude::*; use crate::crypto::WasmKeyType; diff --git a/bindings/wasm/src/account/types/method_content.rs b/bindings/wasm/src/account/types/method_content.rs index d6a7e2d797..b6366eb938 100644 --- a/bindings/wasm/src/account/types/method_content.rs +++ b/bindings/wasm/src/account/types/method_content.rs @@ -1,9 +1,9 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::account::MethodContent; -use identity::crypto::PrivateKey; -use identity::crypto::PublicKey; +use identity_iota::account::MethodContent; +use identity_iota::crypto::PrivateKey; +use identity_iota::crypto::PublicKey; use serde::Deserialize; use serde::Serialize; use wasm_bindgen::prelude::*; diff --git a/bindings/wasm/src/account/types/signature.rs b/bindings/wasm/src/account/types/signature.rs index ef9f62fe75..51b428cbf4 100644 --- a/bindings/wasm/src/account/types/signature.rs +++ b/bindings/wasm/src/account/types/signature.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::account_storage::Signature; +use identity_iota::account_storage::Signature; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/account/wasm_account/account.rs b/bindings/wasm/src/account/wasm_account/account.rs index e4de16026c..023bf1dac2 100644 --- a/bindings/wasm/src/account/wasm_account/account.rs +++ b/bindings/wasm/src/account/wasm_account/account.rs @@ -5,22 +5,22 @@ use std::cell::RefCell; use std::rc::Rc; use std::sync::Arc; -use identity::account::Account; -use identity::account::AccountBuilder; -use identity::account::PublishOptions; -use identity::account_storage::CekAlgorithm; -use identity::account_storage::EncryptedData; -use identity::account_storage::EncryptionAlgorithm; -use identity::account_storage::Storage; -use identity::core::OneOrMany; -use identity::credential::Credential; -use identity::credential::Presentation; -use identity::crypto::ProofOptions; -use identity::crypto::PublicKey; -use identity::did::verifiable::VerifiableProperties; -use identity::iota::Client; -use identity::iota_core::IotaDID; -use identity::iota_core::IotaDocument; +use identity_iota::account::Account; +use identity_iota::account::AccountBuilder; +use identity_iota::account::PublishOptions; +use identity_iota::account_storage::CekAlgorithm; +use identity_iota::account_storage::EncryptedData; +use identity_iota::account_storage::EncryptionAlgorithm; +use identity_iota::account_storage::Storage; +use identity_iota::client::Client; +use identity_iota::core::OneOrMany; +use identity_iota::credential::Credential; +use identity_iota::credential::Presentation; +use identity_iota::crypto::ProofOptions; +use identity_iota::crypto::PublicKey; +use identity_iota::did::verifiable::VerifiableProperties; +use identity_iota::iota_core::IotaDID; +use identity_iota::iota_core::IotaDocument; use js_sys::Promise; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/bindings/wasm/src/account/wasm_account/account_builder.rs b/bindings/wasm/src/account/wasm_account/account_builder.rs index 41d3ef7387..010ea7694a 100644 --- a/bindings/wasm/src/account/wasm_account/account_builder.rs +++ b/bindings/wasm/src/account/wasm_account/account_builder.rs @@ -4,11 +4,11 @@ use std::cell::RefCell; use std::rc::Rc; -use identity::account::AccountBuilder; -use identity::account::IdentitySetup; -use identity::iota::Client; -use identity::iota::ClientBuilder; -use identity::iota_core::IotaDID; +use identity_iota::account::AccountBuilder; +use identity_iota::account::IdentitySetup; +use identity_iota::client::Client; +use identity_iota::client::ClientBuilder; +use identity_iota::iota_core::IotaDID; use js_sys::Promise; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/bindings/wasm/src/account/wasm_account/update/attach_method_relationships.rs b/bindings/wasm/src/account/wasm_account/update/attach_method_relationships.rs index 66c61cd93b..99de28c8ce 100644 --- a/bindings/wasm/src/account/wasm_account/update/attach_method_relationships.rs +++ b/bindings/wasm/src/account/wasm_account/update/attach_method_relationships.rs @@ -4,9 +4,9 @@ use std::cell::RefCell; use std::rc::Rc; -use identity::account::UpdateError::MissingRequiredField; -use identity::core::OneOrMany; -use identity::did::MethodRelationship; +use identity_iota::account::UpdateError::MissingRequiredField; +use identity_iota::core::OneOrMany; +use identity_iota::did::MethodRelationship; use js_sys::Promise; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/bindings/wasm/src/account/wasm_account/update/create_method.rs b/bindings/wasm/src/account/wasm_account/update/create_method.rs index 07293e8c90..d84bdebaa3 100644 --- a/bindings/wasm/src/account/wasm_account/update/create_method.rs +++ b/bindings/wasm/src/account/wasm_account/update/create_method.rs @@ -5,12 +5,12 @@ use std::cell::RefCell; use std::cell::RefMut; use std::rc::Rc; -use identity::account::CreateMethodBuilder; -use identity::account::IdentityUpdater; -use identity::account::MethodContent; -use identity::account::UpdateError::MissingRequiredField; -use identity::did::MethodScope; -use identity::iota::Client; +use identity_iota::account::CreateMethodBuilder; +use identity_iota::account::IdentityUpdater; +use identity_iota::account::MethodContent; +use identity_iota::account::UpdateError::MissingRequiredField; +use identity_iota::client::Client; +use identity_iota::did::MethodScope; use js_sys::Promise; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/bindings/wasm/src/account/wasm_account/update/create_service.rs b/bindings/wasm/src/account/wasm_account/update/create_service.rs index 76336d87e0..ca01cb764f 100644 --- a/bindings/wasm/src/account/wasm_account/update/create_service.rs +++ b/bindings/wasm/src/account/wasm_account/update/create_service.rs @@ -5,12 +5,12 @@ use std::cell::RefCell; use std::cell::RefMut; use std::rc::Rc; -use identity::account::CreateServiceBuilder; -use identity::account::IdentityUpdater; -use identity::account::UpdateError::MissingRequiredField; -use identity::core::Object; -use identity::did::ServiceEndpoint; -use identity::iota::Client; +use identity_iota::account::CreateServiceBuilder; +use identity_iota::account::IdentityUpdater; +use identity_iota::account::UpdateError::MissingRequiredField; +use identity_iota::client::Client; +use identity_iota::core::Object; +use identity_iota::did::ServiceEndpoint; use js_sys::Promise; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/bindings/wasm/src/account/wasm_account/update/delete_method.rs b/bindings/wasm/src/account/wasm_account/update/delete_method.rs index 371fb75327..1d76ae72c7 100644 --- a/bindings/wasm/src/account/wasm_account/update/delete_method.rs +++ b/bindings/wasm/src/account/wasm_account/update/delete_method.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::account::UpdateError::MissingRequiredField; +use identity_iota::account::UpdateError::MissingRequiredField; use js_sys::Promise; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/bindings/wasm/src/account/wasm_account/update/delete_service.rs b/bindings/wasm/src/account/wasm_account/update/delete_service.rs index 9794791d66..11194d856e 100644 --- a/bindings/wasm/src/account/wasm_account/update/delete_service.rs +++ b/bindings/wasm/src/account/wasm_account/update/delete_service.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::account::UpdateError::MissingRequiredField; +use identity_iota::account::UpdateError::MissingRequiredField; use js_sys::Promise; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/bindings/wasm/src/account/wasm_account/update/detach_method_relationships.rs b/bindings/wasm/src/account/wasm_account/update/detach_method_relationships.rs index e40d802844..7dc3961f2f 100644 --- a/bindings/wasm/src/account/wasm_account/update/detach_method_relationships.rs +++ b/bindings/wasm/src/account/wasm_account/update/detach_method_relationships.rs @@ -4,9 +4,9 @@ use std::cell::RefCell; use std::rc::Rc; -use identity::account::UpdateError::MissingRequiredField; -use identity::core::OneOrMany; -use identity::did::MethodRelationship; +use identity_iota::account::UpdateError::MissingRequiredField; +use identity_iota::core::OneOrMany; +use identity_iota::did::MethodRelationship; use js_sys::Promise; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/bindings/wasm/src/account/wasm_account/update/set_also_known_as.rs b/bindings/wasm/src/account/wasm_account/update/set_also_known_as.rs index 431218319b..612bdef687 100644 --- a/bindings/wasm/src/account/wasm_account/update/set_also_known_as.rs +++ b/bindings/wasm/src/account/wasm_account/update/set_also_known_as.rs @@ -4,9 +4,9 @@ use std::cell::RefCell; use std::rc::Rc; -use identity::core::OneOrMany; -use identity::core::OrderedSet; -use identity::core::Url; +use identity_iota::core::OneOrMany; +use identity_iota::core::OrderedSet; +use identity_iota::core::Url; use js_sys::Promise; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/bindings/wasm/src/account/wasm_account/update/set_controller.rs b/bindings/wasm/src/account/wasm_account/update/set_controller.rs index 304c594306..5f6bf8a287 100644 --- a/bindings/wasm/src/account/wasm_account/update/set_controller.rs +++ b/bindings/wasm/src/account/wasm_account/update/set_controller.rs @@ -4,10 +4,10 @@ use std::cell::RefCell; use std::rc::Rc; -use identity::core::OneOrMany; -use identity::core::OneOrSet; -use identity::core::OrderedSet; -use identity::iota_core::IotaDID; +use identity_iota::core::OneOrMany; +use identity_iota::core::OneOrSet; +use identity_iota::core::OrderedSet; +use identity_iota::iota_core::IotaDID; use js_sys::Promise; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/bindings/wasm/src/chain/document_history.rs b/bindings/wasm/src/chain/document_history.rs index f405c13f8f..58660e3c3a 100644 --- a/bindings/wasm/src/chain/document_history.rs +++ b/bindings/wasm/src/chain/document_history.rs @@ -2,10 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 use crate::common::ArrayString; -use identity::iota::ChainHistory; -use identity::iota::DocumentHistory; -use identity::iota::ResolvedIotaDocument; -use identity::iota_core::DiffMessage; +use identity_iota::client::ChainHistory; +use identity_iota::client::DocumentHistory; +use identity_iota::client::ResolvedIotaDocument; +use identity_iota::iota_core::DiffMessage; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/bindings/wasm/src/common/timestamp.rs b/bindings/wasm/src/common/timestamp.rs index 6a08050edc..0bc09ae4b9 100644 --- a/bindings/wasm/src/common/timestamp.rs +++ b/bindings/wasm/src/common/timestamp.rs @@ -1,8 +1,8 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::core::Duration; -use identity::core::Timestamp; +use identity_iota::core::Duration; +use identity_iota::core::Timestamp; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/common/types.rs b/bindings/wasm/src/common/types.rs index 712f9a3d0a..fc9bfc56bb 100644 --- a/bindings/wasm/src/common/types.rs +++ b/bindings/wasm/src/common/types.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::core::Object; +use identity_iota::core::Object; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/bindings/wasm/src/credential/credential.rs b/bindings/wasm/src/credential/credential.rs index 55d217c67c..df961363d9 100644 --- a/bindings/wasm/src/credential/credential.rs +++ b/bindings/wasm/src/credential/credential.rs @@ -1,10 +1,10 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::core::Context; -use identity::core::Object; -use identity::credential::Credential; -use identity::credential::CredentialBuilder; +use identity_iota::core::Context; +use identity_iota::core::Object; +use identity_iota::credential::Credential; +use identity_iota::credential::CredentialBuilder; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/bindings/wasm/src/credential/credential_builder.rs b/bindings/wasm/src/credential/credential_builder.rs index f104dd2b85..9928f8e5a2 100644 --- a/bindings/wasm/src/credential/credential_builder.rs +++ b/bindings/wasm/src/credential/credential_builder.rs @@ -1,19 +1,19 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::core::Context; -use identity::core::Object; -use identity::core::OneOrMany; -use identity::core::Timestamp; -use identity::core::Url; -use identity::credential::CredentialBuilder; -use identity::credential::Evidence; -use identity::credential::Issuer; -use identity::credential::Policy; -use identity::credential::RefreshService; -use identity::credential::Schema; -use identity::credential::Status; -use identity::credential::Subject; +use identity_iota::core::Context; +use identity_iota::core::Object; +use identity_iota::core::OneOrMany; +use identity_iota::core::Timestamp; +use identity_iota::core::Url; +use identity_iota::credential::CredentialBuilder; +use identity_iota::credential::Evidence; +use identity_iota::credential::Issuer; +use identity_iota::credential::Policy; +use identity_iota::credential::RefreshService; +use identity_iota::credential::Schema; +use identity_iota::credential::Status; +use identity_iota::credential::Subject; use wasm_bindgen::prelude::*; use proc_typescript::typescript; diff --git a/bindings/wasm/src/credential/credential_validator.rs b/bindings/wasm/src/credential/credential_validator.rs index 1cd93a9e9a..8b26671556 100644 --- a/bindings/wasm/src/credential/credential_validator.rs +++ b/bindings/wasm/src/credential/credential_validator.rs @@ -1,12 +1,12 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::core::Url; -use identity::iota::CredentialValidator; -use identity::iota::ResolvedIotaDocument; -use identity::iota::StatusCheck; -use identity::iota::ValidationError; -use identity::iota_core::IotaDocument; +use identity_iota::client::CredentialValidator; +use identity_iota::client::ResolvedIotaDocument; +use identity_iota::client::StatusCheck; +use identity_iota::client::ValidationError; +use identity_iota::core::Url; +use identity_iota::iota_core::IotaDocument; use wasm_bindgen::prelude::*; use crate::common::WasmTimestamp; diff --git a/bindings/wasm/src/credential/presentation.rs b/bindings/wasm/src/credential/presentation.rs index 8e642e5717..154919d6f6 100644 --- a/bindings/wasm/src/credential/presentation.rs +++ b/bindings/wasm/src/credential/presentation.rs @@ -1,10 +1,10 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::core::Context; -use identity::core::Object; -use identity::credential::Presentation; -use identity::credential::PresentationBuilder; +use identity_iota::core::Context; +use identity_iota::core::Object; +use identity_iota::credential::Presentation; +use identity_iota::credential::PresentationBuilder; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/bindings/wasm/src/credential/presentation_builder.rs b/bindings/wasm/src/credential/presentation_builder.rs index 71156a879b..75dd61b097 100644 --- a/bindings/wasm/src/credential/presentation_builder.rs +++ b/bindings/wasm/src/credential/presentation_builder.rs @@ -1,14 +1,14 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::core::Context; -use identity::core::Object; -use identity::core::OneOrMany; -use identity::core::Url; -use identity::credential::Credential; -use identity::credential::Policy; -use identity::credential::PresentationBuilder; -use identity::credential::RefreshService; +use identity_iota::core::Context; +use identity_iota::core::Object; +use identity_iota::core::OneOrMany; +use identity_iota::core::Url; +use identity_iota::credential::Credential; +use identity_iota::credential::Policy; +use identity_iota::credential::PresentationBuilder; +use identity_iota::credential::RefreshService; use proc_typescript::typescript; use wasm_bindgen::prelude::*; diff --git a/bindings/wasm/src/credential/presentation_validator.rs b/bindings/wasm/src/credential/presentation_validator.rs index b6e59c3a8b..61ca4e556b 100644 --- a/bindings/wasm/src/credential/presentation_validator.rs +++ b/bindings/wasm/src/credential/presentation_validator.rs @@ -9,8 +9,8 @@ use crate::did::DocumentOrResolvedDocument; use crate::did::WasmVerifierOptions; use crate::error::Result; use crate::error::WasmResult; -use identity::iota::PresentationValidator; -use identity::iota::ResolvedIotaDocument; +use identity_iota::client::PresentationValidator; +use identity_iota::client::ResolvedIotaDocument; use wasm_bindgen::prelude::*; #[wasm_bindgen(js_name = PresentationValidator, inspectable)] @@ -32,7 +32,7 @@ impl WasmPresentationValidator { /// trusted. This section contains more information on additional checks that should be carried out before and after /// calling this method. /// - /// #### The state of the supplied DID Documents. + /// #### The state of the supplied DID Documents. /// The caller must ensure that the DID Documents in `holder` and `issuers` are up-to-date. The convenience methods /// `Resolver::resolve_presentation_holder` and `Resolver::resolve_presentation_issuers` /// can help extract the latest available states of these DID Documents. diff --git a/bindings/wasm/src/credential/validation_options.rs b/bindings/wasm/src/credential/validation_options.rs index 99aaa9f6e2..7b0958c367 100644 --- a/bindings/wasm/src/credential/validation_options.rs +++ b/bindings/wasm/src/credential/validation_options.rs @@ -1,11 +1,11 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::iota::CredentialValidationOptions; -use identity::iota::FailFast; -use identity::iota::PresentationValidationOptions; -use identity::iota::StatusCheck; -use identity::iota::SubjectHolderRelationship; +use identity_iota::client::CredentialValidationOptions; +use identity_iota::client::FailFast; +use identity_iota::client::PresentationValidationOptions; +use identity_iota::client::StatusCheck; +use identity_iota::client::SubjectHolderRelationship; use serde_repr::Deserialize_repr; use serde_repr::Serialize_repr; use wasm_bindgen::prelude::*; diff --git a/bindings/wasm/src/crypto/key_pair.rs b/bindings/wasm/src/crypto/key_pair.rs index db6d10301f..744f39b211 100644 --- a/bindings/wasm/src/crypto/key_pair.rs +++ b/bindings/wasm/src/crypto/key_pair.rs @@ -1,8 +1,8 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::crypto::KeyPair; -use identity::crypto::KeyType; +use identity_iota::crypto::KeyPair; +use identity_iota::crypto::KeyType; use wasm_bindgen::prelude::*; use crate::crypto::WasmKeyType; diff --git a/bindings/wasm/src/crypto/key_type.rs b/bindings/wasm/src/crypto/key_type.rs index ad825a3ad4..66faca7d7d 100644 --- a/bindings/wasm/src/crypto/key_type.rs +++ b/bindings/wasm/src/crypto/key_type.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::crypto::KeyType; +use identity_iota::crypto::KeyType; use wasm_bindgen::prelude::*; #[wasm_bindgen(js_name = KeyType)] diff --git a/bindings/wasm/src/crypto/wasm_ed25519.rs b/bindings/wasm/src/crypto/wasm_ed25519.rs index 6a4f112566..175a153e1f 100644 --- a/bindings/wasm/src/crypto/wasm_ed25519.rs +++ b/bindings/wasm/src/crypto/wasm_ed25519.rs @@ -1,11 +1,11 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::crypto::Ed25519; -use identity::crypto::PrivateKey; -use identity::crypto::PublicKey; -use identity::crypto::Sign; -use identity::crypto::Verify; +use identity_iota::crypto::Ed25519; +use identity_iota::crypto::PrivateKey; +use identity_iota::crypto::PublicKey; +use identity_iota::crypto::Sign; +use identity_iota::crypto::Verify; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/crypto/wasm_proof.rs b/bindings/wasm/src/crypto/wasm_proof.rs index eba73b6f07..cdcecce483 100644 --- a/bindings/wasm/src/crypto/wasm_proof.rs +++ b/bindings/wasm/src/crypto/wasm_proof.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::crypto::Proof; +use identity_iota::crypto::Proof; use wasm_bindgen::prelude::*; use wasm_bindgen::JsValue; diff --git a/bindings/wasm/src/crypto/wasm_proof_options.rs b/bindings/wasm/src/crypto/wasm_proof_options.rs index 6d87233fd1..89dcd85640 100644 --- a/bindings/wasm/src/crypto/wasm_proof_options.rs +++ b/bindings/wasm/src/crypto/wasm_proof_options.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::crypto::ProofOptions; +use identity_iota::crypto::ProofOptions; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/crypto/wasm_proof_purpose.rs b/bindings/wasm/src/crypto/wasm_proof_purpose.rs index 271455afa5..d91e9e2ccc 100644 --- a/bindings/wasm/src/crypto/wasm_proof_purpose.rs +++ b/bindings/wasm/src/crypto/wasm_proof_purpose.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::crypto::ProofPurpose; +use identity_iota::crypto::ProofPurpose; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/crypto/wasm_x25519.rs b/bindings/wasm/src/crypto/wasm_x25519.rs index 2e82a65746..b2cdeb4e1f 100644 --- a/bindings/wasm/src/crypto/wasm_x25519.rs +++ b/bindings/wasm/src/crypto/wasm_x25519.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::crypto::X25519; +use identity_iota::crypto::X25519; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/did/wasm_did.rs b/bindings/wasm/src/did/wasm_did.rs index 2bd6ba3cb6..28eec7107c 100644 --- a/bindings/wasm/src/did/wasm_did.rs +++ b/bindings/wasm/src/did/wasm_did.rs @@ -1,8 +1,8 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::did::DID; -use identity::iota_core::IotaDID; +use identity_iota::did::DID; +use identity_iota::iota_core::IotaDID; use wasm_bindgen::prelude::*; use crate::did::wasm_did_url::WasmDIDUrl; diff --git a/bindings/wasm/src/did/wasm_did_url.rs b/bindings/wasm/src/did/wasm_did_url.rs index 6b6ce1d86d..067f61e9d9 100644 --- a/bindings/wasm/src/did/wasm_did_url.rs +++ b/bindings/wasm/src/did/wasm_did_url.rs @@ -1,9 +1,9 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::did::DIDUrl; -use identity::iota_core::IotaDID; -use identity::iota_core::IotaDIDUrl; +use identity_iota::did::DIDUrl; +use identity_iota::iota_core::IotaDID; +use identity_iota::iota_core::IotaDIDUrl; use wasm_bindgen::prelude::*; use crate::did::WasmDID; diff --git a/bindings/wasm/src/did/wasm_diff_message.rs b/bindings/wasm/src/did/wasm_diff_message.rs index cf25376677..6863d3c214 100644 --- a/bindings/wasm/src/did/wasm_diff_message.rs +++ b/bindings/wasm/src/did/wasm_diff_message.rs @@ -3,9 +3,9 @@ use std::str::FromStr; -use identity::core::ToJson; -use identity::iota_core::DiffMessage; -use identity::iota_core::MessageId; +use identity_iota::core::ToJson; +use identity_iota::iota_core::DiffMessage; +use identity_iota::iota_core::MessageId; use wasm_bindgen::prelude::*; use crate::crypto::WasmProof; @@ -62,7 +62,7 @@ impl WasmDiffMessage { #[wasm_bindgen(js_name = setMessageId)] pub fn set_message_id(&mut self, message_id: &str) -> Result<()> { let message_id: MessageId = MessageId::from_str(message_id) - .map_err(identity::iota_core::Error::InvalidMessage) + .map_err(identity_iota::iota_core::Error::InvalidMessage) .wasm_result()?; self.0.set_message_id(message_id); Ok(()) @@ -82,7 +82,7 @@ impl WasmDiffMessage { #[wasm_bindgen(js_name = setPreviousMessageId)] pub fn set_previous_message_id(&mut self, message_id: &str) -> Result<()> { let previous_message_id: MessageId = MessageId::from_str(message_id) - .map_err(identity::iota_core::Error::InvalidMessage) + .map_err(identity_iota::iota_core::Error::InvalidMessage) .wasm_result()?; self.0.set_previous_message_id(previous_message_id); Ok(()) diff --git a/bindings/wasm/src/did/wasm_document.rs b/bindings/wasm/src/did/wasm_document.rs index 420f430754..7aee10ed4a 100644 --- a/bindings/wasm/src/did/wasm_document.rs +++ b/bindings/wasm/src/did/wasm_document.rs @@ -3,24 +3,24 @@ use std::str::FromStr; -use identity::core::OneOrMany; -use identity::core::OneOrSet; -use identity::core::OrderedSet; -use identity::core::Timestamp; -use identity::core::Url; -use identity::credential::Credential; -use identity::credential::Presentation; -use identity::crypto::PrivateKey; -use identity::crypto::ProofOptions; -use identity::did::verifiable::VerifiableProperties; -use identity::did::MethodScope; -use identity::did::DID; -use identity::iota_core::IotaDID; -use identity::iota_core::IotaDIDUrl; -use identity::iota_core::IotaDocument; -use identity::iota_core::IotaVerificationMethod; -use identity::iota_core::MessageId; -use identity::iota_core::NetworkName; +use identity_iota::core::OneOrMany; +use identity_iota::core::OneOrSet; +use identity_iota::core::OrderedSet; +use identity_iota::core::Timestamp; +use identity_iota::core::Url; +use identity_iota::credential::Credential; +use identity_iota::credential::Presentation; +use identity_iota::crypto::PrivateKey; +use identity_iota::crypto::ProofOptions; +use identity_iota::did::verifiable::VerifiableProperties; +use identity_iota::did::MethodScope; +use identity_iota::did::DID; +use identity_iota::iota_core::IotaDID; +use identity_iota::iota_core::IotaDIDUrl; +use identity_iota::iota_core::IotaDocument; +use identity_iota::iota_core::IotaVerificationMethod; +use identity_iota::iota_core::MessageId; +use identity_iota::iota_core::NetworkName; use wasm_bindgen::prelude::*; use crate::account::wasm_account::UOneOrManyNumber; @@ -509,7 +509,7 @@ impl WasmDocument { .diff( &other.0, MessageId::from_str(message_id) - .map_err(identity::iota_core::Error::InvalidMessage) + .map_err(identity_iota::iota_core::Error::InvalidMessage) .wasm_result()?, key.0.private(), &method_query, @@ -563,7 +563,7 @@ impl WasmDocument { #[wasm_bindgen(js_name = diffIndex)] pub fn diff_index(message_id: &str) -> Result { let message_id = MessageId::from_str(message_id) - .map_err(identity::iota_core::Error::InvalidMessage) + .map_err(identity_iota::iota_core::Error::InvalidMessage) .wasm_result()?; IotaDocument::diff_index(&message_id).wasm_result() } @@ -619,7 +619,7 @@ impl WasmDocument { #[wasm_bindgen(js_name = setMetadataPreviousMessageId)] pub fn set_metadata_previous_message_id(&mut self, value: &str) -> Result<()> { let message_id: MessageId = MessageId::from_str(value) - .map_err(identity::iota_core::Error::InvalidMessage) + .map_err(identity_iota::iota_core::Error::InvalidMessage) .wasm_result()?; self.0.metadata.previous_message_id = message_id; Ok(()) diff --git a/bindings/wasm/src/did/wasm_document_metadata.rs b/bindings/wasm/src/did/wasm_document_metadata.rs index 83ff13854b..0d1d179205 100644 --- a/bindings/wasm/src/did/wasm_document_metadata.rs +++ b/bindings/wasm/src/did/wasm_document_metadata.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::iota_core::IotaDocumentMetadata; +use identity_iota::iota_core::IotaDocumentMetadata; use wasm_bindgen::prelude::*; use crate::common::WasmTimestamp; diff --git a/bindings/wasm/src/did/wasm_method_data.rs b/bindings/wasm/src/did/wasm_method_data.rs index 712f47eadf..054d379311 100644 --- a/bindings/wasm/src/did/wasm_method_data.rs +++ b/bindings/wasm/src/did/wasm_method_data.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::did::MethodData; +use identity_iota::did::MethodData; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/did/wasm_method_relationship.rs b/bindings/wasm/src/did/wasm_method_relationship.rs index bb7c1b2d81..2cc3238fbb 100644 --- a/bindings/wasm/src/did/wasm_method_relationship.rs +++ b/bindings/wasm/src/did/wasm_method_relationship.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::did::MethodRelationship; +use identity_iota::did::MethodRelationship; use serde_repr::Deserialize_repr; use serde_repr::Serialize_repr; use wasm_bindgen::prelude::*; diff --git a/bindings/wasm/src/did/wasm_method_scope.rs b/bindings/wasm/src/did/wasm_method_scope.rs index 502d1b2943..9cec5e0df5 100644 --- a/bindings/wasm/src/did/wasm_method_scope.rs +++ b/bindings/wasm/src/did/wasm_method_scope.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::did::MethodScope; +use identity_iota::did::MethodScope; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/did/wasm_method_type.rs b/bindings/wasm/src/did/wasm_method_type.rs index 6e4d6a3eb7..142aa6043d 100644 --- a/bindings/wasm/src/did/wasm_method_type.rs +++ b/bindings/wasm/src/did/wasm_method_type.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::did::MethodType; +use identity_iota::did::MethodType; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/did/wasm_resolved_document.rs b/bindings/wasm/src/did/wasm_resolved_document.rs index 67cc82690a..c90768b886 100644 --- a/bindings/wasm/src/did/wasm_resolved_document.rs +++ b/bindings/wasm/src/did/wasm_resolved_document.rs @@ -3,8 +3,8 @@ use std::str::FromStr; -use identity::iota::ResolvedIotaDocument; -use identity::iota_core::MessageId; +use identity_iota::client::ResolvedIotaDocument; +use identity_iota::iota_core::MessageId; use wasm_bindgen::prelude::*; use crate::did::WasmDiffMessage; @@ -95,7 +95,7 @@ impl WasmResolvedDocument { #[wasm_bindgen(js_name = setDiffMessageId)] pub fn set_diff_message_id(&mut self, value: &str) -> Result<()> { let message_id: MessageId = MessageId::from_str(value) - .map_err(identity::iota_core::Error::InvalidMessage) + .map_err(identity_iota::iota_core::Error::InvalidMessage) .wasm_result()?; self.0.diff_message_id = message_id; Ok(()) @@ -111,7 +111,7 @@ impl WasmResolvedDocument { #[wasm_bindgen(js_name = setIntegrationMessageId)] pub fn set_integration_message_id(&mut self, value: &str) -> Result<()> { let message_id: MessageId = MessageId::from_str(value) - .map_err(identity::iota_core::Error::InvalidMessage) + .map_err(identity_iota::iota_core::Error::InvalidMessage) .wasm_result()?; self.0.integration_message_id = message_id; Ok(()) diff --git a/bindings/wasm/src/did/wasm_service.rs b/bindings/wasm/src/did/wasm_service.rs index 8822e2eb52..49119d6372 100644 --- a/bindings/wasm/src/did/wasm_service.rs +++ b/bindings/wasm/src/did/wasm_service.rs @@ -3,9 +3,9 @@ use crate::common::deserialize_map_or_any; use crate::common::MapStringAny; -use identity::did::ServiceEndpoint; -use identity::iota_core::IotaDIDUrl; -use identity::iota_core::IotaService; +use identity_iota::did::ServiceEndpoint; +use identity_iota::iota_core::IotaDIDUrl; +use identity_iota::iota_core::IotaService; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; @@ -27,7 +27,7 @@ impl WasmService { let id: IotaDIDUrl = service.id().into_serde().wasm_result()?; let type_: String = service.type_(); let service_endpoint: ServiceEndpoint = deserialize_map_or_any(&service.service_endpoint())?; - let properties: Option = deserialize_map_or_any(&service.properties())?; + let properties: Option = deserialize_map_or_any(&service.properties())?; IotaService::builder(properties.unwrap_or_default()) .id(id) diff --git a/bindings/wasm/src/did/wasm_verification_method.rs b/bindings/wasm/src/did/wasm_verification_method.rs index 25478f02a6..dff3e72ad8 100644 --- a/bindings/wasm/src/did/wasm_verification_method.rs +++ b/bindings/wasm/src/did/wasm_verification_method.rs @@ -1,8 +1,8 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::crypto::PublicKey; -use identity::iota_core::IotaVerificationMethod; +use identity_iota::crypto::PublicKey; +use identity_iota::iota_core::IotaVerificationMethod; use wasm_bindgen::prelude::*; use crate::crypto::WasmKeyType; diff --git a/bindings/wasm/src/did/wasm_verifier_options.rs b/bindings/wasm/src/did/wasm_verifier_options.rs index ffec555648..0527131615 100644 --- a/bindings/wasm/src/did/wasm_verifier_options.rs +++ b/bindings/wasm/src/did/wasm_verifier_options.rs @@ -1,7 +1,7 @@ // Copyright 2020-2021 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::did::verifiable::VerifierOptions; +use identity_iota::did::verifiable::VerifierOptions; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/error.rs b/bindings/wasm/src/error.rs index e7dfc2eeb1..296b42b315 100644 --- a/bindings/wasm/src/error.rs +++ b/bindings/wasm/src/error.rs @@ -5,9 +5,9 @@ use std::borrow::Cow; use std::fmt::Display; use std::result::Result as StdResult; -use identity::account::UpdateError; -use identity::account_storage::Error as AccountStorageError; -use identity::account_storage::Result as AccountStorageResult; +use identity_iota::account::UpdateError; +use identity_iota::account_storage::Error as AccountStorageError; +use identity_iota::account_storage::Result as AccountStorageResult; use wasm_bindgen::JsValue; /// Convenience wrapper for `Result`. @@ -90,14 +90,14 @@ macro_rules! impl_wasm_error_from { } impl_wasm_error_from!( - identity::account::Error, - identity::account_storage::Error, - identity::core::Error, - identity::credential::Error, - identity::did::Error, - identity::did::DIDError, - identity::iota_core::Error, - identity::iota::ValidationError + identity_iota::account::Error, + identity_iota::account_storage::Error, + identity_iota::core::Error, + identity_iota::credential::Error, + identity_iota::did::Error, + identity_iota::did::DIDError, + identity_iota::iota_core::Error, + identity_iota::client::ValidationError ); // Similar to `impl_wasm_error_from`, but uses the types name instead of requiring/calling Into &'static str @@ -115,7 +115,7 @@ macro_rules! impl_wasm_error_from_with_struct_name { } } -// identity::iota now has some errors where the error message does not include the source error's error message. +// identity_iota::iota now has some errors where the error message does not include the source error's error message. // This is in compliance with the Rust error handling project group's recommendation: // * An error type with a source error should either return that error via source or include that source's error message // in its own Display output, but never both. * @@ -138,18 +138,18 @@ fn error_chain_fmt(e: &impl std::error::Error, f: &mut std::fmt::Formatter<'_>) struct ErrorMessage<'a, E: std::error::Error>(&'a E); -impl<'a> Display for ErrorMessage<'a, identity::iota::Error> { +impl<'a> Display for ErrorMessage<'a, identity_iota::client::Error> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match &self.0 { - identity::iota::Error::CredentialValidationError(e) => { + identity_iota::client::Error::CredentialValidationError(e) => { write!(f, "{}. ", self.0)?; error_chain_fmt(&e, f) } - identity::iota::Error::PresentationValidationError(e) => { + identity_iota::client::Error::PresentationValidationError(e) => { write!(f, "{}. ", self.0)?; error_chain_fmt(&e, f) } - identity::iota::Error::IsolatedValidationError(e) => { + identity_iota::client::Error::IsolatedValidationError(e) => { write!(f, "{}. ", self.0)?; error_chain_fmt(&e, f) } @@ -159,8 +159,8 @@ impl<'a> Display for ErrorMessage<'a, identity::iota::Error> { } } -impl From for WasmError<'_> { - fn from(error: identity::iota::Error) -> Self { +impl From for WasmError<'_> { + fn from(error: identity_iota::client::Error) -> Self { Self { message: Cow::Owned(ErrorMessage(&error).to_string()), name: Cow::Borrowed(error.into()), @@ -177,8 +177,8 @@ impl From for WasmError<'_> { } } -impl From for WasmError<'_> { - fn from(error: identity::iota::CompoundCredentialValidationError) -> Self { +impl From for WasmError<'_> { + fn from(error: identity_iota::client::CompoundCredentialValidationError) -> Self { Self { name: Cow::Borrowed("CompoundCredentialValidationError"), message: Cow::Owned(error.to_string()), @@ -186,8 +186,8 @@ impl From for WasmError<'_> { } } -impl From for WasmError<'_> { - fn from(error: identity::iota::CompoundPresentationValidationError) -> Self { +impl From for WasmError<'_> { + fn from(error: identity_iota::client::CompoundPresentationValidationError) -> Self { Self { name: Cow::Borrowed("CompoundPresentationValidationError"), message: Cow::Owned(error.to_string()), diff --git a/bindings/wasm/src/revocation/bitmap.rs b/bindings/wasm/src/revocation/bitmap.rs index 10a4aaa772..bb6b0a4867 100644 --- a/bindings/wasm/src/revocation/bitmap.rs +++ b/bindings/wasm/src/revocation/bitmap.rs @@ -3,8 +3,8 @@ use std::borrow::Cow; -use identity::did::RevocationBitmap; -use identity::did::ServiceEndpoint; +use identity_iota::did::RevocationBitmap; +use identity_iota::did::ServiceEndpoint; use wasm_bindgen::prelude::*; use crate::did::service_endpoint_to_js_value; diff --git a/bindings/wasm/src/tangle/client.rs b/bindings/wasm/src/tangle/client.rs index 71845775aa..c9bf9d7c81 100644 --- a/bindings/wasm/src/tangle/client.rs +++ b/bindings/wasm/src/tangle/client.rs @@ -5,14 +5,14 @@ use core::str::FromStr; use std::rc::Rc; use futures::executor; -use identity::iota::Client; -use identity::iota::ClientBuilder; -use identity::iota::ResolvedIotaDocument; -use identity::iota::TangleResolve; -use identity::iota_core::DiffMessage; -use identity::iota_core::IotaDID; -use identity::iota_core::IotaDocument; -use identity::iota_core::MessageId; +use identity_iota::client::Client; +use identity_iota::client::ClientBuilder; +use identity_iota::client::ResolvedIotaDocument; +use identity_iota::client::TangleResolve; +use identity_iota::iota_core::DiffMessage; +use identity_iota::iota_core::IotaDID; +use identity_iota::iota_core::IotaDocument; +use identity_iota::iota_core::MessageId; use js_sys::Promise; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; @@ -92,7 +92,7 @@ impl WasmClient { #[wasm_bindgen(js_name = publishDiff)] pub fn publish_diff(&self, message_id: &str, diff: &WasmDiffMessage) -> Result { let message: MessageId = MessageId::from_str(message_id) - .map_err(identity::iota_core::Error::InvalidMessage) + .map_err(identity_iota::iota_core::Error::InvalidMessage) .wasm_result()?; let diff: DiffMessage = diff.0.clone(); let client: Rc = self.client.clone(); @@ -164,7 +164,7 @@ impl WasmClient { #[allow(non_snake_case)] pub fn is_message_included(&self, messageId: &str) -> Result { let message: MessageId = MessageId::from_str(messageId) - .map_err(identity::iota_core::Error::InvalidMessage) + .map_err(identity_iota::iota_core::Error::InvalidMessage) .wasm_result()?; let client: Rc = self.client.clone(); diff --git a/bindings/wasm/src/tangle/client_config.rs b/bindings/wasm/src/tangle/client_config.rs index 2629ef2ae8..ebb5d17307 100644 --- a/bindings/wasm/src/tangle/client_config.rs +++ b/bindings/wasm/src/tangle/client_config.rs @@ -3,9 +3,9 @@ use std::time::Duration; -use identity::iota::ClientBuilder; -use identity::iota::DIDMessageEncoding; -use identity::iota_core::Network; +use identity_iota::client::ClientBuilder; +use identity_iota::client::DIDMessageEncoding; +use identity_iota::iota_core::Network; use proc_typescript::typescript; use wasm_bindgen::prelude::*; @@ -218,8 +218,8 @@ struct ClientConfig { #[cfg(test)] mod tests { - use identity::core::FromJson; - use identity::core::Object; + use identity_iota::core::FromJson; + use identity_iota::core::Object; use wasm_bindgen::JsCast; use wasm_bindgen_test::*; diff --git a/bindings/wasm/src/tangle/explorer.rs b/bindings/wasm/src/tangle/explorer.rs index dd1588018f..cab11d3c20 100644 --- a/bindings/wasm/src/tangle/explorer.rs +++ b/bindings/wasm/src/tangle/explorer.rs @@ -3,9 +3,9 @@ use std::str::FromStr; -use identity::iota::ExplorerUrl; -use identity::iota_core::IotaDID; -use identity::iota_core::MessageId; +use identity_iota::client::ExplorerUrl; +use identity_iota::iota_core::IotaDID; +use identity_iota::iota_core::MessageId; use wasm_bindgen::prelude::*; use crate::did::UWasmDID; @@ -45,7 +45,7 @@ impl WasmExplorerUrl { #[wasm_bindgen(js_name = messageUrl)] pub fn message_url(&self, message_id: &str) -> Result { let message_id = MessageId::from_str(message_id) - .map_err(identity::iota_core::Error::InvalidMessage) + .map_err(identity_iota::iota_core::Error::InvalidMessage) .wasm_result()?; self.0.message_url(&message_id).map(|url| url.to_string()).wasm_result() } diff --git a/bindings/wasm/src/tangle/message.rs b/bindings/wasm/src/tangle/message.rs index a78a6fb54f..d2ff3a3627 100644 --- a/bindings/wasm/src/tangle/message.rs +++ b/bindings/wasm/src/tangle/message.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::iota::DIDMessageEncoding; +use identity_iota::client::DIDMessageEncoding; use serde_repr::Deserialize_repr; use serde_repr::Serialize_repr; use wasm_bindgen::prelude::*; diff --git a/bindings/wasm/src/tangle/network.rs b/bindings/wasm/src/tangle/network.rs index 78d7be9528..7ace91d12d 100644 --- a/bindings/wasm/src/tangle/network.rs +++ b/bindings/wasm/src/tangle/network.rs @@ -1,7 +1,7 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::iota_core::Network; +use identity_iota::iota_core::Network; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/tangle/receipt.rs b/bindings/wasm/src/tangle/receipt.rs index a886587cbe..7164139152 100644 --- a/bindings/wasm/src/tangle/receipt.rs +++ b/bindings/wasm/src/tangle/receipt.rs @@ -1,7 +1,7 @@ // Copyright 2020-2021 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity::iota::Receipt; +use identity_iota::client::Receipt; use wasm_bindgen::prelude::*; use crate::error::Result; diff --git a/bindings/wasm/src/tangle/resolver.rs b/bindings/wasm/src/tangle/resolver.rs index e94944508e..d2c6b83ba8 100644 --- a/bindings/wasm/src/tangle/resolver.rs +++ b/bindings/wasm/src/tangle/resolver.rs @@ -5,14 +5,14 @@ use std::collections::HashSet; use std::rc::Rc; use futures::executor; -use identity::core::Url; -use identity::iota::Client; -use identity::iota::ClientBuilder; -use identity::iota::ResolvedIotaDocument; -use identity::iota::Resolver; -use identity::iota::ResolverBuilder; -use identity::iota_core::IotaDID; -use identity::iota_core::NetworkName; +use identity_iota::client::Client; +use identity_iota::client::ClientBuilder; +use identity_iota::client::ResolvedIotaDocument; +use identity_iota::client::Resolver; +use identity_iota::client::ResolverBuilder; +use identity_iota::core::Url; +use identity_iota::iota_core::IotaDID; +use identity_iota::iota_core::NetworkName; use js_sys::Promise; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; @@ -219,8 +219,8 @@ impl WasmResolver { .0 .holder .as_ref() - .ok_or(identity::iota::ValidationError::MissingPresentationHolder) - .map_err(identity::iota::Error::from) + .ok_or(identity_iota::client::ValidationError::MissingPresentationHolder) + .map_err(identity_iota::client::Error::from) .wasm_result()?; let holder: IotaDID = IotaDID::parse(holder_url.as_str()).wasm_result()?; diff --git a/bindings/wasm/tests/wasm.rs b/bindings/wasm/tests/wasm.rs index ae05ec436a..f2fd542728 100644 --- a/bindings/wasm/tests/wasm.rs +++ b/bindings/wasm/tests/wasm.rs @@ -3,8 +3,8 @@ use std::borrow::Cow; -use identity::core::Timestamp; -use identity::iota_core::IotaDID; +use identity_iota::core::Timestamp; +use identity_iota::iota_core::IotaDID; use identity_wasm::account::types::WasmKeyLocation; use wasm_bindgen::prelude::*; use wasm_bindgen::JsCast; diff --git a/documentation/docs/concepts/advanced/storage_interface.mdx b/documentation/docs/concepts/advanced/storage_interface.mdx index 75848a5331..7ad6a5a559 100644 --- a/documentation/docs/concepts/advanced/storage_interface.mdx +++ b/documentation/docs/concepts/advanced/storage_interface.mdx @@ -13,7 +13,7 @@ keywords: --- import memstore_ts from "!!raw-loader!../../../../bindings/wasm/examples-account/src/custom_storage.ts"; -import memstore_rs from "!!raw-loader!../../../../identity-account-storage/src/storage/memstore.rs"; +import memstore_rs from "!!raw-loader!../../../../identity_account_storage/src/storage/memstore.rs"; import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; import CodeBlock from "@theme/CodeBlock"; diff --git a/documentation/docs/concepts/decentralized_identifiers/resolve.mdx b/documentation/docs/concepts/decentralized_identifiers/resolve.mdx index 50ad9d7d83..19eaf577b1 100644 --- a/documentation/docs/concepts/decentralized_identifiers/resolve.mdx +++ b/documentation/docs/concepts/decentralized_identifiers/resolve.mdx @@ -16,27 +16,27 @@ import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; -DID resolution is the process of fetching a [DID Document](https://www.w3.org/TR/did-core/#dfn-did-documents) corresponding to a given [DID](https://www.w3.org/TR/did-core/#dfn-decentralized-identifiers). -The [IOTA Identity Framework](https://github.com/iotaledger/identity.rs) supports resolving DID Documents that are stored on an IOTA Tangle (public or private). The main tool supplied +DID resolution is the process of fetching a [DID Document](https://www.w3.org/TR/did-core/#dfn-did-documents) corresponding to a given [DID](https://www.w3.org/TR/did-core/#dfn-decentralized-identifiers). +The [IOTA Identity Framework](https://github.com/iotaledger/identity.rs) supports resolving DID Documents that are stored on an IOTA Tangle (public or private). The main tool supplied by the IOTA Identity Framework to handle DID Document resolution in a type safe manner is the `Resolver`. A DID Resolver as defined in the [W3C Decentralized Identifiers specification](https://www.w3.org/TR/did-core/#dfn-did-resolvers) -enforces the signature of the resolution function in a manner that is more centered around Web/API resolution rather than a strongly typed framework. This is the reason why the `Resolver` provided by the IOTA Identity Framework deviates somewhat from +enforces the signature of the resolution function in a manner that is more centered around Web/API resolution rather than a strongly typed framework. This is the reason why the `Resolver` provided by the IOTA Identity Framework deviates somewhat from the W3C specification. ## Resolving a DID from the main network -The following example demonstrates how to resolve the DID: "did:iota:H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" from the `main` network. +The following example demonstrates how to resolve the DID: "did:iota:H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" from the `main` network. ```rust -use identity::iota::Resolver; -use identity::iota_core::IotaDID; -use identity::iota::ResolvedIotaDocument; +use identity_iota::client::Resolver; +use identity_iota::iota_core::IotaDID; +use identity_iota::client::ResolvedIotaDocument; -let resolver: Resolver = Resolver::new().await?; +let resolver: Resolver = Resolver::new().await?; let did: IotaDID = IotaDID::parse("did:iota:H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV")?; -let doc: ResolvedIotaDocument = resolver.resolve(&did).await?; +let doc: ResolvedIotaDocument = resolver.resolve(&did).await?; ``` @@ -57,22 +57,22 @@ const { ``` -What happens in this example can be explained on a high level as follows: The Resolver queries the Tangle for the history of the DID Document and utilizes it to recreate and validate the latest state of the DID Document. +What happens in this example can be explained on a high level as follows: The Resolver queries the Tangle for the history of the DID Document and utilizes it to recreate and validate the latest state of the DID Document. -## Resolving from a private tangle -Resolving a DID from a private tangle is similar to resolving a DID from the main net. The only difference is that +## Resolving from a private tangle +Resolving a DID from a private tangle is similar to resolving a DID from the main net. The only difference is that the resolver needs to be configured to have a client capable of operating on said private tangle. Building a `Client` configured for a specified Tangle is explained in [this example in Rust](https://github.com/iotaledger/identity.rs/blob/dev/examples/low-level-api/private_tangle.rs) and [this example in Javascript](https://github.com/iotaledger/identity.rs/blob/dev/bindings/wasm/examples/src/private_tangle.js). -The following example demonstrates how one can setup a `Resolver` with a given `client` and then attempt resolving a specified `did` which may be on any Tangle (public or private). +The following example demonstrates how one can setup a `Resolver` with a given `client` and then attempt resolving a specified `did` which may be on any Tangle (public or private). -```rust -use identity::iota::Resolver; -use identity::iota::ResolverBuilder; -use identity::iota_core::IotaDID; -use identity::iota::Client; -use identity::iota::Result; +```rust +use identity_iota::client::Resolver; +use identity_iota::client::ResolverBuilder; +use identity_iota::iota_core::IotaDID; +use identity_iota::client::Client; +use identity_iota::client::Result; async fn build_and_resolve(client: Client, did: IotaDID) -> Result { @@ -90,7 +90,7 @@ const { DID, Resolver, ResolvedDocument, - Client, + Client, } = require('@iota/identity-wasm/node'); @@ -104,33 +104,33 @@ async function buildAndResolve(client, did) { -In the example above the resolver will automatically try to resolve the DID from the network specified in the `did` (See [DID Format](./../specs/did/iota_did_method_spec#did-format)). -If the resolver was not built with a client configured for the given network name then an error will be thrown. Note that the `ResolverBuilder` can configure the `Resolver` to use -multiple networks as long as they have distinct valid names (max six characters). +In the example above the resolver will automatically try to resolve the DID from the network specified in the `did` (See [DID Format](./../specs/did/iota_did_method_spec#did-format)). +If the resolver was not built with a client configured for the given network name then an error will be thrown. Note that the `ResolverBuilder` can configure the `Resolver` to use +multiple networks as long as they have distinct valid names (max six characters). -Note that in the context of an identity managed by an `Account` the DID document can also be resolved by simply calling the `resolve` method on the `Account` directly. +Note that in the context of an identity managed by an `Account` the DID document can also be resolved by simply calling the `resolve` method on the `Account` directly. -## Resolution in the context of Verifiable Presentations -As explained in [Verifiable Presentations](./../verifiable_credentials/verifiable_presentations) one resolves the DID Documents of the credential issuers and presentation holder -during verification of a verifiable presentation. Resolving the necessary DID Documents is done automatically when verifying presentations via the `Resolver`, but there are certain +## Resolution in the context of Verifiable Presentations +As explained in [Verifiable Presentations](./../verifiable_credentials/verifiable_presentations) one resolves the DID Documents of the credential issuers and presentation holder +during verification of a verifiable presentation. Resolving the necessary DID Documents is done automatically when verifying presentations via the `Resolver`, but there are certain advanced use cases where more control is desired. To accommodate for such situations the `Resolver` also comes equipped with additional stand alone methods that enable: - resolving a presentation holder's DID Document - resolving all DID Documents of the distinct issuers of the credentials contained in the presentation - resolving the issuer's DID Document for a given verifiable credential -## Resolving the history of a DID Document. -The fact that a DID Document [can be updated](./update.mdx) implies that the state of the DID Document can change over time, or in other words the result of resolving a DID -also depends on when this operation was carried out. The `Resolver` provides a way to view the entire history of a DID Document (up to the time when the method is called). +## Resolving the history of a DID Document. +The fact that a DID Document [can be updated](./update.mdx) implies that the state of the DID Document can change over time, or in other words the result of resolving a DID +also depends on when this operation was carried out. The `Resolver` provides a way to view the entire history of a DID Document (up to the time when the method is called). -```rust -use identity::iota::Resolver; -use identity::iota_core::IotaDID; -use identity::iota::DocumentHistory; -use identity::iota::Result; +```rust +use identity_iota::client::Resolver; +use identity_iota::iota_core::IotaDID; +use identity_iota::client::DocumentHistory; +use identity_iota::client::Result; async fn call_resolve_history(did: IotaDID) -> Result { @@ -161,10 +161,10 @@ async function callResolveHistory(did) { -## Complete examples -This section shows complete examples from the Iota Identity Framework code base. The first example creates a DID Document, publishes it to the Tangle and then resolves it. +## Complete examples +This section shows complete examples from the Iota Identity Framework code base. The first example creates a DID Document, publishes it to the Tangle and then resolves it. - -Note that this example used the `Client` to resolve the history of the DID Document, but one could also use the `Resolver` for this task. \ No newline at end of file +Note that this example used the `Client` to resolve the history of the DID Document, but one could also use the `Resolver` for this task. diff --git a/documentation/docs/getting_started/install.mdx b/documentation/docs/getting_started/install.mdx index f206ce2998..a091ced7aa 100644 --- a/documentation/docs/getting_started/install.mdx +++ b/documentation/docs/getting_started/install.mdx @@ -25,20 +25,20 @@ You can include the IOTA Identity Library in your project by adding it as a depe #### Latest Stable Release -This version matches the `main` branch of this repository. It is **stable** and will have **changelogs**. +This version is published to crates.io and is **stable**, following semantic versioning. -```rust +```toml [dependencies] -identity = { git = "https://github.com/iotaledger/identity.rs", branch = "main"} +identity_iota = { version = "0.6" } ``` #### Development Release This version matches the `dev` branch of this repository. It has all the **latest features**, but as such it **may also have undocumented breaking changes**. -```rust +```toml [dependencies] -identity = { git = "https://github.com/iotaledger/identity.rs", branch = "dev"} +identity_iota = { git = "https://github.com/iotaledger/identity.rs", branch = "dev"} ``` You can find detailed installation instructions in the [Getting Started With Rust](../libraries/rust/getting_started) section. @@ -57,7 +57,7 @@ You can install the WASM binding of the IOTA Identity Library using [npm](https: #### Latest Stable Release -This version matches the `main` branch of this repository. It is **stable** and will have **changelogs**. +This version published to npm is **stable**, following semantic versioning. ```bash npm install @iota/identity-wasm @@ -71,4 +71,4 @@ This version matches the `dev` branch of this repository. It has all the **lates npm install @iota/identity-wasm@dev ``` -You can find detailed installation instructions in the [Getting Started With WASM](../libraries/wasm/getting_started) section. \ No newline at end of file +You can find detailed installation instructions in the [Getting Started With WASM](../libraries/wasm/getting_started) section. diff --git a/documentation/docs/libraries/rust/getting_started.md b/documentation/docs/libraries/rust/getting_started.md index 6beab79447..c73ceb972e 100644 --- a/documentation/docs/libraries/rust/getting_started.md +++ b/documentation/docs/libraries/rust/getting_started.md @@ -10,8 +10,8 @@ keywords: ## Requirements -- [Rust](https://www.rust-lang.org/) (>= 1.51) -- [Cargo](https://doc.rust-lang.org/cargo/) (>= 1.51) +- [Rust](https://www.rust-lang.org/) (>= 1.60) +- [Cargo](https://doc.rust-lang.org/cargo/) (>= 1.60) ## Include the Library @@ -19,20 +19,20 @@ To include IOTA Identity in your project add it as a dependency in your `Cargo.t ### Latest Stable Release -This version matches the `main` branch of this repository. It is **stable** and will have **changelogs**. +This version is published to crates.io and is **stable**, following semantic versioning. -```rust +```toml [dependencies] -identity = { git = "https://github.com/iotaledger/identity.rs", branch = "main"} +identity_iota = { version = "0.6" } ``` ### Development Release This version matches the `dev` branch of this repository. It has all the **latest features**, but as such it **may also have undocumented breaking changes**. -```rust +```toml [dependencies] -identity = { git = "https://github.com/iotaledger/identity.rs", branch = "dev"} +identity_iota = { git = "https://github.com/iotaledger/identity.rs", branch = "dev"} ``` diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 1a8ab5ccb4..bbf70a010e 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -3,9 +3,10 @@ name = "examples" version = "0.1.0" edition = "2021" publish = false +release = false [dependencies] -identity = { path = "../identity", features = ["account", "stronghold"] } +identity_iota = { path = "../identity_iota" } pretty_env_logger = { version = "0.4" } rand = { version = "0.8" } tokio = { version = "1.17.0", features = ["full"] } diff --git a/examples/account/config.rs b/examples/account/config.rs index 16014945c5..014b6d59f3 100644 --- a/examples/account/config.rs +++ b/examples/account/config.rs @@ -3,16 +3,16 @@ //! cargo run --example account_config -use identity::account::Account; -use identity::account::AccountBuilder; -use identity::account::AutoSave; -use identity::account::IdentitySetup; -use identity::account::Result; -use identity::account_storage::MemStore; -use identity::iota::ClientBuilder; -use identity::iota::ExplorerUrl; -use identity::iota_core::IotaDID; -use identity::iota_core::Network; +use identity_iota::account::Account; +use identity_iota::account::AccountBuilder; +use identity_iota::account::AutoSave; +use identity_iota::account::IdentitySetup; +use identity_iota::account::Result; +use identity_iota::account_storage::MemStore; +use identity_iota::client::ClientBuilder; +use identity_iota::client::ExplorerUrl; +use identity_iota::iota_core::IotaDID; +use identity_iota::iota_core::Network; #[tokio::main] async fn main() -> Result<()> { diff --git a/examples/account/create_did.rs b/examples/account/create_did.rs index 01b36769e6..ce99e7931e 100644 --- a/examples/account/create_did.rs +++ b/examples/account/create_did.rs @@ -5,12 +5,12 @@ use std::path::PathBuf; -use identity::account::Account; -use identity::account::IdentitySetup; -use identity::account::Result; -use identity::account_storage::Stronghold; -use identity::iota::ExplorerUrl; -use identity::iota_core::IotaDID; +use identity_iota::account::Account; +use identity_iota::account::IdentitySetup; +use identity_iota::account::Result; +use identity_iota::account_storage::Stronghold; +use identity_iota::client::ExplorerUrl; +use identity_iota::iota_core::IotaDID; #[tokio::main] async fn main() -> Result<()> { diff --git a/examples/account/create_vc.rs b/examples/account/create_vc.rs index c7e703b8ef..760e2c6c96 100644 --- a/examples/account/create_vc.rs +++ b/examples/account/create_vc.rs @@ -7,24 +7,24 @@ //! //! cargo run --example account_create_vc -use identity::account::Account; -use identity::account::AccountBuilder; -use identity::account::IdentitySetup; -use identity::account::MethodContent; -use identity::account::Result; - -use identity::core::json; -use identity::core::FromJson; -use identity::core::ToJson; -use identity::core::Url; -use identity::credential::Credential; -use identity::credential::CredentialBuilder; -use identity::credential::Subject; -use identity::crypto::ProofOptions; -use identity::did::DID; -use identity::iota::CredentialValidationOptions; -use identity::iota::CredentialValidator; -use identity::iota::FailFast; +use identity_iota::account::Account; +use identity_iota::account::AccountBuilder; +use identity_iota::account::IdentitySetup; +use identity_iota::account::MethodContent; +use identity_iota::account::Result; + +use identity_iota::client::CredentialValidationOptions; +use identity_iota::client::CredentialValidator; +use identity_iota::client::FailFast; +use identity_iota::core::json; +use identity_iota::core::FromJson; +use identity_iota::core::ToJson; +use identity_iota::core::Url; +use identity_iota::credential::Credential; +use identity_iota::credential::CredentialBuilder; +use identity_iota::credential::Subject; +use identity_iota::crypto::ProofOptions; +use identity_iota::did::DID; pub async fn create_vc() -> Result { // Create an account builder with in-memory storage for simplicity. diff --git a/examples/account/create_vp.rs b/examples/account/create_vp.rs index 35e11d5c73..091afef443 100644 --- a/examples/account/create_vp.rs +++ b/examples/account/create_vp.rs @@ -6,31 +6,31 @@ //! //! cargo run --example account_create_vp -use identity::account::Account; -use identity::account::AccountBuilder; -use identity::account::IdentitySetup; -use identity::account::MethodContent; -use identity::core::json; -use identity::core::Duration; -use identity::core::FromJson; -use identity::core::Timestamp; -use identity::core::ToJson; -use identity::core::Url; -use identity::credential::Credential; -use identity::credential::CredentialBuilder; -use identity::credential::Presentation; -use identity::credential::PresentationBuilder; -use identity::credential::Subject; -use identity::crypto::ProofOptions; -use identity::did::verifiable::VerifierOptions; - -use identity::account::Result; -use identity::iota::CredentialValidationOptions; -use identity::iota::FailFast; -use identity::iota::PresentationValidationOptions; - -use identity::iota::Resolver; -use identity::iota::SubjectHolderRelationship; +use identity_iota::account::Account; +use identity_iota::account::AccountBuilder; +use identity_iota::account::IdentitySetup; +use identity_iota::account::MethodContent; +use identity_iota::core::json; +use identity_iota::core::Duration; +use identity_iota::core::FromJson; +use identity_iota::core::Timestamp; +use identity_iota::core::ToJson; +use identity_iota::core::Url; +use identity_iota::credential::Credential; +use identity_iota::credential::CredentialBuilder; +use identity_iota::credential::Presentation; +use identity_iota::credential::PresentationBuilder; +use identity_iota::credential::Subject; +use identity_iota::crypto::ProofOptions; +use identity_iota::did::verifiable::VerifierOptions; + +use identity_iota::account::Result; +use identity_iota::client::CredentialValidationOptions; +use identity_iota::client::FailFast; +use identity_iota::client::PresentationValidationOptions; + +use identity_iota::client::Resolver; +use identity_iota::client::SubjectHolderRelationship; #[tokio::main] async fn main() -> Result<()> { diff --git a/examples/account/encryption.rs b/examples/account/encryption.rs index ff85f47d22..0e91712b01 100644 --- a/examples/account/encryption.rs +++ b/examples/account/encryption.rs @@ -7,20 +7,20 @@ use std::path::PathBuf; -use identity::account::Account; -use identity::account::AccountBuilder; -use identity::account::IdentitySetup; -use identity::account::MethodContent; -use identity::account::Result; -use identity::account_storage::AgreementInfo; -use identity::account_storage::CekAlgorithm; -use identity::account_storage::EncryptedData; -use identity::account_storage::EncryptionAlgorithm; -use identity::account_storage::Stronghold; -use identity::did::MethodScope; -use identity::iota::ResolvedIotaDocument; -use identity::iota::Resolver; -use identity::iota_core::IotaVerificationMethod; +use identity_iota::account::Account; +use identity_iota::account::AccountBuilder; +use identity_iota::account::IdentitySetup; +use identity_iota::account::MethodContent; +use identity_iota::account::Result; +use identity_iota::account_storage::AgreementInfo; +use identity_iota::account_storage::CekAlgorithm; +use identity_iota::account_storage::EncryptedData; +use identity_iota::account_storage::EncryptionAlgorithm; +use identity_iota::account_storage::Stronghold; +use identity_iota::client::ResolvedIotaDocument; +use identity_iota::client::Resolver; +use identity_iota::did::MethodScope; +use identity_iota::iota_core::IotaVerificationMethod; #[tokio::main] async fn main() -> Result<()> { diff --git a/examples/account/lazy.rs b/examples/account/lazy.rs index 82213f49f4..a69941c935 100644 --- a/examples/account/lazy.rs +++ b/examples/account/lazy.rs @@ -4,13 +4,13 @@ //! cargo run --example account_lazy use std::path::PathBuf; -use identity::account::Account; -use identity::account::IdentitySetup; -use identity::account::Result; -use identity::account_storage::Stronghold; -use identity::core::Url; -use identity::iota::ExplorerUrl; -use identity::iota_core::IotaDID; +use identity_iota::account::Account; +use identity_iota::account::IdentitySetup; +use identity_iota::account::Result; +use identity_iota::account_storage::Stronghold; +use identity_iota::client::ExplorerUrl; +use identity_iota::core::Url; +use identity_iota::iota_core::IotaDID; #[tokio::main] async fn main() -> Result<()> { diff --git a/examples/account/manipulate_did.rs b/examples/account/manipulate_did.rs index 9bed122cf8..25e6bab742 100644 --- a/examples/account/manipulate_did.rs +++ b/examples/account/manipulate_did.rs @@ -5,15 +5,15 @@ use std::path::PathBuf; -use identity::account::Account; -use identity::account::IdentitySetup; -use identity::account::MethodContent; -use identity::account::Result; -use identity::account_storage::Stronghold; -use identity::core::Url; -use identity::did::MethodRelationship; -use identity::iota::ExplorerUrl; -use identity::iota_core::IotaDID; +use identity_iota::account::Account; +use identity_iota::account::IdentitySetup; +use identity_iota::account::MethodContent; +use identity_iota::account::Result; +use identity_iota::account_storage::Stronghold; +use identity_iota::client::ExplorerUrl; +use identity_iota::core::Url; +use identity_iota::did::MethodRelationship; +use identity_iota::iota_core::IotaDID; #[tokio::main] async fn main() -> Result<()> { diff --git a/examples/account/multiple_identities.rs b/examples/account/multiple_identities.rs index 2f6abde48e..0ce420c247 100644 --- a/examples/account/multiple_identities.rs +++ b/examples/account/multiple_identities.rs @@ -5,14 +5,14 @@ use std::path::PathBuf; -use identity::account::Account; -use identity::account::AccountBuilder; -use identity::account::IdentitySetup; -use identity::account::MethodContent; -use identity::account::Result; -use identity::account_storage::Stronghold; -use identity::iota::ExplorerUrl; -use identity::iota_core::IotaDID; +use identity_iota::account::Account; +use identity_iota::account::AccountBuilder; +use identity_iota::account::IdentitySetup; +use identity_iota::account::MethodContent; +use identity_iota::account::Result; +use identity_iota::account_storage::Stronghold; +use identity_iota::client::ExplorerUrl; +use identity_iota::iota_core::IotaDID; #[tokio::main] async fn main() -> Result<()> { diff --git a/examples/account/revoke_vc.rs b/examples/account/revoke_vc.rs index 113d6f1dfd..69bee67284 100644 --- a/examples/account/revoke_vc.rs +++ b/examples/account/revoke_vc.rs @@ -11,27 +11,27 @@ //! //! cargo run --example account_revoke_vc -use identity::account::Account; -use identity::account::AccountBuilder; -use identity::account::IdentitySetup; -use identity::account::MethodContent; -use identity::account::Result; -use identity::core::json; -use identity::core::FromJson; -use identity::core::Url; -use identity::credential::Credential; -use identity::credential::CredentialBuilder; -use identity::credential::RevocationBitmapStatus; -use identity::credential::Status; -use identity::credential::Subject; -use identity::crypto::ProofOptions; -use identity::did::RevocationBitmap; -use identity::did::DID; -use identity::iota::CredentialValidationOptions; -use identity::iota::CredentialValidator; -use identity::iota::ResolvedIotaDocument; -use identity::iota::Resolver; -use identity::iota::ValidationError; +use identity_iota::account::Account; +use identity_iota::account::AccountBuilder; +use identity_iota::account::IdentitySetup; +use identity_iota::account::MethodContent; +use identity_iota::account::Result; +use identity_iota::client::CredentialValidationOptions; +use identity_iota::client::CredentialValidator; +use identity_iota::client::ResolvedIotaDocument; +use identity_iota::client::Resolver; +use identity_iota::client::ValidationError; +use identity_iota::core::json; +use identity_iota::core::FromJson; +use identity_iota::core::Url; +use identity_iota::credential::Credential; +use identity_iota::credential::CredentialBuilder; +use identity_iota::credential::RevocationBitmapStatus; +use identity_iota::credential::Status; +use identity_iota::credential::Subject; +use identity_iota::crypto::ProofOptions; +use identity_iota::did::RevocationBitmap; +use identity_iota::did::DID; #[tokio::main] async fn main() -> Result<()> { @@ -98,7 +98,7 @@ async fn main() -> Result<()> { &credential, &issuer.document(), &CredentialValidationOptions::default(), - identity::iota::FailFast::FirstError, + identity_iota::client::FailFast::FirstError, ); // The credential wasn't revoked, so we expect the validation to succeed. @@ -118,7 +118,7 @@ async fn main() -> Result<()> { &credential, &issuer.document(), &CredentialValidationOptions::default(), - identity::iota::FailFast::FirstError, + identity_iota::client::FailFast::FirstError, ); // We expect validation to no longer succeed because the credential was revoked. @@ -147,7 +147,7 @@ async fn main() -> Result<()> { &credential, &resolved_issuer_doc, &CredentialValidationOptions::default(), - identity::iota::FailFast::FirstError, + identity_iota::client::FailFast::FirstError, ); println!("VC validation result: {:?}", validation_result); diff --git a/examples/account/signing.rs b/examples/account/signing.rs index d265036845..3c848d69c3 100644 --- a/examples/account/signing.rs +++ b/examples/account/signing.rs @@ -5,24 +5,24 @@ use std::path::PathBuf; -use identity::account::Account; -use identity::account::IdentitySetup; -use identity::account::MethodContent; -use identity::account::Result; -use identity::account_storage::Stronghold; -use identity::core::json; -use identity::core::FromJson; -use identity::core::Url; -use identity::credential::Credential; -use identity::credential::Subject; -use identity::crypto::KeyPair; -use identity::crypto::ProofOptions; -use identity::did::verifiable::VerifierOptions; -use identity::did::DID; -use identity::iota::ExplorerUrl; -use identity::iota::ResolvedIotaDocument; -use identity::iota_core::IotaDID; -use identity::prelude::*; +use identity_iota::account::Account; +use identity_iota::account::IdentitySetup; +use identity_iota::account::MethodContent; +use identity_iota::account::Result; +use identity_iota::account_storage::Stronghold; +use identity_iota::client::ExplorerUrl; +use identity_iota::client::ResolvedIotaDocument; +use identity_iota::core::json; +use identity_iota::core::FromJson; +use identity_iota::core::Url; +use identity_iota::credential::Credential; +use identity_iota::credential::Subject; +use identity_iota::crypto::KeyPair; +use identity_iota::crypto::ProofOptions; +use identity_iota::did::verifiable::VerifierOptions; +use identity_iota::did::DID; +use identity_iota::iota_core::IotaDID; +use identity_iota::prelude::*; #[tokio::main] async fn main() -> Result<()> { diff --git a/examples/account/unchecked.rs b/examples/account/unchecked.rs index ba224572e3..8f1f3a7892 100644 --- a/examples/account/unchecked.rs +++ b/examples/account/unchecked.rs @@ -5,14 +5,14 @@ use std::path::PathBuf; -use identity::account::Account; -use identity::account::IdentitySetup; -use identity::account::Result; -use identity::account_storage::Stronghold; -use identity::core::Timestamp; -use identity::iota::ExplorerUrl; -use identity::iota_core::IotaDID; -use identity::prelude::IotaDocument; +use identity_iota::account::Account; +use identity_iota::account::IdentitySetup; +use identity_iota::account::Result; +use identity_iota::account_storage::Stronghold; +use identity_iota::client::ExplorerUrl; +use identity_iota::core::Timestamp; +use identity_iota::iota_core::IotaDID; +use identity_iota::prelude::IotaDocument; #[tokio::main] async fn main() -> Result<()> { diff --git a/examples/getting_started.rs b/examples/getting_started.rs index f2049e5b41..4368b5b1d4 100644 --- a/examples/getting_started.rs +++ b/examples/getting_started.rs @@ -5,7 +5,7 @@ //! //! cargo run --example getting_started -use identity::iota::Result; +use identity_iota::client::Result; #[tokio::main] async fn main() -> Result<()> { diff --git a/examples/low-level-api/common.rs b/examples/low-level-api/common.rs index 010e8f4db3..f3cf3a804b 100644 --- a/examples/low-level-api/common.rs +++ b/examples/low-level-api/common.rs @@ -5,18 +5,18 @@ #![allow(dead_code)] -use identity::core::json; -use identity::core::FromJson; -use identity::core::Timestamp; -use identity::core::Url; -use identity::credential::Credential; -use identity::credential::CredentialBuilder; -use identity::credential::Subject; -use identity::did::MethodScope; -use identity::did::DID; -use identity::iota::Receipt; -use identity::iota_core::IotaVerificationMethod; -use identity::prelude::*; +use identity_iota::core::json; +use identity_iota::core::FromJson; +use identity_iota::core::Timestamp; +use identity_iota::core::Url; +use identity_iota::credential::Credential; +use identity_iota::credential::CredentialBuilder; +use identity_iota::credential::Subject; +use identity_iota::did::MethodScope; +use identity_iota::did::DID; +use identity_iota::client::Receipt; +use identity_iota::iota_core::IotaVerificationMethod; +use identity_iota::prelude::*; /// Helper that takes two DID Documents (identities) for issuer and subject, and /// creates an unsigned credential with claims about subject by issuer. diff --git a/examples/low-level-api/create_did.rs b/examples/low-level-api/create_did.rs index bf8b50f3bd..1436646873 100644 --- a/examples/low-level-api/create_did.rs +++ b/examples/low-level-api/create_did.rs @@ -6,9 +6,9 @@ //! //! cargo run --example create_did -use identity::iota::ExplorerUrl; -use identity::iota::Receipt; -use identity::prelude::*; +use identity_iota::client::ExplorerUrl; +use identity_iota::client::Receipt; +use identity_iota::prelude::*; pub async fn run() -> Result<(IotaDocument, KeyPair, Receipt)> { // Create a client instance to send messages to the Tangle. diff --git a/examples/low-level-api/key_exchange.rs b/examples/low-level-api/key_exchange.rs index a489b5db65..024789fce4 100644 --- a/examples/low-level-api/key_exchange.rs +++ b/examples/low-level-api/key_exchange.rs @@ -5,15 +5,15 @@ //! //! cargo run --example key_exchange -use identity::crypto::KeyType; -use identity::crypto::X25519; -use identity::did::MethodScope; -use identity::iota::Receipt; -use identity::iota::ResolvedIotaDocument; -use identity::iota::TangleResolve; -use identity::iota_core::IotaDID; -use identity::iota_core::IotaVerificationMethod; -use identity::prelude::*; +use identity_iota::client::Receipt; +use identity_iota::client::ResolvedIotaDocument; +use identity_iota::client::TangleResolve; +use identity_iota::crypto::KeyType; +use identity_iota::crypto::X25519; +use identity_iota::did::MethodScope; +use identity_iota::iota_core::IotaDID; +use identity_iota::iota_core::IotaVerificationMethod; +use identity_iota::prelude::*; mod create_did; diff --git a/examples/low-level-api/manipulate_did.rs b/examples/low-level-api/manipulate_did.rs index bfc3c922b3..7aaef0fca4 100644 --- a/examples/low-level-api/manipulate_did.rs +++ b/examples/low-level-api/manipulate_did.rs @@ -6,17 +6,17 @@ //! //! cargo run --example update_did -use identity::core::json; -use identity::core::FromJson; -use identity::core::Timestamp; -use identity::did::MethodScope; -use identity::did::Service; -use identity::did::DID; -use identity::iota::ExplorerUrl; -use identity::iota::Receipt; -use identity::iota_core::IotaService; -use identity::iota_core::IotaVerificationMethod; -use identity::prelude::*; +use identity_iota::client::ExplorerUrl; +use identity_iota::client::Receipt; +use identity_iota::core::json; +use identity_iota::core::FromJson; +use identity_iota::core::Timestamp; +use identity_iota::did::MethodScope; +use identity_iota::did::Service; +use identity_iota::did::DID; +use identity_iota::iota_core::IotaService; +use identity_iota::iota_core::IotaVerificationMethod; +use identity_iota::prelude::*; mod create_did; diff --git a/examples/low-level-api/private_tangle.rs b/examples/low-level-api/private_tangle.rs index 9ef752194c..3b889a9c35 100644 --- a/examples/low-level-api/private_tangle.rs +++ b/examples/low-level-api/private_tangle.rs @@ -9,13 +9,13 @@ //! //! cargo run --example private_tangle -use identity::crypto::KeyType; -use identity::iota::ClientBuilder; -use identity::iota::DIDMessageEncoding; -use identity::iota::ExplorerUrl; -use identity::iota::Receipt; -use identity::iota_core::Network; -use identity::prelude::*; +use identity_iota::client::ClientBuilder; +use identity_iota::client::DIDMessageEncoding; +use identity_iota::client::ExplorerUrl; +use identity_iota::client::Receipt; +use identity_iota::crypto::KeyType; +use identity_iota::iota_core::Network; +use identity_iota::prelude::*; #[tokio::main] pub async fn main() -> Result<()> { diff --git a/examples/low-level-api/resolve_did.rs b/examples/low-level-api/resolve_did.rs index 3b337892ca..d57ca54834 100644 --- a/examples/low-level-api/resolve_did.rs +++ b/examples/low-level-api/resolve_did.rs @@ -8,11 +8,11 @@ //! //! cargo run --example resolve_did -use identity::iota::Receipt; -use identity::iota::ResolvedIotaDocument; -use identity::iota::Resolver; -use identity::iota_core::IotaDID; -use identity::prelude::*; +use identity_iota::client::Receipt; +use identity_iota::client::ResolvedIotaDocument; +use identity_iota::client::Resolver; +use identity_iota::iota_core::IotaDID; +use identity_iota::prelude::*; mod create_did; diff --git a/examples/low-level-api/resolve_history.rs b/examples/low-level-api/resolve_history.rs index f989c13a70..3c301b2524 100644 --- a/examples/low-level-api/resolve_history.rs +++ b/examples/low-level-api/resolve_history.rs @@ -6,21 +6,21 @@ //! //! cargo run --example did_history -use identity::core::json; -use identity::core::FromJson; -use identity::core::Timestamp; -use identity::crypto::KeyPair; -use identity::did::MethodScope; -use identity::did::Service; -use identity::did::DID; -use identity::iota::Client; -use identity::iota::DocumentHistory; -use identity::iota::Receipt; -use identity::iota::Result; -use identity::iota_core::IotaDocument; -use identity::iota_core::IotaService; -use identity::iota_core::IotaVerificationMethod; -use identity::prelude::*; +use identity_iota::client::Client; +use identity_iota::client::DocumentHistory; +use identity_iota::client::Receipt; +use identity_iota::client::Result; +use identity_iota::core::json; +use identity_iota::core::FromJson; +use identity_iota::core::Timestamp; +use identity_iota::crypto::KeyPair; +use identity_iota::did::MethodScope; +use identity_iota::did::Service; +use identity_iota::did::DID; +use identity_iota::iota_core::IotaDocument; +use identity_iota::iota_core::IotaService; +use identity_iota::iota_core::IotaVerificationMethod; +use identity_iota::prelude::*; mod create_did; diff --git a/identity-account/Cargo.toml b/identity_account/Cargo.toml similarity index 60% rename from identity-account/Cargo.toml rename to identity_account/Cargo.toml index 7115293aa7..6f2be45a49 100644 --- a/identity-account/Cargo.toml +++ b/identity_account/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "identity-account" +name = "identity_account" version = "0.5.0" authors = ["IOTA Stiftung"] edition = "2021" @@ -11,12 +11,12 @@ repository = "https://github.com/iotaledger/identity.rs" description = "High-level interface for managing IOTA DID Documents." [dependencies] -identity-account-storage = { version = "=0.5.0", path = "../identity-account-storage", default-features = false } -identity-core = { version = "=0.5.0", path = "../identity-core", default-features = false } -identity-credential = { version = "=0.5.0", path = "../identity-credential", default-features = false } -identity-did = { version = "=0.5.0", path = "../identity-did", default-features = false } -identity-iota = { version = "=0.5.0", path = "../identity-iota", default-features = false } -identity-iota-core = { version = "=0.5.0", path = "../identity-iota-core", default-features = false } +identity_account_storage = { version = "=0.5.0", path = "../identity_account_storage", default-features = false } +identity_core = { version = "=0.5.0", path = "../identity_core", default-features = false } +identity_credential = { version = "=0.5.0", path = "../identity_credential", default-features = false } +identity_did = { version = "=0.5.0", path = "../identity_did", default-features = false } +identity_iota_client = { version = "=0.5.0", path = "../identity_iota_client", default-features = false } +identity_iota_core = { version = "=0.5.0", path = "../identity_iota_core", default-features = false } log = { version = "0.4", default-features = false } paste = { version = "1.0" } rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] } @@ -32,11 +32,11 @@ tokio = { version = "1.17.0", default-features = false, features = ["macros", "r [features] default = ["stronghold", "async", "send-sync-storage", "encryption", "revocation-bitmap"] mem-client = [] -stronghold = ["identity-account-storage/stronghold"] -async = ["identity-iota/async"] -send-sync-storage = ["identity-account-storage/send-sync-storage"] +stronghold = ["identity_account_storage/stronghold"] +async = ["identity_iota_client/async"] +send-sync-storage = ["identity_account_storage/send-sync-storage"] # Enables encryption and decryption functionality. -encryption = ["identity-account-storage/encryption"] +encryption = ["identity_account_storage/encryption"] # Enables revocation with `RevocationBitmap2022`. -revocation-bitmap = ["identity-iota/revocation-bitmap"] +revocation-bitmap = ["identity_iota_client/revocation-bitmap"] diff --git a/identity-account/README.md b/identity_account/README.md similarity index 100% rename from identity-account/README.md rename to identity_account/README.md diff --git a/identity-account/src/account/account.rs b/identity_account/src/account/account.rs similarity index 97% rename from identity-account/src/account/account.rs rename to identity_account/src/account/account.rs index 6040752fa0..5c16357dee 100644 --- a/identity-account/src/account/account.rs +++ b/identity_account/src/account/account.rs @@ -23,11 +23,11 @@ use identity_core::crypto::ProofOptions; use identity_core::crypto::PublicKey; use identity_core::crypto::SetSignature; use identity_did::did::DID; -use identity_iota::chain::DocumentChain; -use identity_iota::document::ResolvedIotaDocument; -use identity_iota::tangle::Client; -use identity_iota::tangle::PublishType; -use identity_iota::tangle::SharedPtr; +use identity_iota_client::chain::DocumentChain; +use identity_iota_client::document::ResolvedIotaDocument; +use identity_iota_client::tangle::Client; +use identity_iota_client::tangle::PublishType; +use identity_iota_client::tangle::SharedPtr; use identity_iota_core::did::IotaDID; use identity_iota_core::did::IotaDIDUrl; use identity_iota_core::diff::DiffMessage; @@ -124,11 +124,13 @@ where pub(crate) async fn load_identity(setup: AccountSetup, did: IotaDID) -> Result { // Ensure the DID matches the client network. if did.network_str() != setup.client.network().name_str() { - return Err(Error::IotaError(identity_iota::Error::IncompatibleNetwork(format!( - "DID network {} does not match account network {}", - did.network_str(), - setup.client.network().name_str() - )))); + return Err(Error::IotaClientError( + identity_iota_client::Error::IncompatibleNetwork(format!( + "DID network {} does not match account network {}", + did.network_str(), + setup.client.network().name_str() + )), + )); } // Ensure the identity exists in storage diff --git a/identity-account/src/account/builder.rs b/identity_account/src/account/builder.rs similarity index 97% rename from identity-account/src/account/builder.rs rename to identity_account/src/account/builder.rs index a90969d94f..caf419757a 100644 --- a/identity-account/src/account/builder.rs +++ b/identity_account/src/account/builder.rs @@ -5,9 +5,9 @@ use std::sync::Arc; use identity_account_storage::storage::MemStore; use identity_account_storage::storage::Storage; -use identity_iota::tangle::Client; -use identity_iota::tangle::ClientBuilder; -use identity_iota::tangle::SharedPtr; +use identity_iota_client::tangle::Client; +use identity_iota_client::tangle::ClientBuilder; +use identity_iota_client::tangle::SharedPtr; use identity_iota_core::did::IotaDID; use crate::account::Account; diff --git a/identity-account/src/account/config.rs b/identity_account/src/account/config.rs similarity index 96% rename from identity-account/src/account/config.rs rename to identity_account/src/account/config.rs index 87329241c8..f4b7107095 100644 --- a/identity-account/src/account/config.rs +++ b/identity_account/src/account/config.rs @@ -4,8 +4,8 @@ use std::sync::Arc; use identity_account_storage::storage::Storage; -use identity_iota::tangle::Client; -use identity_iota::tangle::SharedPtr; +use identity_iota_client::tangle::Client; +use identity_iota_client::tangle::SharedPtr; use serde::Deserialize; use serde::Serialize; diff --git a/identity-account/src/account/mod.rs b/identity_account/src/account/mod.rs similarity index 100% rename from identity-account/src/account/mod.rs rename to identity_account/src/account/mod.rs diff --git a/identity-account/src/account/publish_options.rs b/identity_account/src/account/publish_options.rs similarity index 100% rename from identity-account/src/account/publish_options.rs rename to identity_account/src/account/publish_options.rs diff --git a/identity-account/src/error.rs b/identity_account/src/error.rs similarity index 93% rename from identity-account/src/error.rs rename to identity_account/src/error.rs index 5c694060af..369f95411d 100644 --- a/identity-account/src/error.rs +++ b/identity_account/src/error.rs @@ -21,9 +21,9 @@ pub enum Error { /// Caused by errors from the [identity_account_storage] crate. #[error(transparent)] AccountCoreError(#[from] identity_account_storage::Error), - /// Caused by errors from the [identity_iota] crate. + /// Caused by errors from the [identity_iota_client] crate. #[error(transparent)] - IotaError(#[from] identity_iota::Error), + IotaClientError(#[from] identity_iota_client::Error), /// Caused by errors from the [identity_iota_core] crate. #[error(transparent)] IotaCoreError(#[from] identity_iota_core::Error), diff --git a/identity-account/src/lib.rs b/identity_account/src/lib.rs similarity index 100% rename from identity-account/src/lib.rs rename to identity_account/src/lib.rs diff --git a/identity-account/src/tests/account.rs b/identity_account/src/tests/account.rs similarity index 98% rename from identity-account/src/tests/account.rs rename to identity_account/src/tests/account.rs index fbf7851a53..3300f17ab6 100644 --- a/identity-account/src/tests/account.rs +++ b/identity_account/src/tests/account.rs @@ -14,9 +14,9 @@ use identity_core::common::Url; use identity_core::crypto::ProofOptions; use identity_did::utils::Queryable; use identity_did::verification::MethodScope; -use identity_iota::chain::DocumentChain; -use identity_iota::tangle::Client; -use identity_iota::tangle::ClientBuilder; +use identity_iota_client::chain::DocumentChain; +use identity_iota_client::tangle::Client; +use identity_iota_client::tangle::ClientBuilder; use identity_iota_core::did::IotaDID; use identity_iota_core::diff::DiffMessage; use identity_iota_core::document::IotaDocument; @@ -588,7 +588,7 @@ async fn network_resilient_test( let test_attempt = f(test_run).await; match test_attempt { - error @ Err(Error::IotaError(identity_iota::Error::ClientError(_))) => { + error @ Err(Error::IotaClientError(identity_iota_client::Error::ClientError(_))) => { eprintln!("test run {} errored with {:?}", test_run, error); if test_run == test_runs - 1 { diff --git a/identity-account/src/tests/mod.rs b/identity_account/src/tests/mod.rs similarity index 100% rename from identity-account/src/tests/mod.rs rename to identity_account/src/tests/mod.rs diff --git a/identity-account/src/tests/updates.rs b/identity_account/src/tests/updates.rs similarity index 99% rename from identity-account/src/tests/updates.rs rename to identity_account/src/tests/updates.rs index a7df08625f..7565791f46 100644 --- a/identity-account/src/tests/updates.rs +++ b/identity_account/src/tests/updates.rs @@ -19,7 +19,7 @@ use identity_did::utils::Queryable; use identity_did::verification::MethodRelationship; use identity_did::verification::MethodScope; use identity_did::verification::MethodType; -use identity_iota::tangle::ClientBuilder; +use identity_iota_client::tangle::ClientBuilder; use identity_iota_core::did::IotaDID; use identity_iota_core::document::IotaDocument; use identity_iota_core::document::IotaVerificationMethod; diff --git a/identity-account/src/tests/util.rs b/identity_account/src/tests/util.rs similarity index 96% rename from identity-account/src/tests/util.rs rename to identity_account/src/tests/util.rs index 607c80cb25..3a6e951aa9 100644 --- a/identity-account/src/tests/util.rs +++ b/identity_account/src/tests/util.rs @@ -6,7 +6,7 @@ use std::sync::Arc; use identity_account_storage::storage::MemStore; use identity_account_storage::storage::Storage; use identity_account_storage::storage::Stronghold; -use identity_iota::tangle::ClientBuilder; +use identity_iota_client::tangle::ClientBuilder; use identity_iota_core::tangle::Network; use rand::distributions::DistString; use rand::rngs::OsRng; diff --git a/identity-account/src/types/identity_setup.rs b/identity_account/src/types/identity_setup.rs similarity index 100% rename from identity-account/src/types/identity_setup.rs rename to identity_account/src/types/identity_setup.rs diff --git a/identity-account/src/types/identity_updater.rs b/identity_account/src/types/identity_updater.rs similarity index 86% rename from identity-account/src/types/identity_updater.rs rename to identity_account/src/types/identity_updater.rs index f0e6030216..b12d2c2c06 100644 --- a/identity-account/src/types/identity_updater.rs +++ b/identity_account/src/types/identity_updater.rs @@ -1,8 +1,8 @@ // Copyright 2020-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use identity_iota::tangle::Client; -use identity_iota::tangle::SharedPtr; +use identity_iota_client::tangle::Client; +use identity_iota_client::tangle::SharedPtr; use crate::account::Account; diff --git a/identity-account/src/types/method_content.rs b/identity_account/src/types/method_content.rs similarity index 100% rename from identity-account/src/types/method_content.rs rename to identity_account/src/types/method_content.rs diff --git a/identity-account/src/types/mod.rs b/identity_account/src/types/mod.rs similarity index 100% rename from identity-account/src/types/mod.rs rename to identity_account/src/types/mod.rs diff --git a/identity-account/src/updates/error.rs b/identity_account/src/updates/error.rs similarity index 100% rename from identity-account/src/updates/error.rs rename to identity_account/src/updates/error.rs diff --git a/identity-account/src/updates/macros.rs b/identity_account/src/updates/macros.rs similarity index 91% rename from identity-account/src/updates/macros.rs rename to identity_account/src/updates/macros.rs index d8a31ab5ac..6fbbf45c9c 100644 --- a/identity-account/src/updates/macros.rs +++ b/identity_account/src/updates/macros.rs @@ -36,7 +36,7 @@ macro_rules! impl_update_builder { #[derive(Debug)] pub struct [<$ident Builder>]<'account, C> where - C: identity_iota::tangle::SharedPtr, + C: identity_iota_client::tangle::SharedPtr, { account: &'account mut Account, $( @@ -46,7 +46,7 @@ macro_rules! impl_update_builder { impl<'account, C> [<$ident Builder>]<'account, C> where - C: identity_iota::tangle::SharedPtr, + C: identity_iota_client::tangle::SharedPtr, { $( #[must_use] @@ -58,7 +58,7 @@ macro_rules! impl_update_builder { pub fn new(account: &'account mut Account) -> [<$ident Builder>]<'account, C> where - C: identity_iota::tangle::SharedPtr, + C: identity_iota_client::tangle::SharedPtr, { [<$ident Builder>] { account, @@ -81,7 +81,7 @@ macro_rules! impl_update_builder { impl<'account, C> $crate::types::IdentityUpdater<'account, C> where - C: identity_iota::tangle::SharedPtr, + C: identity_iota_client::tangle::SharedPtr, { /// Creates a new builder to modify the identity. See the documentation of the return type for details. pub fn [<$ident:snake>](&'account mut self) -> [<$ident Builder>]<'account, C> { diff --git a/identity-account/src/updates/mod.rs b/identity_account/src/updates/mod.rs similarity index 100% rename from identity-account/src/updates/mod.rs rename to identity_account/src/updates/mod.rs diff --git a/identity-account/src/updates/update.rs b/identity_account/src/updates/update.rs similarity index 99% rename from identity-account/src/updates/update.rs rename to identity_account/src/updates/update.rs index 570439fbd7..00da8a535e 100644 --- a/identity-account/src/updates/update.rs +++ b/identity_account/src/updates/update.rs @@ -23,8 +23,8 @@ use identity_did::utils::Queryable; use identity_did::verification::MethodRef; use identity_did::verification::MethodRelationship; use identity_did::verification::MethodScope; -use identity_iota::tangle::Client; -use identity_iota::tangle::SharedPtr; +use identity_iota_client::tangle::Client; +use identity_iota_client::tangle::SharedPtr; use identity_iota_core::did::IotaDID; use identity_iota_core::did::IotaDIDUrl; use identity_iota_core::document::IotaDocument; diff --git a/identity-account-storage/Cargo.toml b/identity_account_storage/Cargo.toml similarity index 89% rename from identity-account-storage/Cargo.toml rename to identity_account_storage/Cargo.toml index 489a4bf38e..a95b1dbcb6 100644 --- a/identity-account-storage/Cargo.toml +++ b/identity_account_storage/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "identity-account-storage" +name = "identity_account_storage" version = "0.5.0" authors = ["IOTA Stiftung"] edition = "2021" @@ -16,9 +16,9 @@ async-trait = { version = "0.1", default-features = false } function_name = { version = "0.2", default-features = false, optional = true } futures = { version = "0.3", optional = true } hashbrown = { version = "0.11", features = ["serde"] } -identity-core = { version = "=0.5.0", path = "../identity-core", default-features = false } -identity-did = { version = "=0.5.0", path = "../identity-did", default-features = false } -identity-iota-core = { version = "=0.5.0", path = "../identity-iota-core", default-features = false } +identity_core = { version = "=0.5.0", path = "../identity_core", default-features = false } +identity_did = { version = "=0.5.0", path = "../identity_did", default-features = false } +identity_iota_core = { version = "=0.5.0", path = "../identity_iota_core", default-features = false } iota-crypto = { version = ">=0.7, <0.10", default-features = false, features = ["hmac", "pbkdf", "sha", "std", "aes", "aes-kw"] } iota_stronghold = { version = "0.5.1", default-features = false, features = ["std"], optional = true } once_cell = { version = "1.7", default-features = false, features = ["std"], optional = true } diff --git a/identity-account-storage/README.md b/identity_account_storage/README.md similarity index 100% rename from identity-account-storage/README.md rename to identity_account_storage/README.md diff --git a/identity-account-storage/src/crypto/mod.rs b/identity_account_storage/src/crypto/mod.rs similarity index 100% rename from identity-account-storage/src/crypto/mod.rs rename to identity_account_storage/src/crypto/mod.rs diff --git a/identity-account-storage/src/crypto/remote.rs b/identity_account_storage/src/crypto/remote.rs similarity index 100% rename from identity-account-storage/src/crypto/remote.rs rename to identity_account_storage/src/crypto/remote.rs diff --git a/identity-account-storage/src/error.rs b/identity_account_storage/src/error.rs similarity index 100% rename from identity-account-storage/src/error.rs rename to identity_account_storage/src/error.rs diff --git a/identity-account-storage/src/identity/chain_state.rs b/identity_account_storage/src/identity/chain_state.rs similarity index 100% rename from identity-account-storage/src/identity/chain_state.rs rename to identity_account_storage/src/identity/chain_state.rs diff --git a/identity-account-storage/src/identity/mod.rs b/identity_account_storage/src/identity/mod.rs similarity index 100% rename from identity-account-storage/src/identity/mod.rs rename to identity_account_storage/src/identity/mod.rs diff --git a/identity-account-storage/src/lib.rs b/identity_account_storage/src/lib.rs similarity index 100% rename from identity-account-storage/src/lib.rs rename to identity_account_storage/src/lib.rs diff --git a/identity-account-storage/src/storage/memstore.rs b/identity_account_storage/src/storage/memstore.rs similarity index 100% rename from identity-account-storage/src/storage/memstore.rs rename to identity_account_storage/src/storage/memstore.rs diff --git a/identity-account-storage/src/storage/mod.rs b/identity_account_storage/src/storage/mod.rs similarity index 100% rename from identity-account-storage/src/storage/mod.rs rename to identity_account_storage/src/storage/mod.rs diff --git a/identity-account-storage/src/storage/stronghold.rs b/identity_account_storage/src/storage/stronghold.rs similarity index 100% rename from identity-account-storage/src/storage/stronghold.rs rename to identity_account_storage/src/storage/stronghold.rs diff --git a/identity-account-storage/src/storage/test_suite.rs b/identity_account_storage/src/storage/test_suite.rs similarity index 100% rename from identity-account-storage/src/storage/test_suite.rs rename to identity_account_storage/src/storage/test_suite.rs diff --git a/identity-account-storage/src/storage/traits.rs b/identity_account_storage/src/storage/traits.rs similarity index 100% rename from identity-account-storage/src/storage/traits.rs rename to identity_account_storage/src/storage/traits.rs diff --git a/identity-account-storage/src/stronghold/client_path.rs b/identity_account_storage/src/stronghold/client_path.rs similarity index 100% rename from identity-account-storage/src/stronghold/client_path.rs rename to identity_account_storage/src/stronghold/client_path.rs diff --git a/identity-account-storage/src/stronghold/error.rs b/identity_account_storage/src/stronghold/error.rs similarity index 100% rename from identity-account-storage/src/stronghold/error.rs rename to identity_account_storage/src/stronghold/error.rs diff --git a/identity-account-storage/src/stronghold/mod.rs b/identity_account_storage/src/stronghold/mod.rs similarity index 100% rename from identity-account-storage/src/stronghold/mod.rs rename to identity_account_storage/src/stronghold/mod.rs diff --git a/identity-account-storage/src/stronghold/test_util.rs b/identity_account_storage/src/stronghold/test_util.rs similarity index 100% rename from identity-account-storage/src/stronghold/test_util.rs rename to identity_account_storage/src/stronghold/test_util.rs diff --git a/identity-account-storage/src/stronghold/tests.rs b/identity_account_storage/src/stronghold/tests.rs similarity index 100% rename from identity-account-storage/src/stronghold/tests.rs rename to identity_account_storage/src/stronghold/tests.rs diff --git a/identity-account-storage/src/stronghold/wrapper.rs b/identity_account_storage/src/stronghold/wrapper.rs similarity index 100% rename from identity-account-storage/src/stronghold/wrapper.rs rename to identity_account_storage/src/stronghold/wrapper.rs diff --git a/identity-account-storage/src/types/encryption/cek_algorithm.rs b/identity_account_storage/src/types/encryption/cek_algorithm.rs similarity index 100% rename from identity-account-storage/src/types/encryption/cek_algorithm.rs rename to identity_account_storage/src/types/encryption/cek_algorithm.rs diff --git a/identity-account-storage/src/types/encryption/encrypted_data.rs b/identity_account_storage/src/types/encryption/encrypted_data.rs similarity index 100% rename from identity-account-storage/src/types/encryption/encrypted_data.rs rename to identity_account_storage/src/types/encryption/encrypted_data.rs diff --git a/identity-account-storage/src/types/encryption/encryption_algorithm.rs b/identity_account_storage/src/types/encryption/encryption_algorithm.rs similarity index 100% rename from identity-account-storage/src/types/encryption/encryption_algorithm.rs rename to identity_account_storage/src/types/encryption/encryption_algorithm.rs diff --git a/identity-account-storage/src/types/encryption/mod.rs b/identity_account_storage/src/types/encryption/mod.rs similarity index 100% rename from identity-account-storage/src/types/encryption/mod.rs rename to identity_account_storage/src/types/encryption/mod.rs diff --git a/identity-account-storage/src/types/key_location.rs b/identity_account_storage/src/types/key_location.rs similarity index 100% rename from identity-account-storage/src/types/key_location.rs rename to identity_account_storage/src/types/key_location.rs diff --git a/identity-account-storage/src/types/mod.rs b/identity_account_storage/src/types/mod.rs similarity index 100% rename from identity-account-storage/src/types/mod.rs rename to identity_account_storage/src/types/mod.rs diff --git a/identity-account-storage/src/types/signature.rs b/identity_account_storage/src/types/signature.rs similarity index 100% rename from identity-account-storage/src/types/signature.rs rename to identity_account_storage/src/types/signature.rs diff --git a/identity-account-storage/src/utils/crypto.rs b/identity_account_storage/src/utils/crypto.rs similarity index 100% rename from identity-account-storage/src/utils/crypto.rs rename to identity_account_storage/src/utils/crypto.rs diff --git a/identity-account-storage/src/utils/fs.rs b/identity_account_storage/src/utils/fs.rs similarity index 100% rename from identity-account-storage/src/utils/fs.rs rename to identity_account_storage/src/utils/fs.rs diff --git a/identity-account-storage/src/utils/mod.rs b/identity_account_storage/src/utils/mod.rs similarity index 100% rename from identity-account-storage/src/utils/mod.rs rename to identity_account_storage/src/utils/mod.rs diff --git a/identity-account-storage/src/utils/shared.rs b/identity_account_storage/src/utils/shared.rs similarity index 100% rename from identity-account-storage/src/utils/shared.rs rename to identity_account_storage/src/utils/shared.rs diff --git a/identity-comm/Cargo.toml b/identity_comm/Cargo.toml similarity index 66% rename from identity-comm/Cargo.toml rename to identity_comm/Cargo.toml index 0d9974cbe2..419017930e 100644 --- a/identity-comm/Cargo.toml +++ b/identity_comm/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "identity-comm" +name = "identity_comm" version = "0.5.0-dev.4" authors = ["IOTA Stiftung"] edition = "2021" @@ -11,15 +11,15 @@ repository = "https://github.com/iotaledger/identity.rs" description = "An implementation of the DIDComm Messaging Specification." [dependencies] -identity-core = { path = "../identity-core", version = "=0.5.0-dev.4" } -identity-credential = { path = "../identity-credential", version = "=0.5.0-dev.4" } -identity-did = { path = "../identity-did", version = "=0.5.0-dev.4" } -identity-iota = { path = "../identity-iota", version = "=0.5.0-dev.4", default-features = false } +identity_core = { path = "../identity_core", version = "=0.5.0-dev.4" } +identity_credential = { path = "../identity_credential", version = "=0.5.0-dev.4" } +identity_did = { path = "../identity_did", version = "=0.5.0-dev.4" } +identity_iota_client = { version = "=0.5.0", path = "../identity_iota_client", default-features = false } # libjose = { path = "../libjose", version = "=0.1.0" } paste = { version = "1.0" } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0" } -strum = { version = "0.21", features = ["derive"] } +strum = { version = "0.24.0", default-features = false, features = ["std", "derive"] } thiserror = { version = "1.0" } uuid = { version = "0.8", features = ["serde", "v4"], default-features = false } diff --git a/identity-comm/README.md b/identity_comm/README.md similarity index 100% rename from identity-comm/README.md rename to identity_comm/README.md diff --git a/identity-comm/src/envelope/encrypted.rs b/identity_comm/src/envelope/encrypted.rs similarity index 100% rename from identity-comm/src/envelope/encrypted.rs rename to identity_comm/src/envelope/encrypted.rs diff --git a/identity-comm/src/envelope/mod.rs b/identity_comm/src/envelope/mod.rs similarity index 100% rename from identity-comm/src/envelope/mod.rs rename to identity_comm/src/envelope/mod.rs diff --git a/identity-comm/src/envelope/plaintext.rs b/identity_comm/src/envelope/plaintext.rs similarity index 100% rename from identity-comm/src/envelope/plaintext.rs rename to identity_comm/src/envelope/plaintext.rs diff --git a/identity-comm/src/envelope/signed.rs b/identity_comm/src/envelope/signed.rs similarity index 100% rename from identity-comm/src/envelope/signed.rs rename to identity_comm/src/envelope/signed.rs diff --git a/identity-comm/src/envelope/traits.rs b/identity_comm/src/envelope/traits.rs similarity index 100% rename from identity-comm/src/envelope/traits.rs rename to identity_comm/src/envelope/traits.rs diff --git a/identity-comm/src/error.rs b/identity_comm/src/error.rs similarity index 91% rename from identity-comm/src/error.rs rename to identity_comm/src/error.rs index 529ea929c4..487d632b5c 100644 --- a/identity-comm/src/error.rs +++ b/identity_comm/src/error.rs @@ -6,7 +6,7 @@ pub type Result = core::result::Result; #[derive(Debug, thiserror::Error, strum::IntoStaticStr)] pub enum Error { #[error(transparent)] - IotaError(#[from] identity_iota::Error), + IotaError(#[from] identity_iota_client::Error), #[error(transparent)] CoreError(#[from] identity_core::Error), #[error(transparent)] diff --git a/identity-comm/src/lib.rs b/identity_comm/src/lib.rs similarity index 100% rename from identity-comm/src/lib.rs rename to identity_comm/src/lib.rs diff --git a/identity-comm/src/message/mod.rs b/identity_comm/src/message/mod.rs similarity index 100% rename from identity-comm/src/message/mod.rs rename to identity_comm/src/message/mod.rs diff --git a/identity-comm/src/message/traits.rs b/identity_comm/src/message/traits.rs similarity index 100% rename from identity-comm/src/message/traits.rs rename to identity_comm/src/message/traits.rs diff --git a/identity-comm/src/types.rs b/identity_comm/src/types.rs similarity index 100% rename from identity-comm/src/types.rs rename to identity_comm/src/types.rs diff --git a/identity-core/Cargo.toml b/identity_core/Cargo.toml similarity index 89% rename from identity-core/Cargo.toml rename to identity_core/Cargo.toml index a46e494c87..3ee8425ea3 100644 --- a/identity-core/Cargo.toml +++ b/identity_core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "identity-core" +name = "identity_core" version = "0.5.0" authors = ["IOTA Stiftung"] edition = "2021" @@ -11,12 +11,12 @@ repository = "https://github.com/iotaledger/identity.rs" description = "The core traits and types for the identity-rs library." [dependencies] -identity-diff = { version = "=0.5.0", path = "../identity-diff", default-features = false } +identity-diff = { version = "=0.5.0", path = "../identity_diff", default-features = false } multibase = { version = "0.9", default-features = false, features = ["std"] } serde = { version = "1.0", default-features = false, features = ["std", "derive"] } serde_jcs = { version = "0.1", default-features = false } serde_json = { version = "1.0", default-features = false, features = ["std"] } -strum = { version = "0.21", features = ["derive"] } +strum = { version = "0.24.0", default-features = false, features = ["std", "derive"] } thiserror = { version = "1.0", default-features = false } time = { version = "0.3.5", default-features = false, features = ["std", "serde", "parsing", "formatting"] } url = { version = "2.2", default-features = false, features = ["serde"] } diff --git a/identity-core/README.md b/identity_core/README.md similarity index 100% rename from identity-core/README.md rename to identity_core/README.md diff --git a/identity-core/src/common/context.rs b/identity_core/src/common/context.rs similarity index 100% rename from identity-core/src/common/context.rs rename to identity_core/src/common/context.rs diff --git a/identity-core/src/common/fragment.rs b/identity_core/src/common/fragment.rs similarity index 100% rename from identity-core/src/common/fragment.rs rename to identity_core/src/common/fragment.rs diff --git a/identity-core/src/common/key_comparable.rs b/identity_core/src/common/key_comparable.rs similarity index 100% rename from identity-core/src/common/key_comparable.rs rename to identity_core/src/common/key_comparable.rs diff --git a/identity-core/src/common/mod.rs b/identity_core/src/common/mod.rs similarity index 100% rename from identity-core/src/common/mod.rs rename to identity_core/src/common/mod.rs diff --git a/identity-core/src/common/object.rs b/identity_core/src/common/object.rs similarity index 100% rename from identity-core/src/common/object.rs rename to identity_core/src/common/object.rs diff --git a/identity-core/src/common/one_or_many.rs b/identity_core/src/common/one_or_many.rs similarity index 100% rename from identity-core/src/common/one_or_many.rs rename to identity_core/src/common/one_or_many.rs diff --git a/identity-core/src/common/one_or_set.rs b/identity_core/src/common/one_or_set.rs similarity index 100% rename from identity-core/src/common/one_or_set.rs rename to identity_core/src/common/one_or_set.rs diff --git a/identity-core/src/common/ordered_set.rs b/identity_core/src/common/ordered_set.rs similarity index 100% rename from identity-core/src/common/ordered_set.rs rename to identity_core/src/common/ordered_set.rs diff --git a/identity-core/src/common/timestamp.rs b/identity_core/src/common/timestamp.rs similarity index 100% rename from identity-core/src/common/timestamp.rs rename to identity_core/src/common/timestamp.rs diff --git a/identity-core/src/common/url.rs b/identity_core/src/common/url.rs similarity index 100% rename from identity-core/src/common/url.rs rename to identity_core/src/common/url.rs diff --git a/identity-core/src/convert/json.rs b/identity_core/src/convert/json.rs similarity index 100% rename from identity-core/src/convert/json.rs rename to identity_core/src/convert/json.rs diff --git a/identity-core/src/convert/mod.rs b/identity_core/src/convert/mod.rs similarity index 100% rename from identity-core/src/convert/mod.rs rename to identity_core/src/convert/mod.rs diff --git a/identity-core/src/crypto/key/ed25519.rs b/identity_core/src/crypto/key/ed25519.rs similarity index 100% rename from identity-core/src/crypto/key/ed25519.rs rename to identity_core/src/crypto/key/ed25519.rs diff --git a/identity-core/src/crypto/key/key.rs b/identity_core/src/crypto/key/key.rs similarity index 100% rename from identity-core/src/crypto/key/key.rs rename to identity_core/src/crypto/key/key.rs diff --git a/identity-core/src/crypto/key/mod.rs b/identity_core/src/crypto/key/mod.rs similarity index 100% rename from identity-core/src/crypto/key/mod.rs rename to identity_core/src/crypto/key/mod.rs diff --git a/identity-core/src/crypto/key/pair.rs b/identity_core/src/crypto/key/pair.rs similarity index 100% rename from identity-core/src/crypto/key/pair.rs rename to identity_core/src/crypto/key/pair.rs diff --git a/identity-core/src/crypto/key/type_.rs b/identity_core/src/crypto/key/type_.rs similarity index 100% rename from identity-core/src/crypto/key/type_.rs rename to identity_core/src/crypto/key/type_.rs diff --git a/identity-core/src/crypto/key/x25519.rs b/identity_core/src/crypto/key/x25519.rs similarity index 100% rename from identity-core/src/crypto/key/x25519.rs rename to identity_core/src/crypto/key/x25519.rs diff --git a/identity-core/src/crypto/mod.rs b/identity_core/src/crypto/mod.rs similarity index 100% rename from identity-core/src/crypto/mod.rs rename to identity_core/src/crypto/mod.rs diff --git a/identity-core/src/crypto/proof/jcs_ed25519.rs b/identity_core/src/crypto/proof/jcs_ed25519.rs similarity index 100% rename from identity-core/src/crypto/proof/jcs_ed25519.rs rename to identity_core/src/crypto/proof/jcs_ed25519.rs diff --git a/identity-core/src/crypto/proof/mod.rs b/identity_core/src/crypto/proof/mod.rs similarity index 100% rename from identity-core/src/crypto/proof/mod.rs rename to identity_core/src/crypto/proof/mod.rs diff --git a/identity-core/src/crypto/proof/proof.rs b/identity_core/src/crypto/proof/proof.rs similarity index 100% rename from identity-core/src/crypto/proof/proof.rs rename to identity_core/src/crypto/proof/proof.rs diff --git a/identity-core/src/crypto/proof/proof_options.rs b/identity_core/src/crypto/proof/proof_options.rs similarity index 100% rename from identity-core/src/crypto/proof/proof_options.rs rename to identity_core/src/crypto/proof/proof_options.rs diff --git a/identity-core/src/crypto/proof/proof_value.rs b/identity_core/src/crypto/proof/proof_value.rs similarity index 100% rename from identity-core/src/crypto/proof/proof_value.rs rename to identity_core/src/crypto/proof/proof_value.rs diff --git a/identity-core/src/crypto/signature/core.rs b/identity_core/src/crypto/signature/core.rs similarity index 100% rename from identity-core/src/crypto/signature/core.rs rename to identity_core/src/crypto/signature/core.rs diff --git a/identity-core/src/crypto/signature/data.rs b/identity_core/src/crypto/signature/data.rs similarity index 100% rename from identity-core/src/crypto/signature/data.rs rename to identity_core/src/crypto/signature/data.rs diff --git a/identity-core/src/crypto/signature/mod.rs b/identity_core/src/crypto/signature/mod.rs similarity index 100% rename from identity-core/src/crypto/signature/mod.rs rename to identity_core/src/crypto/signature/mod.rs diff --git a/identity-core/src/error.rs b/identity_core/src/error.rs similarity index 100% rename from identity-core/src/error.rs rename to identity_core/src/error.rs diff --git a/identity-core/src/lib.rs b/identity_core/src/lib.rs similarity index 100% rename from identity-core/src/lib.rs rename to identity_core/src/lib.rs diff --git a/identity-core/src/utils/base_encoding.rs b/identity_core/src/utils/base_encoding.rs similarity index 100% rename from identity-core/src/utils/base_encoding.rs rename to identity_core/src/utils/base_encoding.rs diff --git a/identity-core/src/utils/mod.rs b/identity_core/src/utils/mod.rs similarity index 100% rename from identity-core/src/utils/mod.rs rename to identity_core/src/utils/mod.rs diff --git a/identity-core/tests/fixtures/jcs_ed25519.rs b/identity_core/tests/fixtures/jcs_ed25519.rs similarity index 100% rename from identity-core/tests/fixtures/jcs_ed25519.rs rename to identity_core/tests/fixtures/jcs_ed25519.rs diff --git a/identity-credential/Cargo.toml b/identity_credential/Cargo.toml similarity index 79% rename from identity-credential/Cargo.toml rename to identity_credential/Cargo.toml index cbd322c4d6..c216b08578 100644 --- a/identity-credential/Cargo.toml +++ b/identity_credential/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "identity-credential" +name = "identity_credential" version = "0.5.0" authors = ["IOTA Stiftung"] edition = "2021" @@ -11,11 +11,11 @@ repository = "https://github.com/iotaledger/identity.rs" description = "An implementation of the Verifiable Credentials standard." [dependencies] -identity-core = { version = "=0.5.0", path = "../identity-core", default-features = false } -identity-did = { version = "=0.5.0", path = "../identity-did", default-features = false } +identity_core = { version = "=0.5.0", path = "../identity_core", default-features = false } +identity_did = { version = "=0.5.0", path = "../identity_did", default-features = false } lazy_static = { version = "1.4", default-features = false } serde = { version = "1.0", default-features = false, features = ["std", "derive"] } -strum = { version = "0.21", features = ["derive"] } +strum = { version = "0.24.0", default-features = false, features = ["std", "derive"] } thiserror = { version = "1.0", default-features = false } [dev-dependencies] diff --git a/identity-credential/README.md b/identity_credential/README.md similarity index 100% rename from identity-credential/README.md rename to identity_credential/README.md diff --git a/identity-credential/src/credential/builder.rs b/identity_credential/src/credential/builder.rs similarity index 100% rename from identity-credential/src/credential/builder.rs rename to identity_credential/src/credential/builder.rs diff --git a/identity-credential/src/credential/credential.rs b/identity_credential/src/credential/credential.rs similarity index 100% rename from identity-credential/src/credential/credential.rs rename to identity_credential/src/credential/credential.rs diff --git a/identity-credential/src/credential/evidence.rs b/identity_credential/src/credential/evidence.rs similarity index 100% rename from identity-credential/src/credential/evidence.rs rename to identity_credential/src/credential/evidence.rs diff --git a/identity-credential/src/credential/issuer.rs b/identity_credential/src/credential/issuer.rs similarity index 100% rename from identity-credential/src/credential/issuer.rs rename to identity_credential/src/credential/issuer.rs diff --git a/identity-credential/src/credential/mod.rs b/identity_credential/src/credential/mod.rs similarity index 100% rename from identity-credential/src/credential/mod.rs rename to identity_credential/src/credential/mod.rs diff --git a/identity-credential/src/credential/policy.rs b/identity_credential/src/credential/policy.rs similarity index 100% rename from identity-credential/src/credential/policy.rs rename to identity_credential/src/credential/policy.rs diff --git a/identity-credential/src/credential/refresh.rs b/identity_credential/src/credential/refresh.rs similarity index 100% rename from identity-credential/src/credential/refresh.rs rename to identity_credential/src/credential/refresh.rs diff --git a/identity-credential/src/credential/revocation_bitmap_status.rs b/identity_credential/src/credential/revocation_bitmap_status.rs similarity index 100% rename from identity-credential/src/credential/revocation_bitmap_status.rs rename to identity_credential/src/credential/revocation_bitmap_status.rs diff --git a/identity-credential/src/credential/schema.rs b/identity_credential/src/credential/schema.rs similarity index 100% rename from identity-credential/src/credential/schema.rs rename to identity_credential/src/credential/schema.rs diff --git a/identity-credential/src/credential/status.rs b/identity_credential/src/credential/status.rs similarity index 100% rename from identity-credential/src/credential/status.rs rename to identity_credential/src/credential/status.rs diff --git a/identity-credential/src/credential/subject.rs b/identity_credential/src/credential/subject.rs similarity index 100% rename from identity-credential/src/credential/subject.rs rename to identity_credential/src/credential/subject.rs diff --git a/identity-credential/src/error.rs b/identity_credential/src/error.rs similarity index 100% rename from identity-credential/src/error.rs rename to identity_credential/src/error.rs diff --git a/identity-credential/src/lib.rs b/identity_credential/src/lib.rs similarity index 100% rename from identity-credential/src/lib.rs rename to identity_credential/src/lib.rs diff --git a/identity-credential/src/presentation/builder.rs b/identity_credential/src/presentation/builder.rs similarity index 100% rename from identity-credential/src/presentation/builder.rs rename to identity_credential/src/presentation/builder.rs diff --git a/identity-credential/src/presentation/mod.rs b/identity_credential/src/presentation/mod.rs similarity index 100% rename from identity-credential/src/presentation/mod.rs rename to identity_credential/src/presentation/mod.rs diff --git a/identity-credential/src/presentation/presentation.rs b/identity_credential/src/presentation/presentation.rs similarity index 100% rename from identity-credential/src/presentation/presentation.rs rename to identity_credential/src/presentation/presentation.rs diff --git a/identity-credential/tests/fixtures/credential-1.json b/identity_credential/tests/fixtures/credential-1.json similarity index 100% rename from identity-credential/tests/fixtures/credential-1.json rename to identity_credential/tests/fixtures/credential-1.json diff --git a/identity-credential/tests/fixtures/credential-10.json b/identity_credential/tests/fixtures/credential-10.json similarity index 100% rename from identity-credential/tests/fixtures/credential-10.json rename to identity_credential/tests/fixtures/credential-10.json diff --git a/identity-credential/tests/fixtures/credential-11.json b/identity_credential/tests/fixtures/credential-11.json similarity index 100% rename from identity-credential/tests/fixtures/credential-11.json rename to identity_credential/tests/fixtures/credential-11.json diff --git a/identity-credential/tests/fixtures/credential-12.json b/identity_credential/tests/fixtures/credential-12.json similarity index 100% rename from identity-credential/tests/fixtures/credential-12.json rename to identity_credential/tests/fixtures/credential-12.json diff --git a/identity-credential/tests/fixtures/credential-2.json b/identity_credential/tests/fixtures/credential-2.json similarity index 100% rename from identity-credential/tests/fixtures/credential-2.json rename to identity_credential/tests/fixtures/credential-2.json diff --git a/identity-credential/tests/fixtures/credential-3.json b/identity_credential/tests/fixtures/credential-3.json similarity index 100% rename from identity-credential/tests/fixtures/credential-3.json rename to identity_credential/tests/fixtures/credential-3.json diff --git a/identity-credential/tests/fixtures/credential-4.json b/identity_credential/tests/fixtures/credential-4.json similarity index 100% rename from identity-credential/tests/fixtures/credential-4.json rename to identity_credential/tests/fixtures/credential-4.json diff --git a/identity-credential/tests/fixtures/credential-5.json b/identity_credential/tests/fixtures/credential-5.json similarity index 100% rename from identity-credential/tests/fixtures/credential-5.json rename to identity_credential/tests/fixtures/credential-5.json diff --git a/identity-credential/tests/fixtures/credential-6.json b/identity_credential/tests/fixtures/credential-6.json similarity index 100% rename from identity-credential/tests/fixtures/credential-6.json rename to identity_credential/tests/fixtures/credential-6.json diff --git a/identity-credential/tests/fixtures/credential-7.json b/identity_credential/tests/fixtures/credential-7.json similarity index 100% rename from identity-credential/tests/fixtures/credential-7.json rename to identity_credential/tests/fixtures/credential-7.json diff --git a/identity-credential/tests/fixtures/credential-8.json b/identity_credential/tests/fixtures/credential-8.json similarity index 100% rename from identity-credential/tests/fixtures/credential-8.json rename to identity_credential/tests/fixtures/credential-8.json diff --git a/identity-credential/tests/fixtures/credential-9.json b/identity_credential/tests/fixtures/credential-9.json similarity index 100% rename from identity-credential/tests/fixtures/credential-9.json rename to identity_credential/tests/fixtures/credential-9.json diff --git a/identity-credential/tests/fixtures/evidence-1.json b/identity_credential/tests/fixtures/evidence-1.json similarity index 100% rename from identity-credential/tests/fixtures/evidence-1.json rename to identity_credential/tests/fixtures/evidence-1.json diff --git a/identity-credential/tests/fixtures/evidence-2.json b/identity_credential/tests/fixtures/evidence-2.json similarity index 100% rename from identity-credential/tests/fixtures/evidence-2.json rename to identity_credential/tests/fixtures/evidence-2.json diff --git a/identity-credential/tests/fixtures/issuer-1.json b/identity_credential/tests/fixtures/issuer-1.json similarity index 100% rename from identity-credential/tests/fixtures/issuer-1.json rename to identity_credential/tests/fixtures/issuer-1.json diff --git a/identity-credential/tests/fixtures/issuer-2.json b/identity_credential/tests/fixtures/issuer-2.json similarity index 100% rename from identity-credential/tests/fixtures/issuer-2.json rename to identity_credential/tests/fixtures/issuer-2.json diff --git a/identity-credential/tests/fixtures/policy-1.json b/identity_credential/tests/fixtures/policy-1.json similarity index 100% rename from identity-credential/tests/fixtures/policy-1.json rename to identity_credential/tests/fixtures/policy-1.json diff --git a/identity-credential/tests/fixtures/policy-2.json b/identity_credential/tests/fixtures/policy-2.json similarity index 100% rename from identity-credential/tests/fixtures/policy-2.json rename to identity_credential/tests/fixtures/policy-2.json diff --git a/identity-credential/tests/fixtures/presentation-1.json b/identity_credential/tests/fixtures/presentation-1.json similarity index 100% rename from identity-credential/tests/fixtures/presentation-1.json rename to identity_credential/tests/fixtures/presentation-1.json diff --git a/identity-credential/tests/fixtures/refresh-1.json b/identity_credential/tests/fixtures/refresh-1.json similarity index 100% rename from identity-credential/tests/fixtures/refresh-1.json rename to identity_credential/tests/fixtures/refresh-1.json diff --git a/identity-credential/tests/fixtures/schema-1.json b/identity_credential/tests/fixtures/schema-1.json similarity index 100% rename from identity-credential/tests/fixtures/schema-1.json rename to identity_credential/tests/fixtures/schema-1.json diff --git a/identity-credential/tests/fixtures/schema-2.json b/identity_credential/tests/fixtures/schema-2.json similarity index 100% rename from identity-credential/tests/fixtures/schema-2.json rename to identity_credential/tests/fixtures/schema-2.json diff --git a/identity-credential/tests/fixtures/schema-3.json b/identity_credential/tests/fixtures/schema-3.json similarity index 100% rename from identity-credential/tests/fixtures/schema-3.json rename to identity_credential/tests/fixtures/schema-3.json diff --git a/identity-credential/tests/fixtures/status-1.json b/identity_credential/tests/fixtures/status-1.json similarity index 100% rename from identity-credential/tests/fixtures/status-1.json rename to identity_credential/tests/fixtures/status-1.json diff --git a/identity-credential/tests/fixtures/subject-1.json b/identity_credential/tests/fixtures/subject-1.json similarity index 100% rename from identity-credential/tests/fixtures/subject-1.json rename to identity_credential/tests/fixtures/subject-1.json diff --git a/identity-credential/tests/fixtures/subject-10.json b/identity_credential/tests/fixtures/subject-10.json similarity index 100% rename from identity-credential/tests/fixtures/subject-10.json rename to identity_credential/tests/fixtures/subject-10.json diff --git a/identity-credential/tests/fixtures/subject-2.json b/identity_credential/tests/fixtures/subject-2.json similarity index 100% rename from identity-credential/tests/fixtures/subject-2.json rename to identity_credential/tests/fixtures/subject-2.json diff --git a/identity-credential/tests/fixtures/subject-3.json b/identity_credential/tests/fixtures/subject-3.json similarity index 100% rename from identity-credential/tests/fixtures/subject-3.json rename to identity_credential/tests/fixtures/subject-3.json diff --git a/identity-credential/tests/fixtures/subject-4.json b/identity_credential/tests/fixtures/subject-4.json similarity index 100% rename from identity-credential/tests/fixtures/subject-4.json rename to identity_credential/tests/fixtures/subject-4.json diff --git a/identity-credential/tests/fixtures/subject-5.json b/identity_credential/tests/fixtures/subject-5.json similarity index 100% rename from identity-credential/tests/fixtures/subject-5.json rename to identity_credential/tests/fixtures/subject-5.json diff --git a/identity-credential/tests/fixtures/subject-6.json b/identity_credential/tests/fixtures/subject-6.json similarity index 100% rename from identity-credential/tests/fixtures/subject-6.json rename to identity_credential/tests/fixtures/subject-6.json diff --git a/identity-credential/tests/fixtures/subject-7.json b/identity_credential/tests/fixtures/subject-7.json similarity index 100% rename from identity-credential/tests/fixtures/subject-7.json rename to identity_credential/tests/fixtures/subject-7.json diff --git a/identity-credential/tests/fixtures/subject-8.json b/identity_credential/tests/fixtures/subject-8.json similarity index 100% rename from identity-credential/tests/fixtures/subject-8.json rename to identity_credential/tests/fixtures/subject-8.json diff --git a/identity-credential/tests/fixtures/subject-9.json b/identity_credential/tests/fixtures/subject-9.json similarity index 100% rename from identity-credential/tests/fixtures/subject-9.json rename to identity_credential/tests/fixtures/subject-9.json diff --git a/identity-did/Cargo.toml b/identity_did/Cargo.toml similarity index 89% rename from identity-did/Cargo.toml rename to identity_did/Cargo.toml index aa422e6f9a..aa18aaa91d 100644 --- a/identity-did/Cargo.toml +++ b/identity_did/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "identity-did" +name = "identity_did" version = "0.5.0" authors = ["IOTA Stiftung"] edition = "2021" @@ -15,11 +15,11 @@ dataurl = { version = "0.1.2", default-features = false, optional = true } did_url = { version = "0.1", default-features = false, features = ["std", "serde"] } flate2 = { version = "1.0.23", default-features = false, features = ["rust_backend"], optional = true } form_urlencoded = { version = "1.0.1", default-features = false } -identity-core = { version = "=0.5.0", path = "../identity-core" } +identity_core = { version = "=0.5.0", path = "../identity_core" } indexmap = { version = "1.7", default-features = false, features = ["std", "serde-1"] } roaring = { version = "0.9.0", default-features = false, optional = true } serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] } -strum = { version = "0.21", features = ["derive"] } +strum = { version = "0.24.0", default-features = false, features = ["std", "derive"] } thiserror = { version = "1.0", default-features = false } [dev-dependencies] diff --git a/identity-did/README.md b/identity_did/README.md similarity index 100% rename from identity-did/README.md rename to identity_did/README.md diff --git a/identity-did/src/did/did.rs b/identity_did/src/did/did.rs similarity index 100% rename from identity-did/src/did/did.rs rename to identity_did/src/did/did.rs diff --git a/identity-did/src/did/did_url.rs b/identity_did/src/did/did_url.rs similarity index 100% rename from identity-did/src/did/did_url.rs rename to identity_did/src/did/did_url.rs diff --git a/identity-did/src/did/error.rs b/identity_did/src/did/error.rs similarity index 100% rename from identity-did/src/did/error.rs rename to identity_did/src/did/error.rs diff --git a/identity-did/src/did/mod.rs b/identity_did/src/did/mod.rs similarity index 100% rename from identity-did/src/did/mod.rs rename to identity_did/src/did/mod.rs diff --git a/identity-did/src/diff/diff_document.rs b/identity_did/src/diff/diff_document.rs similarity index 100% rename from identity-did/src/diff/diff_document.rs rename to identity_did/src/diff/diff_document.rs diff --git a/identity-did/src/diff/diff_method.rs b/identity_did/src/diff/diff_method.rs similarity index 100% rename from identity-did/src/diff/diff_method.rs rename to identity_did/src/diff/diff_method.rs diff --git a/identity-did/src/diff/diff_service.rs b/identity_did/src/diff/diff_service.rs similarity index 100% rename from identity-did/src/diff/diff_service.rs rename to identity_did/src/diff/diff_service.rs diff --git a/identity-did/src/diff/method_data.rs b/identity_did/src/diff/method_data.rs similarity index 100% rename from identity-did/src/diff/method_data.rs rename to identity_did/src/diff/method_data.rs diff --git a/identity-did/src/diff/method_ref.rs b/identity_did/src/diff/method_ref.rs similarity index 100% rename from identity-did/src/diff/method_ref.rs rename to identity_did/src/diff/method_ref.rs diff --git a/identity-did/src/diff/method_type.rs b/identity_did/src/diff/method_type.rs similarity index 100% rename from identity-did/src/diff/method_type.rs rename to identity_did/src/diff/method_type.rs diff --git a/identity-did/src/diff/mod.rs b/identity_did/src/diff/mod.rs similarity index 100% rename from identity-did/src/diff/mod.rs rename to identity_did/src/diff/mod.rs diff --git a/identity-did/src/document/builder.rs b/identity_did/src/document/builder.rs similarity index 100% rename from identity-did/src/document/builder.rs rename to identity_did/src/document/builder.rs diff --git a/identity-did/src/document/core_document.rs b/identity_did/src/document/core_document.rs similarity index 100% rename from identity-did/src/document/core_document.rs rename to identity_did/src/document/core_document.rs diff --git a/identity-did/src/document/mod.rs b/identity_did/src/document/mod.rs similarity index 100% rename from identity-did/src/document/mod.rs rename to identity_did/src/document/mod.rs diff --git a/identity-did/src/error.rs b/identity_did/src/error.rs similarity index 100% rename from identity-did/src/error.rs rename to identity_did/src/error.rs diff --git a/identity-did/src/lib.rs b/identity_did/src/lib.rs similarity index 100% rename from identity-did/src/lib.rs rename to identity_did/src/lib.rs diff --git a/identity-did/src/revocation/bitmap.rs b/identity_did/src/revocation/bitmap.rs similarity index 100% rename from identity-did/src/revocation/bitmap.rs rename to identity_did/src/revocation/bitmap.rs diff --git a/identity-did/src/revocation/mod.rs b/identity_did/src/revocation/mod.rs similarity index 100% rename from identity-did/src/revocation/mod.rs rename to identity_did/src/revocation/mod.rs diff --git a/identity-did/src/service/builder.rs b/identity_did/src/service/builder.rs similarity index 100% rename from identity-did/src/service/builder.rs rename to identity_did/src/service/builder.rs diff --git a/identity-did/src/service/mod.rs b/identity_did/src/service/mod.rs similarity index 100% rename from identity-did/src/service/mod.rs rename to identity_did/src/service/mod.rs diff --git a/identity-did/src/service/service.rs b/identity_did/src/service/service.rs similarity index 100% rename from identity-did/src/service/service.rs rename to identity_did/src/service/service.rs diff --git a/identity-did/src/service/service_endpoint.rs b/identity_did/src/service/service_endpoint.rs similarity index 100% rename from identity-did/src/service/service_endpoint.rs rename to identity_did/src/service/service_endpoint.rs diff --git a/identity-did/src/utils/did_url_query.rs b/identity_did/src/utils/did_url_query.rs similarity index 100% rename from identity-did/src/utils/did_url_query.rs rename to identity_did/src/utils/did_url_query.rs diff --git a/identity-did/src/utils/mod.rs b/identity_did/src/utils/mod.rs similarity index 100% rename from identity-did/src/utils/mod.rs rename to identity_did/src/utils/mod.rs diff --git a/identity-did/src/utils/queryable.rs b/identity_did/src/utils/queryable.rs similarity index 100% rename from identity-did/src/utils/queryable.rs rename to identity_did/src/utils/queryable.rs diff --git a/identity-did/src/verifiable/document_signer.rs b/identity_did/src/verifiable/document_signer.rs similarity index 100% rename from identity-did/src/verifiable/document_signer.rs rename to identity_did/src/verifiable/document_signer.rs diff --git a/identity-did/src/verifiable/mod.rs b/identity_did/src/verifiable/mod.rs similarity index 100% rename from identity-did/src/verifiable/mod.rs rename to identity_did/src/verifiable/mod.rs diff --git a/identity-did/src/verifiable/properties.rs b/identity_did/src/verifiable/properties.rs similarity index 100% rename from identity-did/src/verifiable/properties.rs rename to identity_did/src/verifiable/properties.rs diff --git a/identity-did/src/verifiable/tests.rs b/identity_did/src/verifiable/tests.rs similarity index 100% rename from identity-did/src/verifiable/tests.rs rename to identity_did/src/verifiable/tests.rs diff --git a/identity-did/src/verifiable/verifier_options.rs b/identity_did/src/verifiable/verifier_options.rs similarity index 100% rename from identity-did/src/verifiable/verifier_options.rs rename to identity_did/src/verifiable/verifier_options.rs diff --git a/identity-did/src/verification/builder.rs b/identity_did/src/verification/builder.rs similarity index 100% rename from identity-did/src/verification/builder.rs rename to identity_did/src/verification/builder.rs diff --git a/identity-did/src/verification/method_data.rs b/identity_did/src/verification/method_data.rs similarity index 100% rename from identity-did/src/verification/method_data.rs rename to identity_did/src/verification/method_data.rs diff --git a/identity-did/src/verification/method_ref.rs b/identity_did/src/verification/method_ref.rs similarity index 100% rename from identity-did/src/verification/method_ref.rs rename to identity_did/src/verification/method_ref.rs diff --git a/identity-did/src/verification/method_relationship.rs b/identity_did/src/verification/method_relationship.rs similarity index 100% rename from identity-did/src/verification/method_relationship.rs rename to identity_did/src/verification/method_relationship.rs diff --git a/identity-did/src/verification/method_scope.rs b/identity_did/src/verification/method_scope.rs similarity index 100% rename from identity-did/src/verification/method_scope.rs rename to identity_did/src/verification/method_scope.rs diff --git a/identity-did/src/verification/method_type.rs b/identity_did/src/verification/method_type.rs similarity index 100% rename from identity-did/src/verification/method_type.rs rename to identity_did/src/verification/method_type.rs diff --git a/identity-did/src/verification/mod.rs b/identity_did/src/verification/mod.rs similarity index 93% rename from identity-did/src/verification/mod.rs rename to identity_did/src/verification/mod.rs index 8bb2257901..6bb4a93862 100644 --- a/identity-did/src/verification/mod.rs +++ b/identity_did/src/verification/mod.rs @@ -3,8 +3,8 @@ //! The `verification` module contains code for verifying the correctness of core DID-related types. //! -//! This crate DOES NOT verify IOTA-specific invariants, those are exposed by the `identity-iota` -//! crate. +//! This crate DOES NOT verify IOTA-specific invariants, those are exposed by the +//! `identity_iota_core` crate. mod builder; mod method_data; diff --git a/identity-did/src/verification/traits.rs b/identity_did/src/verification/traits.rs similarity index 100% rename from identity-did/src/verification/traits.rs rename to identity_did/src/verification/traits.rs diff --git a/identity-did/src/verification/verification_method.rs b/identity_did/src/verification/verification_method.rs similarity index 100% rename from identity-did/src/verification/verification_method.rs rename to identity_did/src/verification/verification_method.rs diff --git a/identity-diff/Cargo.toml b/identity_diff/Cargo.toml similarity index 90% rename from identity-diff/Cargo.toml rename to identity_diff/Cargo.toml index e0b31ed436..967062a3c1 100644 --- a/identity-diff/Cargo.toml +++ b/identity_diff/Cargo.toml @@ -14,7 +14,7 @@ description = "`Diff` trait to compute and merge data structure differences." identity-diff-derive = { version = "=0.5.0", path = "derive", optional = true } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0" } -strum = { version = "0.21", features = ["derive"] } +strum = { version = "0.24.0", default-features = false, features = ["std", "derive"] } thiserror = { version = "1.0" } [dev-dependencies] diff --git a/identity-diff/README.md b/identity_diff/README.md similarity index 100% rename from identity-diff/README.md rename to identity_diff/README.md diff --git a/identity-diff/derive/Cargo.toml b/identity_diff/derive/Cargo.toml similarity index 100% rename from identity-diff/derive/Cargo.toml rename to identity_diff/derive/Cargo.toml diff --git a/identity-diff/derive/README.md b/identity_diff/derive/README.md similarity index 100% rename from identity-diff/derive/README.md rename to identity_diff/derive/README.md diff --git a/identity-diff/derive/src/impls.rs b/identity_diff/derive/src/impls.rs similarity index 100% rename from identity-diff/derive/src/impls.rs rename to identity_diff/derive/src/impls.rs diff --git a/identity-diff/derive/src/impls/enums.rs b/identity_diff/derive/src/impls/enums.rs similarity index 100% rename from identity-diff/derive/src/impls/enums.rs rename to identity_diff/derive/src/impls/enums.rs diff --git a/identity-diff/derive/src/impls/structs.rs b/identity_diff/derive/src/impls/structs.rs similarity index 100% rename from identity-diff/derive/src/impls/structs.rs rename to identity_diff/derive/src/impls/structs.rs diff --git a/identity-diff/derive/src/lib.rs b/identity_diff/derive/src/lib.rs similarity index 100% rename from identity-diff/derive/src/lib.rs rename to identity_diff/derive/src/lib.rs diff --git a/identity-diff/derive/src/model.rs b/identity_diff/derive/src/model.rs similarity index 100% rename from identity-diff/derive/src/model.rs rename to identity_diff/derive/src/model.rs diff --git a/identity-diff/derive/src/utils.rs b/identity_diff/derive/src/utils.rs similarity index 100% rename from identity-diff/derive/src/utils.rs rename to identity_diff/derive/src/utils.rs diff --git a/identity-diff/src/error.rs b/identity_diff/src/error.rs similarity index 100% rename from identity-diff/src/error.rs rename to identity_diff/src/error.rs diff --git a/identity-diff/src/hashmap.rs b/identity_diff/src/hashmap.rs similarity index 100% rename from identity-diff/src/hashmap.rs rename to identity_diff/src/hashmap.rs diff --git a/identity-diff/src/hashset.rs b/identity_diff/src/hashset.rs similarity index 100% rename from identity-diff/src/hashset.rs rename to identity_diff/src/hashset.rs diff --git a/identity-diff/src/lib.rs b/identity_diff/src/lib.rs similarity index 100% rename from identity-diff/src/lib.rs rename to identity_diff/src/lib.rs diff --git a/identity-diff/src/macros.rs b/identity_diff/src/macros.rs similarity index 100% rename from identity-diff/src/macros.rs rename to identity_diff/src/macros.rs diff --git a/identity-diff/src/object.rs b/identity_diff/src/object.rs similarity index 100% rename from identity-diff/src/object.rs rename to identity_diff/src/object.rs diff --git a/identity-diff/src/option.rs b/identity_diff/src/option.rs similarity index 100% rename from identity-diff/src/option.rs rename to identity_diff/src/option.rs diff --git a/identity-diff/src/string.rs b/identity_diff/src/string.rs similarity index 100% rename from identity-diff/src/string.rs rename to identity_diff/src/string.rs diff --git a/identity-diff/src/traits.rs b/identity_diff/src/traits.rs similarity index 100% rename from identity-diff/src/traits.rs rename to identity_diff/src/traits.rs diff --git a/identity-diff/src/value.rs b/identity_diff/src/value.rs similarity index 100% rename from identity-diff/src/value.rs rename to identity_diff/src/value.rs diff --git a/identity-diff/src/vec.rs b/identity_diff/src/vec.rs similarity index 100% rename from identity-diff/src/vec.rs rename to identity_diff/src/vec.rs diff --git a/identity-diff/tests/derive_enum_test.rs b/identity_diff/tests/derive_enum_test.rs similarity index 100% rename from identity-diff/tests/derive_enum_test.rs rename to identity_diff/tests/derive_enum_test.rs diff --git a/identity-diff/tests/derive_struct_test.rs b/identity_diff/tests/derive_struct_test.rs similarity index 100% rename from identity-diff/tests/derive_struct_test.rs rename to identity_diff/tests/derive_struct_test.rs diff --git a/identity/Cargo.toml b/identity_iota/Cargo.toml similarity index 56% rename from identity/Cargo.toml rename to identity_iota/Cargo.toml index 3d4cc145f7..d160c7c7bc 100644 --- a/identity/Cargo.toml +++ b/identity_iota/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "identity" +name = "identity_iota" version = "0.5.0" authors = ["IOTA Stiftung"] documentation = "https://wiki.iota.org/identity.rs/introduction" @@ -13,14 +13,14 @@ rust-version = "1.60" description = "Framework for Self-Sovereign Identity with IOTA DID." [dependencies] -identity-account = { version = "=0.5.0", path = "../identity-account", default-features = false, optional = true } -identity-account-storage = { version = "=0.5.0", path = "../identity-account-storage", default-features = false, optional = true } -# identity-comm = { version = "=0.5.0-dev.4", path = "../identity-comm", optional = true } -identity-core = { version = "=0.5.0", path = "../identity-core", default-features = false } -identity-credential = { version = "=0.5.0", path = "../identity-credential", default-features = false } -identity-did = { version = "=0.5.0", path = "../identity-did", default-features = false } -identity-iota = { version = "=0.5.0", path = "../identity-iota", default-features = false } -identity-iota-core = { version = "=0.5.0", path = "../identity-iota-core", default-features = false } +# identity_comm = { version = "=0.5.0-dev.4", path = "../identity_comm", optional = true } +identity_account = { version = "=0.5.0", path = "../identity_account", default-features = false, optional = true } +identity_account_storage = { version = "=0.5.0", path = "../identity_account_storage", default-features = false, optional = true } +identity_core = { version = "=0.5.0", path = "../identity_core", default-features = false } +identity_credential = { version = "=0.5.0", path = "../identity_credential", default-features = false } +identity_did = { version = "=0.5.0", path = "../identity_did", default-features = false } +identity_iota_client = { version = "=0.5.0", path = "../identity_iota_client", default-features = false } +identity_iota_core = { version = "=0.5.0", path = "../identity_iota_core", default-features = false } [dev-dependencies] criterion = { version = "0.3" } @@ -34,33 +34,33 @@ harness = false default = ["async", "account", "stronghold", "send-sync-storage", "unstable-encryption", "revocation-bitmap"] # Enables async runtime support (Tokio). -async = ["identity-iota/async"] +async = ["identity_iota_client/async"] # Enables support for secure storage of DID Documents -account = ["identity-account", "identity-account-storage"] +account = ["identity_account", "identity_account_storage"] # Enables support for stronghold storage. -stronghold = ["identity-account/stronghold", "identity-account-storage/stronghold"] +stronghold = ["identity_account/stronghold", "identity_account_storage/stronghold"] # Enables support for DID Communication -# comm = ["identity-comm"] +# comm = ["identity_comm"] # Enables `Send` + `Sync` bounds for the Storage trait. -send-sync-storage = ["identity-account-storage/send-sync-storage"] +send-sync-storage = ["identity_account_storage/send-sync-storage"] # Exposes Storage `test_suite` module. -storage-test-suite = ["identity-account-storage/storage-test-suite"] +storage-test-suite = ["identity_account_storage/storage-test-suite"] # Enables revocation with `RevocationBitmap2022`. revocation-bitmap = [ - "identity-account?/revocation-bitmap", - "identity-iota/revocation-bitmap", - "identity-credential/revocation-bitmap", + "identity_account?/revocation-bitmap", + "identity_iota_client/revocation-bitmap", + "identity_credential/revocation-bitmap", ] # Enables encryption and decryption functionality. # Breaking changes to types and functions behind this flag are not covered by semver. -unstable-encryption = ["identity-account/encryption"] +unstable-encryption = ["identity_account/encryption"] [package.metadata.docs.rs] # To build locally: diff --git a/identity/benches/benchmark.rs b/identity_iota/benches/benchmark.rs similarity index 92% rename from identity/benches/benchmark.rs rename to identity_iota/benches/benchmark.rs index 30c64ef26c..ffc957ea09 100644 --- a/identity/benches/benchmark.rs +++ b/identity_iota/benches/benchmark.rs @@ -8,12 +8,12 @@ use criterion::criterion_main; use criterion::BenchmarkId; use criterion::Criterion; -use identity::crypto::KeyPair; -use identity::iota::DocumentChain; -use identity::iota::IntegrationChain; -use identity::iota_core::IotaDID; -use identity::iota_core::IotaDocument; use identity_core::crypto::KeyType; +use identity_iota::client::DocumentChain; +use identity_iota::client::IntegrationChain; +use identity_iota::crypto::KeyPair; +use identity_iota::iota_core::IotaDID; +use identity_iota::iota_core::IotaDocument; use self::diff_chain::setup_diff_chain_bench; use self::diff_chain::update_diff_chain; diff --git a/identity/benches/diff_chain.rs b/identity_iota/benches/diff_chain.rs similarity index 83% rename from identity/benches/diff_chain.rs rename to identity_iota/benches/diff_chain.rs index bd5a4cfc2a..d2bfa0965e 100644 --- a/identity/benches/diff_chain.rs +++ b/identity_iota/benches/diff_chain.rs @@ -3,22 +3,22 @@ #![allow(deprecated)] -use identity::core::Timestamp; -use identity::crypto::KeyPair; -use identity::did::MethodBuilder; -use identity::did::MethodData; -use identity::did::MethodRef; -use identity::did::MethodType; -use identity::did::DID; -use identity::iota::DocumentChain; -use identity::iota::TangleRef; -use identity::iota_core::DiffMessage; -use identity::iota_core::IotaDID; -use identity::iota_core::IotaDocument; -use identity::iota_core::MessageId; use identity_core::crypto::KeyType; use identity_core::crypto::ProofOptions; -use identity_iota::document::ResolvedIotaDocument; +use identity_iota::client::DocumentChain; +use identity_iota::client::TangleRef; +use identity_iota::core::Timestamp; +use identity_iota::crypto::KeyPair; +use identity_iota::did::MethodBuilder; +use identity_iota::did::MethodData; +use identity_iota::did::MethodRef; +use identity_iota::did::MethodType; +use identity_iota::did::DID; +use identity_iota::iota_core::DiffMessage; +use identity_iota::iota_core::IotaDID; +use identity_iota::iota_core::IotaDocument; +use identity_iota::iota_core::MessageId; +use identity_iota_client::document::ResolvedIotaDocument; pub fn setup_diff_chain_bench() -> (ResolvedIotaDocument, KeyPair) { let keypair: KeyPair = KeyPair::new(KeyType::Ed25519).unwrap(); diff --git a/identity/src/lib.rs b/identity_iota/src/lib.rs similarity index 90% rename from identity/src/lib.rs rename to identity_iota/src/lib.rs index 74aefcf325..494d061f46 100644 --- a/identity/src/lib.rs +++ b/identity_iota/src/lib.rs @@ -66,16 +66,16 @@ pub mod did { pub use identity_did::verifiable; } -pub mod iota { +pub mod client { //! IOTA DID Tangle client and validators. - pub use identity_iota::chain::*; - pub use identity_iota::credential::*; - pub use identity_iota::document::*; - pub use identity_iota::tangle::*; + 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::Error; - pub use identity_iota::Result; + pub use identity_iota_client::Error; + pub use identity_iota_client::Result; } pub mod iota_core { @@ -134,7 +134,7 @@ pub mod prelude { pub use identity_core::crypto::KeyPair; pub use identity_core::crypto::KeyType; - pub use identity_iota::tangle::Client; - pub use identity_iota::Result; + pub use identity_iota_client::tangle::Client; + pub use identity_iota_client::Result; pub use identity_iota_core::document::IotaDocument; } diff --git a/identity-iota/Cargo.toml b/identity_iota_client/Cargo.toml similarity index 81% rename from identity-iota/Cargo.toml rename to identity_iota_client/Cargo.toml index c9497b92be..54d0cc5623 100644 --- a/identity-iota/Cargo.toml +++ b/identity_iota_client/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "identity-iota" +name = "identity_iota_client" version = "0.5.0" authors = ["IOTA Stiftung"] edition = "2021" @@ -16,10 +16,10 @@ bee-rest-api = { version = "0.1.7", default-features = false } brotli = { version = "3.3", default-features = false, features = ["std"] } form_urlencoded = { version = "1.0" } futures = { version = "0.3" } -identity-core = { version = "=0.5.0", path = "../identity-core", default-features = false } -identity-credential = { version = "=0.5.0", path = "../identity-credential" } -identity-did = { version = "=0.5.0", path = "../identity-did", default-features = false } -identity-iota-core = { version = "=0.5.0", path = "../identity-iota-core", default-features = false } +identity_core = { version = "=0.5.0", path = "../identity_core", default-features = false } +identity_credential = { version = "=0.5.0", path = "../identity_credential" } +identity_did = { version = "=0.5.0", path = "../identity_did", default-features = false } +identity_iota_core = { version = "=0.5.0", path = "../identity_iota_core", default-features = false } itertools = { version = "0.10" } lazy_static = { version = "1.4", default-features = false } log = { version = "0.4", default-features = false } @@ -27,7 +27,7 @@ num-derive = { version = "0.3", default-features = false } num-traits = { version = "0.2", default-features = false, features = ["std"] } serde = { version = "1.0", default-features = false, features = ["std", "derive"] } serde_repr = { version = "0.1", default-features = false } -strum = { version = "0.21", features = ["derive"] } +strum = { version = "0.24.0", default-features = false, features = ["std", "derive"] } thiserror = { version = "1.0", default-features = false } [dependencies.iota-client] @@ -56,7 +56,7 @@ default = ["async", "revocation-bitmap"] async = ["iota-client/async"] # Enables revocation with `RevocationBitmap2022`. -revocation-bitmap = ["identity-iota-core/revocation-bitmap"] +revocation-bitmap = ["identity_iota_core/revocation-bitmap"] [package.metadata.docs.rs] # To build locally: diff --git a/identity-iota/README.md b/identity_iota_client/README.md similarity index 100% rename from identity-iota/README.md rename to identity_iota_client/README.md diff --git a/identity-iota/src/chain/diff_chain.rs b/identity_iota_client/src/chain/diff_chain.rs similarity index 100% rename from identity-iota/src/chain/diff_chain.rs rename to identity_iota_client/src/chain/diff_chain.rs diff --git a/identity-iota/src/chain/document_chain.rs b/identity_iota_client/src/chain/document_chain.rs similarity index 100% rename from identity-iota/src/chain/document_chain.rs rename to identity_iota_client/src/chain/document_chain.rs diff --git a/identity-iota/src/chain/document_history.rs b/identity_iota_client/src/chain/document_history.rs similarity index 100% rename from identity-iota/src/chain/document_history.rs rename to identity_iota_client/src/chain/document_history.rs diff --git a/identity-iota/src/chain/integration_chain.rs b/identity_iota_client/src/chain/integration_chain.rs similarity index 100% rename from identity-iota/src/chain/integration_chain.rs rename to identity_iota_client/src/chain/integration_chain.rs diff --git a/identity-iota/src/chain/milestone.rs b/identity_iota_client/src/chain/milestone.rs similarity index 100% rename from identity-iota/src/chain/milestone.rs rename to identity_iota_client/src/chain/milestone.rs diff --git a/identity-iota/src/chain/mod.rs b/identity_iota_client/src/chain/mod.rs similarity index 100% rename from identity-iota/src/chain/mod.rs rename to identity_iota_client/src/chain/mod.rs diff --git a/identity-iota/src/credential/credential_validator.rs b/identity_iota_client/src/credential/credential_validator.rs similarity index 100% rename from identity-iota/src/credential/credential_validator.rs rename to identity_iota_client/src/credential/credential_validator.rs diff --git a/identity-iota/src/credential/errors.rs b/identity_iota_client/src/credential/errors.rs similarity index 100% rename from identity-iota/src/credential/errors.rs rename to identity_iota_client/src/credential/errors.rs diff --git a/identity-iota/src/credential/mod.rs b/identity_iota_client/src/credential/mod.rs similarity index 100% rename from identity-iota/src/credential/mod.rs rename to identity_iota_client/src/credential/mod.rs diff --git a/identity-iota/src/credential/presentation_validator.rs b/identity_iota_client/src/credential/presentation_validator.rs similarity index 100% rename from identity-iota/src/credential/presentation_validator.rs rename to identity_iota_client/src/credential/presentation_validator.rs diff --git a/identity-iota/src/credential/test_utils.rs b/identity_iota_client/src/credential/test_utils.rs similarity index 100% rename from identity-iota/src/credential/test_utils.rs rename to identity_iota_client/src/credential/test_utils.rs diff --git a/identity-iota/src/credential/validation_options.rs b/identity_iota_client/src/credential/validation_options.rs similarity index 100% rename from identity-iota/src/credential/validation_options.rs rename to identity_iota_client/src/credential/validation_options.rs diff --git a/identity-iota/src/document/mod.rs b/identity_iota_client/src/document/mod.rs similarity index 100% rename from identity-iota/src/document/mod.rs rename to identity_iota_client/src/document/mod.rs diff --git a/identity-iota/src/document/resolved_iota_document.rs b/identity_iota_client/src/document/resolved_iota_document.rs similarity index 100% rename from identity-iota/src/document/resolved_iota_document.rs rename to identity_iota_client/src/document/resolved_iota_document.rs diff --git a/identity-iota/src/error.rs b/identity_iota_client/src/error.rs similarity index 100% rename from identity-iota/src/error.rs rename to identity_iota_client/src/error.rs diff --git a/identity-iota/src/lib.rs b/identity_iota_client/src/lib.rs similarity index 100% rename from identity-iota/src/lib.rs rename to identity_iota_client/src/lib.rs diff --git a/identity-iota/src/tangle/client.rs b/identity_iota_client/src/tangle/client.rs similarity index 100% rename from identity-iota/src/tangle/client.rs rename to identity_iota_client/src/tangle/client.rs diff --git a/identity-iota/src/tangle/client_builder.rs b/identity_iota_client/src/tangle/client_builder.rs similarity index 100% rename from identity-iota/src/tangle/client_builder.rs rename to identity_iota_client/src/tangle/client_builder.rs diff --git a/identity-iota/src/tangle/explorer.rs b/identity_iota_client/src/tangle/explorer.rs similarity index 96% rename from identity-iota/src/tangle/explorer.rs rename to identity_iota_client/src/tangle/explorer.rs index 5467aa74e2..e18e7f1435 100644 --- a/identity-iota/src/tangle/explorer.rs +++ b/identity_iota_client/src/tangle/explorer.rs @@ -30,14 +30,14 @@ lazy_static::lazy_static! { /// /// ``` /// # use identity_iota_core::did::IotaDID; -/// # use identity_iota::tangle::ExplorerUrl; +/// # use identity_iota_client::tangle::ExplorerUrl; /// let explorer = ExplorerUrl::mainnet(); /// let did = IotaDID::parse("did:iota:H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV")?; /// assert_eq!( /// explorer.resolver_url(&did)?, /// "https://explorer.iota.org/mainnet/identity-resolver/did:iota:H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" /// ); -/// # Ok::<(), identity_iota::Error>(()) +/// # Ok::<(), identity_iota_client::Error>(()) /// ``` #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] #[repr(transparent)] @@ -66,9 +66,9 @@ impl ExplorerUrl { /// /// Point to a Tangle explorer deployed locally. /// ``` - /// # use identity_iota::tangle::ExplorerUrl; + /// # use identity_iota_client::tangle::ExplorerUrl; /// let explorer = ExplorerUrl::parse("http://127.0.0.1:8082/")?; - /// # Ok::<(), identity_iota::Error>(()) + /// # Ok::<(), identity_iota_client::Error>(()) /// ``` pub fn parse(url: &str) -> Result { let url: Url = Url::parse(url).map_err(|_| Error::InvalidExplorerURL)?; diff --git a/identity-iota/src/tangle/message/compression_brotli.rs b/identity_iota_client/src/tangle/message/compression_brotli.rs similarity index 100% rename from identity-iota/src/tangle/message/compression_brotli.rs rename to identity_iota_client/src/tangle/message/compression_brotli.rs diff --git a/identity-iota/src/tangle/message/message_encoding.rs b/identity_iota_client/src/tangle/message/message_encoding.rs similarity index 100% rename from identity-iota/src/tangle/message/message_encoding.rs rename to identity_iota_client/src/tangle/message/message_encoding.rs diff --git a/identity-iota/src/tangle/message/message_ext.rs b/identity_iota_client/src/tangle/message/message_ext.rs similarity index 100% rename from identity-iota/src/tangle/message/message_ext.rs rename to identity_iota_client/src/tangle/message/message_ext.rs diff --git a/identity-iota/src/tangle/message/message_index.rs b/identity_iota_client/src/tangle/message/message_index.rs similarity index 100% rename from identity-iota/src/tangle/message/message_index.rs rename to identity_iota_client/src/tangle/message/message_index.rs diff --git a/identity-iota/src/tangle/message/message_version.rs b/identity_iota_client/src/tangle/message/message_version.rs similarity index 100% rename from identity-iota/src/tangle/message/message_version.rs rename to identity_iota_client/src/tangle/message/message_version.rs diff --git a/identity-iota/src/tangle/message/mod.rs b/identity_iota_client/src/tangle/message/mod.rs similarity index 100% rename from identity-iota/src/tangle/message/mod.rs rename to identity_iota_client/src/tangle/message/mod.rs diff --git a/identity-iota/src/tangle/mod.rs b/identity_iota_client/src/tangle/mod.rs similarity index 100% rename from identity-iota/src/tangle/mod.rs rename to identity_iota_client/src/tangle/mod.rs diff --git a/identity-iota/src/tangle/publish.rs b/identity_iota_client/src/tangle/publish.rs similarity index 100% rename from identity-iota/src/tangle/publish.rs rename to identity_iota_client/src/tangle/publish.rs diff --git a/identity-iota/src/tangle/receipt.rs b/identity_iota_client/src/tangle/receipt.rs similarity index 100% rename from identity-iota/src/tangle/receipt.rs rename to identity_iota_client/src/tangle/receipt.rs diff --git a/identity-iota/src/tangle/resolver.rs b/identity_iota_client/src/tangle/resolver.rs similarity index 100% rename from identity-iota/src/tangle/resolver.rs rename to identity_iota_client/src/tangle/resolver.rs diff --git a/identity-iota/src/tangle/traits.rs b/identity_iota_client/src/tangle/traits.rs similarity index 100% rename from identity-iota/src/tangle/traits.rs rename to identity_iota_client/src/tangle/traits.rs diff --git a/identity-iota-core/Cargo.toml b/identity_iota_core/Cargo.toml similarity index 84% rename from identity-iota-core/Cargo.toml rename to identity_iota_core/Cargo.toml index 648653633d..87c1f77992 100644 --- a/identity-iota-core/Cargo.toml +++ b/identity_iota_core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "identity-iota-core" +name = "identity_iota_core" version = "0.5.0" authors = ["IOTA Stiftung"] edition = "2021" @@ -12,8 +12,8 @@ description = "Core data structures for the IOTA DID Method." [dependencies] bee-message = { version = "0.1.6", default-features = false, features = ["serde"] } -identity-core = { version = "=0.5.0", path = "../identity-core", default-features = false } -identity-did = { version = "=0.5.0", path = "../identity-did", default-features = false } +identity_core = { version = "=0.5.0", path = "../identity_core", default-features = false } +identity_did = { version = "=0.5.0", path = "../identity_did", default-features = false } lazy_static = { version = "1.4", default-features = false } serde = { version = "1.0", default-features = false, features = ["std", "derive"] } strum = { version = "0.24.0", default-features = false, features = ["std", "derive"] } @@ -33,4 +33,4 @@ rustdoc-args = ["--cfg", "docsrs"] [features] default = ["revocation-bitmap"] # Enables revocation with `RevocationBitmap2022`. -revocation-bitmap = ["identity-did/revocation-bitmap"] +revocation-bitmap = ["identity_did/revocation-bitmap"] diff --git a/identity-iota-core/README.md b/identity_iota_core/README.md similarity index 100% rename from identity-iota-core/README.md rename to identity_iota_core/README.md diff --git a/identity-iota-core/src/did/iota_did.rs b/identity_iota_core/src/did/iota_did.rs similarity index 100% rename from identity-iota-core/src/did/iota_did.rs rename to identity_iota_core/src/did/iota_did.rs diff --git a/identity-iota-core/src/did/macros.rs b/identity_iota_core/src/did/macros.rs similarity index 100% rename from identity-iota-core/src/did/macros.rs rename to identity_iota_core/src/did/macros.rs diff --git a/identity-iota-core/src/did/mod.rs b/identity_iota_core/src/did/mod.rs similarity index 100% rename from identity-iota-core/src/did/mod.rs rename to identity_iota_core/src/did/mod.rs diff --git a/identity-iota-core/src/did/segments.rs b/identity_iota_core/src/did/segments.rs similarity index 100% rename from identity-iota-core/src/did/segments.rs rename to identity_iota_core/src/did/segments.rs diff --git a/identity-iota-core/src/diff/diff_iota_did.rs b/identity_iota_core/src/diff/diff_iota_did.rs similarity index 100% rename from identity-iota-core/src/diff/diff_iota_did.rs rename to identity_iota_core/src/diff/diff_iota_did.rs diff --git a/identity-iota-core/src/diff/diff_iota_document.rs b/identity_iota_core/src/diff/diff_iota_document.rs similarity index 100% rename from identity-iota-core/src/diff/diff_iota_document.rs rename to identity_iota_core/src/diff/diff_iota_document.rs diff --git a/identity-iota-core/src/diff/diff_iota_document_metadata.rs b/identity_iota_core/src/diff/diff_iota_document_metadata.rs similarity index 100% rename from identity-iota-core/src/diff/diff_iota_document_metadata.rs rename to identity_iota_core/src/diff/diff_iota_document_metadata.rs diff --git a/identity-iota-core/src/diff/diff_message.rs b/identity_iota_core/src/diff/diff_message.rs similarity index 100% rename from identity-iota-core/src/diff/diff_message.rs rename to identity_iota_core/src/diff/diff_message.rs diff --git a/identity-iota-core/src/diff/mod.rs b/identity_iota_core/src/diff/mod.rs similarity index 100% rename from identity-iota-core/src/diff/mod.rs rename to identity_iota_core/src/diff/mod.rs diff --git a/identity-iota-core/src/document/iota_document.rs b/identity_iota_core/src/document/iota_document.rs similarity index 100% rename from identity-iota-core/src/document/iota_document.rs rename to identity_iota_core/src/document/iota_document.rs diff --git a/identity-iota-core/src/document/iota_document_metadata.rs b/identity_iota_core/src/document/iota_document_metadata.rs similarity index 100% rename from identity-iota-core/src/document/iota_document_metadata.rs rename to identity_iota_core/src/document/iota_document_metadata.rs diff --git a/identity-iota-core/src/document/mod.rs b/identity_iota_core/src/document/mod.rs similarity index 100% rename from identity-iota-core/src/document/mod.rs rename to identity_iota_core/src/document/mod.rs diff --git a/identity-iota-core/src/error.rs b/identity_iota_core/src/error.rs similarity index 100% rename from identity-iota-core/src/error.rs rename to identity_iota_core/src/error.rs diff --git a/identity-iota-core/src/lib.rs b/identity_iota_core/src/lib.rs similarity index 100% rename from identity-iota-core/src/lib.rs rename to identity_iota_core/src/lib.rs diff --git a/identity-iota-core/src/tangle/message_id.rs b/identity_iota_core/src/tangle/message_id.rs similarity index 100% rename from identity-iota-core/src/tangle/message_id.rs rename to identity_iota_core/src/tangle/message_id.rs diff --git a/identity-iota-core/src/tangle/mod.rs b/identity_iota_core/src/tangle/mod.rs similarity index 100% rename from identity-iota-core/src/tangle/mod.rs rename to identity_iota_core/src/tangle/mod.rs diff --git a/identity-iota-core/src/tangle/network.rs b/identity_iota_core/src/tangle/network.rs similarity index 100% rename from identity-iota-core/src/tangle/network.rs rename to identity_iota_core/src/tangle/network.rs