From 507e910e720d12da2ee7f231ff6b050dc636c80f Mon Sep 17 00:00:00 2001 From: Dave Hrycyszyn Date: Mon, 13 Jan 2020 18:25:05 +0000 Subject: [PATCH] Pulled nym-client binary out to top-level --- Cargo.toml | 10 +++++----- .../clients}/directory-client/Cargo.toml | 2 +- .../clients}/directory-client/src/lib.rs | 0 .../clients}/directory-client/src/metrics.rs | 0 .../clients}/directory-client/src/presence.rs | 0 .../src/requests/health_check_get.rs | 0 .../src/requests/metrics_mixes_get.rs | 0 .../src/requests/metrics_mixes_post.rs | 0 .../clients}/directory-client/src/requests/mod.rs | 0 .../src/requests/presence_coconodes_post.rs | 0 .../src/requests/presence_mixnodes_post.rs | 0 .../src/requests/presence_providers_post.rs | 0 .../src/requests/presence_topology_get.rs | 0 {clients => common/clients}/mix-client/Cargo.toml | 0 {clients => common/clients}/mix-client/src/lib.rs | 0 .../clients}/provider-client/Cargo.toml | 2 +- .../clients}/provider-client/src/lib.rs | 0 .../clients}/validator-client/Cargo.toml | 0 .../clients}/validator-client/src/lib.rs | 0 common/crypto/src/identity/mod.rs | 1 + mixnode/Cargo.toml | 2 +- {clients/nym-client => nym-client}/CHANGELOG.md | 0 {clients/nym-client => nym-client}/Cargo.lock | 0 {clients/nym-client => nym-client}/Cargo.toml | 14 +++++++------- {clients/nym-client => nym-client}/README.md | 0 {clients/nym-client => nym-client}/build.rs | 0 .../nym-client => nym-client}/src/clients/mod.rs | 0 .../nym-client => nym-client}/src/commands/init.rs | 0 .../nym-client => nym-client}/src/commands/mod.rs | 0 .../src/commands/tcpsocket.rs | 0 .../src/commands/websocket.rs | 0 {clients/nym-client => nym-client}/src/lib.rs | 0 {clients/nym-client => nym-client}/src/main.rs | 0 .../src/persistence/mod.rs | 0 .../src/persistence/pathfinder.rs | 0 .../src/persistence/pemstore.rs | 1 + .../src/persistence/toml.rs | 0 .../nym-client => nym-client}/src/sockets/mod.rs | 0 .../nym-client => nym-client}/src/sockets/tcp.rs | 0 .../nym-client => nym-client}/src/sockets/ws.rs | 0 .../nym-client => nym-client}/src/utils/bytes.rs | 0 .../nym-client => nym-client}/src/utils/mod.rs | 0 .../nym-client => nym-client}/src/utils/poisson.rs | 0 .../nym-client => nym-client}/src/utils/sphinx.rs | 0 sfw-provider/Cargo.toml | 2 +- validator/Cargo.toml | 7 +++---- 46 files changed, 21 insertions(+), 20 deletions(-) rename {clients => common/clients}/directory-client/Cargo.toml (90%) rename {clients => common/clients}/directory-client/src/lib.rs (100%) rename {clients => common/clients}/directory-client/src/metrics.rs (100%) rename {clients => common/clients}/directory-client/src/presence.rs (100%) rename {clients => common/clients}/directory-client/src/requests/health_check_get.rs (100%) rename {clients => common/clients}/directory-client/src/requests/metrics_mixes_get.rs (100%) rename {clients => common/clients}/directory-client/src/requests/metrics_mixes_post.rs (100%) rename {clients => common/clients}/directory-client/src/requests/mod.rs (100%) rename {clients => common/clients}/directory-client/src/requests/presence_coconodes_post.rs (100%) rename {clients => common/clients}/directory-client/src/requests/presence_mixnodes_post.rs (100%) rename {clients => common/clients}/directory-client/src/requests/presence_providers_post.rs (100%) rename {clients => common/clients}/directory-client/src/requests/presence_topology_get.rs (100%) rename {clients => common/clients}/mix-client/Cargo.toml (100%) rename {clients => common/clients}/mix-client/src/lib.rs (100%) rename {clients => common/clients}/provider-client/Cargo.toml (87%) rename {clients => common/clients}/provider-client/src/lib.rs (100%) rename {clients => common/clients}/validator-client/Cargo.toml (100%) rename {clients => common/clients}/validator-client/src/lib.rs (100%) rename {clients/nym-client => nym-client}/CHANGELOG.md (100%) rename {clients/nym-client => nym-client}/Cargo.lock (100%) rename {clients/nym-client => nym-client}/Cargo.toml (75%) rename {clients/nym-client => nym-client}/README.md (100%) rename {clients/nym-client => nym-client}/build.rs (100%) rename {clients/nym-client => nym-client}/src/clients/mod.rs (100%) rename {clients/nym-client => nym-client}/src/commands/init.rs (100%) rename {clients/nym-client => nym-client}/src/commands/mod.rs (100%) rename {clients/nym-client => nym-client}/src/commands/tcpsocket.rs (100%) rename {clients/nym-client => nym-client}/src/commands/websocket.rs (100%) rename {clients/nym-client => nym-client}/src/lib.rs (100%) rename {clients/nym-client => nym-client}/src/main.rs (100%) rename {clients/nym-client => nym-client}/src/persistence/mod.rs (100%) rename {clients/nym-client => nym-client}/src/persistence/pathfinder.rs (100%) rename {clients/nym-client => nym-client}/src/persistence/pemstore.rs (99%) rename {clients/nym-client => nym-client}/src/persistence/toml.rs (100%) rename {clients/nym-client => nym-client}/src/sockets/mod.rs (100%) rename {clients/nym-client => nym-client}/src/sockets/tcp.rs (100%) rename {clients/nym-client => nym-client}/src/sockets/ws.rs (100%) rename {clients/nym-client => nym-client}/src/utils/bytes.rs (100%) rename {clients/nym-client => nym-client}/src/utils/mod.rs (100%) rename {clients/nym-client => nym-client}/src/utils/poisson.rs (100%) rename {clients/nym-client => nym-client}/src/utils/sphinx.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 3de700b805..8e1687fdc5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,15 +1,15 @@ [workspace] members = [ - "clients/nym-client", - "clients/directory-client", - "clients/mix-client", - "clients/provider-client", - "clients/validator-client", + "common/clients/directory-client", + "common/clients/mix-client", + "common/clients/provider-client", + "common/clients/validator-client", "common/addressing", "common/crypto", "common/topology", "mixnode", + "nym-client", "sfw-provider", "sfw-provider/sfw-provider-requests", "validator", diff --git a/clients/directory-client/Cargo.toml b/common/clients/directory-client/Cargo.toml similarity index 90% rename from clients/directory-client/Cargo.toml rename to common/clients/directory-client/Cargo.toml index 4ba0d1f4f7..019fd4700a 100644 --- a/clients/directory-client/Cargo.toml +++ b/common/clients/directory-client/Cargo.toml @@ -11,7 +11,7 @@ reqwest = "0.9.22" serde = { version = "1.0.104", features = ["derive"] } ## internal -topology = {path = "../../common/topology"} +topology = {path = "../../topology"} [dev-dependencies] mockito = "0.22.0" diff --git a/clients/directory-client/src/lib.rs b/common/clients/directory-client/src/lib.rs similarity index 100% rename from clients/directory-client/src/lib.rs rename to common/clients/directory-client/src/lib.rs diff --git a/clients/directory-client/src/metrics.rs b/common/clients/directory-client/src/metrics.rs similarity index 100% rename from clients/directory-client/src/metrics.rs rename to common/clients/directory-client/src/metrics.rs diff --git a/clients/directory-client/src/presence.rs b/common/clients/directory-client/src/presence.rs similarity index 100% rename from clients/directory-client/src/presence.rs rename to common/clients/directory-client/src/presence.rs diff --git a/clients/directory-client/src/requests/health_check_get.rs b/common/clients/directory-client/src/requests/health_check_get.rs similarity index 100% rename from clients/directory-client/src/requests/health_check_get.rs rename to common/clients/directory-client/src/requests/health_check_get.rs diff --git a/clients/directory-client/src/requests/metrics_mixes_get.rs b/common/clients/directory-client/src/requests/metrics_mixes_get.rs similarity index 100% rename from clients/directory-client/src/requests/metrics_mixes_get.rs rename to common/clients/directory-client/src/requests/metrics_mixes_get.rs diff --git a/clients/directory-client/src/requests/metrics_mixes_post.rs b/common/clients/directory-client/src/requests/metrics_mixes_post.rs similarity index 100% rename from clients/directory-client/src/requests/metrics_mixes_post.rs rename to common/clients/directory-client/src/requests/metrics_mixes_post.rs diff --git a/clients/directory-client/src/requests/mod.rs b/common/clients/directory-client/src/requests/mod.rs similarity index 100% rename from clients/directory-client/src/requests/mod.rs rename to common/clients/directory-client/src/requests/mod.rs diff --git a/clients/directory-client/src/requests/presence_coconodes_post.rs b/common/clients/directory-client/src/requests/presence_coconodes_post.rs similarity index 100% rename from clients/directory-client/src/requests/presence_coconodes_post.rs rename to common/clients/directory-client/src/requests/presence_coconodes_post.rs diff --git a/clients/directory-client/src/requests/presence_mixnodes_post.rs b/common/clients/directory-client/src/requests/presence_mixnodes_post.rs similarity index 100% rename from clients/directory-client/src/requests/presence_mixnodes_post.rs rename to common/clients/directory-client/src/requests/presence_mixnodes_post.rs diff --git a/clients/directory-client/src/requests/presence_providers_post.rs b/common/clients/directory-client/src/requests/presence_providers_post.rs similarity index 100% rename from clients/directory-client/src/requests/presence_providers_post.rs rename to common/clients/directory-client/src/requests/presence_providers_post.rs diff --git a/clients/directory-client/src/requests/presence_topology_get.rs b/common/clients/directory-client/src/requests/presence_topology_get.rs similarity index 100% rename from clients/directory-client/src/requests/presence_topology_get.rs rename to common/clients/directory-client/src/requests/presence_topology_get.rs diff --git a/clients/mix-client/Cargo.toml b/common/clients/mix-client/Cargo.toml similarity index 100% rename from clients/mix-client/Cargo.toml rename to common/clients/mix-client/Cargo.toml diff --git a/clients/mix-client/src/lib.rs b/common/clients/mix-client/src/lib.rs similarity index 100% rename from clients/mix-client/src/lib.rs rename to common/clients/mix-client/src/lib.rs diff --git a/clients/provider-client/Cargo.toml b/common/clients/provider-client/Cargo.toml similarity index 87% rename from clients/provider-client/Cargo.toml rename to common/clients/provider-client/Cargo.toml index f9f181b217..602f7d2725 100644 --- a/clients/provider-client/Cargo.toml +++ b/common/clients/provider-client/Cargo.toml @@ -12,7 +12,7 @@ log = "0.4.8" tokio = { version = "0.2", features = ["full"] } ## internal -sfw-provider-requests = { path = "../../sfw-provider/sfw-provider-requests" } +sfw-provider-requests = { path = "../../../sfw-provider/sfw-provider-requests" } ## will be moved to proper dependencies once released sphinx = { git = "https://github.com/nymtech/sphinx", rev="1d8cefcb6a0cb8e87d00d89eb1ccf2839e92aa1f" } diff --git a/clients/provider-client/src/lib.rs b/common/clients/provider-client/src/lib.rs similarity index 100% rename from clients/provider-client/src/lib.rs rename to common/clients/provider-client/src/lib.rs diff --git a/clients/validator-client/Cargo.toml b/common/clients/validator-client/Cargo.toml similarity index 100% rename from clients/validator-client/Cargo.toml rename to common/clients/validator-client/Cargo.toml diff --git a/clients/validator-client/src/lib.rs b/common/clients/validator-client/src/lib.rs similarity index 100% rename from clients/validator-client/src/lib.rs rename to common/clients/validator-client/src/lib.rs diff --git a/common/crypto/src/identity/mod.rs b/common/crypto/src/identity/mod.rs index 423871720a..5953581d6b 100644 --- a/common/crypto/src/identity/mod.rs +++ b/common/crypto/src/identity/mod.rs @@ -103,6 +103,7 @@ impl DummyMixIdentityPublicKey { base64::encode_config(&self.to_bytes(), base64::URL_SAFE) } + #[allow(dead_code)] fn from_b64_string(val: String) -> Self { Self::from_bytes(&base64::decode_config(&val, base64::URL_SAFE).unwrap()) } diff --git a/mixnode/Cargo.toml b/mixnode/Cargo.toml index 0e0843eb16..42a428bd0a 100644 --- a/mixnode/Cargo.toml +++ b/mixnode/Cargo.toml @@ -16,7 +16,7 @@ tokio = { version = "0.2", features = ["full"] } ## internal addressing = {path = "../common/addressing" } -directory-client = { path = "../clients/directory-client" } +directory-client = { path = "../common/clients/directory-client" } ## will be moved to proper dependencies once released sphinx = { git = "https://github.com/nymtech/sphinx", rev="1d8cefcb6a0cb8e87d00d89eb1ccf2839e92aa1f" } diff --git a/clients/nym-client/CHANGELOG.md b/nym-client/CHANGELOG.md similarity index 100% rename from clients/nym-client/CHANGELOG.md rename to nym-client/CHANGELOG.md diff --git a/clients/nym-client/Cargo.lock b/nym-client/Cargo.lock similarity index 100% rename from clients/nym-client/Cargo.lock rename to nym-client/Cargo.lock diff --git a/clients/nym-client/Cargo.toml b/nym-client/Cargo.toml similarity index 75% rename from clients/nym-client/Cargo.toml rename to nym-client/Cargo.toml index 20b05e2db7..857f1a2d95 100644 --- a/clients/nym-client/Cargo.toml +++ b/nym-client/Cargo.toml @@ -30,13 +30,13 @@ tokio = { version = "0.2", features = ["full"] } tungstenite = "0.9.2" ## internal -addressing = {path = "../../common/addressing" } -crypto = {path = "../../common/crypto"} -directory-client = { path = "../directory-client" } -mix-client = { path = "../mix-client" } -provider-client = { path = "../provider-client" } -sfw-provider-requests = { path = "../../sfw-provider/sfw-provider-requests" } -topology = {path = "../../common/topology" } +addressing = {path = "../common/addressing" } +crypto = {path = "../common/crypto"} +directory-client = { path = "../common/clients/directory-client" } +mix-client = { path = "../common/clients/mix-client" } +provider-client = { path = "../common/clients/provider-client" } +sfw-provider-requests = { path = "../sfw-provider/sfw-provider-requests" } +topology = {path = "../common/topology" } ## will be moved to proper dependencies once released sphinx = { git = "https://github.com/nymtech/sphinx", rev="1d8cefcb6a0cb8e87d00d89eb1ccf2839e92aa1f" } diff --git a/clients/nym-client/README.md b/nym-client/README.md similarity index 100% rename from clients/nym-client/README.md rename to nym-client/README.md diff --git a/clients/nym-client/build.rs b/nym-client/build.rs similarity index 100% rename from clients/nym-client/build.rs rename to nym-client/build.rs diff --git a/clients/nym-client/src/clients/mod.rs b/nym-client/src/clients/mod.rs similarity index 100% rename from clients/nym-client/src/clients/mod.rs rename to nym-client/src/clients/mod.rs diff --git a/clients/nym-client/src/commands/init.rs b/nym-client/src/commands/init.rs similarity index 100% rename from clients/nym-client/src/commands/init.rs rename to nym-client/src/commands/init.rs diff --git a/clients/nym-client/src/commands/mod.rs b/nym-client/src/commands/mod.rs similarity index 100% rename from clients/nym-client/src/commands/mod.rs rename to nym-client/src/commands/mod.rs diff --git a/clients/nym-client/src/commands/tcpsocket.rs b/nym-client/src/commands/tcpsocket.rs similarity index 100% rename from clients/nym-client/src/commands/tcpsocket.rs rename to nym-client/src/commands/tcpsocket.rs diff --git a/clients/nym-client/src/commands/websocket.rs b/nym-client/src/commands/websocket.rs similarity index 100% rename from clients/nym-client/src/commands/websocket.rs rename to nym-client/src/commands/websocket.rs diff --git a/clients/nym-client/src/lib.rs b/nym-client/src/lib.rs similarity index 100% rename from clients/nym-client/src/lib.rs rename to nym-client/src/lib.rs diff --git a/clients/nym-client/src/main.rs b/nym-client/src/main.rs similarity index 100% rename from clients/nym-client/src/main.rs rename to nym-client/src/main.rs diff --git a/clients/nym-client/src/persistence/mod.rs b/nym-client/src/persistence/mod.rs similarity index 100% rename from clients/nym-client/src/persistence/mod.rs rename to nym-client/src/persistence/mod.rs diff --git a/clients/nym-client/src/persistence/pathfinder.rs b/nym-client/src/persistence/pathfinder.rs similarity index 100% rename from clients/nym-client/src/persistence/pathfinder.rs rename to nym-client/src/persistence/pathfinder.rs diff --git a/clients/nym-client/src/persistence/pemstore.rs b/nym-client/src/persistence/pemstore.rs similarity index 99% rename from clients/nym-client/src/persistence/pemstore.rs rename to nym-client/src/persistence/pemstore.rs index 6780ed9cea..19f6bb07df 100644 --- a/clients/nym-client/src/persistence/pemstore.rs +++ b/nym-client/src/persistence/pemstore.rs @@ -13,6 +13,7 @@ pub fn read_mix_identity_keypair_from_disk( keypair } +#[allow(dead_code)] pub fn read_mix_encryption_keypair_from_disk(_id: String) -> crypto::encryption::x25519::KeyPair { unimplemented!() } diff --git a/clients/nym-client/src/persistence/toml.rs b/nym-client/src/persistence/toml.rs similarity index 100% rename from clients/nym-client/src/persistence/toml.rs rename to nym-client/src/persistence/toml.rs diff --git a/clients/nym-client/src/sockets/mod.rs b/nym-client/src/sockets/mod.rs similarity index 100% rename from clients/nym-client/src/sockets/mod.rs rename to nym-client/src/sockets/mod.rs diff --git a/clients/nym-client/src/sockets/tcp.rs b/nym-client/src/sockets/tcp.rs similarity index 100% rename from clients/nym-client/src/sockets/tcp.rs rename to nym-client/src/sockets/tcp.rs diff --git a/clients/nym-client/src/sockets/ws.rs b/nym-client/src/sockets/ws.rs similarity index 100% rename from clients/nym-client/src/sockets/ws.rs rename to nym-client/src/sockets/ws.rs diff --git a/clients/nym-client/src/utils/bytes.rs b/nym-client/src/utils/bytes.rs similarity index 100% rename from clients/nym-client/src/utils/bytes.rs rename to nym-client/src/utils/bytes.rs diff --git a/clients/nym-client/src/utils/mod.rs b/nym-client/src/utils/mod.rs similarity index 100% rename from clients/nym-client/src/utils/mod.rs rename to nym-client/src/utils/mod.rs diff --git a/clients/nym-client/src/utils/poisson.rs b/nym-client/src/utils/poisson.rs similarity index 100% rename from clients/nym-client/src/utils/poisson.rs rename to nym-client/src/utils/poisson.rs diff --git a/clients/nym-client/src/utils/sphinx.rs b/nym-client/src/utils/sphinx.rs similarity index 100% rename from clients/nym-client/src/utils/sphinx.rs rename to nym-client/src/utils/sphinx.rs diff --git a/sfw-provider/Cargo.toml b/sfw-provider/Cargo.toml index 940c747462..d355353ad6 100644 --- a/sfw-provider/Cargo.toml +++ b/sfw-provider/Cargo.toml @@ -22,7 +22,7 @@ hmac = "0.7.1" ## internal crypto = {path = "../common/crypto"} -directory-client = { path = "../clients/directory-client" } +directory-client = { path = "../common/clients/directory-client" } sfw-provider-requests = { path = "./sfw-provider-requests" } ## will be moved to proper dependencies once released diff --git a/validator/Cargo.toml b/validator/Cargo.toml index 7ddc293ff8..d0f9cdb325 100644 --- a/validator/Cargo.toml +++ b/validator/Cargo.toml @@ -23,9 +23,9 @@ toml = "0.5.5" ## internal addressing = {path = "../common/addressing" } crypto = { path = "../common/crypto" } -directory-client = { path = "../clients/directory-client" } -mix-client = { path = "../clients/mix-client" } -provider-client = { path = "../clients/provider-client" } +directory-client = { path = "../common/clients/directory-client" } +mix-client = { path = "../common/clients/mix-client" } +provider-client = { path = "../common/clients/provider-client" } sfw-provider-requests = { path = "../sfw-provider/sfw-provider-requests" } topology = {path = "../common/topology" } @@ -36,4 +36,3 @@ sphinx = { git = "https://github.com/nymtech/sphinx", rev="1d8cefcb6a0cb8e87d00d built = "0.3.2" [dev-dependencies] -