From f5d9fda0b153591ac84bace7e872ccebe23a7bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 4 Mar 2024 09:38:29 +0000 Subject: [PATCH 1/2] moved and renamed nym-id to nym-id-cli --- Cargo.lock | 2 +- Cargo.toml | 4 +++- {nym-id => tools/nym-id-cli}/Cargo.toml | 8 ++++---- {nym-id => tools/nym-id-cli}/src/commands/build_info.rs | 0 .../nym-id-cli}/src/commands/import_credential.rs | 0 {nym-id => tools/nym-id-cli}/src/commands/mod.rs | 0 {nym-id => tools/nym-id-cli}/src/commands/setup.rs | 0 {nym-id => tools/nym-id-cli}/src/main.rs | 0 8 files changed, 8 insertions(+), 6 deletions(-) rename {nym-id => tools/nym-id-cli}/Cargo.toml (67%) rename {nym-id => tools/nym-id-cli}/src/commands/build_info.rs (100%) rename {nym-id => tools/nym-id-cli}/src/commands/import_credential.rs (100%) rename {nym-id => tools/nym-id-cli}/src/commands/mod.rs (100%) rename {nym-id => tools/nym-id-cli}/src/commands/setup.rs (100%) rename {nym-id => tools/nym-id-cli}/src/main.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 2bd734b3f6..0dc8ab742c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5629,7 +5629,7 @@ dependencies = [ ] [[package]] -name = "nym-id" +name = "nym-id-cli" version = "0.1.0" dependencies = [ "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 0f369f0a80..f479a81f57 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,6 +56,7 @@ members = [ "common/node-tester-utils", "common/nonexhaustive-delayqueue", "common/nymcoconut", + "common/nym-id-lib", "common/nymsphinx", "common/nymsphinx/acknowledgements", "common/nymsphinx/addressing", @@ -106,13 +107,14 @@ members = [ "tools/internal/ssl-inject", # "tools/internal/sdk-version-bump", "tools/nym-cli", + "tools/nym-id-cli", "tools/nym-nr-query", "tools/nymvisor", "tools/ts-rs-cli", "wasm/client", # "wasm/full-nym-wasm", "wasm/mix-fetch", - "wasm/node-tester", "nym-id", "common/nym-id-lib", + "wasm/node-tester", ] default-members = [ diff --git a/nym-id/Cargo.toml b/tools/nym-id-cli/Cargo.toml similarity index 67% rename from nym-id/Cargo.toml rename to tools/nym-id-cli/Cargo.toml index 49da695276..c57404397a 100644 --- a/nym-id/Cargo.toml +++ b/tools/nym-id-cli/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "nym-id" +name = "nym-id-cli" version = "0.1.0" authors.workspace = true repository.workspace = true @@ -17,6 +17,6 @@ clap = { workspace = true, features = ["derive"] } tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } tracing.workspace = true -nym-bin-common = { path = "../common/bin-common", features = ["output_format", "basic_tracing"] } -nym-credential-storage = { path = "../common/credential-storage" } -nym-id-lib = { path = "../common/nym-id-lib" } +nym-bin-common = { path = "../../common/bin-common", features = ["output_format", "basic_tracing"] } +nym-credential-storage = { path = "../../common/credential-storage" } +nym-id-lib = { path = "../../common/nym-id-lib" } diff --git a/nym-id/src/commands/build_info.rs b/tools/nym-id-cli/src/commands/build_info.rs similarity index 100% rename from nym-id/src/commands/build_info.rs rename to tools/nym-id-cli/src/commands/build_info.rs diff --git a/nym-id/src/commands/import_credential.rs b/tools/nym-id-cli/src/commands/import_credential.rs similarity index 100% rename from nym-id/src/commands/import_credential.rs rename to tools/nym-id-cli/src/commands/import_credential.rs diff --git a/nym-id/src/commands/mod.rs b/tools/nym-id-cli/src/commands/mod.rs similarity index 100% rename from nym-id/src/commands/mod.rs rename to tools/nym-id-cli/src/commands/mod.rs diff --git a/nym-id/src/commands/setup.rs b/tools/nym-id-cli/src/commands/setup.rs similarity index 100% rename from nym-id/src/commands/setup.rs rename to tools/nym-id-cli/src/commands/setup.rs diff --git a/nym-id/src/main.rs b/tools/nym-id-cli/src/main.rs similarity index 100% rename from nym-id/src/main.rs rename to tools/nym-id-cli/src/main.rs From a04a782dbf7c5ca5b989d5e93821f95ff8587717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Mon, 4 Mar 2024 09:40:11 +0000 Subject: [PATCH 2/2] renamed nym-id-lib to nym-id --- Cargo.lock | 38 +++++++++---------- Cargo.toml | 2 +- clients/native/Cargo.toml | 2 +- .../native/src/commands/import_credential.rs | 2 +- clients/native/src/error.rs | 2 +- clients/socks5/Cargo.toml | 2 +- .../socks5/src/commands/import_credential.rs | 2 +- clients/socks5/src/error.rs | 2 +- common/commands/Cargo.toml | 2 +- .../commands/src/coconut/import_credential.rs | 2 +- common/{nym-id-lib => nym-id}/Cargo.toml | 2 +- common/{nym-id-lib => nym-id}/src/error.rs | 0 .../src/import_credential.rs | 0 common/{nym-id-lib => nym-id}/src/lib.rs | 0 .../network-requester/Cargo.toml | 2 +- .../src/cli/import_credential.rs | 2 +- .../network-requester/src/error.rs | 2 +- tools/nym-id-cli/Cargo.toml | 2 +- .../src/commands/import_credential.rs | 2 +- 19 files changed, 34 insertions(+), 34 deletions(-) rename common/{nym-id-lib => nym-id}/Cargo.toml (96%) rename common/{nym-id-lib => nym-id}/src/error.rs (100%) rename common/{nym-id-lib => nym-id}/src/import_credential.rs (100%) rename common/{nym-id-lib => nym-id}/src/lib.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 0dc8ab742c..c3df2e1c05 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5128,7 +5128,7 @@ dependencies = [ "nym-credentials", "nym-credentials-interface", "nym-crypto", - "nym-id-lib", + "nym-id", "nym-mixnet-contract-common", "nym-multisig-contract-common", "nym-name-service-common", @@ -5169,7 +5169,7 @@ dependencies = [ "nym-credentials", "nym-crypto", "nym-gateway-requests", - "nym-id-lib", + "nym-id", "nym-network-defaults", "nym-pemstore", "nym-sphinx", @@ -5629,21 +5629,7 @@ dependencies = [ ] [[package]] -name = "nym-id-cli" -version = "0.1.0" -dependencies = [ - "anyhow", - "bs58 0.5.0", - "clap 4.4.7", - "nym-bin-common", - "nym-credential-storage", - "nym-id-lib", - "tokio", - "tracing", -] - -[[package]] -name = "nym-id-lib" +name = "nym-id" version = "0.1.0" dependencies = [ "nym-credential-storage", @@ -5654,6 +5640,20 @@ dependencies = [ "zeroize", ] +[[package]] +name = "nym-id-cli" +version = "0.1.0" +dependencies = [ + "anyhow", + "bs58 0.5.0", + "clap 4.4.7", + "nym-bin-common", + "nym-credential-storage", + "nym-id", + "tokio", + "tracing", +] + [[package]] name = "nym-inclusion-probability" version = "0.1.0" @@ -5892,7 +5892,7 @@ dependencies = [ "nym-credentials", "nym-crypto", "nym-exit-policy", - "nym-id-lib", + "nym-id", "nym-network-defaults", "nym-ordered-buffer", "nym-sdk", @@ -6180,7 +6180,7 @@ dependencies = [ "nym-credentials", "nym-crypto", "nym-gateway-requests", - "nym-id-lib", + "nym-id", "nym-network-defaults", "nym-ordered-buffer", "nym-pemstore", diff --git a/Cargo.toml b/Cargo.toml index f479a81f57..d67b66149a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,7 @@ members = [ "common/node-tester-utils", "common/nonexhaustive-delayqueue", "common/nymcoconut", - "common/nym-id-lib", + "common/nym-id", "common/nymsphinx", "common/nymsphinx/acknowledgements", "common/nymsphinx/addressing", diff --git a/clients/native/Cargo.toml b/clients/native/Cargo.toml index 9da09cd0d0..a85b73e5a4 100644 --- a/clients/native/Cargo.toml +++ b/clients/native/Cargo.toml @@ -51,6 +51,6 @@ nym-task = { path = "../../common/task" } nym-topology = { path = "../../common/topology" } nym-validator-client = { path = "../../common/client-libs/validator-client", features = ["http-client"] } nym-client-websocket-requests = { path = "websocket-requests" } -nym-id-lib = { path = "../../common/nym-id-lib" } +nym-id = { path = "../../common/nym-id" } [dev-dependencies] diff --git a/clients/native/src/commands/import_credential.rs b/clients/native/src/commands/import_credential.rs index aac7feaa64..8554f74ee7 100644 --- a/clients/native/src/commands/import_credential.rs +++ b/clients/native/src/commands/import_credential.rs @@ -5,7 +5,7 @@ use crate::commands::try_load_current_config; use crate::error::ClientError; use clap::ArgGroup; -use nym_id_lib::import_credential; +use nym_id::import_credential; use std::fs; use std::path::PathBuf; diff --git a/clients/native/src/error.rs b/clients/native/src/error.rs index b4f47cf90b..33daa1247d 100644 --- a/clients/native/src/error.rs +++ b/clients/native/src/error.rs @@ -1,6 +1,6 @@ use nym_client_core::error::ClientCoreError; -use nym_id_lib::NymIdError; +use nym_id::NymIdError; #[derive(thiserror::Error, Debug)] pub enum ClientError { diff --git a/clients/socks5/Cargo.toml b/clients/socks5/Cargo.toml index 0af4c34770..2665f6355c 100644 --- a/clients/socks5/Cargo.toml +++ b/clients/socks5/Cargo.toml @@ -35,7 +35,7 @@ nym-ordered-buffer = { path = "../../common/socks5/ordered-buffer" } nym-pemstore = { path = "../../common/pemstore" } nym-topology = { path = "../../common/topology" } nym-socks5-client-core = { path = "../../common/socks5-client-core" } -nym-id-lib = { path = "../../common/nym-id-lib" } +nym-id = { path = "../../common/nym-id" } [features] default = [] diff --git a/clients/socks5/src/commands/import_credential.rs b/clients/socks5/src/commands/import_credential.rs index 25285870f8..8a13e799d3 100644 --- a/clients/socks5/src/commands/import_credential.rs +++ b/clients/socks5/src/commands/import_credential.rs @@ -5,7 +5,7 @@ use crate::commands::try_load_current_config; use crate::error::Socks5ClientError; use clap::ArgGroup; -use nym_id_lib::import_credential; +use nym_id::import_credential; use std::fs; use std::path::PathBuf; diff --git a/clients/socks5/src/error.rs b/clients/socks5/src/error.rs index 788d1250f8..de40ccfefa 100644 --- a/clients/socks5/src/error.rs +++ b/clients/socks5/src/error.rs @@ -1,6 +1,6 @@ use nym_client_core::error::ClientCoreError; -use nym_id_lib::NymIdError; +use nym_id::NymIdError; #[derive(thiserror::Error, Debug)] pub enum Socks5ClientError { diff --git a/common/commands/Cargo.toml b/common/commands/Cargo.toml index dba6b7a9b5..6c96a3f93d 100644 --- a/common/commands/Cargo.toml +++ b/common/commands/Cargo.toml @@ -55,7 +55,7 @@ nym-credentials = { path = "../../common/credentials" } nym-credentials-interface = { path = "../../common/credentials-interface" } nym-credential-storage = { path = "../../common/credential-storage" } nym-credential-utils = { path = "../../common/credential-utils" } -nym-id-lib = { path = "../../common/nym-id-lib" } +nym-id = { path = "../nym-id" } nym-pemstore = { path = "../../common/pemstore", version = "0.3.0" } nym-types = { path = "../../common/types" } diff --git a/common/commands/src/coconut/import_credential.rs b/common/commands/src/coconut/import_credential.rs index 388961ace4..852f94e34a 100644 --- a/common/commands/src/coconut/import_credential.rs +++ b/common/commands/src/coconut/import_credential.rs @@ -6,7 +6,7 @@ use anyhow::bail; use clap::ArgGroup; use clap::Parser; use nym_credential_storage::initialise_persistent_storage; -use nym_id_lib::import_credential; +use nym_id::import_credential; use std::fs; use std::path::PathBuf; diff --git a/common/nym-id-lib/Cargo.toml b/common/nym-id/Cargo.toml similarity index 96% rename from common/nym-id-lib/Cargo.toml rename to common/nym-id/Cargo.toml index 3114f0eded..eb80073fb7 100644 --- a/common/nym-id-lib/Cargo.toml +++ b/common/nym-id/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "nym-id-lib" +name = "nym-id" version = "0.1.0" authors.workspace = true repository.workspace = true diff --git a/common/nym-id-lib/src/error.rs b/common/nym-id/src/error.rs similarity index 100% rename from common/nym-id-lib/src/error.rs rename to common/nym-id/src/error.rs diff --git a/common/nym-id-lib/src/import_credential.rs b/common/nym-id/src/import_credential.rs similarity index 100% rename from common/nym-id-lib/src/import_credential.rs rename to common/nym-id/src/import_credential.rs diff --git a/common/nym-id-lib/src/lib.rs b/common/nym-id/src/lib.rs similarity index 100% rename from common/nym-id-lib/src/lib.rs rename to common/nym-id/src/lib.rs diff --git a/service-providers/network-requester/Cargo.toml b/service-providers/network-requester/Cargo.toml index 65ca6c2aa3..ac8d641719 100644 --- a/service-providers/network-requester/Cargo.toml +++ b/service-providers/network-requester/Cargo.toml @@ -61,7 +61,7 @@ nym-statistics-common = { path = "../../common/statistics" } nym-task = { path = "../../common/task" } nym-types = { path = "../../common/types" } nym-exit-policy = { path = "../../common/exit-policy", features = ["client"] } -nym-id-lib = { path = "../../common/nym-id-lib" } +nym-id = { path = "../../common/nym-id" } [dev-dependencies] tempfile = "3.5.0" diff --git a/service-providers/network-requester/src/cli/import_credential.rs b/service-providers/network-requester/src/cli/import_credential.rs index 1fe0d3de52..d46b0442bf 100644 --- a/service-providers/network-requester/src/cli/import_credential.rs +++ b/service-providers/network-requester/src/cli/import_credential.rs @@ -5,7 +5,7 @@ use crate::cli::try_load_current_config; use crate::error::NetworkRequesterError; use clap::ArgGroup; -use nym_id_lib::import_credential; +use nym_id::import_credential; use std::fs; use std::path::PathBuf; diff --git a/service-providers/network-requester/src/error.rs b/service-providers/network-requester/src/error.rs index 0143494696..048ca2a5d2 100644 --- a/service-providers/network-requester/src/error.rs +++ b/service-providers/network-requester/src/error.rs @@ -4,7 +4,7 @@ pub use nym_client_core::error::ClientCoreError; use nym_exit_policy::policy::PolicyError; -use nym_id_lib::NymIdError; +use nym_id::NymIdError; use nym_socks5_requests::{RemoteAddress, Socks5RequestError}; use std::net::SocketAddr; diff --git a/tools/nym-id-cli/Cargo.toml b/tools/nym-id-cli/Cargo.toml index c57404397a..bada736bfd 100644 --- a/tools/nym-id-cli/Cargo.toml +++ b/tools/nym-id-cli/Cargo.toml @@ -19,4 +19,4 @@ tracing.workspace = true nym-bin-common = { path = "../../common/bin-common", features = ["output_format", "basic_tracing"] } nym-credential-storage = { path = "../../common/credential-storage" } -nym-id-lib = { path = "../../common/nym-id-lib" } +nym-id = { path = "../../common/nym-id" } diff --git a/tools/nym-id-cli/src/commands/import_credential.rs b/tools/nym-id-cli/src/commands/import_credential.rs index 9422a34e8d..e04bb89af5 100644 --- a/tools/nym-id-cli/src/commands/import_credential.rs +++ b/tools/nym-id-cli/src/commands/import_credential.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use clap::ArgGroup; -use nym_id_lib::import_credential; +use nym_id::import_credential; use std::fs; use std::path::PathBuf;