Compare commits

..

33 Commits

Author SHA1 Message Date
mfahampshire 69fc35653e Merge branch 'feature/coco-demos' of github.com:nymtech/nym into feature/coco-demos 2023-08-02 16:18:35 +02:00
mfahampshire c7fac9cc05 reorganised quickstart section with web demos 2023-08-02 16:17:29 +02:00
Tommy Verrall 20a8dfe2b6 fix config 2023-08-02 16:17:29 +02:00
Tommy Verrall 3333b21f1b linting and removing unused imports 2023-08-02 16:17:29 +02:00
Tommy Verrall e2b27a998b remove console 2023-08-02 16:17:29 +02:00
Tommy Verrall a8028c5f09 fix api tests for no blacklisted nodes 2023-08-02 16:17:29 +02:00
pierre 8ed4d8e7c9 build(nc-android): disable sentry upload proguard mapping files 2023-08-02 16:17:29 +02:00
dependabot[bot] c69641d8b0 Bump semver from 5.7.1 to 5.7.2 in /nym-wallet/webdriver
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 16:17:29 +02:00
Fouad a901dac0ae Type documentation for NymSDK (#3701)
* set up development process for docs

* set up development process for docs

* Add local installs for Typedoc on gitignore

* Add Typedoc comments on types.ts file

* add typedoc config file

* update types and add annotations

* Add updates on types file

* add examples + manage sort order for doc items

* update client methods with examples

* add description of NymMixnetClientOptions

* add description of NymMixnetClientOptions

* fix linting

---------

Co-authored-by: Lorexia <alexia.lorenza.martinel@protonmail.com>
2023-08-02 16:17:29 +02:00
pierre 8a2ed9496d build(nc-android): moving build config to kotlin 2023-08-02 16:17:29 +02:00
Bogdan-Ștefan Neacşu 6fc6771b97 Fix develop after bad automerge (#3712) 2023-08-02 16:17:29 +02:00
Jędrzej Stuczyński dbbd60c9e9 Feature/simplify cli parsing (#3699)
* added a global flag to disable the printed out banner inside tty

* added a 'build-info' command to our binaries

* added binary name to BinaryBuildInformation

* clippy
2023-08-02 16:17:29 +02:00
Bogdan-Ștefan Neacşu 64cbc4054d Apply fix from feature/ephemera to develop too (#3698) 2023-08-02 16:17:29 +02:00
mfahampshire 9a23c44c5e reorganised quickstart section with web demos 2023-08-02 16:13:26 +02:00
Tommy Verrall 5dacf0c8f8 Merge pull request #3730 from nymtech/qa/fix-api-tests
fix config for prod runs on api tests
2023-08-02 15:05:27 +02:00
Tommy Verrall cbafd37102 fix config 2023-08-02 13:22:02 +02:00
Tommy Verrall e537359c73 Merge pull request #3728 from nymtech/qa/fix-api-tests
fix api tests for no blacklisted nodes
2023-08-02 13:21:00 +02:00
Tommy Verrall 2ed3e646be linting and removing unused imports 2023-08-02 13:02:29 +02:00
Tommy Verrall c725ae4e2b remove console 2023-08-02 12:55:46 +02:00
Tommy Verrall 5ab2c738df fix api tests for no blacklisted nodes 2023-08-02 12:54:09 +02:00
pierre cd70b0de75 build(nc-android): disable sentry upload proguard mapping files 2023-08-02 11:18:30 +02:00
Tommy Verrall 6359b38a5d Merge pull request #3660 from nymtech/dependabot/npm_and_yarn/nym-wallet/webdriver/semver-5.7.2
Bump semver from 5.7.1 to 5.7.2 in /nym-wallet/webdriver
2023-08-02 10:36:36 +02:00
dependabot[bot] 00b5a46cbc Bump semver from 5.7.1 to 5.7.2 in /nym-wallet/webdriver
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 15:22:00 +00:00
Fouad e97a068bf0 Type documentation for NymSDK (#3701)
* set up development process for docs

* set up development process for docs

* Add local installs for Typedoc on gitignore

* Add Typedoc comments on types.ts file

* add typedoc config file

* update types and add annotations

* Add updates on types file

* add examples + manage sort order for doc items

* update client methods with examples

* add description of NymMixnetClientOptions

* add description of NymMixnetClientOptions

* fix linting

---------

Co-authored-by: Lorexia <alexia.lorenza.martinel@protonmail.com>
2023-08-01 16:21:12 +01:00
Lorexia 15a6af49f0 Add updates to community list projects 2023-08-01 10:49:02 +02:00
mfahampshire 97956afdf6 removed old wallet address flag again 2023-08-01 10:48:52 +02:00
pierre 5fbccc3406 build(nc-android): moving build config to kotlin 2023-07-27 19:11:33 +02:00
pierre ac8afe133f fix(nc-desktop): typo 2023-07-27 15:53:55 +02:00
Bogdan-Ștefan Neacşu 19736b1204 Fix develop after bad automerge (#3712) 2023-07-27 13:25:34 +03:00
pierre 6e5f6bf0df ci: fix release strapi actions 2023-07-27 11:42:42 +02:00
Jędrzej Stuczyński 67435e9cdf Feature/simplify cli parsing (#3699)
* added a global flag to disable the printed out banner inside tty

* added a 'build-info' command to our binaries

* added binary name to BinaryBuildInformation

* clippy
2023-07-27 10:20:07 +01:00
Bogdan-Ștefan Neacşu a47899aa77 Apply fix from feature/ephemera to develop too (#3698) 2023-07-27 12:18:08 +03:00
pierre 44fa52a7a7 ci: fix release strapi actions 2023-07-27 11:08:24 +02:00
69 changed files with 1256 additions and 976 deletions
-22
View File
@@ -4,28 +4,6 @@ Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https://
## [Unreleased]
## [v1.1.24] (2023-08-08)
- Latency based gateway selection is serial and slow ([#3710])
- Network-requester: strip comments from allow lists ([#3625])
- Remove (or start maintaining) `upgrade` commands from all binaries ([#3600])
- Set sphinx as default packet type ([#3748])
- Apply fix from feature/ephemera to develop too (#3698) ([#3742])
- Feature/coco demos ([#3732])
- Add updates to community list projects ([#3722])
- Add geo-aware mixnet topology provider ([#3713])
- Add updates to community list projects ([#3711])
[#3710]: https://github.com/nymtech/nym/issues/3710
[#3625]: https://github.com/nymtech/nym/issues/3625
[#3600]: https://github.com/nymtech/nym/issues/3600
[#3748]: https://github.com/nymtech/nym/pull/3748
[#3742]: https://github.com/nymtech/nym/pull/3742
[#3732]: https://github.com/nymtech/nym/pull/3732
[#3722]: https://github.com/nymtech/nym/pull/3722
[#3713]: https://github.com/nymtech/nym/pull/3713
[#3711]: https://github.com/nymtech/nym/pull/3711
## [v1.1.23] (2023-07-04)
- nym-cli: add client identity key signing support ([#3576])
Generated
+9 -9
View File
@@ -1895,7 +1895,7 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
[[package]]
name = "explorer-api"
version = "1.1.24"
version = "1.1.23"
dependencies = [
"chrono",
"clap 4.2.7",
@@ -3531,7 +3531,7 @@ dependencies = [
[[package]]
name = "nym-api"
version = "1.1.25"
version = "1.1.24"
dependencies = [
"anyhow",
"async-trait",
@@ -3668,7 +3668,7 @@ dependencies = [
[[package]]
name = "nym-cli"
version = "1.1.24"
version = "1.1.23"
dependencies = [
"anyhow",
"base64 0.13.1",
@@ -3734,7 +3734,7 @@ dependencies = [
[[package]]
name = "nym-client"
version = "1.1.24"
version = "1.1.23"
dependencies = [
"clap 4.2.7",
"dirs 4.0.0",
@@ -4022,7 +4022,7 @@ dependencies = [
[[package]]
name = "nym-gateway"
version = "1.1.24"
version = "1.1.23"
dependencies = [
"anyhow",
"async-trait",
@@ -4175,7 +4175,7 @@ dependencies = [
[[package]]
name = "nym-mixnode"
version = "1.1.25"
version = "1.1.24"
dependencies = [
"anyhow",
"bs58 0.4.0",
@@ -4291,7 +4291,7 @@ dependencies = [
[[package]]
name = "nym-network-requester"
version = "1.1.24"
version = "1.1.23"
dependencies = [
"anyhow",
"async-file-watcher",
@@ -4338,7 +4338,7 @@ dependencies = [
[[package]]
name = "nym-network-statistics"
version = "1.1.24"
version = "1.1.23"
dependencies = [
"dirs 4.0.0",
"log",
@@ -4497,7 +4497,7 @@ dependencies = [
[[package]]
name = "nym-socks5-client"
version = "1.1.24"
version = "1.1.23"
dependencies = [
"clap 4.2.7",
"lazy_static",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "nym-client"
version = "1.1.24"
version = "1.1.23"
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>", "Jędrzej Stuczyński <andrew@nymtech.net>"]
description = "Implementation of the Nym Client"
edition = "2021"
+16
View File
@@ -0,0 +1,16 @@
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use clap::Args;
use nym_bin_common::bin_info_owned;
use nym_bin_common::output_format::OutputFormat;
#[derive(Args)]
pub(crate) struct BuildInfo {
#[clap(short, long, default_value_t = OutputFormat::default())]
output: OutputFormat,
}
pub(crate) fn execute(args: BuildInfo) {
println!("{}", args.output.format(&bin_info_owned!()))
}
+15 -7
View File
@@ -10,7 +10,7 @@ use clap::CommandFactory;
use clap::{Parser, Subcommand};
use lazy_static::lazy_static;
use log::{error, info};
use nym_bin_common::build_information::BinaryBuildInformation;
use nym_bin_common::bin_info;
use nym_bin_common::completions::{fig_generate, ArgShell};
use nym_client_core::client::base_client::storage::gateway_details::{
OnDiskGatewayDetails, PersistedGatewayDetails,
@@ -22,12 +22,12 @@ use nym_config::OptionalSet;
use std::error::Error;
use std::net::IpAddr;
pub(crate) mod build_info;
pub(crate) mod init;
pub(crate) mod run;
lazy_static! {
pub static ref PRETTY_BUILD_INFORMATION: String =
BinaryBuildInformation::new(env!("CARGO_PKG_VERSION")).pretty_print();
pub static ref PRETTY_BUILD_INFORMATION: String = bin_info!().pretty_print();
}
// Helper for passing LONG_VERSION to clap
@@ -42,6 +42,10 @@ pub(crate) struct Cli {
#[clap(short, long)]
pub(crate) config_env_file: Option<std::path::PathBuf>,
/// Flag used for disabling the printed banner in tty.
#[clap(long)]
pub(crate) no_banner: bool,
#[clap(subcommand)]
command: Commands,
}
@@ -54,6 +58,9 @@ pub(crate) enum Commands {
/// Run the Nym client with provided configuration client optionally overriding set parameters
Run(run::Run),
/// Show build information of this binary
BuildInfo(build_info::BuildInfo),
/// Generate shell completions
Completions(ArgShell),
@@ -73,12 +80,13 @@ pub(crate) struct OverrideConfig {
enabled_credentials_mode: Option<bool>,
}
pub(crate) async fn execute(args: &Cli) -> Result<(), Box<dyn Error + Send + Sync>> {
pub(crate) async fn execute(args: Cli) -> Result<(), Box<dyn Error + Send + Sync>> {
let bin_name = "nym-native-client";
match &args.command {
Commands::Init(m) => init::execute(m).await?,
Commands::Run(m) => run::execute(m).await?,
match args.command {
Commands::Init(m) => init::execute(&m).await?,
Commands::Run(m) => run::execute(&m).await?,
Commands::BuildInfo(m) => build_info::execute(m),
Commands::Completions(s) => s.generate(&mut Cli::command(), bin_name),
Commands::GenerateFigSpec => fig_generate(&mut Cli::command(), bin_name),
}
+7 -4
View File
@@ -14,10 +14,13 @@ pub mod websocket;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
setup_logging();
maybe_print_banner(crate_name!(), crate_version!());
let args = commands::Cli::parse();
setup_env(args.config_env_file.as_ref());
commands::execute(&args).await
if !args.no_banner {
maybe_print_banner(crate_name!(), crate_version!());
}
setup_logging();
commands::execute(args).await
}
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "nym-socks5-client"
version = "1.1.24"
version = "1.1.23"
authors = ["Dave Hrycyszyn <futurechimp@users.noreply.github.com>"]
description = "A SOCKS5 localhost proxy that converts incoming messages to Sphinx and sends them to a Nym address"
edition = "2021"
+16
View File
@@ -0,0 +1,16 @@
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use clap::Args;
use nym_bin_common::bin_info_owned;
use nym_bin_common::output_format::OutputFormat;
#[derive(Args)]
pub(crate) struct BuildInfo {
#[clap(short, long, default_value_t = OutputFormat::default())]
output: OutputFormat,
}
pub(crate) fn execute(args: BuildInfo) {
println!("{}", args.output.format(&bin_info_owned!()))
}
+15 -7
View File
@@ -10,7 +10,7 @@ use clap::CommandFactory;
use clap::{Parser, Subcommand};
use lazy_static::lazy_static;
use log::{error, info};
use nym_bin_common::build_information::BinaryBuildInformation;
use nym_bin_common::bin_info;
use nym_bin_common::completions::{fig_generate, ArgShell};
use nym_client_core::client::base_client::storage::gateway_details::{
OnDiskGatewayDetails, PersistedGatewayDetails,
@@ -23,12 +23,12 @@ use nym_config::OptionalSet;
use nym_sphinx::params::{PacketSize, PacketType};
use std::error::Error;
pub(crate) mod build_info;
pub mod init;
pub(crate) mod run;
lazy_static! {
pub static ref PRETTY_BUILD_INFORMATION: String =
BinaryBuildInformation::new(env!("CARGO_PKG_VERSION")).pretty_print();
pub static ref PRETTY_BUILD_INFORMATION: String = bin_info!().pretty_print();
}
// Helper for passing LONG_VERSION to clap
@@ -43,6 +43,10 @@ pub(crate) struct Cli {
#[clap(short, long)]
pub(crate) config_env_file: Option<std::path::PathBuf>,
/// Flag used for disabling the printed banner in tty.
#[clap(long)]
pub(crate) no_banner: bool,
#[clap(subcommand)]
command: Commands,
}
@@ -55,6 +59,9 @@ pub(crate) enum Commands {
/// Run the Nym client with provided configuration client optionally overriding set parameters
Run(run::Run),
/// Show build information of this binary
BuildInfo(build_info::BuildInfo),
/// Generate shell completions
Completions(ArgShell),
@@ -76,12 +83,13 @@ pub(crate) struct OverrideConfig {
outfox: bool,
}
pub(crate) async fn execute(args: &Cli) -> Result<(), Box<dyn Error + Send + Sync>> {
pub(crate) async fn execute(args: Cli) -> Result<(), Box<dyn Error + Send + Sync>> {
let bin_name = "nym-socks5-client";
match &args.command {
Commands::Init(m) => init::execute(m).await?,
Commands::Run(m) => run::execute(m).await?,
match args.command {
Commands::Init(m) => init::execute(&m).await?,
Commands::Run(m) => run::execute(&m).await?,
Commands::BuildInfo(m) => build_info::execute(m),
Commands::Completions(s) => s.generate(&mut Cli::command(), bin_name),
Commands::GenerateFigSpec => fig_generate(&mut Cli::command(), bin_name),
}
+7 -4
View File
@@ -13,10 +13,13 @@ pub mod error;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
setup_logging();
maybe_print_banner(crate_name!(), crate_version!());
let args = commands::Cli::parse();
setup_env(args.config_env_file.as_ref());
commands::execute(&args).await
if !args.no_banner {
maybe_print_banner(crate_name!(), crate_version!());
}
setup_logging();
commands::execute(args).await
}
+70 -29
View File
@@ -5,9 +5,13 @@
// and be used by our smart contracts
use serde::{Deserialize, Serialize};
use std::fmt::{Display, Formatter};
#[derive(Debug)]
pub struct BinaryBuildInformation {
/// Provides the name of the binary, i.e. the content of `CARGO_PKG_NAME` environmental variable.
pub binary_name: &'static str,
// VERGEN_BUILD_TIMESTAMP
/// Provides the build timestamp, for example `2021-02-23T20:14:46.558472672+00:00`.
pub build_timestamp: &'static str,
@@ -43,8 +47,9 @@ pub struct BinaryBuildInformation {
impl BinaryBuildInformation {
// explicitly require the build_version to be passed as it's binary specific
pub const fn new(build_version: &'static str) -> Self {
pub const fn new(binary_name: &'static str, build_version: &'static str) -> Self {
BinaryBuildInformation {
binary_name,
build_timestamp: env!("VERGEN_BUILD_TIMESTAMP"),
build_version,
commit_sha: env!("VERGEN_GIT_SHA"),
@@ -58,6 +63,7 @@ impl BinaryBuildInformation {
pub fn to_owned(&self) -> BinaryBuildInformationOwned {
BinaryBuildInformationOwned {
binary_name: self.binary_name.to_owned(),
build_timestamp: self.build_timestamp.to_owned(),
build_version: self.build_version.to_owned(),
commit_sha: self.commit_sha.to_owned(),
@@ -70,39 +76,15 @@ impl BinaryBuildInformation {
}
pub fn pretty_print(&self) -> String {
format!(
r#"
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
"#,
"Build Timestamp:",
self.build_timestamp,
"Build Version:",
self.build_version,
"Commit SHA:",
self.commit_sha,
"Commit Date:",
self.commit_timestamp,
"Commit Branch:",
self.commit_branch,
"rustc Version:",
self.rustc_version,
"rustc Channel:",
self.rustc_channel,
"cargo Profile:",
self.cargo_profile,
)
self.to_owned().to_string()
}
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct BinaryBuildInformationOwned {
/// Provides the name of the binary, i.e. the content of `CARGO_PKG_NAME` environmental variable.
pub binary_name: String,
// VERGEN_BUILD_TIMESTAMP
/// Provides the build timestamp, for example `2021-02-23T20:14:46.558472672+00:00`.
pub build_timestamp: String,
@@ -135,3 +117,62 @@ pub struct BinaryBuildInformationOwned {
/// Provides the cargo profile that was used for the build, for example `debug`.
pub cargo_profile: String,
}
impl Display for BinaryBuildInformationOwned {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(
f,
r#"
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
{:<20}{}
"#,
"Binary Name:",
self.binary_name,
"Build Timestamp:",
self.build_timestamp,
"Build Version:",
self.build_version,
"Commit SHA:",
self.commit_sha,
"Commit Date:",
self.commit_timestamp,
"Commit Branch:",
self.commit_branch,
"rustc Version:",
self.rustc_version,
"rustc Channel:",
self.rustc_channel,
"cargo Profile:",
self.cargo_profile,
)
}
}
// since this macro will get expanded at the callsite, it will pull in correct binary version
#[macro_export]
macro_rules! bin_info {
() => {
$crate::build_information::BinaryBuildInformation::new(
env!("CARGO_PKG_NAME"),
env!("CARGO_PKG_VERSION"),
)
};
}
#[macro_export]
macro_rules! bin_info_owned {
() => {
$crate::build_information::BinaryBuildInformation::new(
env!("CARGO_PKG_NAME"),
env!("CARGO_PKG_VERSION"),
)
.to_owned()
};
}
-1
View File
@@ -34,7 +34,6 @@ nym-pemstore = { path = "../../common/pemstore", version = "0.3.0" }
rand_chacha = "0.2"
[features]
default = ["sphinx"]
serde = ["serde_crate", "serde_bytes", "ed25519-dalek/serde", "x25519-dalek/serde"]
asymmetric = ["x25519-dalek", "ed25519-dalek", "zeroize"]
hashing = ["blake3", "digest", "hkdf", "hmac", "generic-array"]
-5
View File
@@ -40,8 +40,3 @@ path = "framing"
[target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio]
version = "1.24.1"
features = ["sync"]
[features]
default = ["sphinx"]
sphinx = ["nym-crypto/sphinx", "nym-sphinx-params/sphinx", "nym-sphinx-types/sphinx"]
outfox = ["nym-crypto/outfox", "nym-sphinx-params/outfox", "nym-sphinx-types/outfox"]
+2 -3
View File
@@ -12,6 +12,5 @@ bytes = "1.0"
tokio-util = { version = "0.7.4", features = ["codec"] }
thiserror = "1.0.37"
nym-sphinx-types = { path = "../types", features = ["sphinx", "outfox"] }
nym-sphinx-params = { path = "../params", features = ["sphinx", "outfox"] }
nym-sphinx-types = { path = "../types" }
nym-sphinx-params = { path = "../params" }
-1
View File
@@ -15,6 +15,5 @@ nym-crypto = { path = "../../crypto", features = ["hashing", "symmetric"] }
nym-sphinx-types = { path = "../types" }
[features]
default = ["sphinx"]
sphinx = ["nym-crypto/sphinx", "nym-sphinx-types/outfox"]
outfox = ["nym-crypto/outfox", "nym-sphinx-types/outfox"]
+5 -34
View File
@@ -2,10 +2,10 @@
// SPDX-License-Identifier: Apache-2.0
use crate::PacketType;
#[cfg(feature = "sphinx")]
use nym_sphinx_types::{header::HEADER_SIZE, PAYLOAD_OVERHEAD_SIZE};
#[cfg(feature = "outfox")]
use nym_sphinx_types::{MIN_PACKET_SIZE, MIX_PARAMS_LEN, OUTFOX_PACKET_OVERHEAD};
use nym_sphinx_types::{
header::HEADER_SIZE, MIN_PACKET_SIZE, MIX_PARAMS_LEN, OUTFOX_PACKET_OVERHEAD,
PAYLOAD_OVERHEAD_SIZE,
};
use serde::{Deserialize, Serialize};
use std::cmp::Ordering;
use std::convert::TryFrom;
@@ -14,7 +14,6 @@ use std::str::FromStr;
use thiserror::Error;
// each sphinx packet contains mandatory header and payload padding + markers
#[cfg(feature = "sphinx")]
const SPHINX_PACKET_OVERHEAD: usize = HEADER_SIZE + PAYLOAD_OVERHEAD_SIZE;
// it's up to the smart people to figure those values out : )
@@ -23,23 +22,16 @@ const SPHINX_PACKET_OVERHEAD: usize = HEADER_SIZE + PAYLOAD_OVERHEAD_SIZE;
// TODO: I'm not entirely sure if we can easily extract `<AckEncryptionAlgorithm as NewStreamCipher>::NonceSize`
// into a const usize before relevant stuff is stabilised in rust...
#[cfg(feature = "sphinx")]
const ACK_IV_SIZE: usize = 16;
#[cfg(feature = "sphinx")]
const ACK_PACKET_SIZE: usize = ACK_IV_SIZE + crate::FRAG_ID_LEN + SPHINX_PACKET_OVERHEAD;
#[cfg(feature = "sphinx")]
const REGULAR_PACKET_SIZE: usize = 2 * 1024 + SPHINX_PACKET_OVERHEAD;
#[cfg(feature = "sphinx")]
const EXTENDED_PACKET_SIZE_8: usize = 8 * 1024 + SPHINX_PACKET_OVERHEAD;
#[cfg(feature = "sphinx")]
const EXTENDED_PACKET_SIZE_16: usize = 16 * 1024 + SPHINX_PACKET_OVERHEAD;
#[cfg(feature = "sphinx")]
const EXTENDED_PACKET_SIZE_32: usize = 32 * 1024 + SPHINX_PACKET_OVERHEAD;
#[cfg(feature = "outfox")]
const OUTFOX_ACK_PACKET_SIZE: usize = MIN_PACKET_SIZE + OUTFOX_PACKET_OVERHEAD;
#[cfg(feature = "outfox")]
const OUTFOX_REGULAR_PACKET_SIZE: usize = 2 * 1024 + OUTFOX_PACKET_OVERHEAD;
#[derive(Debug, Error)]
@@ -162,55 +154,39 @@ impl TryFrom<u8> for PacketSize {
impl PacketSize {
pub const fn size(self) -> usize {
#[allow(unreachable_patterns)]
match self {
#[cfg(feature = "sphinx")]
PacketSize::RegularPacket => REGULAR_PACKET_SIZE,
#[cfg(feature = "sphinx")]
PacketSize::AckPacket => ACK_PACKET_SIZE,
#[cfg(feature = "sphinx")]
PacketSize::ExtendedPacket8 => EXTENDED_PACKET_SIZE_8,
#[cfg(feature = "sphinx")]
PacketSize::ExtendedPacket16 => EXTENDED_PACKET_SIZE_16,
#[cfg(feature = "sphinx")]
PacketSize::ExtendedPacket32 => EXTENDED_PACKET_SIZE_32,
#[cfg(feature = "outfox")]
PacketSize::OutfoxRegularPacket => OUTFOX_REGULAR_PACKET_SIZE,
#[cfg(feature = "outfox")]
PacketSize::OutfoxAckPacket => OUTFOX_ACK_PACKET_SIZE,
_ => 0,
}
}
pub const fn header_size(&self) -> usize {
#[allow(unreachable_patterns)]
match self {
#[cfg(feature = "sphinx")]
PacketSize::RegularPacket
| PacketSize::AckPacket
| PacketSize::ExtendedPacket8
| PacketSize::ExtendedPacket16
| PacketSize::ExtendedPacket32 => HEADER_SIZE,
#[cfg(feature = "outfox")]
PacketSize::OutfoxRegularPacket | PacketSize::OutfoxAckPacket => MIX_PARAMS_LEN,
_ => 0,
}
}
pub const fn payload_overhead(&self) -> usize {
#[allow(unreachable_patterns)]
match self {
#[cfg(feature = "sphinx")]
PacketSize::RegularPacket
| PacketSize::AckPacket
| PacketSize::ExtendedPacket8
| PacketSize::ExtendedPacket16
| PacketSize::ExtendedPacket32 => PAYLOAD_OVERHEAD_SIZE,
#[cfg(feature = "outfox")]
PacketSize::OutfoxRegularPacket | PacketSize::OutfoxAckPacket => {
OUTFOX_PACKET_OVERHEAD - MIX_PARAMS_LEN // Mix params are calculated into the total overhead so we take them out here
}
_ => 0,
}
}
@@ -268,16 +244,11 @@ impl PacketSize {
plaintext_size: usize,
packet_type: PacketType,
) -> Result<Self, InvalidPacketSize> {
#[allow(unreachable_patterns)]
let overhead = match packet_type {
#[cfg(feature = "sphinx")]
PacketType::Mix => SPHINX_PACKET_OVERHEAD,
#[allow(deprecated)]
#[cfg(feature = "sphinx")]
PacketType::Vpn => SPHINX_PACKET_OVERHEAD,
#[cfg(feature = "outfox")]
PacketType::Outfox => OUTFOX_PACKET_OVERHEAD,
_ => 0,
};
let packet_size = plaintext_size + overhead;
Self::get_type(packet_size)
-1
View File
@@ -13,6 +13,5 @@ nym-outfox = { path = "../../../nym-outfox", optional = true }
thiserror = "1"
[features]
default = ["sphinx"]
sphinx = ["sphinx-packet"]
outfox = ["nym-outfox"]
+16 -220
View File
@@ -2,19 +2,6 @@
# It is not intended for manual editing.
version = 3
[[package]]
name = "aes"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8"
dependencies = [
"cfg-if",
"cipher",
"cpufeatures",
"ctr",
"opaque-debug 0.3.0",
]
[[package]]
name = "ahash"
version = "0.7.6"
@@ -32,12 +19,6 @@ version = "1.0.70"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4"
[[package]]
name = "arrayref"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545"
[[package]]
name = "autocfg"
version = "1.1.0"
@@ -74,25 +55,13 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "blake2"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330"
dependencies = [
"byte-tools",
"crypto-mac 0.7.0",
"digest 0.8.1",
"opaque-debug 0.2.3",
]
[[package]]
name = "block-buffer"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
dependencies = [
"generic-array 0.14.6",
"generic-array",
]
[[package]]
@@ -101,7 +70,7 @@ version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
dependencies = [
"generic-array 0.14.6",
"generic-array",
]
[[package]]
@@ -116,12 +85,6 @@ version = "3.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8"
[[package]]
name = "byte-tools"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
[[package]]
name = "byteorder"
version = "1.4.3"
@@ -149,25 +112,6 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chacha"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddf3c081b5fba1e5615640aae998e0fbd10c24cbd897ee39ed754a77601a4862"
dependencies = [
"byteorder",
"keystream",
]
[[package]]
name = "cipher"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
dependencies = [
"generic-array 0.14.6",
]
[[package]]
name = "coconut-test"
version = "0.1.0"
@@ -296,9 +240,9 @@ version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef"
dependencies = [
"generic-array 0.14.6",
"generic-array",
"rand_core 0.6.4",
"subtle 2.4.1",
"subtle",
"zeroize",
]
@@ -308,39 +252,10 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
"generic-array 0.14.6",
"generic-array",
"typenum",
]
[[package]]
name = "crypto-mac"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5"
dependencies = [
"generic-array 0.12.4",
"subtle 1.0.0",
]
[[package]]
name = "crypto-mac"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714"
dependencies = [
"generic-array 0.14.6",
"subtle 2.4.1",
]
[[package]]
name = "ctr"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea"
dependencies = [
"cipher",
]
[[package]]
name = "curve25519-dalek"
version = "3.2.0"
@@ -350,7 +265,7 @@ dependencies = [
"byteorder",
"digest 0.9.0",
"rand_core 0.5.1",
"subtle 2.4.1",
"subtle",
"zeroize",
]
@@ -561,22 +476,13 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "digest"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
dependencies = [
"generic-array 0.12.4",
]
[[package]]
name = "digest"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
dependencies = [
"generic-array 0.14.6",
"generic-array",
]
[[package]]
@@ -587,7 +493,7 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer 0.10.4",
"crypto-common",
"subtle 2.4.1",
"subtle",
]
[[package]]
@@ -663,12 +569,12 @@ dependencies = [
"der",
"digest 0.10.7",
"ff",
"generic-array 0.14.6",
"generic-array",
"group",
"pkcs8",
"rand_core 0.6.4",
"sec1",
"subtle 2.4.1",
"subtle",
"zeroize",
]
@@ -729,7 +635,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160"
dependencies = [
"rand_core 0.6.4",
"subtle 2.4.1",
"subtle",
]
[[package]]
@@ -848,15 +754,6 @@ dependencies = [
"slab",
]
[[package]]
name = "generic-array"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd"
dependencies = [
"typenum",
]
[[package]]
name = "generic-array"
version = "0.14.6"
@@ -924,7 +821,7 @@ checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7"
dependencies = [
"ff",
"rand_core 0.6.4",
"subtle 2.4.1",
"subtle",
]
[[package]]
@@ -948,26 +845,6 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]]
name = "hkdf"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01706d578d5c281058480e673ae4086a9f4710d8df1ad80a5b03e39ece5f886b"
dependencies = [
"digest 0.9.0",
"hmac 0.11.0",
]
[[package]]
name = "hmac"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
dependencies = [
"crypto-mac 0.11.1",
"digest 0.9.0",
]
[[package]]
name = "hmac"
version = "0.12.1"
@@ -1068,12 +945,6 @@ dependencies = [
"sha2 0.10.6",
]
[[package]]
name = "keystream"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28"
[[package]]
name = "lazy_static"
version = "1.4.0"
@@ -1098,12 +969,6 @@ dependencies = [
"pkg-config",
]
[[package]]
name = "libm"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"
[[package]]
name = "libz-sys"
version = "1.1.8"
@@ -1122,18 +987,6 @@ version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f"
[[package]]
name = "lioness"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9"
dependencies = [
"arrayref",
"blake2",
"chacha",
"keystream",
]
[[package]]
name = "log"
version = "0.4.17"
@@ -1165,16 +1018,6 @@ dependencies = [
"rand_chacha 0.2.2",
]
[[package]]
name = "num-traits"
version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2"
dependencies = [
"autocfg",
"libm",
]
[[package]]
name = "nym-coconut-bandwidth"
version = "0.1.0"
@@ -1409,7 +1252,6 @@ dependencies = [
name = "nym-sphinx-types"
version = "0.2.0"
dependencies = [
"sphinx-packet",
"thiserror",
]
@@ -1453,12 +1295,6 @@ version = "1.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
[[package]]
name = "opaque-debug"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
[[package]]
name = "opaque-debug"
version = "0.3.0"
@@ -1649,16 +1485,6 @@ dependencies = [
"getrandom 0.2.10",
]
[[package]]
name = "rand_distr"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9e9532ada3929fb8b2e9dbe28d1e06c9b2cc65813f074fcb6bd5fbefeff9d56"
dependencies = [
"num-traits",
"rand 0.7.3",
]
[[package]]
name = "rand_hc"
version = "0.2.0"
@@ -1699,7 +1525,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb"
dependencies = [
"crypto-bigint",
"hmac 0.12.1",
"hmac",
"zeroize",
]
@@ -1808,9 +1634,9 @@ checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928"
dependencies = [
"base16ct",
"der",
"generic-array 0.14.6",
"generic-array",
"pkcs8",
"subtle 2.4.1",
"subtle",
"zeroize",
]
@@ -1901,7 +1727,7 @@ dependencies = [
"cfg-if",
"cpufeatures",
"digest 0.9.0",
"opaque-debug 0.3.0",
"opaque-debug",
]
[[package]]
@@ -1934,30 +1760,6 @@ dependencies = [
"autocfg",
]
[[package]]
name = "sphinx-packet"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc43eda802856ee82a7555c7b75ceb9e07451741c7a2f5f23d036020e01189d4"
dependencies = [
"aes",
"arrayref",
"blake2",
"bs58",
"byteorder",
"chacha",
"curve25519-dalek",
"digest 0.9.0",
"hkdf",
"hmac 0.11.0",
"lioness",
"log",
"rand 0.7.3",
"rand_distr",
"sha2 0.9.9",
"subtle 2.4.1",
]
[[package]]
name = "spki"
version = "0.6.0"
@@ -1974,12 +1776,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "subtle"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee"
[[package]]
name = "subtle"
version = "2.4.1"
+2 -2
View File
@@ -1,5 +1,5 @@
# Introduction
Welcome to the Nym Developer Portal, containing quickstart resources, user manuals, integration information, and tutorials outlining to start building privacy enhanced apps.
Welcome to the Nym Developer Portal, containing the resources and tools needed to build privacy enhanced apps (PEApps) with Nym's technology. Whether you're a seasoned developer or just getting started, our portal is designed to help you create decentralized applications and services utilising the Nym mixnet.
For more in-depth information about nodes, network traffic flows, etc check out the [docs](https://nymtech.net/docs).
Join our community of developers and start building the decentralized future today!
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "explorer-api"
version = "1.1.24"
version = "1.1.23"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+1 -1
View File
@@ -3,7 +3,7 @@
[package]
name = "nym-gateway"
version = "1.1.24"
version = "1.1.23"
authors = [
"Dave Hrycyszyn <futurechimp@users.noreply.github.com>",
"Jędrzej Stuczyński <andrew@nymtech.net>",
+16
View File
@@ -0,0 +1,16 @@
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use clap::Args;
use nym_bin_common::bin_info_owned;
use nym_bin_common::output_format::OutputFormat;
#[derive(Args)]
pub(crate) struct BuildInfo {
#[clap(short, long, default_value_t = OutputFormat::default())]
output: OutputFormat,
}
pub(crate) fn execute(args: BuildInfo) {
println!("{}", args.output.format(&bin_info_owned!()))
}
+5
View File
@@ -18,6 +18,7 @@ use std::error::Error;
use std::net::IpAddr;
use std::path::PathBuf;
pub(crate) mod build_info;
pub(crate) mod init;
pub(crate) mod node_details;
pub(crate) mod run;
@@ -37,6 +38,9 @@ pub(crate) enum Commands {
/// Sign text to prove ownership of this mixnode
Sign(sign::Sign),
/// Show build information of this binary
BuildInfo(build_info::BuildInfo),
/// Generate shell completions
Completions(ArgShell),
@@ -67,6 +71,7 @@ pub(crate) async fn execute(args: Cli) -> Result<(), Box<dyn Error + Send + Sync
Commands::NodeDetails(m) => node_details::execute(m).await?,
Commands::Run(m) => run::execute(m).await?,
Commands::Sign(m) => sign::execute(m)?,
Commands::BuildInfo(m) => build_info::execute(m),
Commands::Completions(s) => s.generate(&mut crate::Cli::command(), bin_name),
Commands::GenerateFigSpec => fig_generate(&mut crate::Cli::command(), bin_name),
}
+11 -6
View File
@@ -5,7 +5,7 @@ use clap::{crate_name, crate_version, Parser};
use colored::Colorize;
use lazy_static::lazy_static;
use log::error;
use nym_bin_common::build_information::BinaryBuildInformation;
use nym_bin_common::bin_info;
use nym_bin_common::logging::{maybe_print_banner, setup_logging};
use nym_bin_common::output_format::OutputFormat;
use nym_network_defaults::setup_env;
@@ -18,8 +18,7 @@ mod node;
pub(crate) mod support;
lazy_static! {
pub static ref PRETTY_BUILD_INFORMATION: String =
BinaryBuildInformation::new(env!("CARGO_PKG_VERSION")).pretty_print();
pub static ref PRETTY_BUILD_INFORMATION: String = bin_info!().pretty_print();
}
// Helper for passing LONG_VERSION to clap
@@ -34,18 +33,24 @@ struct Cli {
#[clap(short, long)]
pub(crate) config_env_file: Option<std::path::PathBuf>,
/// Flag used for disabling the printed banner in tty.
#[clap(long)]
pub(crate) no_banner: bool,
#[clap(subcommand)]
command: commands::Commands,
}
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
setup_logging();
maybe_print_banner(crate_name!(), crate_version!());
let args = Cli::parse();
setup_env(args.config_env_file.as_ref());
if !args.no_banner {
maybe_print_banner(crate_name!(), crate_version!());
}
setup_logging();
commands::execute(args).await.map_err(|err| {
if atty::is(atty::Stream::Stdout) {
let error_message = format!("{err}").red();
+1 -1
View File
@@ -3,7 +3,7 @@
[package]
name = "nym-mixnode"
version = "1.1.25"
version = "1.1.24"
authors = [
"Dave Hrycyszyn <futurechimp@users.noreply.github.com>",
"Jędrzej Stuczyński <andrew@nymtech.net>",
+16
View File
@@ -0,0 +1,16 @@
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use clap::Args;
use nym_bin_common::bin_info_owned;
use nym_bin_common::output_format::OutputFormat;
#[derive(Args)]
pub(crate) struct BuildInfo {
#[clap(short, long, default_value_t = OutputFormat::default())]
output: OutputFormat,
}
pub(crate) fn execute(args: BuildInfo) {
println!("{}", args.output.format(&bin_info_owned!()))
}
+5
View File
@@ -15,6 +15,7 @@ use nym_crypto::bech32_address_validation;
use std::net::IpAddr;
use std::process;
mod build_info;
mod describe;
mod init;
mod node_details;
@@ -38,6 +39,9 @@ pub(crate) enum Commands {
/// Show details of this mixnode
NodeDetails(node_details::NodeDetails),
/// Show build information of this binary
BuildInfo(build_info::BuildInfo),
/// Generate shell completions
Completions(ArgShell),
@@ -64,6 +68,7 @@ pub(crate) async fn execute(args: Cli) -> anyhow::Result<()> {
Commands::Run(m) => run::execute(&m).await?,
Commands::Sign(m) => sign::execute(&m)?,
Commands::NodeDetails(m) => node_details::execute(&m)?,
Commands::BuildInfo(m) => build_info::execute(m),
Commands::Completions(s) => s.generate(&mut crate::Cli::command(), bin_name),
Commands::GenerateFigSpec => fig_generate(&mut crate::Cli::command(), bin_name),
}
+15 -7
View File
@@ -7,7 +7,8 @@ extern crate rocket;
use ::nym_config::defaults::setup_env;
use clap::{crate_name, crate_version, Parser};
use lazy_static::lazy_static;
use nym_bin_common::build_information::BinaryBuildInformation;
use nym_bin_common::bin_info;
#[allow(unused_imports)]
use nym_bin_common::logging::{maybe_print_banner, setup_logging};
#[cfg(feature = "cpucycles")]
@@ -16,13 +17,13 @@ use nym_bin_common::setup_tracing;
use nym_mixnode_common::measure;
#[cfg(feature = "cpucycles")]
use tracing::instrument;
mod commands;
mod config;
mod node;
lazy_static! {
pub static ref PRETTY_BUILD_INFORMATION: String =
BinaryBuildInformation::new(env!("CARGO_PKG_VERSION")).pretty_print();
pub static ref PRETTY_BUILD_INFORMATION: String = bin_info!().pretty_print();
}
// Helper for passing LONG_VERSION to clap
@@ -37,6 +38,10 @@ struct Cli {
#[clap(short, long)]
pub(crate) config_env_file: Option<std::path::PathBuf>,
/// Flag used for disabling the printed banner in tty.
#[clap(long)]
pub(crate) no_banner: bool,
#[clap(subcommand)]
command: commands::Commands,
}
@@ -49,6 +54,13 @@ fn test_function() {
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let args = Cli::parse();
setup_env(args.config_env_file.as_ref());
if !args.no_banner {
maybe_print_banner(crate_name!(), crate_version!());
}
cfg_if::cfg_if! {
if #[cfg(feature = "cpucycles")] {
setup_tracing!("mixnode");
@@ -59,10 +71,6 @@ async fn main() -> anyhow::Result<()> {
}
}
maybe_print_banner(crate_name!(), crate_version!());
let args = Cli::parse();
setup_env(args.config_env_file.as_ref());
commands::execute(args).await?;
cfg_if::cfg_if! {
+1 -1
View File
@@ -3,7 +3,7 @@
[package]
name = "nym-api"
version = "1.1.25"
version = "1.1.24"
authors = [
"Dave Hrycyszyn <futurechimp@users.noreply.github.com>",
"Jędrzej Stuczyński <andrew@nymtech.net>",
+2 -3
View File
@@ -8,14 +8,13 @@ use ::nym_config::defaults::var_names::{MIXNET_CONTRACT_ADDRESS, VESTING_CONTRAC
use anyhow::Result;
use clap::Parser;
use lazy_static::lazy_static;
use nym_bin_common::build_information::BinaryBuildInformation;
use nym_bin_common::bin_info;
use nym_config::defaults::var_names::NYXD;
use nym_config::OptionalSet;
use nym_validator_client::nyxd;
lazy_static! {
pub static ref PRETTY_BUILD_INFORMATION: String =
BinaryBuildInformation::new(env!("CARGO_PKG_VERSION")).pretty_print();
pub static ref PRETTY_BUILD_INFORMATION: String = bin_info!().pretty_print();
}
// Helper for passing LONG_VERSION to clap
@@ -1,12 +1,9 @@
import ConfigHandler from "../../src/config/configHandler";
import ContractCache from "../../src/endpoints/CirculatingSupply";
let contract: ContractCache;
let config: ConfigHandler;
describe("Get circulating supply", (): void => {
beforeAll(async (): Promise<void> => {
contract = new ContractCache();
config = ConfigHandler.getInstance();
});
it("Get circulating supply amounts", async (): Promise<void> => {
@@ -1,13 +1,10 @@
import ContractCache from "../../src/endpoints/ContractCache";
import ConfigHandler from "../../src/config/configHandler";
let contract: ContractCache;
let config: ConfigHandler;
describe("Get epoch info", (): void => {
beforeAll(async (): Promise<void> => {
contract = new ContractCache();
config = ConfigHandler.getInstance();
});
it("Get epoch reward params", async (): Promise<void> => {
@@ -1,13 +1,10 @@
import ContractCache from "../../../src/endpoints/ContractCache";
import ConfigHandler from "../../../src/config/configHandler";
let contract: ContractCache;
let config: ConfigHandler;
describe("Get gateway data", (): void => {
beforeAll(async (): Promise<void> => {
contract = new ContractCache();
config = ConfigHandler.getInstance();
});
it("Get all gateways", async (): Promise<void> => {
@@ -40,8 +37,13 @@ describe("Get gateway data", (): void => {
it("Get blacklisted gateways", async (): Promise<void> => {
const response = await contract.getBlacklistedGateways();
response.forEach(function (value) {
expect(typeof value).toBe("string");
});
if (response === null) {
// no blacklisted gateways returns an empty array
expect(response).toBeNull();
} else {
response.forEach(function (value) {
expect(typeof value).toBe("string");
});
}
});
});
@@ -16,8 +16,12 @@ describe("Get mixnode data", (): void => {
//bond information overview
expect(typeof mixnode.bond_information.mix_id).toBe("number");
expect(typeof mixnode.bond_information.owner).toBe("string");
expect(typeof mixnode.bond_information.original_pledge.amount).toBe("string");
expect(typeof mixnode.bond_information.original_pledge.denom).toBe("string");
expect(typeof mixnode.bond_information.original_pledge.amount).toBe(
"string"
);
expect(typeof mixnode.bond_information.original_pledge.denom).toBe(
"string"
);
expect(typeof mixnode.bond_information.layer).toBe("number");
expect(typeof mixnode.bond_information.bonding_height).toBe("number");
expect(typeof mixnode.bond_information.is_unbonding).toBe("boolean");
@@ -30,11 +34,17 @@ describe("Get mixnode data", (): void => {
//mixnode
expect(typeof mixnode.bond_information.mix_node.host).toBe("string");
expect(mixnode.bond_information.mix_node.http_api_port).toStrictEqual(8000);
expect(typeof mixnode.bond_information.mix_node.verloc_port).toBe("number");
expect(mixnode.bond_information.mix_node.http_api_port).toStrictEqual(
8000
);
expect(typeof mixnode.bond_information.mix_node.verloc_port).toBe(
"number"
);
expect(typeof mixnode.bond_information.mix_node.mix_port).toBe("number");
expect(mixnode.bond_information.mix_node.mix_port).toStrictEqual(1789);
expect(typeof mixnode.bond_information.mix_node.verloc_port).toBe("number");
expect(typeof mixnode.bond_information.mix_node.verloc_port).toBe(
"number"
);
const identitykey = mixnode.bond_information.mix_node.identity_key;
if (typeof identitykey === "string") {
@@ -51,15 +61,27 @@ describe("Get mixnode data", (): void => {
}
//rewarding details
expect(typeof mixnode.rewarding_details.cost_params.profit_margin_percent).toBe("string");
expect(typeof mixnode.rewarding_details.cost_params.interval_operating_cost.denom).toBe("string");
expect(typeof mixnode.rewarding_details.cost_params.interval_operating_cost.amount).toBe("string");
expect(
typeof mixnode.rewarding_details.cost_params.profit_margin_percent
).toBe("string");
expect(
typeof mixnode.rewarding_details.cost_params.interval_operating_cost
.denom
).toBe("string");
expect(
typeof mixnode.rewarding_details.cost_params.interval_operating_cost
.amount
).toBe("string");
expect(typeof mixnode.rewarding_details.operator).toBe("string");
expect(typeof mixnode.rewarding_details.delegates).toBe("string");
expect(typeof mixnode.rewarding_details.total_unit_reward).toBe("string");
expect(typeof mixnode.rewarding_details.unit_delegation).toBe("string");
expect(typeof mixnode.rewarding_details.last_rewarded_epoch).toBe("number");
expect(typeof mixnode.rewarding_details.unique_delegations).toBe("number");
expect(typeof mixnode.rewarding_details.last_rewarded_epoch).toBe(
"number"
);
expect(typeof mixnode.rewarding_details.unique_delegations).toBe(
"number"
);
});
});
@@ -76,36 +98,66 @@ describe("Get mixnode data", (): void => {
// expect(typeof mixnode.family).toBe("string");
//mixnode details bond info
expect(typeof mixnode.mixnode_details.bond_information.mix_id).toBe("number")
expect(typeof mixnode.mixnode_details.bond_information.owner).toBe("string");
expect(typeof mixnode.mixnode_details.bond_information.original_pledge.amount).toBe("string");
expect(typeof mixnode.mixnode_details.bond_information.original_pledge.denom).toBe("string");
expect(typeof mixnode.mixnode_details.bond_information.layer).toBe("number");
expect(typeof mixnode.mixnode_details.bond_information.bonding_height).toBe("number");
expect(typeof mixnode.mixnode_details.bond_information.is_unbonding).toBe("boolean");
expect(typeof mixnode.mixnode_details.bond_information.mix_id).toBe(
"number"
);
expect(typeof mixnode.mixnode_details.bond_information.owner).toBe(
"string"
);
expect(
typeof mixnode.mixnode_details.bond_information.original_pledge.amount
).toBe("string");
expect(
typeof mixnode.mixnode_details.bond_information.original_pledge.denom
).toBe("string");
expect(typeof mixnode.mixnode_details.bond_information.layer).toBe(
"number"
);
expect(
typeof mixnode.mixnode_details.bond_information.bonding_height
).toBe("number");
expect(typeof mixnode.mixnode_details.bond_information.is_unbonding).toBe(
"boolean"
);
if (mixnode.mixnode_details.bond_information.proxy === null) {
return true;
} else {
expect(typeof mixnode.mixnode_details.bond_information.proxy).toBe("string");
expect(typeof mixnode.mixnode_details.bond_information.proxy).toBe(
"string"
);
}
//mixnode
expect(typeof mixnode.mixnode_details.bond_information.mix_node.host).toBe("string");
expect(mixnode.mixnode_details.bond_information.mix_node.http_api_port).toStrictEqual(8000);
expect(typeof mixnode.mixnode_details.bond_information.mix_node.verloc_port).toBe("number");
expect(typeof mixnode.mixnode_details.bond_information.mix_node.mix_port).toBe("number");
expect(mixnode.mixnode_details.bond_information.mix_node.mix_port).toStrictEqual(1789);
expect(typeof mixnode.mixnode_details.bond_information.mix_node.verloc_port).toBe("number");
expect(
typeof mixnode.mixnode_details.bond_information.mix_node.host
).toBe("string");
expect(
mixnode.mixnode_details.bond_information.mix_node.http_api_port
).toStrictEqual(8000);
expect(
typeof mixnode.mixnode_details.bond_information.mix_node.verloc_port
).toBe("number");
expect(
typeof mixnode.mixnode_details.bond_information.mix_node.mix_port
).toBe("number");
expect(
mixnode.mixnode_details.bond_information.mix_node.mix_port
).toStrictEqual(1789);
expect(
typeof mixnode.mixnode_details.bond_information.mix_node.verloc_port
).toBe("number");
const identitykey2 = mixnode.mixnode_details.bond_information.mix_node.identity_key
const identitykey2 =
mixnode.mixnode_details.bond_information.mix_node.identity_key;
if (typeof identitykey2 === "string") {
if (identitykey2.length === 43) {
return true;
} else expect(identitykey2).toHaveLength(44);
}
const sphinx2 = mixnode.mixnode_details.bond_information.mix_node.sphinx_key
const sphinx2 =
mixnode.mixnode_details.bond_information.mix_node.sphinx_key;
if (typeof sphinx2 === "string") {
if (sphinx2.length === 43) {
return true;
@@ -113,22 +165,45 @@ describe("Get mixnode data", (): void => {
}
//mixnode rewarding info
expect(typeof mixnode.mixnode_details.rewarding_details.cost_params.profit_margin_percent).toBe("string");
expect(typeof mixnode.mixnode_details.rewarding_details.cost_params.interval_operating_cost.denom).toBe("string");
expect(typeof mixnode.mixnode_details.rewarding_details.cost_params.interval_operating_cost.amount).toBe("string");
expect(typeof mixnode.mixnode_details.rewarding_details.operator).toBe("string");
expect(typeof mixnode.mixnode_details.rewarding_details.delegates).toBe("string");
expect(typeof mixnode.mixnode_details.rewarding_details.total_unit_reward).toBe("string");
expect(typeof mixnode.mixnode_details.rewarding_details.unit_delegation).toBe("string");
expect(typeof mixnode.mixnode_details.rewarding_details.last_rewarded_epoch).toBe("number");
expect(typeof mixnode.mixnode_details.rewarding_details.unique_delegations).toBe("number");
expect(
typeof mixnode.mixnode_details.rewarding_details.cost_params
.profit_margin_percent
).toBe("string");
expect(
typeof mixnode.mixnode_details.rewarding_details.cost_params
.interval_operating_cost.denom
).toBe("string");
expect(
typeof mixnode.mixnode_details.rewarding_details.cost_params
.interval_operating_cost.amount
).toBe("string");
expect(typeof mixnode.mixnode_details.rewarding_details.operator).toBe(
"string"
);
expect(typeof mixnode.mixnode_details.rewarding_details.delegates).toBe(
"string"
);
expect(
typeof mixnode.mixnode_details.rewarding_details.total_unit_reward
).toBe("string");
expect(
typeof mixnode.mixnode_details.rewarding_details.unit_delegation
).toBe("string");
expect(
typeof mixnode.mixnode_details.rewarding_details.last_rewarded_epoch
).toBe("number");
expect(
typeof mixnode.mixnode_details.rewarding_details.unique_delegations
).toBe("number");
});
});
it("Get active mixnodes", async (): Promise<void> => {
const response = await contract.getActiveMixnodes();
response.forEach(function (mixnode) {
expect(mixnode.rewarding_details.cost_params.profit_margin_percent).toBeTruthy();
expect(
mixnode.rewarding_details.cost_params.profit_margin_percent
).toBeTruthy();
expect(typeof mixnode.bond_information.layer).toBe("number");
});
});
@@ -136,7 +211,10 @@ describe("Get mixnode data", (): void => {
it("Get active mixnodes detailed", async (): Promise<void> => {
const response = await contract.getActiveMixnodesDetailed();
response.forEach(function (mixnode) {
expect(mixnode.mixnode_details.rewarding_details.cost_params.profit_margin_percent).toBeTruthy();
expect(
mixnode.mixnode_details.rewarding_details.cost_params
.profit_margin_percent
).toBeTruthy();
});
});
@@ -150,14 +228,21 @@ describe("Get mixnode data", (): void => {
it("Get rewarded mixnodes detailed", async (): Promise<void> => {
const response = await contract.getRewardedMixnodesDetailed();
response.forEach(function (mixnode) {
expect(mixnode.mixnode_details.rewarding_details.last_rewarded_epoch).toBeTruthy();
expect(
mixnode.mixnode_details.rewarding_details.last_rewarded_epoch
).toBeTruthy();
});
});
it("Get blacklisted mixnodes", async (): Promise<void> => {
const response = await contract.getBlacklistedMixnodes();
response.forEach(function (value) {
expect(typeof value).toBe("number");
});
if (response === null) {
// no blacklisted mixnodes returns an empty array
expect(response).toBeNull();
} else {
response.forEach(function (value) {
expect(typeof value).toBe("number");
});
}
});
});
@@ -1,28 +1,24 @@
import ContractCache from "../../src/endpoints/ContractCache";
import ConfigHandler from "../../src/config/configHandler";
let contract: ContractCache;
let config: ConfigHandler;
describe("Get service provider info", (): void => {
beforeAll(async (): Promise<void> => {
contract = new ContractCache();
config = ConfigHandler.getInstance();
});
beforeAll(async (): Promise<void> => {
contract = new ContractCache();
});
it("Get service providers", async (): Promise<void> => {
const response = await contract.getServiceProviders();
if ("[service_id]" in response) {
response.services.forEach((x) => {
expect(typeof x.service.nym_address.address).toBe("string");
expect(typeof x.service.service_type).toBe("string");
expect(typeof x.service.block_height).toBe("number");
expect(typeof x.service.announcer).toBe("string");
expect(typeof x.service.deposit.amount).toBe("string");
expect(typeof x.service.deposit.denom).toBe("string");
});
} else if ("[ ]" in response) {
return;
}
});
});
it("Get service providers", async (): Promise<void> => {
const response = await contract.getServiceProviders();
if ("[service_id]" in response) {
response.services.forEach((x) => {
expect(typeof x.service.nym_address.address).toBe("string");
expect(typeof x.service.service_type).toBe("string");
expect(typeof x.service.block_height).toBe("number");
expect(typeof x.service.announcer).toBe("string");
expect(typeof x.service.deposit.amount).toBe("string");
expect(typeof x.service.deposit.denom).toBe("string");
});
} else if ("[ ]" in response) {
return;
}
});
});
@@ -40,7 +40,9 @@ describe("Get gateway data", (): void => {
expect(identity_key).toStrictEqual(response.identity);
expect(typeof response.owner).toBe("string");
} else if ("message" in response) {
expect(response.message).toContain("could not find uptime history associated with gateway");
expect(response.message).toContain(
"could not find uptime history associated with gateway"
);
}
});
@@ -58,7 +60,9 @@ describe("Get gateway data", (): void => {
expect(identity_key).toStrictEqual(response.identity);
expect(typeof response.count).toBe("number");
} else if ("message" in response) {
expect(response.message).toContain("could not find uptime history associated with mixnode");
expect(response.message).toContain(
"could not find uptime history associated with mixnode"
);
}
});
@@ -55,7 +55,9 @@ describe("Get mixnode data", (): void => {
expect(identity_key).toStrictEqual(response.mix_id);
expect(typeof response.owner).toBe("string");
} else if ("message" in response) {
expect(response.message).toContain("could not find uptime history associated with mixnode");
expect(response.message).toContain(
"could not find uptime history associated with mixnode"
);
}
});
@@ -70,7 +72,9 @@ describe("Get mixnode data", (): void => {
const identity_key = config.environmnetConfig.mix_id;
const response = await status.getMixnodeRewardComputation(identity_key);
if ("estimation" in response) {
expect(response.reward_params.interval.sybil_resistance).toStrictEqual("0.3");
expect(response.reward_params.interval.sybil_resistance).toStrictEqual(
"0.3"
);
expect(response.reward_params.active_set_size).toStrictEqual(240);
expect(typeof response.reward_params.interval.reward_pool).toBe("string");
} else if ("message" in response) {
@@ -108,7 +112,9 @@ describe("Get mixnode data", (): void => {
const response = await status.getUnfilteredMixnodes();
response.forEach((x) => {
expect(typeof x.stake_saturation).toBe("string");
expect(typeof x.mixnode_details.rewarding_details.last_rewarded_epoch).toBe("number");
expect(
typeof x.mixnode_details.rewarding_details.last_rewarded_epoch
).toBe("number");
});
});
@@ -116,7 +122,9 @@ describe("Get mixnode data", (): void => {
const identity_key = config.environmnetConfig.mix_id;
const response = await status.getMixnodeStatus(identity_key);
const unfiltered_mixnodes_response = await status.getUnfilteredMixnodes();
const mixnode = unfiltered_mixnodes_response.find(x => x.mixnode_details.bond_information.mix_id === identity_key);
const mixnode = unfiltered_mixnodes_response.find(
(x) => x.mixnode_details.bond_information.mix_id === identity_key
);
if (mixnode) {
expect(response.status).toStrictEqual("active");
} else {
@@ -127,7 +135,9 @@ describe("Get mixnode data", (): void => {
it("Get all rewarded mixnodes", async (): Promise<void> => {
const response = await status.getDetailedRewardedMixnodes();
response.forEach((x) => {
expect(typeof x.mixnode_details.rewarding_details.last_rewarded_epoch).toBe("number");
expect(
typeof x.mixnode_details.rewarding_details.last_rewarded_epoch
).toBe("number");
});
});
@@ -146,7 +156,9 @@ describe("Get mixnode data", (): void => {
it("with correct data", async (): Promise<void> => {
const mix_id = config.environmnetConfig.mix_id;
const response = await status.sendMixnodeRewardEstimatedComputation(mix_id);
const response = await status.sendMixnodeRewardEstimatedComputation(
mix_id
);
expect(typeof response.estimation.delegates).toBe("string");
});
});
+3 -2
View File
@@ -10,7 +10,8 @@ qa:
log_level: error
prod:
api_base_url: https://validator.nymtech.net/api/v1
mixnode_identity: DLdMKLPywEy1vnu3yPrtXvzY7fw1puiiHpA9n9UQatiQ
gateway_identity: CgQrYP8etksSBf4nALNqp93SHPpgFwEUyTsjBNNLj5WM
mix_id: 730
mixnode_identity: 3pMCJswCyA19MGYWGDWT5fBk2M8ybSZGXttyAoNY5gBB
gateway_identity: 2BuMSfMW3zpeAjKXyKLhmY4QW1DXurrtSPEJ6CjX3SEh
log_level: error
time_zone: utc
@@ -125,7 +125,7 @@ export interface EpochLength {
}
export interface ServiceProviders {
services: (Services)[];
services: Services[];
}
export interface Services {
service_id: number;
@@ -145,4 +145,3 @@ export interface Deposit {
denom: string;
amount: string;
}
-6
View File
@@ -2,12 +2,6 @@
## [Unreleased]
## [v1.1.16] (2023-08-08)
- Uncouple network-requester <-> gateway in nym-connect and harbourmaster ([#3472])
[#3472]: https://github.com/nymtech/nym/issues/3472
## [v1.1.15] (2023-07-25)
- NC Desktop - remove sentry DSN from code ([#3694])
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@nym/nym-connect",
"version": "1.1.16",
"version": "1.1.15",
"main": "index.js",
"license": "MIT",
"scripts": {
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "nym-connect"
version = "1.1.16"
version = "1.1.15"
description = "nym-connect"
authors = ["Nym Technologies SA"]
license = ""
@@ -1,7 +1,7 @@
{
"package": {
"productName": "nym-connect",
"version": "1.1.16"
"version": "1.1.15"
},
"build": {
"distDir": "../dist",
-127
View File
@@ -1,127 +0,0 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.21'
id 'io.sentry.android.gradle' version '3.11.0'
}
android {
namespace 'net.nymtech.nyms5'
compileSdk 33
defaultConfig {
applicationId "net.nymtech.nyms5"
minSdk 24
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
flavorDimensions "abi"
productFlavors {
universal {
dimension "abi"
ndk {
abiFilters "arm64-v8a", "armeabi-v7a", "x86_64", "x86"
}
}
arch64 {
dimension "abi"
ndk {
abiFilters "arm64-v8a", "x86_64"
}
}
arm64 {
dimension "abi"
ndk {
abiFilters "arm64-v8a"
}
}
arm {
dimension "abi"
ndk {
abiFilters "armeabi-v7a"
}
}
x86_64 {
dimension "abi"
ndk {
abiFilters "x86_64"
}
}
x86 {
dimension "abi"
ndk {
abiFilters "x86"
}
}
}
// splits {
// abi {
// enable true
// reset()
// include "x86_64", "arm64-v8a"
// universalApk true
// }
// }
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.4.6'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
implementation 'androidx.activity:activity-compose:1.7.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0'
implementation platform('androidx.compose:compose-bom:2022.10.00')
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1'
implementation 'androidx.navigation:navigation-compose:2.6.0'
implementation 'androidx.compose.runtime:runtime-livedata'
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-graphics'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.compose.material3:material3'
implementation 'androidx.work:work-runtime-ktx:2.8.1'
implementation 'androidx.datastore:datastore-preferences:1.0.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation platform('androidx.compose:compose-bom:2022.10.00')
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
debugImplementation 'androidx.compose.ui:ui-tooling'
debugImplementation 'androidx.compose.ui:ui-test-manifest'
implementation 'com.github.kittinunf.fuel:fuel:2.3.1'
implementation 'io.sentry:sentry-android:6.24.0'
}
@@ -0,0 +1,137 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.serialization") version "1.8.21"
id("io.sentry.android.gradle") version "3.11.0"
}
android {
namespace = "net.nymtech.nyms5"
compileSdk = 33
defaultConfig {
applicationId = "net.nymtech.nyms5"
minSdk = 24
targetSdk = 33
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
flavorDimensions += "abi"
productFlavors {
create("universal") {
dimension = "abi"
ndk {
abiFilters += listOf("arm64-v8a", "armeabi-v7a", "x86_64", "x86")
}
}
create("arch64") {
dimension = "abi"
ndk {
abiFilters += listOf("arm64-v8a", "x86_64")
}
}
create("arm64") {
dimension = "abi"
ndk {
abiFilters += "arm64-v8a"
}
}
create("arm") {
dimension = "abi"
ndk {
abiFilters += "armeabi-v7a"
}
}
create("x86_64") {
dimension = "abi"
ndk {
abiFilters += "x86_64"
}
}
create("x86") {
dimension = "abi"
ndk {
abiFilters += "x86"
}
}
}
// splits {
// abi {
// enable true
// reset()
// include "x86_64", "arm64-v8a"
// universalApk true
// }
// }
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.6"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}
sentry {
// TODO disable auto upload of mapping files for now to ease FDroid submission
// (avoiding to have to provide a sentry auth token during compile time)
autoUploadProguardMapping.set(false)
}
dependencies {
implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
implementation("androidx.activity:activity-compose:1.7.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0")
implementation(platform("androidx.compose:compose-bom:2022.10.00"))
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1")
implementation("androidx.navigation:navigation-compose:2.6.0")
implementation("androidx.compose.runtime:runtime-livedata")
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
implementation("androidx.work:work-runtime-ktx:2.8.1")
implementation("androidx.datastore:datastore-preferences:1.0.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
androidTestImplementation(platform("androidx.compose:compose-bom:2022.10.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
implementation("com.github.kittinunf.fuel:fuel:2.3.1")
implementation("io.sentry:sentry-android:6.24.0")
}
@@ -19,7 +19,6 @@ import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.runBlocking
val Context.dataStore: DataStore<Preferences> by preferencesDataStore(name = "settings")
val monitoringKey = booleanPreferencesKey("monitoring")
-6
View File
@@ -1,6 +0,0 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.0.2' apply false
id 'com.android.library' version '8.0.2' apply false
id 'org.jetbrains.kotlin.android' version '1.8.20' apply false
}
@@ -0,0 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.1.0" apply false
id("com.android.library") version "8.1.0" apply false
id("org.jetbrains.kotlin.android") version "1.8.20" apply false
}
@@ -12,5 +12,7 @@ dependencyResolutionManagement {
mavenCentral()
}
}
rootProject.name = "nyms5"
include ':app'
include(":app")
+48 -243
View File
@@ -21,20 +21,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
dependencies = [
"crypto-common",
"generic-array 0.14.7",
]
[[package]]
name = "aes"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8"
dependencies = [
"cfg-if",
"cipher 0.3.0",
"cpufeatures",
"ctr 0.8.0",
"opaque-debug 0.3.0",
"generic-array",
]
[[package]]
@@ -44,7 +31,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241"
dependencies = [
"cfg-if",
"cipher 0.4.4",
"cipher",
"cpufeatures",
]
@@ -55,11 +42,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c"
dependencies = [
"aead",
"aes 0.8.2",
"cipher 0.4.4",
"ctr 0.9.2",
"aes",
"cipher",
"ctr",
"ghash",
"subtle 2.4.1",
"subtle",
]
[[package]]
@@ -110,16 +97,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95c2fcf79ad1932ac6269a738109997a83c227c09b75842ae564dc8ede6a861c"
dependencies = [
"base64ct",
"blake2 0.10.6",
"blake2",
"password-hash",
]
[[package]]
name = "arrayref"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544"
[[package]]
name = "async-trait"
version = "0.1.64"
@@ -225,14 +206,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e141fb0f8be1c7b45887af94c88b182472b57c96b56773250ae00cd6a14a164"
dependencies = [
"bs58 0.5.0",
"hmac 0.12.1",
"hmac",
"k256 0.13.1",
"once_cell",
"pbkdf2",
"rand_core 0.6.4",
"ripemd",
"sha2 0.10.6",
"subtle 2.4.1",
"subtle",
"zeroize",
]
@@ -274,18 +255,6 @@ dependencies = [
"wyz",
]
[[package]]
name = "blake2"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330"
dependencies = [
"byte-tools",
"crypto-mac 0.7.0",
"digest 0.8.1",
"opaque-debug 0.2.3",
]
[[package]]
name = "blake2"
version = "0.10.6"
@@ -307,7 +276,7 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
dependencies = [
"generic-array 0.14.7",
"generic-array",
]
[[package]]
@@ -316,7 +285,7 @@ version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e"
dependencies = [
"generic-array 0.14.7",
"generic-array",
]
[[package]]
@@ -329,7 +298,7 @@ dependencies = [
"group 0.11.0",
"pairing",
"rand_core 0.6.4",
"subtle 2.4.1",
"subtle",
"zeroize",
]
@@ -385,12 +354,6 @@ version = "3.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535"
[[package]]
name = "byte-tools"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
[[package]]
name = "bytemuck"
version = "1.13.0"
@@ -495,25 +458,6 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chacha"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddf3c081b5fba1e5615640aae998e0fbd10c24cbd897ee39ed754a77601a4862"
dependencies = [
"byteorder",
"keystream",
]
[[package]]
name = "cipher"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
dependencies = [
"generic-array 0.14.7",
]
[[package]]
name = "cipher"
version = "0.4.4"
@@ -849,9 +793,9 @@ version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef"
dependencies = [
"generic-array 0.14.7",
"generic-array",
"rand_core 0.6.4",
"subtle 2.4.1",
"subtle",
"zeroize",
]
@@ -861,9 +805,9 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15"
dependencies = [
"generic-array 0.14.7",
"generic-array",
"rand_core 0.6.4",
"subtle 2.4.1",
"subtle",
"zeroize",
]
@@ -873,31 +817,11 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
"generic-array 0.14.7",
"generic-array",
"rand_core 0.6.4",
"typenum",
]
[[package]]
name = "crypto-mac"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5"
dependencies = [
"generic-array 0.12.4",
"subtle 1.0.0",
]
[[package]]
name = "crypto-mac"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714"
dependencies = [
"generic-array 0.14.7",
"subtle 2.4.1",
]
[[package]]
name = "cssparser"
version = "0.27.2"
@@ -944,22 +868,13 @@ dependencies = [
"syn 1.0.107",
]
[[package]]
name = "ctr"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea"
dependencies = [
"cipher 0.3.0",
]
[[package]]
name = "ctr"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
dependencies = [
"cipher 0.4.4",
"cipher",
]
[[package]]
@@ -977,7 +892,7 @@ dependencies = [
"byteorder",
"digest 0.9.0",
"rand_core 0.5.1",
"subtle 2.4.1",
"subtle",
"zeroize",
]
@@ -1168,22 +1083,13 @@ dependencies = [
"syn 1.0.107",
]
[[package]]
name = "digest"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
dependencies = [
"generic-array 0.12.4",
]
[[package]]
name = "digest"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
dependencies = [
"generic-array 0.14.7",
"generic-array",
]
[[package]]
@@ -1195,7 +1101,7 @@ dependencies = [
"block-buffer 0.10.3",
"const-oid",
"crypto-common",
"subtle 2.4.1",
"subtle",
]
[[package]]
@@ -1403,12 +1309,12 @@ dependencies = [
"der 0.6.1",
"digest 0.10.7",
"ff 0.12.1",
"generic-array 0.14.7",
"generic-array",
"group 0.12.1",
"pkcs8 0.9.0",
"rand_core 0.6.4",
"sec1 0.3.0",
"subtle 2.4.1",
"subtle",
"zeroize",
]
@@ -1422,12 +1328,12 @@ dependencies = [
"crypto-bigint 0.5.2",
"digest 0.10.7",
"ff 0.13.0",
"generic-array 0.14.7",
"generic-array",
"group 0.13.0",
"pkcs8 0.10.2",
"rand_core 0.6.4",
"sec1 0.7.3",
"subtle 2.4.1",
"subtle",
"zeroize",
]
@@ -1536,7 +1442,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924"
dependencies = [
"rand_core 0.6.4",
"subtle 2.4.1",
"subtle",
]
[[package]]
@@ -1546,7 +1452,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160"
dependencies = [
"rand_core 0.6.4",
"subtle 2.4.1",
"subtle",
]
[[package]]
@@ -1556,7 +1462,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449"
dependencies = [
"rand_core 0.6.4",
"subtle 2.4.1",
"subtle",
]
[[package]]
@@ -1836,15 +1742,6 @@ dependencies = [
"windows 0.39.0",
]
[[package]]
name = "generic-array"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd"
dependencies = [
"typenum",
]
[[package]]
name = "generic-array"
version = "0.14.7"
@@ -1900,7 +1797,7 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40"
dependencies = [
"opaque-debug 0.3.0",
"opaque-debug",
"polyval",
]
@@ -2031,7 +1928,7 @@ dependencies = [
"byteorder",
"ff 0.11.1",
"rand_core 0.6.4",
"subtle 2.4.1",
"subtle",
]
[[package]]
@@ -2042,7 +1939,7 @@ checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7"
dependencies = [
"ff 0.12.1",
"rand_core 0.6.4",
"subtle 2.4.1",
"subtle",
]
[[package]]
@@ -2053,7 +1950,7 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
dependencies = [
"ff 0.13.0",
"rand_core 0.6.4",
"subtle 2.4.1",
"subtle",
]
[[package]]
@@ -2229,26 +2126,6 @@ version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0"
[[package]]
name = "hkdf"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01706d578d5c281058480e673ae4086a9f4710d8df1ad80a5b03e39ece5f886b"
dependencies = [
"digest 0.9.0",
"hmac 0.11.0",
]
[[package]]
name = "hmac"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
dependencies = [
"crypto-mac 0.11.1",
"digest 0.9.0",
]
[[package]]
name = "hmac"
version = "0.12.1"
@@ -2500,7 +2377,7 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
dependencies = [
"generic-array 0.14.7",
"generic-array",
]
[[package]]
@@ -2659,12 +2536,6 @@ dependencies = [
"signature 2.1.0",
]
[[package]]
name = "keystream"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28"
[[package]]
name = "kuchiki"
version = "0.8.1"
@@ -2701,12 +2572,6 @@ dependencies = [
"pkg-config",
]
[[package]]
name = "libm"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb"
[[package]]
name = "libz-sys"
version = "1.1.8"
@@ -2734,18 +2599,6 @@ version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
[[package]]
name = "lioness"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9"
dependencies = [
"arrayref",
"blake2 0.8.1",
"chacha",
"keystream",
]
[[package]]
name = "lock_api"
version = "0.4.9"
@@ -2989,7 +2842,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
dependencies = [
"autocfg",
"libm",
]
[[package]]
@@ -3268,7 +3120,6 @@ dependencies = [
name = "nym-sphinx-types"
version = "0.2.0"
dependencies = [
"sphinx-packet",
"thiserror",
]
@@ -3278,7 +3129,7 @@ version = "0.1.0"
dependencies = [
"aes-gcm",
"argon2",
"generic-array 0.14.7",
"generic-array",
"getrandom 0.2.10",
"rand 0.8.5",
"serde",
@@ -3517,12 +3368,6 @@ version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
[[package]]
name = "opaque-debug"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
[[package]]
name = "opaque-debug"
version = "0.3.0"
@@ -3677,7 +3522,7 @@ checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166"
dependencies = [
"base64ct",
"rand_core 0.6.4",
"subtle 2.4.1",
"subtle",
]
[[package]]
@@ -3699,7 +3544,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
dependencies = [
"digest 0.10.7",
"hmac 0.12.1",
"hmac",
]
[[package]]
@@ -3980,7 +3825,7 @@ checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6"
dependencies = [
"cfg-if",
"cpufeatures",
"opaque-debug 0.3.0",
"opaque-debug",
"universal-hash",
]
@@ -4186,16 +4031,6 @@ dependencies = [
"getrandom 0.2.10",
]
[[package]]
name = "rand_distr"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9e9532ada3929fb8b2e9dbe28d1e06c9b2cc65813f074fcb6bd5fbefeff9d56"
dependencies = [
"num-traits",
"rand 0.7.3",
]
[[package]]
name = "rand_hc"
version = "0.2.0"
@@ -4322,7 +4157,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb"
dependencies = [
"crypto-bigint 0.4.9",
"hmac 0.12.1",
"hmac",
"zeroize",
]
@@ -4332,8 +4167,8 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2"
dependencies = [
"hmac 0.12.1",
"subtle 2.4.1",
"hmac",
"subtle",
]
[[package]]
@@ -4532,9 +4367,9 @@ checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928"
dependencies = [
"base16ct 0.1.1",
"der 0.6.1",
"generic-array 0.14.7",
"generic-array",
"pkcs8 0.9.0",
"subtle 2.4.1",
"subtle",
"zeroize",
]
@@ -4546,9 +4381,9 @@ checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc"
dependencies = [
"base16ct 0.2.0",
"der 0.7.7",
"generic-array 0.14.7",
"generic-array",
"pkcs8 0.10.2",
"subtle 2.4.1",
"subtle",
"zeroize",
]
@@ -4798,7 +4633,7 @@ dependencies = [
"cfg-if",
"cpufeatures",
"digest 0.9.0",
"opaque-debug 0.3.0",
"opaque-debug",
]
[[package]]
@@ -4909,30 +4744,6 @@ dependencies = [
"system-deps 5.0.0",
]
[[package]]
name = "sphinx-packet"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc43eda802856ee82a7555c7b75ceb9e07451741c7a2f5f23d036020e01189d4"
dependencies = [
"aes 0.7.5",
"arrayref",
"blake2 0.8.1",
"bs58 0.4.0",
"byteorder",
"chacha",
"curve25519-dalek",
"digest 0.9.0",
"hkdf",
"hmac 0.11.0",
"lioness",
"log",
"rand 0.7.3",
"rand_distr",
"sha2 0.9.9",
"subtle 2.4.1",
]
[[package]]
name = "spin"
version = "0.5.2"
@@ -5034,12 +4845,6 @@ dependencies = [
"syn 1.0.107",
]
[[package]]
name = "subtle"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee"
[[package]]
name = "subtle"
version = "2.4.1"
@@ -5399,7 +5204,7 @@ dependencies = [
"serde_repr",
"sha2 0.10.6",
"signature 2.1.0",
"subtle 2.4.1",
"subtle",
"subtle-encoding",
"tendermint-proto",
"time",
@@ -5459,7 +5264,7 @@ dependencies = [
"serde",
"serde_bytes",
"serde_json",
"subtle 2.4.1",
"subtle",
"subtle-encoding",
"tendermint",
"tendermint-config",
@@ -5869,7 +5674,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d3160b73c9a19f7e2939a2fdad446c57c1bbbbf4d919d3213ff1267a580d8b5"
dependencies = [
"crypto-common",
"subtle 2.4.1",
"subtle",
]
[[package]]
+7 -7
View File
@@ -2024,10 +2024,10 @@ pkg-dir@4.2.0:
dependencies:
find-up "^4.0.0"
prettier@2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c"
integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==
prettier@^2.8.7:
version "2.8.8"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
pretty-format@^27.3.1:
version "27.3.1"
@@ -2259,9 +2259,9 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1:
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
"semver@2 || 3 || 4 || 5":
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
version "5.7.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==
serialize-error@^8.0.0:
version "8.1.0"
+4 -2
View File
@@ -8,6 +8,7 @@
"ts-packages/*",
"nym-wallet",
"nym-connect/**",
"nym-browser-extension",
"explorer",
"types",
"clients/validator"
@@ -28,8 +29,9 @@
"tsc": "lerna run tsc --stream",
"types:lint:fix": "lerna run lint:fix --scope @nymproject/types --scope @nymproject/nym-wallet-app",
"audit:fix": "npm_config_yes=true npx yarn-audit-fix -- --dry-run",
"preinstall": "yarn install:copy-placeholders",
"install:copy-placeholders": "cp scripts/build/yarn/wasm-placeholder/package.json sdk/typescript/packages/nym-client-wasm"
"preinstall": "yarn install:copy-placeholders && yarn install:copy-storage-placeholders",
"install:copy-placeholders": "cp scripts/build/yarn/wasm-placeholder/package.json sdk/typescript/packages/nym-client-wasm",
"install:copy-storage-placeholders": "mkdir -p nym-browser-extension/storage/pkg && cp scripts/build/yarn/storage-placeholder/package.json nym-browser-extension/storage/pkg"
},
"devDependencies": {
"lerna": "^6.6.2",
+2 -1
View File
@@ -1,2 +1,3 @@
src/mixnet/wasm/worker.js
src/mixnet/node-tester/worker.js
src/mixnet/node-tester/worker.js
docs/
@@ -0,0 +1,17 @@
## Install dependencies
run `yarn install` to install dependencies
## Generate docs
We use TypeDoc for document generation https://typedoc.org/
To generate docs run `yarn docs:generate`. Generated docs can be found the `./docs` directory.
To view the generated docs in a webpage run `yarn docs:serve`. The docs will be available to view at `http://localhost:3000`.
## Local document development
To support the development process we have a local server that will watch for changes to the src files and update the docs in real time.
Run `yarn docs:dev` to start a local server to view the docs. Again, The docs will be available to view at `http://localhost:3000`.
+12 -6
View File
@@ -28,11 +28,15 @@
"build:dev": "yarn build:dev:only-this",
"build:dev:only-this": "scripts/build.sh",
"build:local": "run-s build:dependencies:nym-client-wasm build:dev:only-this",
"docs:watch": "nodemon --ext ts --watch './src/**/*' --watch './typedoc.json' --exec \"yarn docs:generate\"",
"docs:generate": "typedoc",
"docs:serve": "reload -b -d ./docs -p 3000",
"docs:dev": "run-p docs:watch docs:serve ",
"test": "node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js -c=jest.config.mjs --no-cache"
},
"dependencies": {
"@npmcli/node-gyp": "^3.0.0",
"@nymproject/nym-client-wasm": "1.0.0",
"@nymproject/nym-client-wasm": "1",
"comlink": "^4.3.1",
"lerna": "^6.6.2",
"node-gyp": "^9.3.1"
@@ -52,10 +56,10 @@
"@rollup/plugin-terser": "^0.2.1",
"@rollup/plugin-typescript": "^10.0.1",
"@rollup/plugin-wasm": "^6.1.1",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.13.0",
"@types/jest": "^27.0.1",
"@types/node": "^16.7.13",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.13.0",
"eslint": "^8.10.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^16.1.0",
@@ -67,13 +71,15 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.2",
"eslint-plugin-react-hooks": "^4.3.0",
"jest": "^29.5.0",
"nodemon": "3.0.1",
"reload": "^3.2.1",
"rimraf": "^3.0.2",
"rollup": "^3.9.1",
"rollup-plugin-base64": "^1.0.1",
"rollup-plugin-web-worker-loader": "^1.6.1",
"typescript": "^4.8.4",
"jest": "^29.5.0",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.2"
"typedoc": "^0.24.8",
"typescript": "^4.8.4"
}
}
@@ -1,2 +1,7 @@
// eslint-disable-next-line no-console
/**
* @ignore
* @internal
*/
export const notImplementedYet = () => console.log('Not implement, coming soon...');
@@ -1,5 +0,0 @@
const QA_VALIDATOR_URL = 'https://qa-nym-api.qa.nymte.ch/api';
const QWERTY_VALIDATOR_URL = 'https://qwerty-validator-api.qa.nymte.ch/api';
const MAINNET_VALIDATOR_URL = 'https://validator.nymtech.net/api/';
export { QA_VALIDATOR_URL, QWERTY_VALIDATOR_URL, MAINNET_VALIDATOR_URL };
@@ -25,8 +25,6 @@ export interface NodeTesterLoadedEvent {
};
}
export type Network = 'QA' | 'SANDBOX' | 'MAINNET';
export type NodeTestResultResponse = {
score: number;
sentPackets: number;
@@ -35,31 +33,3 @@ export type NodeTestResultResponse = {
duplicatePackets: number;
duplicateAcks: number;
};
export type Error = {
kind: 'Error';
args: { message: string };
};
export type WorkerLoaded = {
kind: 'WorkerLoaded';
};
export type DisplayTesterResults = {
kind: 'DisplayTesterResults';
args: {
result: NodeTestResultResponse;
};
};
export type TestPacket = {
kind: 'TestPacket';
args: {
mixnodeIdentity: string;
network: Network;
};
};
export type TestStatus = 'Stopped' | 'Running' | 'Complete';
export type NodeTestEvent = Error | DisplayTesterResults | TestPacket | WorkerLoaded;
@@ -5,8 +5,8 @@ import {
ConnectedEvent,
EventKinds,
IWebWorker,
IWebWorkerAsync,
IWebWorkerEvents,
Client,
Events,
LoadedEvent,
MimeTypes,
RawMessageReceivedEvent,
@@ -15,20 +15,40 @@ import {
import { createSubscriptions } from './subscriptions';
/**
* Client for the Nym mixnet.
* Options for the Nym mixnet client.
* @property autoConvertStringMimeTypes - An array of mime types.
* @example
* ```typescript
* const client = await createNymMixnetClient({
* autoConvertStringMimeTypes: [MimeTypes.ApplicationJson, MimeTypes.TextPlain],
* });
* ```
*/
export interface NymMixnetClientOptions {
autoConvertStringMimeTypes?: string[] | MimeTypes[];
}
/**
* The client for the Nym mixnet which gives access to client methods and event subscriptions.
* Returned by the {@link createNymMixnetClient} function.
*
*/
export interface NymMixnetClient {
client: IWebWorkerAsync;
events: IWebWorkerEvents;
client: Client;
events: Events;
}
/**
* Create a client to send and receive traffic from the Nym mixnet.
*
* @required
* @returns
* @example
* ```typescript
* const client = await createNymMixnetClient();
* ```
*/
export const createNymMixnetClient = async (options?: {
autoConvertStringMimeTypes?: string[] | MimeTypes[];
}): Promise<NymMixnetClient> => {
export const createNymMixnetClient = async (options?: NymMixnetClientOptions): Promise<NymMixnetClient> => {
// create a web worker that runs the WASM client on another thread and wait until it signals that it is ready
// eslint-disable-next-line @typescript-eslint/no-use-before-define
const worker = await createWorker();
@@ -53,7 +73,7 @@ export const createNymMixnetClient = async (options?: {
});
// manage the subscribers, returning self-unsubscribe methods
const events: IWebWorkerEvents = {
const events: Events = {
subscribeToConnected: (handler) => addSubscription<ConnectedEvent>(EventKinds.Connected, handler),
subscribeToLoaded: (handler) => addSubscription<LoadedEvent>(EventKinds.Loaded, handler),
subscribeToTextMessageReceivedEvent: (handler) =>
@@ -65,7 +85,7 @@ export const createNymMixnetClient = async (options?: {
};
// let comlink handle interop with the web worker
const client: IWebWorkerAsync = Comlink.wrap<IWebWorker>(worker);
const client: Client = Comlink.wrap<IWebWorker>(worker);
// set any options
if (options?.autoConvertStringMimeTypes) {
@@ -3,32 +3,138 @@ import type { DebugWasm } from './types-from-wasm-pack';
export * from './types-from-wasm-pack';
/**
* Some common mime types, however, you can always just specify the mime-type as a string
*
* @ignore
* @hidden
* @internal
*/
export enum MimeTypes {
ApplicationOctetStream = 'application/octet-stream',
TextPlain = 'text/plain',
ApplicationJson = 'application/json',
export interface IWebWorker {
start: (config: NymClientConfig) => void;
stop: () => void;
selfAddress: () => string | undefined;
setTextMimeTypes: (mimeTypes: string[]) => void;
getTextMimeTypes: () => string[];
send: (args: { payload: Payload; recipient: string; replySurbs?: number }) => void;
rawSend: (args: { payload: Uint8Array; recipient: string; replySurbs?: number }) => void;
}
export interface Payload {
message: string | Uint8Array;
mimeType?: MimeTypes | string;
headers?: string;
export interface Client {
/**
* Start the client.
*
* @example
*
* ```typescript
* const client = await createNymMixnetClient();
* await client.start({
* clientId: 'my-client',
* nymApiUrl: 'https://validator.nymtech.net/api',
* });
*
*/
start: (config: NymClientConfig) => Promise<void>;
/**
* Stop the client.
* @example
* ```typescript
* const client = await createNymMixnetClient();
* await client.start({
* clientId: 'my-client',
* nymApiUrl: 'https://validator.nymtech.net/api',
* });
* await client.stop();
* ```
*/
stop: () => Promise<void>;
/**
* Get the client address
* @example
* ```typescript
* const client = await createNymMixnetClient();
* await client.start({
* clientId: 'my-client',
* nymApiUrl: 'https://validator.nymtech.net/api',
* });
* const address = await client.selfAddress();
* ```
*/
selfAddress: () => Promise<string | undefined>;
/**
* Set the mime-types that should be used when using the {@link Client.send} method.
* @example
* ```typescript
* const client = await createNymMixnetClient();
* await client.start({
* clientId: 'my-client',
* nymApiUrl: 'https://validator.nymtech.net/api',
* });
* await client.setTextMimeTypes(['text/plain', 'application/json']);
* ```
* @param mimeTypes
* @see {@link MimeTypes}
* @see {@link Client.send}
* @see {@link Client.getTextMimeTypes}
*/
setTextMimeTypes: (mimeTypes: string[]) => void;
/**
* Get the mime-types that are automatically converted to strings.
* @example
* ```typescript
* const client = await createNymMixnetClient();
* await client.start({
* clientId: 'my-client',
* nymApiUrl: 'https://validator.nymtech.net/api',
* });
* const mimeTypes = await client.getTextMimeTypes();
* ```
* @see {@link MimeTypes}
* @see {@link Payload}
* @see {@link Client.send}
* @see {@link Client.setTextMimeTypes}
*/
getTextMimeTypes: () => Promise<string[]>;
/**
* Send some data through the mixnet message.
* @example
* ```typescript
* const client = await createNymMixnetClient();
* await client.start({
* clientId: 'my-client',
* nymApiUrl: 'https://validator.nymtech.net/api',
* });
* await client.send({
* payload: 'Hello world',
* recipient: // recipient address,
* });
* ```
* @see {@link MimeTypes}
* @see {@link Payload}
*/
send: (args: { payload: Payload; recipient: string; replySurbs?: number }) => Promise<void>;
/**
* Send a raw payload, without any mime-type conversion.
* @example
* ```typescript
* const client = await createNymMixnetClient();
* await client.start({
* clientId: 'my-client',
* nymApiUrl: 'https://validator.nymtech.net/api',
* });
* const payload = new Uint8Array([1, 2, 3]);
* await client.rawSend({
* payload,
* recipient: // recipient address,
* });
* ```
* @see {@link MimeTypes}
* @see {@link Payload}
*/
rawSend: (args: { payload: Uint8Array; recipient: string; replySurbs?: number }) => Promise<void>;
}
export type OnPayloadFn = (payload: Payload) => void;
export type OnRawPayloadFn = (payload: Uint8Array) => void;
export type EventHandlerFn<E> = (e: E) => void | Promise<void>;
export type EventHandlerSubscribeFn<E> = (fn: EventHandlerFn<E>) => EventHandlerUnsubscribeFn;
export type EventHandlerUnsubscribeFn = () => void;
/**
* The configuration passed to the {@link Client.start} method of the {@link Client}
*/
export interface NymClientConfig {
/**
* A human-readable id for the client.
@@ -56,31 +162,99 @@ export interface NymClientConfig {
debug?: DebugWasm;
}
export interface IWebWorker {
start: (config: NymClientConfig) => void;
stop: () => void;
selfAddress: () => string | undefined;
setTextMimeTypes: (mimeTypes: string[]) => void;
getTextMimeTypes: () => string[];
send: (args: { payload: Payload; recipient: string; replySurbs?: number }) => void;
rawSend: (args: { payload: Uint8Array; recipient: string; replySurbs?: number }) => void;
}
export interface IWebWorkerAsync {
start: (config: NymClientConfig) => Promise<void>;
stop: () => Promise<void>;
selfAddress: () => Promise<string | undefined>;
setTextMimeTypes: (mimeTypes: string[]) => void;
getTextMimeTypes: () => Promise<string[]>;
send: (args: { payload: Payload; recipient: string; replySurbs?: number }) => Promise<void>;
rawSend: (args: { payload: Uint8Array; recipient: string; replySurbs?: number }) => Promise<void>;
export interface Events {
/**
* @see {@link LoadedEvent}
* @example
* ```typescript
* events.subscribeToLoaded((e) => {
* console.log(e.args); // { loaded: true }
* });
* ```
*/
subscribeToLoaded: EventHandlerSubscribeFn<LoadedEvent>;
/**
* @see {@link ConnectedEvent}
* @example
* ```typescript
* events.subscribeConnected((e) => {
* console.log(e.args.address); // Client address
* });
*
*/
subscribeToConnected: EventHandlerSubscribeFn<ConnectedEvent>;
/**
* @returns {@link EventHandlerUnsubscribeFn}
* @see {@link StringMessageReceivedEvent}
* @example
* ```typescript
* const unsubscribe = events.subscribeToTextMessageReceivedEvent((e) => {
* console.log(e.args.payload); // string
* });
*
* // Stop listening to the event
* unsubscribe();
* ```
*/
subscribeToTextMessageReceivedEvent: EventHandlerSubscribeFn<StringMessageReceivedEvent>;
/**
* @returns {@link EventHandlerUnsubscribeFn}
* @see {@link BinaryMessageReceivedEvent}
* @example
* ```typescript
* const unsubscribe = events.subscribeToBinaryMessageReceivedEvent((e) => {
* console.log(e.args.payload); // Uint8Array
* });
*
* // Stop listening to the event
* unsubscribe();
* ```
*/
subscribeToBinaryMessageReceivedEvent: EventHandlerSubscribeFn<BinaryMessageReceivedEvent>;
/**
* @returns {@link EventHandlerUnsubscribeFn}
* @see {@link RawMessageReceivedEvent}
* @example
* ```typescript
* const unsubscribe = events.subscribeToRawMessageReceivedEvent((e) => {
* console.log(e.args.payload); // Uint8Array
* });
*
* // Stop listening to the event
* unsubscribe();
* ```
*/
subscribeToRawMessageReceivedEvent: EventHandlerSubscribeFn<RawMessageReceivedEvent>;
}
/**
* Enum representing various event kinds.
* @enum
*/
export enum EventKinds {
/**
* The event emitted when the nodetester is ready to be used.
*/
Loaded = 'Loaded',
/**
* The event emitted when connection to the gateway is established.
*/
Connected = 'Connected',
/**
* The event for when a message is received and interpreted as a string.
*/
StringMessageReceived = 'StringMessageReceived',
/**
* The event for when a binary message is received. BinaryMessage is a type of message that contains additional metadata, such as MIME type and some headers, along with the actual payload data.
*/
BinaryMessageReceived = 'BinaryMessageReceived',
/**
* The event for when a raw message is received. RawMessage represents the bytes that are received directly from the mixnet with no further parsing or interpretation done on them.
*/
RawMessageReceived = 'RawMessageReceived',
}
@@ -107,7 +281,6 @@ export interface StringMessageReceivedEvent {
headers?: string;
};
}
export interface BinaryMessageReceivedEvent {
kind: EventKinds.BinaryMessageReceived;
args: {
@@ -124,10 +297,54 @@ export interface RawMessageReceivedEvent {
};
}
export interface IWebWorkerEvents {
subscribeToLoaded: EventHandlerSubscribeFn<LoadedEvent>;
subscribeToConnected: EventHandlerSubscribeFn<ConnectedEvent>;
subscribeToTextMessageReceivedEvent: EventHandlerSubscribeFn<StringMessageReceivedEvent>;
subscribeToBinaryMessageReceivedEvent: EventHandlerSubscribeFn<BinaryMessageReceivedEvent>;
subscribeToRawMessageReceivedEvent: EventHandlerSubscribeFn<RawMessageReceivedEvent>;
/**
* Some common mime types, however, you can always just specify the mime-type as a string
*/
export enum MimeTypes {
ApplicationOctetStream = 'application/octet-stream',
TextPlain = 'text/plain',
ApplicationJson = 'application/json',
}
export interface Payload {
message: string | Uint8Array;
mimeType?: MimeTypes | string;
headers?: string;
}
/**
* @ignore
* @internal
*/
export type OnPayloadFn = (payload: Payload) => void;
/**
* @ignore
* @internal
*/
export type OnRawPayloadFn = (payload: Uint8Array) => void;
/**
* The **EventHandlerSubscribeFn** is a function that takes a callback of type {@link EventHandlerFn}
*
* @see {@link Events}
* @see {@link EventHandlerFn}
* @see {@link EventHandlerUnsubscribeFn}
*/
export type EventHandlerSubscribeFn<E> = (fn: EventHandlerFn<E>) => EventHandlerUnsubscribeFn;
/**
* The **EventHandlerFn** is a callback function that is passed to the {@link EventHandlerSubscribeFn}
* @see {@link Events}
* @see {@link EventHandlerFn}
* @see {@link EventHandlerSubscribeFn}
*/
export type EventHandlerFn<E> = (e: E) => void | Promise<void>;
/**
* The **EventHandlerUnsubscribeFn** function is returned by the {@link EventHandlerSubscribeFn}
* and can be used to stop listening for particular events
* @see {@link Events}
* @see {@link EventHandlerFn}
* @see {@link EventHandlerSubscribeFn}
*/
export type EventHandlerUnsubscribeFn = () => void;
+32
View File
@@ -0,0 +1,32 @@
{
"sort": ["kind"],
"entryPoints": ["./src/index.ts"],
"out": "./docs",
"exclude": ["./src/**/node-tester/*", "./src/**/wasm/types-from-wasm-pack.ts"],
"kindSortOrder": [
"Function",
"Interface",
"TypeAlias",
"Reference",
"Project",
"Module",
"Namespace",
"Enum",
"EnumMember",
"Class",
"Constructor",
"Property",
"Variable",
"Accessor",
"Method",
"ObjectLiteral",
"Parameter",
"TypeParameter",
"TypeLiteral",
"CallSignature",
"ConstructorSignature",
"IndexSignature",
"GetSignature",
"SetSignature"
]
}
@@ -3,7 +3,7 @@
[package]
name = "nym-network-requester"
version = "1.1.24"
version = "1.1.23"
authors.workspace = true
edition.workspace = true
rust-version = "1.65"
@@ -0,0 +1,16 @@
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use clap::Args;
use nym_bin_common::bin_info_owned;
use nym_bin_common::output_format::OutputFormat;
#[derive(Args)]
pub(crate) struct BuildInfo {
#[clap(short, long, default_value_t = OutputFormat::default())]
output: OutputFormat,
}
pub(crate) fn execute(args: BuildInfo) {
println!("{}", args.output.format(&bin_info_owned!()))
}
@@ -10,7 +10,7 @@ use crate::{
};
use clap::{CommandFactory, Parser, Subcommand};
use log::{error, info};
use nym_bin_common::build_information::BinaryBuildInformation;
use nym_bin_common::bin_info;
use nym_bin_common::completions::{fig_generate, ArgShell};
use nym_bin_common::version_checker;
use nym_client_core::client::base_client::storage::gateway_details::{
@@ -21,13 +21,13 @@ use nym_client_core::config::GatewayEndpointConfig;
use nym_client_core::error::ClientCoreError;
use nym_sphinx::params::PacketSize;
mod build_info;
mod init;
mod run;
mod sign;
lazy_static::lazy_static! {
pub static ref PRETTY_BUILD_INFORMATION: String =
BinaryBuildInformation::new(env!("CARGO_PKG_VERSION")).pretty_print();
pub static ref PRETTY_BUILD_INFORMATION: String = bin_info!().pretty_print();
}
// Helper for passing LONG_VERSION to clap
@@ -42,6 +42,10 @@ pub(crate) struct Cli {
#[clap(short, long)]
pub(crate) config_env_file: Option<std::path::PathBuf>,
/// Flag used for disabling the printed banner in tty.
#[clap(long)]
pub(crate) no_banner: bool,
#[clap(subcommand)]
command: Commands,
}
@@ -59,6 +63,9 @@ pub(crate) enum Commands {
/// Sign to prove ownership of this network requester
Sign(sign::Sign),
/// Show build information of this binary
BuildInfo(build_info::BuildInfo),
/// Generate shell completions
Completions(ArgShell),
@@ -119,10 +126,11 @@ pub(crate) fn override_config(config: Config, args: OverrideConfig) -> Config {
pub(crate) async fn execute(args: Cli) -> Result<(), NetworkRequesterError> {
let bin_name = "nym-network-requester";
match &args.command {
Commands::Init(m) => init::execute(m).await?,
Commands::Run(m) => run::execute(m).await?,
Commands::Sign(m) => sign::execute(m).await?,
match args.command {
Commands::Init(m) => init::execute(&m).await?,
Commands::Run(m) => run::execute(&m).await?,
Commands::Sign(m) => sign::execute(&m).await?,
Commands::BuildInfo(m) => build_info::execute(m),
Commands::Completions(s) => s.generate(&mut Cli::command(), bin_name),
Commands::GenerateFigSpec => fig_generate(&mut Cli::command(), bin_name),
}
@@ -13,7 +13,7 @@ use crate::{reply, socks5};
use async_trait::async_trait;
use futures::channel::mpsc;
use log::warn;
use nym_bin_common::build_information::BinaryBuildInformation;
use nym_bin_common::bin_info_owned;
use nym_client_core::config::disk_persistence::CommonClientPaths;
use nym_network_defaults::NymNetworkDetails;
use nym_service_providers_common::interface::{
@@ -101,7 +101,7 @@ impl ServiceProvider<Socks5Request> for NRServiceProvider {
) -> Result<BinaryInformation, Self::ServiceProviderError> {
Ok(BinaryInformation {
binary_name: env!("CARGO_PKG_NAME").to_string(),
build_information: BinaryBuildInformation::new(env!("CARGO_PKG_VERSION")).to_owned(),
build_information: bin_info_owned!(),
})
}
@@ -18,11 +18,13 @@ mod statistics;
#[tokio::main]
async fn main() -> Result<(), NetworkRequesterError> {
setup_logging();
maybe_print_banner(crate_name!(), crate_version!());
let args = cli::Cli::parse();
setup_env(args.config_env_file.as_ref());
if !args.no_banner {
maybe_print_banner(crate_name!(), crate_version!());
}
setup_logging();
cli::execute(args).await
}
@@ -1,6 +1,6 @@
[package]
name = "nym-network-statistics"
version = "1.1.24"
version = "1.1.23"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "nym-cli"
version = "1.1.24"
version = "1.1.23"
authors.workspace = true
edition = "2021"
+208 -7
View File
@@ -6421,6 +6421,11 @@ ansi-regex@^6.0.1:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a"
integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==
ansi-sequence-parser@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz#4d790f31236ac20366b23b3916b789e1bde39aed"
integrity sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==
ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
@@ -7821,6 +7826,17 @@ cli-boxes@^2.2.1:
resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f"
integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==
cli-color@~2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-2.0.3.tgz#73769ba969080629670f3f2ef69a4bf4e7cc1879"
integrity sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==
dependencies:
d "^1.0.1"
es5-ext "^0.10.61"
es6-iterator "^2.0.3"
memoizee "^0.4.15"
timers-ext "^0.1.7"
cli-cursor@3.1.0, cli-cursor@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
@@ -8093,6 +8109,11 @@ commander@^9.4.1:
resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30"
integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==
commander@~9.4.0:
version "9.4.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd"
integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==
common-ancestor-path@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz#4f7d2d1394d91b7abdf51871c62f71eadb0182a7"
@@ -8871,6 +8892,14 @@ d3-zoom@^2.0.0:
d3-selection "2"
d3-transition "2"
d@1, d@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a"
integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==
dependencies:
es5-ext "^0.10.50"
type "^1.0.1"
damerau-levenshtein@^1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7"
@@ -9678,16 +9707,52 @@ es-to-primitive@^1.2.1:
is-date-object "^1.0.1"
is-symbol "^1.0.2"
es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46:
version "0.10.62"
resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5"
integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==
dependencies:
es6-iterator "^2.0.3"
es6-symbol "^3.1.3"
next-tick "^1.1.0"
es5-shim@^4.5.13:
version "4.6.7"
resolved "https://registry.yarnpkg.com/es5-shim/-/es5-shim-4.6.7.tgz#bc67ae0fc3dd520636e0a1601cc73b450ad3e955"
integrity sha512-jg21/dmlrNQI7JyyA2w7n+yifSxBng0ZralnSfVZjoCawgNTCnS+yBCyVM9DL5itm7SUnDGgv7hcq2XCZX4iRQ==
es6-iterator@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7"
integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==
dependencies:
d "1"
es5-ext "^0.10.35"
es6-symbol "^3.1.1"
es6-shim@^0.35.5:
version "0.35.8"
resolved "https://registry.yarnpkg.com/es6-shim/-/es6-shim-0.35.8.tgz#89216f6fbf8bacba3f897c8c0e814d2a41c05fb7"
integrity sha512-Twf7I2v4/1tLoIXMT8HlqaBSS5H2wQTs2wx3MNYCI8K1R1/clXyCazrcVCPm/FuO9cyV8+leEaZOWD5C253NDg==
es6-symbol@^3.1.1, es6-symbol@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18"
integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==
dependencies:
d "^1.0.1"
ext "^1.1.2"
es6-weak-map@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53"
integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==
dependencies:
d "1"
es5-ext "^0.10.46"
es6-iterator "^2.0.3"
es6-symbol "^3.1.1"
escalade@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
@@ -10150,6 +10215,14 @@ etag@~1.8.1:
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==
event-emitter@^0.3.5:
version "0.3.5"
resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39"
integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==
dependencies:
d "1"
es5-ext "~0.10.14"
event-target-shim@^5.0.0:
version "5.0.1"
resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789"
@@ -10330,6 +10403,13 @@ express@^4.17.1, express@^4.17.3, express@^4.18.2:
utils-merge "1.0.1"
vary "~1.1.2"
ext@^1.1.2:
version "1.7.0"
resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f"
integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==
dependencies:
type "^2.7.2"
extend-shallow@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
@@ -10590,7 +10670,7 @@ fill-range@^7.0.1:
dependencies:
to-regex-range "^5.0.1"
finalhandler@1.2.0:
finalhandler@1.2.0, finalhandler@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32"
integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==
@@ -12432,6 +12512,11 @@ is-potential-custom-element-name@^1.0.1:
resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5"
integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==
is-promise@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1"
integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==
is-reference@1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7"
@@ -13749,7 +13834,7 @@ json5@^1.0.1, json5@^1.0.2:
dependencies:
minimist "^1.2.0"
jsonc-parser@3.2.0, jsonc-parser@^3.0.0:
jsonc-parser@3.2.0, jsonc-parser@^3.0.0, jsonc-parser@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76"
integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==
@@ -14314,6 +14399,13 @@ lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1:
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.0.tgz#b9e2a6a72a129d81ab317202d93c7691df727e61"
integrity sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==
lru-queue@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3"
integrity sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==
dependencies:
es5-ext "~0.10.2"
lunr@^2.3.9:
version "2.3.9"
resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1"
@@ -14464,7 +14556,7 @@ markdown-extensions@^1.0.0:
resolved "https://registry.yarnpkg.com/markdown-extensions/-/markdown-extensions-1.1.1.tgz#fea03b539faeaee9b4ef02a3769b455b189f7fc3"
integrity sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q==
marked@^4.0.16:
marked@^4.0.16, marked@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3"
integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==
@@ -14662,6 +14754,20 @@ memfs@^3.1.2, memfs@^3.2.2, memfs@^3.4.1, memfs@^3.4.3:
dependencies:
fs-monkey "^1.0.4"
memoizee@^0.4.15:
version "0.4.15"
resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.15.tgz#e6f3d2da863f318d02225391829a6c5956555b72"
integrity sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==
dependencies:
d "^1.0.1"
es5-ext "^0.10.53"
es6-weak-map "^2.0.3"
event-emitter "^0.3.5"
is-promise "^2.2.2"
lru-queue "^0.1.0"
next-tick "^1.1.0"
timers-ext "^0.1.7"
memoizerific@^1.11.3:
version "1.11.3"
resolved "https://registry.yarnpkg.com/memoizerific/-/memoizerific-1.11.3.tgz#7c87a4646444c32d75438570905f2dbd1b1a805a"
@@ -15195,7 +15301,7 @@ minimist-options@4.1.0:
is-plain-obj "^1.1.0"
kind-of "^6.0.3"
minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6:
minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6, minimist@~1.2.0:
version "1.2.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
@@ -15505,6 +15611,11 @@ nested-error-stacks@^2.0.0, nested-error-stacks@^2.1.0:
resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.1.1.tgz#26c8a3cee6cc05fbcf1e333cd2fc3e003326c0b5"
integrity sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==
next-tick@1, next-tick@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb"
integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==
nice-try@^1.0.4:
version "1.0.5"
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
@@ -15632,6 +15743,22 @@ node-releases@^2.0.12:
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.12.tgz#35627cc224a23bfb06fb3380f2b3afaaa7eb1039"
integrity sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==
nodemon@3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.0.1.tgz#affe822a2c5f21354466b2fc8ae83277d27dadc7"
integrity sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==
dependencies:
chokidar "^3.5.2"
debug "^3.2.7"
ignore-by-default "^1.0.1"
minimatch "^3.1.2"
pstree.remy "^1.1.8"
semver "^7.5.3"
simple-update-notifier "^2.0.0"
supports-color "^5.5.0"
touch "^3.1.0"
undefsafe "^2.0.5"
nodemon@^2.0.21:
version "2.0.22"
resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.22.tgz#182c45c3a78da486f673d6c1702e00728daf5258"
@@ -16143,7 +16270,7 @@ open@^7.0.3:
is-docker "^2.0.0"
is-wsl "^2.1.1"
open@^8.0.9, open@^8.4.0:
open@^8.0.0, open@^8.0.9, open@^8.4.0:
version "8.4.2"
resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9"
integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==
@@ -18108,6 +18235,20 @@ relateurl@^0.2.7:
resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9"
integrity sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==
reload@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/reload/-/reload-3.2.1.tgz#42d43e33e327efe1348c723272c6835fe333349a"
integrity sha512-ZdM8ZSEeI72zkhh6heMEvJ0vHZoovZXcJI6Zae8CzS7o5vO/WjZsAMMr0y1+3I/fCN7y7ZxABoUwwCswcLHkjQ==
dependencies:
cli-color "~2.0.0"
commander "~9.4.0"
finalhandler "~1.2.0"
minimist "~1.2.0"
open "^8.0.0"
serve-static "~1.15.0"
supervisor "~0.12.0"
ws "~8.11.0"
remark-external-links@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/remark-external-links/-/remark-external-links-8.0.0.tgz#308de69482958b5d1cd3692bc9b725ce0240f345"
@@ -18730,7 +18871,7 @@ serve-index@^1.9.1:
mime-types "~2.1.17"
parseurl "~1.3.2"
serve-static@1.15.0:
serve-static@1.15.0, serve-static@~1.15.0:
version "1.15.0"
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540"
integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==
@@ -18851,6 +18992,16 @@ shiki@^0.10.1:
vscode-oniguruma "^1.6.1"
vscode-textmate "5.2.0"
shiki@^0.14.1:
version "0.14.3"
resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.3.tgz#d1a93c463942bdafb9866d74d619a4347d0bbf64"
integrity sha512-U3S/a+b0KS+UkTyMjoNojvTgrBHjgp7L6ovhFVZsXmBGnVdQ4K4U9oK0z63w538S91ATngv1vXigHCSWOwnr+g==
dependencies:
ansi-sequence-parser "^1.1.0"
jsonc-parser "^3.2.0"
vscode-oniguruma "^1.7.0"
vscode-textmate "^8.0.0"
side-channel@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf"
@@ -18908,6 +19059,13 @@ simple-update-notifier@^1.0.7:
dependencies:
semver "~7.0.0"
simple-update-notifier@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz#d70b92bdab7d6d90dfd73931195a30b6e3d7cebb"
integrity sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==
dependencies:
semver "^7.5.3"
sisteransi@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
@@ -19527,6 +19685,11 @@ stylis@4.2.0:
resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.2.0.tgz#79daee0208964c8fe695a42fcffcac633a211a51"
integrity sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==
supervisor@~0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/supervisor/-/supervisor-0.12.0.tgz#de7e6337015b291851c10f3538c4a7f04917ecc1"
integrity sha512-iBYeU5Or4WiiIa3+ns1DpHIiHjNNXSuYUiixKcznewwo4ImBJ8EobktaAo2csOcauhrz4SvKRTou8Z2C3W28+A==
supports-color@8.1.1, supports-color@^8.0.0:
version "8.1.1"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c"
@@ -19847,6 +20010,14 @@ timers-browserify@^2.0.4:
dependencies:
setimmediate "^1.0.4"
timers-ext@^0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6"
integrity sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==
dependencies:
es5-ext "~0.10.46"
next-tick "1"
tiny-warning@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754"
@@ -20237,6 +20408,16 @@ type-is@~1.6.18:
media-typer "0.3.0"
mime-types "~2.1.24"
type@^1.0.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0"
integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==
type@^2.7.2:
version "2.7.2"
resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0"
integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==
typed-array-length@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb"
@@ -20269,6 +20450,16 @@ typedoc@^0.22.13:
minimatch "^5.1.0"
shiki "^0.10.1"
typedoc@^0.24.8:
version "0.24.8"
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.24.8.tgz#cce9f47ba6a8d52389f5e583716a2b3b4335b63e"
integrity sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w==
dependencies:
lunr "^2.3.9"
marked "^4.3.0"
minimatch "^9.0.0"
shiki "^0.14.1"
"typescript@^3 || ^4", typescript@^4.6.2, typescript@^4.8.4:
version "4.9.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
@@ -20850,7 +21041,7 @@ vm-browserify@^1.0.1:
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==
vscode-oniguruma@^1.6.1:
vscode-oniguruma@^1.6.1, vscode-oniguruma@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b"
integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==
@@ -20860,6 +21051,11 @@ vscode-textmate@5.2.0:
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.2.0.tgz#01f01760a391e8222fe4f33fbccbd1ad71aed74e"
integrity sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==
vscode-textmate@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d"
integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==
w3c-hr-time@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd"
@@ -21416,6 +21612,11 @@ ws@^8.13.0, ws@^8.2.3:
resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0"
integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==
ws@~8.11.0:
version "8.11.0"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143"
integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==
x-default-browser@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/x-default-browser/-/x-default-browser-0.4.0.tgz#70cf0da85da7c0ab5cb0f15a897f2322a6bdd481"