Add nym prefix to a few more crates (#3092)
* Add nym- prefix to execute crate * Add nym- prefix to nonexhaustive-delayqueue * Add nym- prefix to config crate * Update imports * Update more module paths * rustfmt * Add nym- prefix to statistics-common * Update explicit module paths * rustfmt
This commit is contained in:
Generated
+64
-64
@@ -680,7 +680,6 @@ name = "client-core"
|
||||
version = "1.1.10"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"config",
|
||||
"dashmap 5.4.0",
|
||||
"dirs",
|
||||
"futures",
|
||||
@@ -689,8 +688,9 @@ dependencies = [
|
||||
"gloo-timers",
|
||||
"humantime-serde",
|
||||
"log",
|
||||
"nonexhaustive-delayqueue",
|
||||
"nym-config",
|
||||
"nym-crypto",
|
||||
"nym-nonexhaustive-delayqueue",
|
||||
"nym-pemstore",
|
||||
"nym-sphinx",
|
||||
"nym-task",
|
||||
@@ -788,19 +788,6 @@ dependencies = [
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "config"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"handlebars",
|
||||
"log",
|
||||
"nym-network-defaults",
|
||||
"serde",
|
||||
"toml",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "console-api"
|
||||
version = "0.4.0"
|
||||
@@ -1009,11 +996,11 @@ dependencies = [
|
||||
"bip39",
|
||||
"clap 4.1.4",
|
||||
"coconut-interface",
|
||||
"config",
|
||||
"credential-storage",
|
||||
"credentials",
|
||||
"log",
|
||||
"nym-bin-common",
|
||||
"nym-config",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-pemstore",
|
||||
@@ -1811,14 +1798,6 @@ version = "2.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
|
||||
|
||||
[[package]]
|
||||
name = "execute"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "explorer-api"
|
||||
version = "1.1.10"
|
||||
@@ -3238,18 +3217,6 @@ dependencies = [
|
||||
"minimal-lexical",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nonexhaustive-delayqueue"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"slab",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"tokio-util",
|
||||
"wasm-timer",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ntapi"
|
||||
version = "0.4.0"
|
||||
@@ -3323,7 +3290,6 @@ dependencies = [
|
||||
"coconut-bandwidth-contract-common",
|
||||
"coconut-dkg-common",
|
||||
"coconut-interface",
|
||||
"config",
|
||||
"console-subscriber",
|
||||
"cosmwasm-std",
|
||||
"credential-storage",
|
||||
@@ -3343,6 +3309,7 @@ dependencies = [
|
||||
"multisig-contract-common",
|
||||
"nym-api-requests",
|
||||
"nym-bin-common",
|
||||
"nym-config",
|
||||
"nym-contracts-common",
|
||||
"nym-crypto",
|
||||
"nym-inclusion-probability",
|
||||
@@ -3485,7 +3452,6 @@ dependencies = [
|
||||
"clap 4.1.4",
|
||||
"client-core",
|
||||
"coconut-interface",
|
||||
"config",
|
||||
"credential-storage",
|
||||
"credentials",
|
||||
"dirs",
|
||||
@@ -3495,6 +3461,7 @@ dependencies = [
|
||||
"lazy_static",
|
||||
"log",
|
||||
"nym-bin-common",
|
||||
"nym-config",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-pemstore",
|
||||
@@ -3514,6 +3481,19 @@ dependencies = [
|
||||
"websocket-requests",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-config"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"handlebars",
|
||||
"log",
|
||||
"nym-network-defaults",
|
||||
"serde",
|
||||
"toml",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-contracts-common"
|
||||
version = "0.1.0"
|
||||
@@ -3551,6 +3531,14 @@ dependencies = [
|
||||
"x25519-dalek",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-execute"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-gateway"
|
||||
version = "1.1.10"
|
||||
@@ -3563,7 +3551,6 @@ dependencies = [
|
||||
"clap 4.1.4",
|
||||
"coconut-interface",
|
||||
"colored",
|
||||
"config",
|
||||
"credentials",
|
||||
"dashmap 4.0.2",
|
||||
"dirs",
|
||||
@@ -3577,10 +3564,12 @@ dependencies = [
|
||||
"mixnode-common",
|
||||
"nym-api-requests",
|
||||
"nym-bin-common",
|
||||
"nym-config",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-pemstore",
|
||||
"nym-sphinx",
|
||||
"nym-statistics-common",
|
||||
"nym-task",
|
||||
"nym-types",
|
||||
"once_cell",
|
||||
@@ -3589,7 +3578,6 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sqlx 0.5.13",
|
||||
"statistics-common",
|
||||
"subtle-encoding",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
@@ -3637,7 +3625,6 @@ dependencies = [
|
||||
"bs58",
|
||||
"clap 4.1.4",
|
||||
"colored",
|
||||
"config",
|
||||
"cupid",
|
||||
"dirs",
|
||||
"dotenv",
|
||||
@@ -3647,9 +3634,10 @@ dependencies = [
|
||||
"log",
|
||||
"mixnet-client",
|
||||
"mixnode-common",
|
||||
"nonexhaustive-delayqueue",
|
||||
"nym-bin-common",
|
||||
"nym-config",
|
||||
"nym-crypto",
|
||||
"nym-nonexhaustive-delayqueue",
|
||||
"nym-pemstore",
|
||||
"nym-sphinx",
|
||||
"nym-sphinx-params",
|
||||
@@ -3690,17 +3678,18 @@ dependencies = [
|
||||
"async-trait",
|
||||
"clap 4.1.4",
|
||||
"client-core",
|
||||
"config",
|
||||
"dirs",
|
||||
"futures",
|
||||
"ipnetwork 0.20.0",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"nym-bin-common",
|
||||
"nym-config",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-sdk",
|
||||
"nym-sphinx",
|
||||
"nym-statistics-common",
|
||||
"nym-task",
|
||||
"ordered-buffer",
|
||||
"pretty_env_logger",
|
||||
@@ -3712,7 +3701,6 @@ dependencies = [
|
||||
"service-providers-common",
|
||||
"socks5-requests",
|
||||
"sqlx 0.6.2",
|
||||
"statistics-common",
|
||||
"tap",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
@@ -3728,15 +3716,27 @@ dependencies = [
|
||||
"dirs",
|
||||
"log",
|
||||
"nym-bin-common",
|
||||
"nym-statistics-common",
|
||||
"pretty_env_logger",
|
||||
"rocket",
|
||||
"serde",
|
||||
"sqlx 0.5.13",
|
||||
"statistics-common",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-nonexhaustive-delayqueue"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"slab",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"tokio-util",
|
||||
"wasm-timer",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-outfox"
|
||||
version = "0.1.0"
|
||||
@@ -3791,7 +3791,6 @@ dependencies = [
|
||||
"clap 4.1.4",
|
||||
"client-core",
|
||||
"coconut-interface",
|
||||
"config",
|
||||
"credential-storage",
|
||||
"credentials",
|
||||
"dirs",
|
||||
@@ -3802,6 +3801,7 @@ dependencies = [
|
||||
"log",
|
||||
"mobile-storage",
|
||||
"nym-bin-common",
|
||||
"nym-config",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-pemstore",
|
||||
@@ -3951,6 +3951,20 @@ dependencies = [
|
||||
"sphinx-packet",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-statistics-common"
|
||||
version = "1.0.1"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"log",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sqlx 0.5.13",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-task"
|
||||
version = "0.1.0"
|
||||
@@ -3983,12 +3997,12 @@ name = "nym-types"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"coconut-interface",
|
||||
"config",
|
||||
"cosmrs",
|
||||
"cosmwasm-std",
|
||||
"eyre",
|
||||
"itertools",
|
||||
"log",
|
||||
"nym-config",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-vesting-contract",
|
||||
"nym-vesting-contract-common",
|
||||
@@ -4035,10 +4049,10 @@ dependencies = [
|
||||
name = "nym-wallet-types"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"config",
|
||||
"cosmrs",
|
||||
"cosmwasm-std",
|
||||
"hex-literal",
|
||||
"nym-config",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-network-defaults",
|
||||
"nym-types",
|
||||
@@ -5972,20 +5986,6 @@ version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
||||
|
||||
[[package]]
|
||||
name = "statistics-common"
|
||||
version = "1.0.1"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"log",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sqlx 0.5.13",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "stringprep"
|
||||
version = "0.1.2"
|
||||
@@ -6871,12 +6871,10 @@ dependencies = [
|
||||
"coconut-dkg-common",
|
||||
"coconut-interface",
|
||||
"colored",
|
||||
"config",
|
||||
"cosmrs",
|
||||
"cosmwasm-std",
|
||||
"cw3",
|
||||
"cw4",
|
||||
"execute",
|
||||
"flate2",
|
||||
"futures",
|
||||
"group-contract-common",
|
||||
@@ -6884,7 +6882,9 @@ dependencies = [
|
||||
"log",
|
||||
"multisig-contract-common",
|
||||
"nym-api-requests",
|
||||
"nym-config",
|
||||
"nym-contracts-common",
|
||||
"nym-execute",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-network-defaults",
|
||||
"nym-vesting-contract",
|
||||
|
||||
@@ -24,12 +24,12 @@ tokio = { version = "1.24.1", features = ["macros"]}
|
||||
time = "0.3.17"
|
||||
|
||||
# internal
|
||||
config = { path = "../../common/config" }
|
||||
nym-config = { path = "../../common/config" }
|
||||
nym-crypto = { path = "../../common/crypto" }
|
||||
gateway-client = { path = "../../common/client-libs/gateway-client" }
|
||||
#gateway-client = { path = "../../common/client-libs/gateway-client", default-features = false, features = ["wasm", "coconut"] }
|
||||
gateway-requests = { path = "../../gateway/gateway-requests" }
|
||||
nonexhaustive-delayqueue = { path = "../../common/nonexhaustive-delayqueue" }
|
||||
nym-nonexhaustive-delayqueue = { path = "../../common/nonexhaustive-delayqueue" }
|
||||
nym-sphinx = { path = "../../common/nymsphinx" }
|
||||
nym-pemstore = { path = "../../common/pemstore" }
|
||||
nym-topology = { path = "../../common/topology" }
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ use crate::client::real_messages_control::acknowledgement_control::Retransmissio
|
||||
use futures::channel::mpsc;
|
||||
use futures::StreamExt;
|
||||
use log::*;
|
||||
use nonexhaustive_delayqueue::{Expired, NonExhaustiveDelayQueue, QueueKey};
|
||||
use nym_nonexhaustive_delayqueue::{Expired, NonExhaustiveDelayQueue, QueueKey};
|
||||
use nym_sphinx::chunking::fragment::FragmentIdentifier;
|
||||
use nym_sphinx::Delay as SphinxDelay;
|
||||
use std::collections::HashMap;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use config::defaults::NymNetworkDetails;
|
||||
use config::{NymConfig, OptionalSet, DB_FILE_NAME};
|
||||
use nym_config::defaults::NymNetworkDetails;
|
||||
use nym_config::{NymConfig, OptionalSet, DB_FILE_NAME};
|
||||
use nym_sphinx::params::PacketSize;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::marker::PhantomData;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::config::Config;
|
||||
use config::NymConfig;
|
||||
use nym_config::NymConfig;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
@@ -6,11 +6,11 @@ use crate::{
|
||||
config::{persistence::key_pathfinder::ClientKeyPathfinder, Config},
|
||||
error::ClientCoreError,
|
||||
};
|
||||
use config::NymConfig;
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
use gateway_client::wasm_mockups::SigningNyxdClient;
|
||||
use gateway_client::GatewayClient;
|
||||
use gateway_requests::registration::handshake::SharedKeys;
|
||||
use nym_config::NymConfig;
|
||||
use nym_crypto::asymmetric::identity;
|
||||
use nym_topology::{filter::VersionFilterable, gateway};
|
||||
use rand::{seq::SliceRandom, thread_rng};
|
||||
|
||||
@@ -10,7 +10,7 @@ use rand::rngs::OsRng;
|
||||
use serde::Serialize;
|
||||
use tap::TapFallible;
|
||||
|
||||
use config::NymConfig;
|
||||
use nym_config::NymConfig;
|
||||
use nym_crypto::asymmetric::{encryption, identity};
|
||||
use url::Url;
|
||||
|
||||
@@ -182,7 +182,7 @@ pub fn get_client_address_from_stored_keys<T>(
|
||||
config: &Config<T>,
|
||||
) -> Result<Recipient, ClientCoreError>
|
||||
where
|
||||
T: config::NymConfig,
|
||||
T: nym_config::NymConfig,
|
||||
{
|
||||
fn load_identity_keys(
|
||||
pathfinder: &ClientKeyPathfinder,
|
||||
|
||||
@@ -16,7 +16,7 @@ url = "2.2"
|
||||
tokio = { version = "1.24.1", features = ["rt-multi-thread", "net", "signal", "macros"] } # async runtime
|
||||
|
||||
coconut-interface = { path = "../../common/coconut-interface" }
|
||||
config = { path = "../../common/config" }
|
||||
nym-config = { path = "../../common/config" }
|
||||
credentials = { path = "../../common/credentials" }
|
||||
credential-storage = { path = "../../common/credential-storage" }
|
||||
nym-crypto = { path = "../../common/crypto", features = ["rand", "asymmetric", "symmetric", "aes", "hashing"] }
|
||||
|
||||
@@ -8,10 +8,10 @@ mod recovery_storage;
|
||||
mod state;
|
||||
|
||||
use commands::*;
|
||||
use config::{DATA_DIR, DB_FILE_NAME};
|
||||
use error::Result;
|
||||
use log::*;
|
||||
use nym_bin_common::completions::fig_generate;
|
||||
use nym_config::{DATA_DIR, DB_FILE_NAME};
|
||||
use nym_network_defaults::{setup_env, NymNetworkDetails};
|
||||
use std::process::exit;
|
||||
use std::time::{Duration, SystemTime};
|
||||
|
||||
@@ -37,7 +37,7 @@ tokio-tungstenite = "0.14" # websocket
|
||||
nym-bin-common = { path = "../../common/bin-common" }
|
||||
client-core = { path = "../client-core", features = ["fs-surb-storage"] }
|
||||
coconut-interface = { path = "../../common/coconut-interface" }
|
||||
config = { path = "../../common/config" }
|
||||
nym-config = { path = "../../common/config" }
|
||||
credential-storage = { path = "../../common/credential-storage" }
|
||||
credentials = { path = "../../common/credentials" }
|
||||
nym-crypto = { path = "../../common/crypto" }
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
use crate::client::config::template::config_template;
|
||||
use client_core::config::ClientCoreConfigTrait;
|
||||
use config::defaults::DEFAULT_WEBSOCKET_LISTENING_PORT;
|
||||
use config::{NymConfig, OptionalSet};
|
||||
use nym_config::defaults::DEFAULT_WEBSOCKET_LISTENING_PORT;
|
||||
use nym_config::{NymConfig, OptionalSet};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt::Debug;
|
||||
use std::net::{IpAddr, Ipv4Addr};
|
||||
|
||||
@@ -7,7 +7,7 @@ use crate::{
|
||||
error::ClientError,
|
||||
};
|
||||
use clap::Args;
|
||||
use config::NymConfig;
|
||||
use nym_config::NymConfig;
|
||||
use nym_crypto::asymmetric::identity;
|
||||
use nym_sphinx::addressing::clients::Recipient;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
use crate::client::config::{BaseConfig, Config};
|
||||
use clap::CommandFactory;
|
||||
use clap::{Parser, Subcommand};
|
||||
use config::OptionalSet;
|
||||
use lazy_static::lazy_static;
|
||||
use nym_bin_common::build_information::BinaryBuildInformation;
|
||||
use nym_bin_common::completions::{fig_generate, ArgShell};
|
||||
use nym_config::OptionalSet;
|
||||
use std::error::Error;
|
||||
use std::net::IpAddr;
|
||||
|
||||
@@ -88,13 +88,13 @@ pub(crate) fn override_config(config: Config, args: OverrideConfig) -> Config {
|
||||
BaseConfig::with_custom_nym_apis,
|
||||
args.nym_apis,
|
||||
nym_network_defaults::var_names::NYM_API,
|
||||
config::parse_urls,
|
||||
nym_config::parse_urls,
|
||||
)
|
||||
.with_optional_custom_env_ext(
|
||||
BaseConfig::with_custom_nyxd,
|
||||
args.nyxd_urls,
|
||||
nym_network_defaults::var_names::NYXD,
|
||||
config::parse_urls,
|
||||
nym_config::parse_urls,
|
||||
)
|
||||
.with_optional_ext(
|
||||
BaseConfig::with_disabled_credentials,
|
||||
|
||||
@@ -11,9 +11,9 @@ use crate::{
|
||||
};
|
||||
|
||||
use clap::Args;
|
||||
use config::NymConfig;
|
||||
use log::*;
|
||||
use nym_bin_common::version_checker::is_minor_version_compatible;
|
||||
use nym_config::NymConfig;
|
||||
use nym_crypto::asymmetric::identity;
|
||||
|
||||
#[derive(Args, Clone)]
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
use crate::client::config::{Config, MISSING_VALUE};
|
||||
|
||||
use config::NymConfig;
|
||||
use nym_bin_common::version_checker::Version;
|
||||
use nym_config::NymConfig;
|
||||
|
||||
use clap::Args;
|
||||
use std::fmt::Display;
|
||||
|
||||
@@ -30,7 +30,7 @@ url = "2.2"
|
||||
nym-bin-common = { path = "../../common/bin-common" }
|
||||
client-core = { path = "../client-core", features = ["fs-surb-storage"] }
|
||||
coconut-interface = { path = "../../common/coconut-interface" }
|
||||
config = { path = "../../common/config" }
|
||||
nym-config = { path = "../../common/config" }
|
||||
credential-storage = { path = "../../common/credential-storage", optional = true }
|
||||
mobile-storage = { path = "../../common/mobile-storage", optional = true }
|
||||
credentials = { path = "../../common/credentials" }
|
||||
|
||||
@@ -5,8 +5,8 @@ use crate::client::config::template::config_template;
|
||||
pub use client_core::config::Config as BaseConfig;
|
||||
pub use client_core::config::MISSING_VALUE;
|
||||
use client_core::config::{ClientCoreConfigTrait, DebugConfig};
|
||||
use config::defaults::DEFAULT_SOCKS5_LISTENING_PORT;
|
||||
use config::{NymConfig, OptionalSet};
|
||||
use nym_config::defaults::DEFAULT_SOCKS5_LISTENING_PORT;
|
||||
use nym_config::{NymConfig, OptionalSet};
|
||||
use nym_sphinx::addressing::clients::Recipient;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use service_providers_common::interface::ProviderInterfaceVersion;
|
||||
|
||||
@@ -7,7 +7,7 @@ use crate::{
|
||||
error::Socks5ClientError,
|
||||
};
|
||||
use clap::Args;
|
||||
use config::NymConfig;
|
||||
use nym_config::NymConfig;
|
||||
use nym_crypto::asymmetric::identity;
|
||||
use nym_sphinx::addressing::clients::Recipient;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
use crate::client::config::{BaseConfig, Config};
|
||||
use clap::CommandFactory;
|
||||
use clap::{Parser, Subcommand};
|
||||
use config::OptionalSet;
|
||||
use lazy_static::lazy_static;
|
||||
use nym_bin_common::build_information::BinaryBuildInformation;
|
||||
use nym_bin_common::completions::{fig_generate, ArgShell};
|
||||
use nym_config::OptionalSet;
|
||||
use std::error::Error;
|
||||
|
||||
pub mod init;
|
||||
@@ -87,13 +87,13 @@ pub(crate) fn override_config(config: Config, args: OverrideConfig) -> Config {
|
||||
BaseConfig::with_custom_nym_apis,
|
||||
args.nym_apis,
|
||||
nym_network_defaults::var_names::NYM_API,
|
||||
config::parse_urls,
|
||||
nym_config::parse_urls,
|
||||
)
|
||||
.with_optional_custom_env_ext(
|
||||
BaseConfig::with_custom_nyxd,
|
||||
args.nyxd_urls,
|
||||
nym_network_defaults::var_names::NYXD,
|
||||
config::parse_urls,
|
||||
nym_config::parse_urls,
|
||||
)
|
||||
.with_optional_ext(
|
||||
BaseConfig::with_disabled_credentials,
|
||||
|
||||
@@ -8,9 +8,9 @@ use crate::{
|
||||
};
|
||||
|
||||
use clap::Args;
|
||||
use config::NymConfig;
|
||||
use log::*;
|
||||
use nym_bin_common::version_checker::is_minor_version_compatible;
|
||||
use nym_config::NymConfig;
|
||||
use nym_crypto::asymmetric::identity;
|
||||
use nym_sphinx::addressing::clients::Recipient;
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
use crate::client::config::{Config, MISSING_VALUE};
|
||||
|
||||
use config::NymConfig;
|
||||
use nym_bin_common::version_checker::Version;
|
||||
use nym_config::NymConfig;
|
||||
|
||||
use clap::Args;
|
||||
use std::{fmt::Display, process};
|
||||
|
||||
@@ -37,7 +37,7 @@ nym-api-requests = { path = "../../../nym-api/nym-api-requests" }
|
||||
# perhaps after https://github.com/cosmos/cosmos-rust/pull/97 is resolved (and tendermint-rs is updated)
|
||||
async-trait = { version = "0.1.51", optional = true }
|
||||
bip39 = { version = "1", features = ["rand"], optional = true }
|
||||
config = { path = "../../config", optional = true }
|
||||
nym-config = { path = "../../config", optional = true }
|
||||
cosmrs = { git = "https://github.com/neacsu/cosmos-rust", branch = "neacsu/feegrant_support", features = ["rpc", "bip32", "cosmwasm"], optional = true}
|
||||
cw3 = { version = "0.13.4", optional = true }
|
||||
cw4 = { version = "0.13.4", optional = true }
|
||||
@@ -46,7 +46,7 @@ flate2 = { version = "1.0.20", optional = true }
|
||||
sha2 = { version = "0.9.5", optional = true }
|
||||
itertools = { version = "0.10", optional = true }
|
||||
cosmwasm-std = { version = "1.0.0", optional = true }
|
||||
execute = { path = "../../execute" }
|
||||
nym-execute = { path = "../../execute" }
|
||||
|
||||
[dev-dependencies]
|
||||
ts-rs = "6.1.2"
|
||||
@@ -55,7 +55,7 @@ ts-rs = "6.1.2"
|
||||
nyxd-client = [
|
||||
"async-trait",
|
||||
"bip39",
|
||||
"config",
|
||||
"nym-config",
|
||||
"cosmrs",
|
||||
"cw3",
|
||||
"cw4",
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::nyxd::error::NyxdError;
|
||||
use config::defaults;
|
||||
use cosmrs::tx::Gas;
|
||||
use cosmrs::Coin;
|
||||
use cosmwasm_std::{Decimal, Fraction, Uint128};
|
||||
use nym_config::defaults;
|
||||
use std::ops::Mul;
|
||||
use std::str::FromStr;
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ use cosmrs::rpc::query::Query;
|
||||
use cosmrs::rpc::Error as TendermintRpcError;
|
||||
use cosmrs::rpc::HttpClientUrl;
|
||||
use cosmrs::tx::Msg;
|
||||
use execute::execute;
|
||||
use log::debug;
|
||||
use nym_execute::execute;
|
||||
use nym_mixnet_contract_common::MixId;
|
||||
use nym_network_defaults::{ChainDetails, NymNetworkDetails};
|
||||
use nym_vesting_contract_common::ExecuteMsg as VestingExecuteMsg;
|
||||
@@ -162,7 +162,7 @@ impl NyxdClient<SigningNyxdClient> {
|
||||
// maybe the wallet could be made into a generic, but for now, let's just have this one implementation
|
||||
pub fn connect_with_signer<U: Clone>(
|
||||
config: Config,
|
||||
network: config::defaults::NymNetworkDetails,
|
||||
network: nym_config::defaults::NymNetworkDetails,
|
||||
endpoint: U,
|
||||
signer: DirectSecp256k1HdWallet,
|
||||
gas_price: Option<GasPrice>,
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::nyxd::error::NyxdError;
|
||||
use config::defaults;
|
||||
use cosmrs::bip32::{DerivationPath, XPrv};
|
||||
use cosmrs::crypto::secp256k1::{Signature, SigningKey};
|
||||
use cosmrs::crypto::PublicKey;
|
||||
use cosmrs::tx::SignDoc;
|
||||
use cosmrs::{tx, AccountId};
|
||||
use nym_config::defaults;
|
||||
|
||||
/// Derivation information required to derive a keypair and an address from a mnemonic.
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "config"
|
||||
name = "nym-config"
|
||||
version = "0.1.0"
|
||||
authors = ["Jedrzej Stuczynski <andrew@nymtech.net>"]
|
||||
edition = "2021"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "execute"
|
||||
name = "nym-execute"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "nonexhaustive-delayqueue"
|
||||
name = "nym-nonexhaustive-delayqueue"
|
||||
version = "0.1.0"
|
||||
authors = ["Jędrzej Stuczyński <andrew@nymtech.net>"]
|
||||
edition = "2021"
|
||||
@@ -19,4 +19,4 @@ rev = "b9d1a54ad514c2f230a026afe0dde341e98cd7b6"
|
||||
version = "0.4.4"
|
||||
|
||||
[target."cfg(target_arch = \"wasm32\")".dependencies.futures-core]
|
||||
version = "0.3.0"
|
||||
version = "0.3.0"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
[package]
|
||||
name = "statistics-common"
|
||||
name = "nym-statistics-common"
|
||||
version = "1.0.1"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ validator-client = { path = "../../common/client-libs/validator-client", feature
|
||||
] }
|
||||
nym-mixnet-contract-common = { path = "../../common/cosmwasm-smart-contracts/mixnet-contract" }
|
||||
nym-vesting-contract-common = { path = "../../common/cosmwasm-smart-contracts/vesting-contract" }
|
||||
config = { path = "../../common/config" }
|
||||
nym-config = { path = "../../common/config" }
|
||||
coconut-interface = { path = "../../common/coconut-interface" }
|
||||
# Used for Type conversion, can be extracted but its a lot of work
|
||||
nym-vesting-contract = { path = "../../contracts/vesting" }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::currency::{CurrencyDenom, DecCoin};
|
||||
use config::defaults::DenomDetails;
|
||||
use nym_config::defaults::DenomDetails;
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::error::TypesError;
|
||||
use config::defaults::{DenomDetails, DenomDetailsOwned, NymNetworkDetails};
|
||||
use cosmwasm_std::Fraction;
|
||||
use cosmwasm_std::{Decimal, Uint128};
|
||||
use nym_config::defaults::{DenomDetails, DenomDetailsOwned, NymNetworkDetails};
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::cmp::Ordering;
|
||||
|
||||
@@ -24,7 +24,7 @@ crate-type = ["cdylib", "rlib"]
|
||||
[dependencies]
|
||||
mixnet-contract-common = { path = "../../common/cosmwasm-smart-contracts/mixnet-contract", package = "nym-mixnet-contract-common", version = "0.1.0" }
|
||||
vesting-contract-common = { path = "../../common/cosmwasm-smart-contracts/vesting-contract", package = "nym-vesting-contract-common", version = "0.1.0" }
|
||||
#config = { path = "../../common/config"}
|
||||
#nym-config = { path = "../../common/config"}
|
||||
|
||||
cosmwasm-std = "1.0.0"
|
||||
cosmwasm-storage = "1.0.0"
|
||||
|
||||
+2
-2
@@ -54,7 +54,7 @@ url = { version = "2.2", features = ["serde"] }
|
||||
# internal
|
||||
coconut-interface = { path = "../common/coconut-interface" }
|
||||
credentials = { path = "../common/credentials" }
|
||||
config = { path = "../common/config" }
|
||||
nym-config = { path = "../common/config" }
|
||||
nym-crypto = { path = "../common/crypto" }
|
||||
nym-bin-common = { path = "../common/bin-common" }
|
||||
gateway-requests = { path = "gateway-requests" }
|
||||
@@ -63,7 +63,7 @@ mixnode-common = { path = "../common/mixnode-common" }
|
||||
nym-network-defaults = { path = "../common/network-defaults" }
|
||||
nym-sphinx = { path = "../common/nymsphinx" }
|
||||
nym-pemstore = { path = "../common/pemstore" }
|
||||
statistics-common = { path = "../common/statistics" }
|
||||
nym-statistics-common = { path = "../common/statistics" }
|
||||
nym-api-requests = { path = "../nym-api/nym-api-requests" }
|
||||
nym-task = { path = "../common/task" }
|
||||
validator-client = { path = "../common/client-libs/validator-client", features = [
|
||||
|
||||
@@ -7,7 +7,7 @@ use crate::{
|
||||
OutputFormat,
|
||||
};
|
||||
use clap::Args;
|
||||
use config::NymConfig;
|
||||
use nym_config::NymConfig;
|
||||
use nym_crypto::asymmetric::{encryption, identity};
|
||||
use std::error::Error;
|
||||
use std::net::IpAddr;
|
||||
|
||||
@@ -5,9 +5,9 @@ use crate::error::GatewayError;
|
||||
use crate::{config::Config, Cli};
|
||||
use clap::CommandFactory;
|
||||
use clap::Subcommand;
|
||||
use config::OptionalSet;
|
||||
use nym_bin_common::completions::{fig_generate, ArgShell};
|
||||
use nym_bin_common::version_checker;
|
||||
use nym_config::OptionalSet;
|
||||
use nym_network_defaults::var_names::NYXD;
|
||||
use nym_network_defaults::var_names::{BECH32_PREFIX, NYM_API, STATISTICS_SERVICE_DOMAIN_ADDRESS};
|
||||
use std::error::Error;
|
||||
@@ -104,7 +104,7 @@ pub(crate) fn override_config(
|
||||
Config::with_custom_nym_apis,
|
||||
args.nym_apis,
|
||||
NYM_API,
|
||||
config::parse_urls,
|
||||
nym_config::parse_urls,
|
||||
)
|
||||
.with_optional(Config::with_enabled_statistics, args.enabled_statistics)
|
||||
.with_optional_env(
|
||||
@@ -123,7 +123,7 @@ pub(crate) fn override_config(
|
||||
Config::with_custom_validator_nyxd,
|
||||
args.nyxd_urls,
|
||||
NYXD,
|
||||
config::parse_urls,
|
||||
nym_config::parse_urls,
|
||||
)
|
||||
.with_optional(
|
||||
Config::with_only_coconut_credentials,
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
use crate::config::{Config, MISSING_VALUE};
|
||||
use clap::Args;
|
||||
use config::NymConfig;
|
||||
use nym_bin_common::version_checker::Version;
|
||||
use nym_config::NymConfig;
|
||||
use std::fmt::Display;
|
||||
use std::process;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::config::template::config_template;
|
||||
use config::defaults::{DEFAULT_CLIENT_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT};
|
||||
use config::NymConfig;
|
||||
use nym_config::defaults::{DEFAULT_CLIENT_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT};
|
||||
use nym_config::NymConfig;
|
||||
use nym_network_defaults::mainnet::{NYM_API, NYXD_URL, STATISTICS_SERVICE_DOMAIN_ADDRESS};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::net::IpAddr;
|
||||
|
||||
@@ -18,10 +18,10 @@ use log::*;
|
||||
use mixnet_client::forwarder::{MixForwardingSender, PacketForwarder};
|
||||
use nym_crypto::asymmetric::{encryption, identity};
|
||||
use nym_network_defaults::NymNetworkDetails;
|
||||
use nym_statistics_common::collector::StatisticsSender;
|
||||
use nym_task::{TaskClient, TaskManager};
|
||||
use rand::seq::SliceRandom;
|
||||
use rand::thread_rng;
|
||||
use statistics_common::collector::StatisticsSender;
|
||||
use std::error::Error;
|
||||
use std::net::SocketAddr;
|
||||
use std::process;
|
||||
|
||||
@@ -6,7 +6,7 @@ use sqlx::types::chrono::{DateTime, Utc};
|
||||
use std::time::Duration;
|
||||
use url::Url;
|
||||
|
||||
use statistics_common::{
|
||||
use nym_statistics_common::{
|
||||
api::build_and_send_statistics_request, collector::StatisticsCollector, error::StatsError,
|
||||
StatsData, StatsGatewayData, StatsMessage,
|
||||
};
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
use crate::commands::{override_config, OverrideConfig};
|
||||
use crate::config::Config;
|
||||
use crate::error::GatewayError;
|
||||
use config::NymConfig;
|
||||
use log::error;
|
||||
use nym_config::NymConfig;
|
||||
|
||||
pub(crate) fn build_config<O: Into<OverrideConfig>>(
|
||||
id: String,
|
||||
|
||||
+2
-2
@@ -40,11 +40,11 @@ url = { version = "2.2", features = ["serde"] }
|
||||
atty = "0.2"
|
||||
|
||||
## internal
|
||||
config = { path="../common/config" }
|
||||
nym-config = { path="../common/config" }
|
||||
nym-crypto = { path="../common/crypto" }
|
||||
mixnet-client = { path="../common/client-libs/mixnet-client" }
|
||||
mixnode-common = { path="../common/mixnode-common" }
|
||||
nonexhaustive-delayqueue = { path="../common/nonexhaustive-delayqueue" }
|
||||
nym-nonexhaustive-delayqueue = { path="../common/nonexhaustive-delayqueue" }
|
||||
nym-sphinx = { path="../common/nymsphinx" }
|
||||
nym-pemstore = { path = "../common/pemstore", version = "0.1.0" }
|
||||
nym-task = { path = "../common/task" }
|
||||
|
||||
@@ -5,7 +5,7 @@ use crate::config::Config;
|
||||
use crate::node::node_description::NodeDescription;
|
||||
use clap::Args;
|
||||
use colored::Colorize;
|
||||
use config::NymConfig;
|
||||
use nym_config::NymConfig;
|
||||
use std::io;
|
||||
use std::io::Write;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ use crate::node::MixNode;
|
||||
use crate::OutputFormat;
|
||||
use crate::{commands::override_config, config::persistence::pathfinder::MixNodePathfinder};
|
||||
use clap::Args;
|
||||
use config::NymConfig;
|
||||
use nym_config::NymConfig;
|
||||
use nym_crypto::asymmetric::{encryption, identity};
|
||||
use std::net::IpAddr;
|
||||
use validator_client::nyxd;
|
||||
|
||||
@@ -5,10 +5,10 @@ use crate::{config::Config, Cli};
|
||||
use clap::CommandFactory;
|
||||
use clap::Subcommand;
|
||||
use colored::Colorize;
|
||||
use config::defaults::var_names::{BECH32_PREFIX, NYM_API};
|
||||
use config::OptionalSet;
|
||||
use nym_bin_common::completions::{fig_generate, ArgShell};
|
||||
use nym_bin_common::version_checker;
|
||||
use nym_config::defaults::var_names::{BECH32_PREFIX, NYM_API};
|
||||
use nym_config::OptionalSet;
|
||||
use nym_crypto::bech32_address_validation;
|
||||
use std::net::IpAddr;
|
||||
use std::process;
|
||||
@@ -100,7 +100,7 @@ fn override_config(mut config: Config, args: OverrideConfig) -> Config {
|
||||
Config::with_custom_nym_apis,
|
||||
args.nym_apis,
|
||||
NYM_API,
|
||||
config::parse_urls,
|
||||
nym_config::parse_urls,
|
||||
)
|
||||
.with_optional(
|
||||
|cfg, wallet_address| {
|
||||
|
||||
@@ -5,7 +5,7 @@ use crate::config::Config;
|
||||
use crate::node::MixNode;
|
||||
use crate::OutputFormat;
|
||||
use clap::Args;
|
||||
use config::NymConfig;
|
||||
use nym_config::NymConfig;
|
||||
|
||||
#[derive(Args)]
|
||||
pub(crate) struct NodeDetails {
|
||||
|
||||
@@ -7,7 +7,7 @@ use crate::config::Config;
|
||||
use crate::node::MixNode;
|
||||
use crate::OutputFormat;
|
||||
use clap::Args;
|
||||
use config::NymConfig;
|
||||
use nym_config::NymConfig;
|
||||
use std::net::IpAddr;
|
||||
use validator_client::nyxd;
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ use crate::config::{persistence::pathfinder::MixNodePathfinder, Config};
|
||||
use crate::node::MixNode;
|
||||
use anyhow::{anyhow, Result};
|
||||
use clap::{ArgGroup, Args};
|
||||
use config::NymConfig;
|
||||
use log::error;
|
||||
use nym_config::NymConfig;
|
||||
use nym_crypto::asymmetric::identity;
|
||||
use validator_client::nyxd;
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
use crate::config::{missing_string_value, Config};
|
||||
use clap::Args;
|
||||
use config::NymConfig;
|
||||
use nym_bin_common::version_checker::Version;
|
||||
use nym_config::NymConfig;
|
||||
use std::fmt::Display;
|
||||
use std::process;
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use crate::config::template::config_template;
|
||||
use config::defaults::mainnet::NYM_API;
|
||||
use config::defaults::{
|
||||
use nym_config::defaults::mainnet::NYM_API;
|
||||
use nym_config::defaults::{
|
||||
DEFAULT_HTTP_API_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT, DEFAULT_VERLOC_LISTENING_PORT,
|
||||
};
|
||||
use config::NymConfig;
|
||||
use nym_config::NymConfig;
|
||||
use serde::{Deserialize, Deserializer, Serialize};
|
||||
use std::net::{IpAddr, SocketAddr};
|
||||
use std::path::PathBuf;
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
#[macro_use]
|
||||
extern crate rocket;
|
||||
|
||||
use ::config::defaults::setup_env;
|
||||
use ::nym_config::defaults::setup_env;
|
||||
use clap::{crate_name, crate_version, Parser, ValueEnum};
|
||||
use lazy_static::lazy_static;
|
||||
use nym_bin_common::logging::setup_logging;
|
||||
|
||||
@@ -19,10 +19,10 @@ use crate::node::node_statistics::SharedNodeStats;
|
||||
use crate::node::packet_delayforwarder::{DelayForwarder, PacketDelayForwardSender};
|
||||
use crate::OutputFormat;
|
||||
use colored::Colorize;
|
||||
use config::NymConfig;
|
||||
use log::{error, info, warn};
|
||||
use mixnode_common::verloc::{self, AtomicVerlocResult, VerlocMeasurer};
|
||||
use nym_bin_common::version_checker::parse_version;
|
||||
use nym_config::NymConfig;
|
||||
use nym_crypto::asymmetric::{encryption, identity};
|
||||
use nym_task::{TaskClient, TaskManager};
|
||||
use rand::seq::SliceRandom;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
use crate::node::node_statistics::UpdateSender;
|
||||
use futures::channel::mpsc;
|
||||
use futures::StreamExt;
|
||||
use nonexhaustive_delayqueue::{Expired, NonExhaustiveDelayQueue};
|
||||
use nym_nonexhaustive_delayqueue::{Expired, NonExhaustiveDelayQueue};
|
||||
use nym_sphinx::forwarding::packet::MixPacket;
|
||||
use std::io;
|
||||
use tokio::time::Instant;
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ schemars = { version = "0.8", features = ["preserve_order"] }
|
||||
coconut-bandwidth-contract-common = { path = "../common/cosmwasm-smart-contracts/coconut-bandwidth-contract" }
|
||||
coconut-dkg-common = { path = "../common/cosmwasm-smart-contracts/coconut-dkg" }
|
||||
coconut-interface = { path = "../common/coconut-interface" }
|
||||
config = { path = "../common/config" }
|
||||
nym-config = { path = "../common/config" }
|
||||
cosmwasm-std = "1.0.0"
|
||||
credential-storage = { path = "../common/credential-storage" }
|
||||
credentials = { path = "../common/credentials" }
|
||||
|
||||
@@ -95,7 +95,7 @@ pub async fn extract_encryption_key(
|
||||
mod test {
|
||||
use super::*;
|
||||
use crate::coconut::tests::tx_entry_fixture;
|
||||
use config::defaults::VOUCHER_INFO;
|
||||
use nym_config::defaults::VOUCHER_INFO;
|
||||
use nymcoconut::{prepare_blind_sign, BlindSignRequest, Parameters};
|
||||
use rand_07::rngs::OsRng;
|
||||
use std::str::FromStr;
|
||||
|
||||
@@ -15,7 +15,6 @@ use coconut_interface::KeyPair as CoconutKeyPair;
|
||||
use coconut_interface::{
|
||||
Attribute, BlindSignRequest, BlindedSignature, Parameters, VerificationKey,
|
||||
};
|
||||
use config::defaults::NYM_API_VERSION;
|
||||
use credentials::coconut::params::{
|
||||
NymApiCredentialEncryptionAlgorithm, NymApiCredentialHkdfAlgorithm,
|
||||
};
|
||||
@@ -24,6 +23,7 @@ use keypair::KeyPair;
|
||||
use nym_api_requests::coconut::{
|
||||
BlindSignRequestBody, BlindedSignatureResponse, VerifyCredentialBody, VerifyCredentialResponse,
|
||||
};
|
||||
use nym_config::defaults::NYM_API_VERSION;
|
||||
use nym_crypto::asymmetric::encryption;
|
||||
use nym_crypto::shared_key::new_ephemeral_shared_key;
|
||||
use nym_crypto::symmetric::stream_cipher;
|
||||
|
||||
@@ -11,7 +11,6 @@ use coconut_bandwidth_contract_common::spend_credential::{
|
||||
SpendCredential, SpendCredentialResponse,
|
||||
};
|
||||
use coconut_interface::{hash_to_scalar, Credential, VerificationKey};
|
||||
use config::defaults::VOUCHER_INFO;
|
||||
use cosmwasm_std::{to_binary, Addr, CosmosMsg, Decimal, WasmMsg};
|
||||
use credentials::coconut::bandwidth::BandwidthVoucher;
|
||||
use credentials::coconut::params::{
|
||||
@@ -20,6 +19,7 @@ use credentials::coconut::params::{
|
||||
use nym_api_requests::coconut::{
|
||||
BlindSignRequestBody, BlindedSignatureResponse, VerifyCredentialBody, VerifyCredentialResponse,
|
||||
};
|
||||
use nym_config::defaults::VOUCHER_INFO;
|
||||
use nym_crypto::shared_key::recompute_shared_key;
|
||||
use nym_crypto::symmetric::stream_cipher;
|
||||
use nymcoconut::tests::helpers::theta_from_keys_and_attributes;
|
||||
|
||||
+2
-2
@@ -11,15 +11,15 @@ use crate::support::cli::CliArgs;
|
||||
use crate::support::config::Config;
|
||||
use crate::support::storage;
|
||||
use crate::support::storage::NymApiStorage;
|
||||
use ::config::defaults::setup_env;
|
||||
use ::nym_config::defaults::setup_env;
|
||||
use anyhow::Result;
|
||||
use circulating_supply_api::cache::CirculatingSupplyCache;
|
||||
use clap::Parser;
|
||||
use coconut::dkg::controller::DkgController;
|
||||
use config::NymConfig;
|
||||
use log::info;
|
||||
use node_status_api::NodeStatusCache;
|
||||
use nym_bin_common::logging::setup_logging;
|
||||
use nym_config::NymConfig;
|
||||
use nym_contract_cache::cache::NymContractCache;
|
||||
use nym_task::TaskManager;
|
||||
use rand::rngs::OsRng;
|
||||
|
||||
@@ -6,7 +6,6 @@ use crate::network_monitor::monitor::gateway_clients_cache::{
|
||||
};
|
||||
use crate::network_monitor::monitor::gateways_pinger::GatewayPinger;
|
||||
use crate::network_monitor::monitor::receiver::{GatewayClientUpdate, GatewayClientUpdateSender};
|
||||
use config::defaults::REMAINING_BANDWIDTH_THRESHOLD;
|
||||
use credential_storage::PersistentStorage;
|
||||
use futures::channel::mpsc;
|
||||
use futures::stream::{self, FuturesUnordered, StreamExt};
|
||||
@@ -15,6 +14,7 @@ use futures::{Future, Stream};
|
||||
use gateway_client::error::GatewayClientError;
|
||||
use gateway_client::{AcknowledgementReceiver, GatewayClient, MixnetMessageReceiver};
|
||||
use log::{debug, info, trace, warn};
|
||||
use nym_config::defaults::REMAINING_BANDWIDTH_THRESHOLD;
|
||||
use nym_crypto::asymmetric::identity::{self, PUBLIC_KEY_LENGTH};
|
||||
use nym_sphinx::forwarding::packet::MixPacket;
|
||||
use nym_task::TaskClient;
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use super::config::Config;
|
||||
use ::config::defaults::var_names::{MIXNET_CONTRACT_ADDRESS, VESTING_CONTRACT_ADDRESS};
|
||||
use ::nym_config::defaults::var_names::{MIXNET_CONTRACT_ADDRESS, VESTING_CONTRACT_ADDRESS};
|
||||
use anyhow::Result;
|
||||
use clap::Parser;
|
||||
use config::{NymConfig, OptionalSet};
|
||||
use lazy_static::lazy_static;
|
||||
use nym_bin_common::build_information::BinaryBuildInformation;
|
||||
use nym_config::{NymConfig, OptionalSet};
|
||||
use std::fs;
|
||||
use validator_client::nyxd;
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use self::template::config_template;
|
||||
use config::defaults::mainnet::{MIXNET_CONTRACT_ADDRESS, VESTING_CONTRACT_ADDRESS};
|
||||
use config::defaults::DEFAULT_NYM_API_PORT;
|
||||
use config::NymConfig;
|
||||
use nym_config::defaults::mainnet::{MIXNET_CONTRACT_ADDRESS, VESTING_CONTRACT_ADDRESS};
|
||||
use nym_config::defaults::DEFAULT_NYM_API_PORT;
|
||||
use nym_config::NymConfig;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::path::PathBuf;
|
||||
use std::time::Duration;
|
||||
|
||||
@@ -13,9 +13,9 @@ use coconut_dkg_common::{
|
||||
types::{EncodedBTEPublicKeyWithProof, Epoch, EpochId},
|
||||
verification_key::{ContractVKShare, VerificationKeyShare},
|
||||
};
|
||||
use config::defaults::{ChainDetails, NymNetworkDetails, DEFAULT_NYM_API_PORT};
|
||||
use cw3::ProposalResponse;
|
||||
use cw4::MemberResponse;
|
||||
use nym_config::defaults::{ChainDetails, NymNetworkDetails, DEFAULT_NYM_API_PORT};
|
||||
use nym_contracts_common::dealings::ContractSafeBytes;
|
||||
use nym_mixnet_contract_common::families::{Family, FamilyHead};
|
||||
use nym_mixnet_contract_common::mixnode::MixNodeDetails;
|
||||
|
||||
@@ -47,7 +47,7 @@ yaml-rust = "0.4"
|
||||
client-core = { path = "../../../clients/client-core" }
|
||||
nym-api-requests = { path = "../../../nym-api/nym-api-requests" }
|
||||
nym-contracts-common = { path = "../../../common/cosmwasm-smart-contracts/contracts-common"}
|
||||
config-common = { path = "../../../common/config", package = "config" }
|
||||
nym-config-common = { path = "../../../common/config", package = "nym-config" }
|
||||
nym-crypto = { path = "../../../common/crypto" }
|
||||
nym-bin-common = { path = "../../../common/bin-common"}
|
||||
nym-socks5-client = { path = "../../../clients/socks5" }
|
||||
|
||||
@@ -3,7 +3,7 @@ use crate::{
|
||||
state::State,
|
||||
};
|
||||
use client_core::config::Config as BaseConfig;
|
||||
use config_common::NymConfig;
|
||||
use nym_config_common::NymConfig;
|
||||
use nym_crypto::asymmetric::identity;
|
||||
use nym_socks5::client::config::Config as Socks5Config;
|
||||
use std::path::PathBuf;
|
||||
@@ -124,10 +124,10 @@ pub async fn init_socks5_config(provider_address: String, chosen_gateway_id: Str
|
||||
log::trace!("Creating config for id: {}", id);
|
||||
let mut config = Config::new(id.as_str(), &provider_address);
|
||||
|
||||
if let Ok(raw_validators) = std::env::var(config_common::defaults::var_names::NYM_API) {
|
||||
if let Ok(raw_validators) = std::env::var(nym_config_common::defaults::var_names::NYM_API) {
|
||||
config
|
||||
.get_base_mut()
|
||||
.set_custom_nym_apis(config_common::parse_urls(&raw_validators));
|
||||
.set_custom_nym_apis(nym_config_common::parse_urls(&raw_validators));
|
||||
}
|
||||
|
||||
let chosen_gateway_id = identity::PublicKey::from_base58_string(chosen_gateway_id)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use config_common::defaults::setup_env;
|
||||
use nym_config_common::defaults::setup_env;
|
||||
use tauri::Manager;
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use ::config_common::NymConfig;
|
||||
use ::nym_config_common::NymConfig;
|
||||
use client_core::error::ClientCoreStatusMessage;
|
||||
use futures::SinkExt;
|
||||
use tap::TapFallible;
|
||||
|
||||
@@ -8,7 +8,7 @@ use std::sync::Arc;
|
||||
use tap::TapFallible;
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
use config_common::NymConfig;
|
||||
use nym_config_common::NymConfig;
|
||||
use nym_socks5::client::NymClient as Socks5NymClient;
|
||||
use nym_socks5::client::{config::Config as Socks5Config, Socks5ControlMessageSender};
|
||||
|
||||
|
||||
Generated
+39
-39
@@ -615,7 +615,6 @@ name = "client-core"
|
||||
version = "1.1.10"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"config",
|
||||
"dashmap",
|
||||
"dirs",
|
||||
"futures",
|
||||
@@ -624,8 +623,9 @@ dependencies = [
|
||||
"gloo-timers",
|
||||
"humantime-serde",
|
||||
"log",
|
||||
"nonexhaustive-delayqueue",
|
||||
"nym-config",
|
||||
"nym-crypto",
|
||||
"nym-nonexhaustive-delayqueue",
|
||||
"nym-pemstore",
|
||||
"nym-sphinx",
|
||||
"nym-task",
|
||||
@@ -768,19 +768,6 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "config"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"handlebars",
|
||||
"log",
|
||||
"nym-network-defaults",
|
||||
"serde",
|
||||
"toml",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "const-oid"
|
||||
version = "0.7.1"
|
||||
@@ -1648,14 +1635,6 @@ version = "2.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
|
||||
|
||||
[[package]]
|
||||
name = "execute"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "eyre"
|
||||
version = "0.6.8"
|
||||
@@ -3374,18 +3353,6 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nonexhaustive-delayqueue"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"slab",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"tokio-util",
|
||||
"wasm-timer",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "notify-rust"
|
||||
version = "4.7.1"
|
||||
@@ -3508,6 +3475,19 @@ dependencies = [
|
||||
"vergen 7.5.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-config"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"handlebars",
|
||||
"log",
|
||||
"nym-network-defaults",
|
||||
"serde",
|
||||
"toml",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-connect"
|
||||
version = "1.1.9"
|
||||
@@ -3516,7 +3496,6 @@ dependencies = [
|
||||
"bip39",
|
||||
"chrono",
|
||||
"client-core",
|
||||
"config",
|
||||
"dirs",
|
||||
"eyre",
|
||||
"fern",
|
||||
@@ -3526,6 +3505,7 @@ dependencies = [
|
||||
"log",
|
||||
"nym-api-requests",
|
||||
"nym-bin-common",
|
||||
"nym-config",
|
||||
"nym-contracts-common",
|
||||
"nym-crypto",
|
||||
"nym-socks5-client",
|
||||
@@ -3582,6 +3562,14 @@ dependencies = [
|
||||
"x25519-dalek",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-execute"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-mixnet-contract-common"
|
||||
version = "0.1.0"
|
||||
@@ -3612,6 +3600,18 @@ dependencies = [
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-nonexhaustive-delayqueue"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"slab",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"tokio-util",
|
||||
"wasm-timer",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-pemstore"
|
||||
version = "0.1.0"
|
||||
@@ -3626,7 +3626,6 @@ dependencies = [
|
||||
"clap",
|
||||
"client-core",
|
||||
"coconut-interface",
|
||||
"config",
|
||||
"credentials",
|
||||
"dirs",
|
||||
"futures",
|
||||
@@ -3636,6 +3635,7 @@ dependencies = [
|
||||
"log",
|
||||
"mobile-storage",
|
||||
"nym-bin-common",
|
||||
"nym-config",
|
||||
"nym-crypto",
|
||||
"nym-network-defaults",
|
||||
"nym-pemstore",
|
||||
@@ -6768,12 +6768,10 @@ dependencies = [
|
||||
"coconut-dkg-common",
|
||||
"coconut-interface",
|
||||
"colored 2.0.0",
|
||||
"config",
|
||||
"cosmrs",
|
||||
"cosmwasm-std",
|
||||
"cw3",
|
||||
"cw4",
|
||||
"execute",
|
||||
"flate2",
|
||||
"futures",
|
||||
"group-contract-common",
|
||||
@@ -6781,7 +6779,9 @@ dependencies = [
|
||||
"log",
|
||||
"multisig-contract-common",
|
||||
"nym-api-requests",
|
||||
"nym-config",
|
||||
"nym-contracts-common",
|
||||
"nym-execute",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-network-defaults",
|
||||
"nym-vesting-contract",
|
||||
|
||||
@@ -49,7 +49,7 @@ yaml-rust = "0.4"
|
||||
client-core = { path = "../../../clients/client-core" }
|
||||
nym-api-requests = { path = "../../../nym-api/nym-api-requests" }
|
||||
nym-contracts-common = { path = "../../../common/cosmwasm-smart-contracts/contracts-common"}
|
||||
config-common = { path = "../../../common/config", package = "config" }
|
||||
nym-config-common = { path = "../../../common/config", package = "nym-config" }
|
||||
nym-crypto = { path = "../../../common/crypto" }
|
||||
nym-bin-common = { path = "../../../common/bin-common"}
|
||||
nym-socks5-client = { path = "../../../clients/socks5", features = ["mobile"], default-features = false }
|
||||
|
||||
@@ -3,7 +3,7 @@ use crate::{
|
||||
state::State,
|
||||
};
|
||||
use client_core::{client::key_manager::KeyManager, config::Config as BaseConfig};
|
||||
use config_common::NymConfig;
|
||||
use nym_config_common::NymConfig;
|
||||
use nym_crypto::asymmetric::identity;
|
||||
use nym_socks5::client::config::Config as Socks5Config;
|
||||
use std::path::PathBuf;
|
||||
@@ -100,10 +100,10 @@ pub async fn init_socks5_config(
|
||||
log::trace!("Initialising client...");
|
||||
let mut config = Config::new(SOCKS5_CONFIG_ID, &provider_address);
|
||||
|
||||
if let Ok(raw_validators) = std::env::var(config_common::defaults::var_names::NYM_API) {
|
||||
if let Ok(raw_validators) = std::env::var(nym_config_common::defaults::var_names::NYM_API) {
|
||||
config
|
||||
.get_base_mut()
|
||||
.set_custom_nym_apis(config_common::parse_urls(&raw_validators));
|
||||
.set_custom_nym_apis(nym_config_common::parse_urls(&raw_validators));
|
||||
}
|
||||
|
||||
let nym_api_endpoints = config.get_base().get_nym_api_endpoints();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use config_common::defaults::setup_env;
|
||||
use nym_config_common::defaults::setup_env;
|
||||
use std::sync::Arc;
|
||||
use tauri::{App, Manager};
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use ::config_common::NymConfig;
|
||||
use ::nym_config_common::NymConfig;
|
||||
use client_core::client::key_manager::KeyManager;
|
||||
use client_core::error::ClientCoreStatusMessage;
|
||||
use futures::SinkExt;
|
||||
|
||||
@@ -9,7 +9,7 @@ use std::sync::Arc;
|
||||
use tap::TapFallible;
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
use config_common::NymConfig;
|
||||
use nym_config_common::NymConfig;
|
||||
use nym_socks5::client::NymClient as Socks5NymClient;
|
||||
use nym_socks5::client::{config::Config as Socks5Config, Socks5ControlMessageSender};
|
||||
|
||||
|
||||
Generated
+26
-26
@@ -679,19 +679,6 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "config"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"handlebars",
|
||||
"log",
|
||||
"nym-network-defaults",
|
||||
"serde",
|
||||
"toml",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "const-oid"
|
||||
version = "0.7.1"
|
||||
@@ -1423,14 +1410,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "execute"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "eyre"
|
||||
version = "0.6.8"
|
||||
@@ -2939,6 +2918,19 @@ dependencies = [
|
||||
"vergen 7.5.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-config"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"handlebars",
|
||||
"log",
|
||||
"nym-network-defaults",
|
||||
"serde",
|
||||
"toml",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-contracts-common"
|
||||
version = "0.1.0"
|
||||
@@ -2950,6 +2942,14 @@ dependencies = [
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-execute"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nym-mixnet-contract-common"
|
||||
version = "0.1.0"
|
||||
@@ -2993,12 +2993,12 @@ name = "nym-types"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"coconut-interface",
|
||||
"config",
|
||||
"cosmrs",
|
||||
"cosmwasm-std",
|
||||
"eyre",
|
||||
"itertools",
|
||||
"log",
|
||||
"nym-config",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-vesting-contract",
|
||||
"nym-vesting-contract-common",
|
||||
@@ -3059,10 +3059,10 @@ dependencies = [
|
||||
name = "nym-wallet-types"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"config",
|
||||
"cosmrs",
|
||||
"cosmwasm-std",
|
||||
"hex-literal",
|
||||
"nym-config",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-network-defaults",
|
||||
"nym-types",
|
||||
@@ -3087,7 +3087,6 @@ dependencies = [
|
||||
"chrono",
|
||||
"coconut-interface",
|
||||
"colored 2.0.0",
|
||||
"config",
|
||||
"cosmrs",
|
||||
"cosmwasm-std",
|
||||
"dirs",
|
||||
@@ -3098,6 +3097,7 @@ dependencies = [
|
||||
"itertools",
|
||||
"k256",
|
||||
"log",
|
||||
"nym-config",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-types",
|
||||
"nym-vesting-contract",
|
||||
@@ -5564,12 +5564,10 @@ dependencies = [
|
||||
"coconut-dkg-common",
|
||||
"coconut-interface",
|
||||
"colored 2.0.0",
|
||||
"config",
|
||||
"cosmrs",
|
||||
"cosmwasm-std",
|
||||
"cw3",
|
||||
"cw4",
|
||||
"execute",
|
||||
"flate2",
|
||||
"futures",
|
||||
"group-contract-common",
|
||||
@@ -5577,7 +5575,9 @@ dependencies = [
|
||||
"log",
|
||||
"multisig-contract-common",
|
||||
"nym-api-requests",
|
||||
"nym-config",
|
||||
"nym-contracts-common",
|
||||
"nym-execute",
|
||||
"nym-mixnet-contract-common",
|
||||
"nym-network-defaults",
|
||||
"nym-vesting-contract",
|
||||
|
||||
@@ -14,7 +14,7 @@ ts-rs = "6.1.2"
|
||||
cosmwasm-std = "1.0.0-beta8"
|
||||
cosmrs = { git = "https://github.com/neacsu/cosmos-rust", branch = "neacsu/feegrant_support" }
|
||||
|
||||
config = { path = "../../common/config" }
|
||||
nym-config = { path = "../../common/config" }
|
||||
nym-network-defaults = { path = "../../common/network-defaults" }
|
||||
nym-mixnet-contract-common = { path = "../../common/cosmwasm-smart-contracts/mixnet-contract" }
|
||||
validator-client = { path = "../../common/client-libs/validator-client", features = [
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use config::defaults::{mainnet, DenomDetails, NymNetworkDetails};
|
||||
use nym_config::defaults::{mainnet, DenomDetails, NymNetworkDetails};
|
||||
use nym_types::{currency::DecCoin, error::TypesError};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{fmt, ops::Not, str::FromStr};
|
||||
|
||||
@@ -59,7 +59,7 @@ validator-client = { path = "../../common/client-libs/validator-client", feature
|
||||
] }
|
||||
nym-mixnet-contract-common = { path = "../../common/cosmwasm-smart-contracts/mixnet-contract" }
|
||||
nym-vesting-contract-common = { path = "../../common/cosmwasm-smart-contracts/vesting-contract" }
|
||||
config = { path = "../../common/config" }
|
||||
nym-config = { path = "../../common/config" }
|
||||
coconut-interface = { path = "../../common/coconut-interface" }
|
||||
# Used for Type conversion, can be extracted but its a lot of work
|
||||
nym-vesting-contract = { path = "../../contracts/vesting" }
|
||||
|
||||
@@ -13,7 +13,7 @@ use strum::IntoEnumIterator;
|
||||
use url::Url;
|
||||
use validator_client::nyxd::AccountId as CosmosAccountId;
|
||||
|
||||
use config::defaults::{DenomDetailsOwned, NymNetworkDetails, ValidatorDetails};
|
||||
use nym_config::defaults::{DenomDetailsOwned, NymNetworkDetails, ValidatorDetails};
|
||||
use nym_wallet_types::network::Network as WalletNetwork;
|
||||
use nym_wallet_types::network_config;
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ use crate::network_config;
|
||||
use crate::state::{WalletAccountIds, WalletState};
|
||||
use crate::wallet_storage::{self, DEFAULT_LOGIN_ID};
|
||||
use bip39::{Language, Mnemonic};
|
||||
use config::defaults::{NymNetworkDetails, COSMOS_DERIVATION_PATH};
|
||||
use cosmrs::bip32::DerivationPath;
|
||||
use itertools::Itertools;
|
||||
use nym_config::defaults::{NymNetworkDetails, COSMOS_DERIVATION_PATH};
|
||||
use nym_types::account::{Account, AccountEntry, Balance};
|
||||
use nym_wallet_types::network::Network as WalletNetwork;
|
||||
use rand::seq::SliceRandom;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::config;
|
||||
use crate::error::BackendError;
|
||||
use crate::simulate::SimulateResult;
|
||||
use ::config::defaults::NymNetworkDetails;
|
||||
use ::nym_config::defaults::NymNetworkDetails;
|
||||
use cosmwasm_std::Decimal;
|
||||
use itertools::Itertools;
|
||||
use log::warn;
|
||||
|
||||
@@ -392,7 +392,7 @@ mod tests {
|
||||
use crate::wallet_storage::account_data::{MnemonicAccount, WalletAccount};
|
||||
|
||||
use super::*;
|
||||
use config::defaults::COSMOS_DERIVATION_PATH;
|
||||
use nym_config::defaults::COSMOS_DERIVATION_PATH;
|
||||
use std::str::FromStr;
|
||||
use tempfile::tempdir;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ url = { workspace = true }
|
||||
|
||||
# internal
|
||||
client-core = { path = "../../clients/client-core" }
|
||||
config = { path = "../../common/config" }
|
||||
nym-config = { path = "../../common/config" }
|
||||
nym-crypto = { path = "../../common/crypto" }
|
||||
nym-bin-common = { path = "../../common/bin-common"}
|
||||
nym-network-defaults = { path = "../../common/network-defaults" }
|
||||
@@ -42,6 +42,6 @@ ordered-buffer = {path = "../../common/socks5/ordered-buffer"}
|
||||
proxy-helpers = { path = "../../common/socks5/proxy-helpers" }
|
||||
service-providers-common = { path = "../common" }
|
||||
socks5-requests = { path = "../../common/socks5/requests" }
|
||||
statistics-common = { path = "../../common/statistics" }
|
||||
nym-statistics-common = { path = "../../common/statistics" }
|
||||
nym-task = { path = "../../common/task" }
|
||||
websocket-requests = { path = "../../clients/native/websocket-requests" }
|
||||
|
||||
@@ -7,7 +7,7 @@ use crate::{
|
||||
error::NetworkRequesterError,
|
||||
};
|
||||
use clap::Args;
|
||||
use config::NymConfig;
|
||||
use nym_config::NymConfig;
|
||||
use nym_crypto::asymmetric::identity;
|
||||
use nym_sphinx::addressing::clients::Recipient;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -68,13 +68,13 @@ pub(crate) fn override_config(config: Config, args: OverrideConfig) -> Config {
|
||||
BaseConfig::with_custom_nym_apis,
|
||||
args.nym_apis,
|
||||
nym_network_defaults::var_names::NYM_API,
|
||||
config::parse_urls,
|
||||
nym_config::parse_urls,
|
||||
)
|
||||
.with_optional_custom_env_ext(
|
||||
BaseConfig::with_custom_nyxd,
|
||||
args.nyxd_urls,
|
||||
nym_network_defaults::var_names::NYXD,
|
||||
config::parse_urls,
|
||||
nym_config::parse_urls,
|
||||
)
|
||||
.with_optional_ext(
|
||||
BaseConfig::with_disabled_credentials,
|
||||
|
||||
@@ -7,8 +7,8 @@ use crate::{
|
||||
error::NetworkRequesterError,
|
||||
};
|
||||
use clap::Args;
|
||||
use config::NymConfig;
|
||||
use nym_bin_common::version_checker;
|
||||
use nym_config::NymConfig;
|
||||
use nym_sphinx::addressing::clients::Recipient;
|
||||
|
||||
const ENABLE_STATISTICS: &str = "enable-statistics";
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
use crate::config::template::config_template;
|
||||
use client_core::config::ClientCoreConfigTrait;
|
||||
use config::{NymConfig, OptionalSet};
|
||||
use nym_config::{NymConfig, OptionalSet};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt::Debug;
|
||||
use std::path::PathBuf;
|
||||
|
||||
@@ -14,6 +14,7 @@ use log::warn;
|
||||
use nym_bin_common::build_information::BinaryBuildInformation;
|
||||
use nym_sphinx::addressing::clients::Recipient;
|
||||
use nym_sphinx::anonymous_replies::requests::AnonymousSenderTag;
|
||||
use nym_statistics_common::collector::StatisticsSender;
|
||||
use nym_task::connections::LaneQueueLengths;
|
||||
use nym_task::{TaskClient, TaskManager};
|
||||
use proxy_helpers::connection_controller::{Controller, ControllerCommand, ControllerSender};
|
||||
@@ -26,7 +27,6 @@ use socks5_requests::{
|
||||
ConnectRequest, ConnectionId, NetworkData, SendRequest, Socks5ProtocolVersion,
|
||||
Socks5ProviderRequest, Socks5Request, Socks5RequestContent, Socks5Response,
|
||||
};
|
||||
use statistics_common::collector::StatisticsSender;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
||||
|
||||
@@ -7,6 +7,14 @@ use crate::reply::MixnetMessage;
|
||||
use async_trait::async_trait;
|
||||
use log::*;
|
||||
use nym_sphinx::addressing::clients::Recipient;
|
||||
use nym_statistics_common::api::{
|
||||
build_statistics_request_bytes, DEFAULT_STATISTICS_SERVICE_ADDRESS,
|
||||
DEFAULT_STATISTICS_SERVICE_PORT,
|
||||
};
|
||||
use nym_statistics_common::{
|
||||
collector::StatisticsCollector, error::StatsError as CommonStatsError, StatsMessage,
|
||||
StatsServiceData,
|
||||
};
|
||||
use ordered_buffer::OrderedMessageSender;
|
||||
use proxy_helpers::proxy_runner::MixProxySender;
|
||||
use rand::RngCore;
|
||||
@@ -14,14 +22,6 @@ use serde::Deserialize;
|
||||
use service_providers_common::interface::RequestVersion;
|
||||
use socks5_requests::{ConnectionId, RemoteAddress, Socks5Request, Socks5RequestContent};
|
||||
use sqlx::types::chrono::{DateTime, Utc};
|
||||
use statistics_common::api::{
|
||||
build_statistics_request_bytes, DEFAULT_STATISTICS_SERVICE_ADDRESS,
|
||||
DEFAULT_STATISTICS_SERVICE_PORT,
|
||||
};
|
||||
use statistics_common::{
|
||||
collector::StatisticsCollector, error::StatsError as CommonStatsError, StatsMessage,
|
||||
StatsServiceData,
|
||||
};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
@@ -147,7 +147,7 @@ impl StatisticsCollector for ServiceStatisticsCollector {
|
||||
.get(&requested_service)
|
||||
.copied()
|
||||
.unwrap_or(0);
|
||||
statistics_common::StatsData::Service(StatsServiceData::new(
|
||||
nym_statistics_common::StatsData::Service(StatsServiceData::new(
|
||||
requested_service,
|
||||
request_bytes,
|
||||
response_bytes,
|
||||
|
||||
@@ -12,5 +12,5 @@ pub enum StatsError {
|
||||
InvalidClientAddress,
|
||||
|
||||
#[error("Common statistics error {0}")]
|
||||
CommonError(#[from] statistics_common::error::StatsError),
|
||||
CommonError(#[from] nym_statistics_common::error::StatsError),
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ sqlx = { version = "0.5", features = ["runtime-tokio-rustls", "sqlite", "macros"
|
||||
thiserror = "1"
|
||||
tokio = { version = "1.4", features = [ "net", "rt-multi-thread", "macros", "time" ] }
|
||||
nym-bin-common = { path = "../../common/bin-common"}
|
||||
statistics-common = { path = "../../common/statistics" }
|
||||
nym-statistics-common = { path = "../../common/statistics" }
|
||||
|
||||
[build-dependencies]
|
||||
sqlx = { version = "0.5", features = ["runtime-tokio-rustls", "sqlite", "macros", "migrate"] }
|
||||
|
||||
@@ -8,7 +8,7 @@ use crate::storage::NetworkStatisticsStorage;
|
||||
use error::Result;
|
||||
use routes::{post_all_statistics, post_statistic};
|
||||
|
||||
use statistics_common::api::STATISTICS_SERVICE_VERSION;
|
||||
use nym_statistics_common::api::STATISTICS_SERVICE_VERSION;
|
||||
|
||||
mod error;
|
||||
mod routes;
|
||||
|
||||
@@ -5,7 +5,7 @@ use rocket::serde::json::Json;
|
||||
use rocket::State;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use statistics_common::StatsMessage;
|
||||
use nym_statistics_common::StatsMessage;
|
||||
|
||||
use crate::api::error::Result;
|
||||
use crate::storage::NetworkStatisticsStorage;
|
||||
|
||||
@@ -6,7 +6,7 @@ use sqlx::types::chrono::{DateTime, Utc};
|
||||
use sqlx::ConnectOptions;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use statistics_common::StatsMessage;
|
||||
use nym_statistics_common::StatsMessage;
|
||||
|
||||
use crate::storage::error::NetworkStatisticsStorageError;
|
||||
use crate::storage::manager::StorageManager;
|
||||
@@ -58,7 +58,7 @@ impl NetworkStatisticsStorage {
|
||||
.into();
|
||||
for stats_data in msg.stats_data {
|
||||
match stats_data {
|
||||
statistics_common::StatsData::Service(service_data) => {
|
||||
nym_statistics_common::StatsData::Service(service_data) => {
|
||||
self.manager
|
||||
.insert_service_statistics(
|
||||
service_data.requested_service.clone(),
|
||||
@@ -69,7 +69,7 @@ impl NetworkStatisticsStorage {
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
statistics_common::StatsData::Gateway(gateway_data) => {
|
||||
nym_statistics_common::StatsData::Gateway(gateway_data) => {
|
||||
self.manager
|
||||
.insert_gateway_statistics(
|
||||
gateway_data.gateway_id,
|
||||
|
||||
Reference in New Issue
Block a user