From 9aa6332df795a1053863f2e8bd99afc3be6dec21 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Wed, 30 Jul 2025 22:39:56 +0200 Subject: [PATCH] modified names with nym- prefix + fixed imports --- Cargo.lock | 574 +++++++++--------- Cargo.toml | 2 +- common/client-core/Cargo.toml | 2 +- common/client-core/surb-storage/Cargo.toml | 4 +- .../src/backend/fs_backend/manager.rs | 2 +- common/client-libs/gateway-client/Cargo.toml | 2 +- .../easy_addr/Cargo.toml | 4 +- .../mixnet-contract/group-contract/Cargo.toml | 12 + .../mixnet-contract/group-contract/src/lib.rs | 1 + .../mixnet-contract/group-contract/src/msg.rs | 50 ++ common/credential-storage/Cargo.toml | 4 +- .../credential-storage/src/backends/sqlite.rs | 2 +- .../src/persistent_storage/mod.rs | 2 +- common/dkg/Cargo.toml | 7 +- common/node-tester-utils/Cargo.toml | 2 +- common/nyxd-scraper/Cargo.toml | 22 +- common/topology/Cargo.toml | 4 +- common/topology/src/wasm_helpers.rs | 2 +- common/wasm/client-core/Cargo.toml | 18 +- common/wasm/storage/Cargo.toml | 4 +- common/wasm/storage/src/error.rs | 2 +- common/wasm/storage/src/lib.rs | 2 +- common/wasm/utils/Cargo.toml | 2 +- common/zulip-client/Cargo.toml | 2 +- contracts/mixnet/Cargo.toml | 4 +- contracts/vesting/Cargo.toml | 3 +- cpu-cycles/Cargo.toml | 2 +- documentation/autodoc/Cargo.toml | 2 +- .../cli/commands/verify-signature/Cargo.toml | 4 +- nym-browser-extension/storage/Cargo.toml | 20 +- .../vpn-api-lib-wasm/Cargo.toml | 7 +- .../vpn-api-lib-wasm/src/error.rs | 2 +- .../vpn-api-lib-wasm/src/lib.rs | 10 +- .../Cargo.toml | 2 +- .../src/apple.rs | 0 .../src/lib.rs | 0 .../src/linux.rs | 0 .../src/windows.rs | 0 nym-validator-rewarder/Cargo.toml | 22 +- .../src/cli/process_block.rs | 2 +- .../src/cli/process_until.rs | 2 +- nym-validator-rewarder/src/config/mod.rs | 6 +- nym-validator-rewarder/src/error.rs | 2 +- .../src/rewarder/block_signing/mod.rs | 2 +- .../src/rewarder/block_signing/types.rs | 2 +- .../src/rewarder/helpers.rs | 2 +- nym-validator-rewarder/src/rewarder/mod.rs | 2 +- nyx-chain-watcher/Cargo.toml | 10 +- nyx-chain-watcher/src/chain_scraper/mod.rs | 8 +- nyx-chain-watcher/src/http/state.rs | 2 +- tools/echo-server/Cargo.toml | 2 +- tools/echo-server/src/echo-server.rs | 2 +- tools/ts-rs-cli/Cargo.toml | 20 +- wasm/client/Cargo.toml | 9 +- wasm/mix-fetch/Cargo.toml | 6 +- wasm/node-tester/Cargo.toml | 4 +- wasm/zknym-lib/Cargo.toml | 6 +- wasm/zknym-lib/src/error.rs | 2 +- wasm/zknym-lib/src/lib.rs | 4 +- 59 files changed, 509 insertions(+), 392 deletions(-) create mode 100644 common/cosmwasm-smart-contracts/mixnet-contract/group-contract/Cargo.toml create mode 100644 common/cosmwasm-smart-contracts/mixnet-contract/group-contract/src/lib.rs create mode 100644 common/cosmwasm-smart-contracts/mixnet-contract/group-contract/src/msg.rs rename {sqlx-pool-guard => nym-sqlx-pool-guard}/Cargo.toml (96%) rename {sqlx-pool-guard => nym-sqlx-pool-guard}/src/apple.rs (100%) rename {sqlx-pool-guard => nym-sqlx-pool-guard}/src/lib.rs (100%) rename {sqlx-pool-guard => nym-sqlx-pool-guard}/src/linux.rs (100%) rename {sqlx-pool-guard => nym-sqlx-pool-guard}/src/windows.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index ce42393e61..129bf23213 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -548,14 +548,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "autodoc" -version = "1.6.0" -dependencies = [ - "env_logger", - "log", -] - [[package]] name = "axum" version = "0.6.20" @@ -2406,15 +2398,6 @@ version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" -[[package]] -name = "easy-addr" -version = "1.6.0" -dependencies = [ - "cosmwasm-std", - "quote", - "syn 1.0.109", -] - [[package]] name = "ecdsa" version = "0.16.9" @@ -2430,31 +2413,6 @@ dependencies = [ "spki", ] -[[package]] -name = "echo-server" -version = "1.6.0" -dependencies = [ - "anyhow", - "bincode", - "bytecodec", - "bytes", - "clap", - "dashmap", - "dirs", - "futures", - "nym-bin-common 1.6.0", - "nym-crypto 1.6.0", - "nym-sdk", - "serde", - "tempfile", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", - "tracing-subscriber", - "uuid", -] - [[package]] name = "ed25519" version = "2.2.3" @@ -2660,22 +2618,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "extension-storage" -version = "1.6.0" -dependencies = [ - "bip39", - "console_error_panic_hook", - "js-sys", - "serde-wasm-bindgen 0.6.5", - "thiserror 2.0.12", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-storage", - "wasm-utils", - "zeroize", -] - [[package]] name = "eyre" version = "0.6.12" @@ -4535,31 +4477,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "mix-fetch-wasm" -version = "1.6.0" -dependencies = [ - "async-trait", - "futures", - "js-sys", - "nym-bin-common 1.6.0", - "nym-http-api-client 1.6.0", - "nym-ordered-buffer", - "nym-service-providers-common", - "nym-socks5-requests", - "rand 0.8.5", - "serde", - "serde-wasm-bindgen 0.6.5", - "thiserror 2.0.12", - "tokio", - "tsify", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-client-core", - "wasm-utils", -] - [[package]] name = "mixnet-connectivity-check" version = "1.6.0" @@ -5115,6 +5032,14 @@ dependencies = [ "x25519-dalek", ] +[[package]] +name = "nym-autodoc" +version = "1.6.0" +dependencies = [ + "env_logger", + "log", +] + [[package]] name = "nym-bandwidth-controller" version = "1.6.0" @@ -5325,6 +5250,7 @@ dependencies = [ "nym-task 1.6.0", "nym-topology 1.6.0", "nym-validator-client 1.6.0", + "nym-wasm-utils", "rand 0.8.5", "rand_chacha 0.3.1", "serde", @@ -5342,7 +5268,6 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-utils", "wasmtimer", "zeroize", ] @@ -5388,9 +5313,9 @@ dependencies = [ "dashmap", "nym-crypto 1.6.0", "nym-sphinx 1.6.0", + "nym-sqlx-pool-guard", "nym-task 1.6.0", "sqlx", - "sqlx-pool-guard", "thiserror 2.0.12", "time", "tokio", @@ -5407,6 +5332,8 @@ dependencies = [ "nym-bin-common 1.6.0", "nym-node-tester-utils", "nym-node-tester-wasm", + "nym-wasm-client-core", + "nym-wasm-utils", "rand 0.8.5", "serde", "serde-wasm-bindgen 0.6.5", @@ -5416,8 +5343,6 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "wasm-bindgen-test", - "wasm-client-core", - "wasm-utils", ] [[package]] @@ -5671,9 +5596,9 @@ dependencies = [ "nym-compact-ecash 1.6.0", "nym-credentials", "nym-ecash-time 1.6.0", + "nym-sqlx-pool-guard", "serde", "sqlx", - "sqlx-pool-guard", "thiserror 2.0.12", "tokio", "zeroize", @@ -5860,6 +5785,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "nym-easy-addr" +version = "1.6.0" +dependencies = [ + "cosmwasm-std", + "quote", + "syn 1.0.109", +] + [[package]] name = "nym-ecash-contract-common" version = "0.1.0" @@ -5904,6 +5838,31 @@ dependencies = [ "time", ] +[[package]] +name = "nym-echo-server" +version = "1.6.0" +dependencies = [ + "anyhow", + "bincode", + "bytecodec", + "bytes", + "clap", + "dashmap", + "dirs", + "futures", + "nym-bin-common 1.6.0", + "nym-crypto 1.6.0", + "nym-sdk", + "serde", + "tempfile", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", + "tracing-subscriber", + "uuid", +] + [[package]] name = "nym-execute" version = "1.6.0" @@ -5936,6 +5895,22 @@ dependencies = [ "utoipa", ] +[[package]] +name = "nym-extension-storage" +version = "1.6.0" +dependencies = [ + "bip39", + "console_error_panic_hook", + "js-sys", + "nym-wasm-storage", + "nym-wasm-utils", + "serde-wasm-bindgen 0.6.5", + "thiserror 2.0.12", + "wasm-bindgen", + "wasm-bindgen-futures", + "zeroize", +] + [[package]] name = "nym-ffi-shared" version = "1.6.0" @@ -6022,6 +5997,7 @@ dependencies = [ "nym-statistics-common 1.6.0", "nym-task 1.6.0", "nym-validator-client 1.6.0", + "nym-wasm-utils", "rand 0.8.5", "serde", "si-scale", @@ -6035,7 +6011,6 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-utils", "wasmtimer", "zeroize", ] @@ -6359,6 +6334,31 @@ dependencies = [ "tracing", ] +[[package]] +name = "nym-mix-fetch-wasm" +version = "1.6.0" +dependencies = [ + "async-trait", + "futures", + "js-sys", + "nym-bin-common 1.6.0", + "nym-http-api-client 1.6.0", + "nym-ordered-buffer", + "nym-service-providers-common", + "nym-socks5-requests", + "nym-wasm-client-core", + "nym-wasm-utils", + "rand 0.8.5", + "serde", + "serde-wasm-bindgen 0.6.5", + "thiserror 2.0.12", + "tokio", + "tsify", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", +] + [[package]] name = "nym-mixnet-client" version = "1.6.0" @@ -6833,13 +6833,13 @@ dependencies = [ "nym-sphinx-params 1.6.0", "nym-task 1.6.0", "nym-topology 1.6.0", + "nym-wasm-utils", "rand 0.8.5", "rand_chacha 0.3.1", "serde", "serde_json", "thiserror 2.0.12", "tokio", - "wasm-utils", ] [[package]] @@ -6849,6 +6849,8 @@ dependencies = [ "futures", "js-sys", "nym-node-tester-utils", + "nym-wasm-client-core", + "nym-wasm-utils", "rand 0.8.5", "serde", "serde-wasm-bindgen 0.6.5", @@ -6857,8 +6859,6 @@ dependencies = [ "tsify", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-client-core", - "wasm-utils", "wasmtimer", ] @@ -6919,6 +6919,61 @@ dependencies = [ "tokio", ] +[[package]] +name = "nym-nyx-chain-watcher" +version = "1.6.0" +dependencies = [ + "anyhow", + "async-trait", + "axum 0.7.9", + "chrono", + "clap", + "nym-bin-common 1.6.0", + "nym-config 1.6.0", + "nym-network-defaults 1.6.0", + "nym-nyxd-scraper", + "nym-task 1.6.0", + "nym-validator-client 1.6.0", + "reqwest 0.12.22", + "schemars 0.8.22", + "serde", + "sqlx", + "thiserror 2.0.12", + "time", + "tokio", + "tokio-util", + "tower-http 0.5.2", + "tracing", + "tracing-subscriber", + "utoipa", + "utoipa-swagger-ui", + "utoipauto", +] + +[[package]] +name = "nym-nyxd-scraper" +version = "1.6.0" +dependencies = [ + "async-trait", + "const_format", + "cosmrs", + "eyre", + "futures", + "humantime", + "serde", + "sha2 0.10.9", + "sqlx", + "tendermint", + "tendermint-rpc", + "thiserror 2.0.12", + "time", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", + "url", +] + [[package]] name = "nym-ordered-buffer" version = "1.6.0" @@ -7540,6 +7595,19 @@ dependencies = [ "thiserror 2.0.12", ] +[[package]] +name = "nym-sqlx-pool-guard" +version = "1.6.0" +dependencies = [ + "proc_pidinfo", + "sqlx", + "tempfile", + "tokio", + "tracing", + "tracing-subscriber", + "windows 0.61.3", +] + [[package]] name = "nym-statistics-api" version = "1.6.0" @@ -7729,6 +7797,7 @@ dependencies = [ "nym-mixnet-contract-common 1.6.0", "nym-sphinx-addressing 1.6.0", "nym-sphinx-types 1.6.0", + "nym-wasm-utils", "rand 0.8.5", "reqwest 0.12.22", "serde", @@ -7738,7 +7807,21 @@ dependencies = [ "tracing", "tsify", "wasm-bindgen", - "wasm-utils", +] + +[[package]] +name = "nym-ts-rs-cli" +version = "1.6.0" +dependencies = [ + "anyhow", + "nym-api-requests 1.6.0", + "nym-mixnet-contract-common 1.6.0", + "nym-types", + "nym-validator-client 1.6.0", + "nym-vesting-contract-common 1.6.0", + "nym-wallet-types", + "ts-rs", + "walkdir", ] [[package]] @@ -7903,12 +7986,12 @@ dependencies = [ "nym-crypto 1.6.0", "nym-ecash-time 1.6.0", "nym-network-defaults 1.6.0", + "nym-nyxd-scraper", "nym-pemstore 1.6.0", "nym-serde-helpers 1.6.0", "nym-task 1.6.0", "nym-ticketbooks-merkle 1.6.0", "nym-validator-client 1.6.0", - "nyxd-scraper", "rand 0.8.5", "rand_chacha 0.3.1", "serde", @@ -7984,6 +8067,7 @@ dependencies = [ "nym-credentials-interface 1.6.0", "nym-crypto 1.6.0", "nym-ecash-time 1.6.0", + "nym-wasm-utils", "serde", "serde-wasm-bindgen 0.6.5", "serde_json", @@ -7991,7 +8075,6 @@ dependencies = [ "time", "tsify", "wasm-bindgen", - "wasm-utils", "zeroize", ] @@ -8014,6 +8097,71 @@ dependencies = [ "ts-rs", ] +[[package]] +name = "nym-wasm-client-core" +version = "1.6.0" +dependencies = [ + "async-trait", + "console_error_panic_hook", + "js-sys", + "nym-bandwidth-controller", + "nym-client-core", + "nym-config 1.6.0", + "nym-credential-storage", + "nym-crypto 1.6.0", + "nym-gateway-client", + "nym-sphinx 1.6.0", + "nym-sphinx-acknowledgements 1.6.0", + "nym-statistics-common 1.6.0", + "nym-task 1.6.0", + "nym-topology 1.6.0", + "nym-validator-client 1.6.0", + "nym-wasm-storage", + "nym-wasm-utils", + "rand 0.8.5", + "serde", + "serde-wasm-bindgen 0.6.5", + "thiserror 2.0.12", + "time", + "tsify", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "zeroize", +] + +[[package]] +name = "nym-wasm-storage" +version = "1.6.0" +dependencies = [ + "async-trait", + "getrandom 0.2.16", + "indexed_db_futures", + "js-sys", + "nym-store-cipher", + "nym-wasm-utils", + "serde", + "serde-wasm-bindgen 0.6.5", + "thiserror 2.0.12", + "wasm-bindgen", +] + +[[package]] +name = "nym-wasm-utils" +version = "1.6.0" +dependencies = [ + "console_error_panic_hook", + "futures", + "getrandom 0.2.16", + "gloo-net", + "gloo-utils 0.2.0", + "js-sys", + "tungstenite 0.20.1", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "nym-wireguard" version = "1.6.0" @@ -8073,6 +8221,50 @@ dependencies = [ "x25519-dalek", ] +[[package]] +name = "nym-zknym-lib" +version = "1.6.0" +dependencies = [ + "anyhow", + "async-trait", + "bs58", + "getrandom 0.2.16", + "js-sys", + "nym-bin-common 1.6.0", + "nym-compact-ecash 1.6.0", + "nym-credentials", + "nym-crypto 1.6.0", + "nym-http-api-client 1.6.0", + "nym-wasm-utils", + "rand 0.8.5", + "reqwest 0.12.22", + "serde", + "thiserror 2.0.12", + "tokio", + "tsify", + "uuid", + "wasm-bindgen", + "wasmtimer", + "zeroize", +] + +[[package]] +name = "nym-zulip-client" +version = "1.6.0" +dependencies = [ + "itertools 0.14.0", + "nym-bin-common 1.6.0", + "nym-http-api-client 1.6.0", + "reqwest 0.12.22", + "serde", + "serde_json", + "thiserror 2.0.12", + "tokio", + "tracing", + "url", + "zeroize", +] + [[package]] name = "nymvisor" version = "1.6.0" @@ -8103,61 +8295,6 @@ dependencies = [ "url", ] -[[package]] -name = "nyx-chain-watcher" -version = "1.6.0" -dependencies = [ - "anyhow", - "async-trait", - "axum 0.7.9", - "chrono", - "clap", - "nym-bin-common 1.6.0", - "nym-config 1.6.0", - "nym-network-defaults 1.6.0", - "nym-task 1.6.0", - "nym-validator-client 1.6.0", - "nyxd-scraper", - "reqwest 0.12.22", - "schemars 0.8.22", - "serde", - "sqlx", - "thiserror 2.0.12", - "time", - "tokio", - "tokio-util", - "tower-http 0.5.2", - "tracing", - "tracing-subscriber", - "utoipa", - "utoipa-swagger-ui", - "utoipauto", -] - -[[package]] -name = "nyxd-scraper" -version = "1.6.0" -dependencies = [ - "async-trait", - "const_format", - "cosmrs", - "eyre", - "futures", - "humantime", - "serde", - "sha2 0.10.9", - "sqlx", - "tendermint", - "tendermint-rpc", - "thiserror 2.0.12", - "time", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", - "url", -] - [[package]] name = "object" version = "0.36.7" @@ -10456,19 +10593,6 @@ dependencies = [ "whoami", ] -[[package]] -name = "sqlx-pool-guard" -version = "1.6.0" -dependencies = [ - "proc_pidinfo", - "sqlx", - "tempfile", - "tokio", - "tracing", - "tracing-subscriber", - "windows 0.61.3", -] - [[package]] name = "sqlx-postgres" version = "0.8.6" @@ -11596,21 +11720,6 @@ dependencies = [ "ts-rs-macros", ] -[[package]] -name = "ts-rs-cli" -version = "1.6.0" -dependencies = [ - "anyhow", - "nym-api-requests 1.6.0", - "nym-mixnet-contract-common 1.6.0", - "nym-types", - "nym-validator-client 1.6.0", - "nym-vesting-contract-common 1.6.0", - "nym-wallet-types", - "ts-rs", - "walkdir", -] - [[package]] name = "ts-rs-macros" version = "10.1.0" @@ -12269,55 +12378,6 @@ dependencies = [ "syn 2.0.104", ] -[[package]] -name = "wasm-client-core" -version = "1.6.0" -dependencies = [ - "async-trait", - "console_error_panic_hook", - "js-sys", - "nym-bandwidth-controller", - "nym-client-core", - "nym-config 1.6.0", - "nym-credential-storage", - "nym-crypto 1.6.0", - "nym-gateway-client", - "nym-sphinx 1.6.0", - "nym-sphinx-acknowledgements 1.6.0", - "nym-statistics-common 1.6.0", - "nym-task 1.6.0", - "nym-topology 1.6.0", - "nym-validator-client 1.6.0", - "rand 0.8.5", - "serde", - "serde-wasm-bindgen 0.6.5", - "thiserror 2.0.12", - "time", - "tsify", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-storage", - "wasm-utils", - "zeroize", -] - -[[package]] -name = "wasm-storage" -version = "1.6.0" -dependencies = [ - "async-trait", - "getrandom 0.2.16", - "indexed_db_futures", - "js-sys", - "nym-store-cipher", - "serde", - "serde-wasm-bindgen 0.6.5", - "thiserror 2.0.12", - "wasm-bindgen", - "wasm-utils", -] - [[package]] name = "wasm-streams" version = "0.4.2" @@ -12331,22 +12391,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "wasm-utils" -version = "1.6.0" -dependencies = [ - "console_error_panic_hook", - "futures", - "getrandom 0.2.16", - "gloo-net", - "gloo-utils 0.2.0", - "js-sys", - "tungstenite 0.20.1", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wasmtimer" version = "0.4.2" @@ -13140,33 +13184,6 @@ dependencies = [ "zopfli", ] -[[package]] -name = "zknym-lib" -version = "1.6.0" -dependencies = [ - "anyhow", - "async-trait", - "bs58", - "getrandom 0.2.16", - "js-sys", - "nym-bin-common 1.6.0", - "nym-compact-ecash 1.6.0", - "nym-credentials", - "nym-crypto 1.6.0", - "nym-http-api-client 1.6.0", - "rand 0.8.5", - "reqwest 0.12.22", - "serde", - "thiserror 2.0.12", - "tokio", - "tsify", - "uuid", - "wasm-bindgen", - "wasm-utils", - "wasmtimer", - "zeroize", -] - [[package]] name = "zopfli" version = "0.8.2" @@ -13206,20 +13223,3 @@ dependencies = [ "cc", "pkg-config", ] - -[[package]] -name = "zulip-client" -version = "1.6.0" -dependencies = [ - "itertools 0.14.0", - "nym-bin-common 1.6.0", - "nym-http-api-client 1.6.0", - "reqwest 0.12.22", - "serde", - "serde_json", - "thiserror 2.0.12", - "tokio", - "tracing", - "url", - "zeroize", -] diff --git a/Cargo.toml b/Cargo.toml index d47650d610..4b7319dcc7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -129,7 +129,7 @@ members = [ "service-providers/common", "service-providers/ip-packet-router", "service-providers/network-requester", - "sqlx-pool-guard", + "nym-sqlx-pool-guard", "tools/echo-server", "tools/internal/contract-state-importer/importer-cli", "tools/internal/contract-state-importer/importer-contract", diff --git a/common/client-core/Cargo.toml b/common/client-core/Cargo.toml index 4cfdca54ee..ca93ce61e2 100644 --- a/common/client-core/Cargo.toml +++ b/common/client-core/Cargo.toml @@ -104,7 +104,7 @@ features = ["tokio"] # version.workspace = true # features = ["futures"] -[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-utils] +[target."cfg(target_arch = \"wasm32\")".dependencies.nym-wasm-utils] path = "../wasm/utils" features = ["websocket"] diff --git a/common/client-core/surb-storage/Cargo.toml b/common/client-core/surb-storage/Cargo.toml index 60688bd8c9..bea2fd2162 100644 --- a/common/client-core/surb-storage/Cargo.toml +++ b/common/client-core/surb-storage/Cargo.toml @@ -26,8 +26,8 @@ workspace = true features = ["runtime-tokio-rustls", "sqlite", "macros", "migrate", "time"] optional = true -[target."cfg(not(target_arch = \"wasm32\"))".dependencies.sqlx-pool-guard] -path = "../../../sqlx-pool-guard" +[target."cfg(not(target_arch = \"wasm32\"))".dependencies.nym-sqlx-pool-guard] +path = "../../../nym-sqlx-pool-guard" [build-dependencies] tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } diff --git a/common/client-core/surb-storage/src/backend/fs_backend/manager.rs b/common/client-core/surb-storage/src/backend/fs_backend/manager.rs index 6edde091ce..b0a6ec68f7 100644 --- a/common/client-core/surb-storage/src/backend/fs_backend/manager.rs +++ b/common/client-core/surb-storage/src/backend/fs_backend/manager.rs @@ -13,7 +13,7 @@ use std::path::Path; use time::OffsetDateTime; use tracing::{error, info}; -use sqlx_pool_guard::SqlitePoolGuard; +use nym_sqlx_pool_guard::SqlitePoolGuard; #[derive(Debug, Clone)] pub struct StorageManager { diff --git a/common/client-libs/gateway-client/Cargo.toml b/common/client-libs/gateway-client/Cargo.toml index 3a4b18dfcb..32bd76aa7b 100644 --- a/common/client-libs/gateway-client/Cargo.toml +++ b/common/client-libs/gateway-client/Cargo.toml @@ -61,7 +61,7 @@ workspace = true [target."cfg(target_arch = \"wasm32\")".dependencies.wasm-bindgen-futures] workspace = true -[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-utils] +[target."cfg(target_arch = \"wasm32\")".dependencies.nym-wasm-utils] path = "../../wasm/utils" features = ["websocket"] diff --git a/common/cosmwasm-smart-contracts/easy_addr/Cargo.toml b/common/cosmwasm-smart-contracts/easy_addr/Cargo.toml index c41da734cd..cae31b323b 100644 --- a/common/cosmwasm-smart-contracts/easy_addr/Cargo.toml +++ b/common/cosmwasm-smart-contracts/easy_addr/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "easy-addr" +name = "nym-easy-addr" version.workspace = true edition = "2021" publish = false @@ -11,4 +11,4 @@ proc-macro = true [dependencies] cosmwasm-std = { workspace = true } quote = { workspace = true } -syn = { workspace = true, features = ["full", "printing", "extra-traits"] } \ No newline at end of file +syn = { workspace = true, features = ["full", "printing", "extra-traits"] } diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/group-contract/Cargo.toml b/common/cosmwasm-smart-contracts/mixnet-contract/group-contract/Cargo.toml new file mode 100644 index 0000000000..97aa67b7a9 --- /dev/null +++ b/common/cosmwasm-smart-contracts/mixnet-contract/group-contract/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "nym-group-contract-common" +version.workspace = true +edition = "2021" +license.workspace = true + +[dependencies] +cosmwasm-schema = { workspace = true } +cw-controllers = { workspace = true } +cw4 = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true, features = ["derive"] } diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/group-contract/src/lib.rs b/common/cosmwasm-smart-contracts/mixnet-contract/group-contract/src/lib.rs new file mode 100644 index 0000000000..d0e87a0d30 --- /dev/null +++ b/common/cosmwasm-smart-contracts/mixnet-contract/group-contract/src/lib.rs @@ -0,0 +1 @@ +pub mod msg; diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/group-contract/src/msg.rs b/common/cosmwasm-smart-contracts/mixnet-contract/group-contract/src/msg.rs new file mode 100644 index 0000000000..84674946b1 --- /dev/null +++ b/common/cosmwasm-smart-contracts/mixnet-contract/group-contract/src/msg.rs @@ -0,0 +1,50 @@ +use cosmwasm_schema::{cw_serde, QueryResponses}; +use cw4::Member; + +#[cw_serde] +pub struct InstantiateMsg { + /// The admin is the only account that can update the group state. + /// Omit it to make the group immutable. + pub admin: Option, + pub members: Vec, +} + +#[cw_serde] +pub enum ExecuteMsg { + /// Change the admin + UpdateAdmin { admin: Option }, + /// apply a diff to the existing members. + /// remove is applied after add, so if an address is in both, it is removed + UpdateMembers { + remove: Vec, + add: Vec, + }, + /// Add a new hook to be informed of all membership changes. Must be called by Admin + AddHook { addr: String }, + /// Remove a hook. Must be called by Admin + RemoveHook { addr: String }, +} + +#[cw_serde] +#[derive(QueryResponses)] +pub enum QueryMsg { + #[returns(cw_controllers::AdminResponse)] + Admin {}, + #[returns(cw4::TotalWeightResponse)] + TotalWeight { at_height: Option }, + #[returns(cw4::MemberListResponse)] + ListMembers { + start_after: Option, + limit: Option, + }, + #[returns(cw4::MemberResponse)] + Member { + addr: String, + at_height: Option, + }, + /// Shows all registered hooks. + #[returns(cw_controllers::HooksResponse)] + Hooks {}, +} +#[cw_serde] +pub struct MigrateMsg {} diff --git a/common/credential-storage/Cargo.toml b/common/credential-storage/Cargo.toml index 44a122ce4f..15463ec837 100644 --- a/common/credential-storage/Cargo.toml +++ b/common/credential-storage/Cargo.toml @@ -20,8 +20,8 @@ nym-credentials = { path = "../credentials" } nym-compact-ecash = { path = "../nym_offline_compact_ecash" } nym-ecash-time = { path = "../ecash-time" } -[target."cfg(not(target_arch = \"wasm32\"))".dependencies.sqlx-pool-guard] -path = "../../sqlx-pool-guard" +[target."cfg(not(target_arch = \"wasm32\"))".dependencies.nym-sqlx-pool-guard] +path = "../../nym-sqlx-pool-guard" [target."cfg(not(target_arch = \"wasm32\"))".dependencies.sqlx] workspace = true diff --git a/common/credential-storage/src/backends/sqlite.rs b/common/credential-storage/src/backends/sqlite.rs index 6ac45aec47..d2f25623bc 100644 --- a/common/credential-storage/src/backends/sqlite.rs +++ b/common/credential-storage/src/backends/sqlite.rs @@ -6,8 +6,8 @@ use crate::models::{ RawVerificationKey, StoredIssuedTicketbook, StoredPendingTicketbook, }; use nym_ecash_time::Date; +use nym_sqlx_pool_guard::SqlitePoolGuard; use sqlx::{Executor, Sqlite, Transaction}; -use sqlx_pool_guard::SqlitePoolGuard; #[derive(Clone)] pub struct SqliteEcashTicketbookManager { diff --git a/common/credential-storage/src/persistent_storage/mod.rs b/common/credential-storage/src/persistent_storage/mod.rs index 35df10c318..a62bc512ed 100644 --- a/common/credential-storage/src/persistent_storage/mod.rs +++ b/common/credential-storage/src/persistent_storage/mod.rs @@ -33,11 +33,11 @@ use nym_credentials::{ IssuanceTicketBook, IssuedTicketBook, }; use nym_ecash_time::{ecash_today, Date, EcashTime}; +use nym_sqlx_pool_guard::SqlitePoolGuard; use sqlx::{ sqlite::{SqliteAutoVacuum, SqliteSynchronous}, ConnectOptions, }; -use sqlx_pool_guard::SqlitePoolGuard; use std::path::Path; use zeroize::Zeroizing; diff --git a/common/dkg/Cargo.toml b/common/dkg/Cargo.toml index 1afd99c29f..9f9af55063 100644 --- a/common/dkg/Cargo.toml +++ b/common/dkg/Cargo.toml @@ -12,7 +12,12 @@ bitvec = { workspace = true } # unfortunately until https://github.com/zkcrypto/bls12_381/issues/10 is resolved, we have to rely on the fork # as we need to be able to serialize Gt so that we could create the lookup table for baby-step-giant-step algorithm -bls12_381 = { workspace = true, default-features = false, features = ["alloc", "pairings", "experimental", "zeroize"] } +bls12_381 = { workspace = true, default-features = false, features = [ + "alloc", + "pairings", + "experimental", + "zeroize", +] } nym-contracts-common = { path = "../cosmwasm-smart-contracts/contracts-common", optional = true } bs58 = { workspace = true } diff --git a/common/node-tester-utils/Cargo.toml b/common/node-tester-utils/Cargo.toml index 594f66f4fd..24df456100 100644 --- a/common/node-tester-utils/Cargo.toml +++ b/common/node-tester-utils/Cargo.toml @@ -28,5 +28,5 @@ nym-sphinx = { path = "../nymsphinx" } workspace = true ## wasm-only dependencies -[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-utils] +[target."cfg(target_arch = \"wasm32\")".dependencies.nym-wasm-utils] path = "../wasm/utils" diff --git a/common/nyxd-scraper/Cargo.toml b/common/nyxd-scraper/Cargo.toml index 44b24188e9..629619b2f2 100644 --- a/common/nyxd-scraper/Cargo.toml +++ b/common/nyxd-scraper/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "nyxd-scraper" +name = "nym-nyxd-scraper" version.workspace = true authors.workspace = true repository.workspace = true @@ -19,9 +19,18 @@ futures.workspace = true humantime = { workspace = true } sha2 = { workspace = true } serde = { workspace = true, features = ["derive"] } -sqlx = { workspace = true, features = ["runtime-tokio-rustls", "sqlite", "macros", "migrate", "time"] } +sqlx = { workspace = true, features = [ + "runtime-tokio-rustls", + "sqlite", + "macros", + "migrate", + "time", +] } tendermint.workspace = true -tendermint-rpc = { workspace = true, features = ["websocket-client", "http-client"] } +tendermint-rpc = { workspace = true, features = [ + "websocket-client", + "http-client", +] } thiserror.workspace = true time = { workspace = true } tokio = { workspace = true, features = ["full"] } @@ -36,5 +45,10 @@ url.workspace = true [build-dependencies] -sqlx = { workspace = true, features = ["runtime-tokio-rustls", "sqlite", "macros", "migrate"] } +sqlx = { workspace = true, features = [ + "runtime-tokio-rustls", + "sqlite", + "macros", + "migrate", +] } tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } diff --git a/common/topology/Cargo.toml b/common/topology/Cargo.toml index 28f53993be..8ee4b99bd5 100644 --- a/common/topology/Cargo.toml +++ b/common/topology/Cargo.toml @@ -41,11 +41,11 @@ nym-api-requests = { path = "../../nym-api/nym-api-requests" } # 'wasm-serde-types' feature -wasm-utils = { path = "../wasm/utils", default-features = false, optional = true } +nym-wasm-utils = { path = "../wasm/utils", default-features = false, optional = true } [features] default = ["provider-trait"] provider-trait = ["async-trait"] -wasm-serde-types = ["tsify", "wasm-bindgen", "wasm-utils"] +wasm-serde-types = ["tsify", "wasm-bindgen", "nym-wasm-utils"] persistence = ["serde_json"] outfox = [] diff --git a/common/topology/src/wasm_helpers.rs b/common/topology/src/wasm_helpers.rs index 5ebce45455..5570d2c3ce 100644 --- a/common/topology/src/wasm_helpers.rs +++ b/common/topology/src/wasm_helpers.rs @@ -6,13 +6,13 @@ use crate::node::{EntryDetails, RoutingNode, RoutingNodeError, SupportedRoles}; use crate::{CachedEpochRewardedSet, NymTopology, NymTopologyMetadata}; +use nym_wasm_utils::error::simple_js_error; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::net::SocketAddr; use thiserror::Error; use tsify::Tsify; use wasm_bindgen::{prelude::wasm_bindgen, JsValue}; -use wasm_utils::error::simple_js_error; #[derive(Debug, Error)] pub enum SerializableTopologyError { diff --git a/common/wasm/client-core/Cargo.toml b/common/wasm/client-core/Cargo.toml index b6af34dc60..0ba8d203be 100644 --- a/common/wasm/client-core/Cargo.toml +++ b/common/wasm/client-core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "wasm-client-core" +name = "nym-wasm-client-core" authors = ["Jedrzej Stuczynski "] version.workspace = true edition = "2021" @@ -23,19 +23,25 @@ wasm-bindgen-futures = { workspace = true } zeroize = { workspace = true } nym-bandwidth-controller = { path = "../../bandwidth-controller" } -nym-client-core = { path = "../../client-core", default-features = false, features = ["wasm"] } +nym-client-core = { path = "../../client-core", default-features = false, features = [ + "wasm", +] } nym-config = { path = "../../config" } nym-credential-storage = { path = "../../credential-storage" } nym-crypto = { path = "../../crypto", features = ["asymmetric", "serde"] } -nym-gateway-client = { path = "../../client-libs/gateway-client", default-features = false, features = ["wasm"] } +nym-gateway-client = { path = "../../client-libs/gateway-client", default-features = false, features = [ + "wasm", +] } nym-sphinx = { path = "../../nymsphinx" } -nym-sphinx-acknowledgements = { path = "../../nymsphinx/acknowledgements", features = ["serde"] } +nym-sphinx-acknowledgements = { path = "../../nymsphinx/acknowledgements", features = [ + "serde", +] } nym-statistics-common = { path = "../../statistics" } nym-task = { path = "../../task" } nym-topology = { path = "../../topology", features = ["wasm-serde-types"] } nym-validator-client = { path = "../../client-libs/validator-client", default-features = false } -wasm-utils = { path = "../utils" } -wasm-storage = { path = "../storage" } +nym-wasm-utils = { path = "../utils" } +nym-wasm-storage = { path = "../storage" } # The `console_error_panic_hook` crate provides better debugging of panics by diff --git a/common/wasm/storage/Cargo.toml b/common/wasm/storage/Cargo.toml index 5766af1190..4c56604c8e 100644 --- a/common/wasm/storage/Cargo.toml +++ b/common/wasm/storage/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "wasm-storage" +name = "nym-wasm-storage" version.workspace = true authors = ["Jedrzej Stuczynski "] edition = "2021" @@ -18,4 +18,4 @@ indexed_db_futures = { workspace = true } thiserror = { workspace = true } nym-store-cipher = { path = "../../store-cipher", features = ["json"] } -wasm-utils = { path = "../utils", default-features = false } +nym-wasm-utils = { path = "../utils", default-features = false } diff --git a/common/wasm/storage/src/error.rs b/common/wasm/storage/src/error.rs index 3ca74adee4..ee28306c8b 100644 --- a/common/wasm/storage/src/error.rs +++ b/common/wasm/storage/src/error.rs @@ -1,10 +1,10 @@ // Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +use nym_wasm_utils::error::simple_js_error; use serde_wasm_bindgen::Error; use thiserror::Error; use wasm_bindgen::JsValue; -use wasm_utils::error::simple_js_error; #[derive(Debug, Error)] pub enum StorageError { diff --git a/common/wasm/storage/src/lib.rs b/common/wasm/storage/src/lib.rs index 8d9e795270..c20015ab53 100644 --- a/common/wasm/storage/src/lib.rs +++ b/common/wasm/storage/src/lib.rs @@ -8,11 +8,11 @@ use nym_store_cipher::{ Aes256Gcm, Algorithm, EncryptedData, KdfInfo, KeySizeUser, Params, StoreCipher, Unsigned, Version, }; +use nym_wasm_utils::console_log; use serde::de::DeserializeOwned; use serde::Serialize; use std::future::IntoFuture; use wasm_bindgen::JsValue; -use wasm_utils::console_log; pub use indexed_db_futures::database::{Database, VersionChangeEvent}; pub use indexed_db_futures::prelude::*; diff --git a/common/wasm/utils/Cargo.toml b/common/wasm/utils/Cargo.toml index 0785c0d8b1..8876e53cd8 100644 --- a/common/wasm/utils/Cargo.toml +++ b/common/wasm/utils/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "wasm-utils" +name = "nym-wasm-utils" version.workspace = true authors = ["Jedrzej Stuczynski "] edition = "2021" diff --git a/common/zulip-client/Cargo.toml b/common/zulip-client/Cargo.toml index 263f3e5c62..b065774006 100644 --- a/common/zulip-client/Cargo.toml +++ b/common/zulip-client/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "zulip-client" +name = "nym-zulip-client" version.workspace = true authors.workspace = true repository.workspace = true diff --git a/contracts/mixnet/Cargo.toml b/contracts/mixnet/Cargo.toml index ae2ad99d36..7cc2d5020a 100644 --- a/contracts/mixnet/Cargo.toml +++ b/contracts/mixnet/Cargo.toml @@ -22,7 +22,7 @@ name = "schema" required-features = ["schema-gen"] [lib] -name = "mixnet_contract" +name = "nym_mixnet_contract" crate-type = ["cdylib", "rlib"] [dependencies] @@ -60,4 +60,4 @@ testable-mixnet-contract = ["nym-contracts-common-testing"] schema-gen = ["mixnet-contract-common/schema", "cosmwasm-schema"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/contracts/vesting/Cargo.toml b/contracts/vesting/Cargo.toml index 2845ee15a1..60cdece967 100644 --- a/contracts/vesting/Cargo.toml +++ b/contracts/vesting/Cargo.toml @@ -20,9 +20,8 @@ name = "schema" required-features = ["schema-gen"] [lib] -name = "vesting_contract" +name = "nym_vesting_contract" crate-type = ["cdylib", "rlib"] - [dependencies] mixnet-contract-common = { path = "../../common/cosmwasm-smart-contracts/mixnet-contract", package = "nym-mixnet-contract-common", version = "0.6.0" } contracts-common = { path = "../../common/cosmwasm-smart-contracts/contracts-common", package = "nym-contracts-common", version = "0.5.0" } diff --git a/cpu-cycles/Cargo.toml b/cpu-cycles/Cargo.toml index a0d4270a79..359f3d7322 100644 --- a/cpu-cycles/Cargo.toml +++ b/cpu-cycles/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "cpu-cycles" +name = "nym-cpu-cycles" version.workspace = true edition = "2021" build = "build.rs" diff --git a/documentation/autodoc/Cargo.toml b/documentation/autodoc/Cargo.toml index 2a29f9854d..88f798fb32 100644 --- a/documentation/autodoc/Cargo.toml +++ b/documentation/autodoc/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "autodoc" +name = "nym-autodoc" version.workspace = true authors.workspace = true repository.workspace = true diff --git a/examples/cli/commands/verify-signature/Cargo.toml b/examples/cli/commands/verify-signature/Cargo.toml index 34c619b193..26cbd6b929 100644 --- a/examples/cli/commands/verify-signature/Cargo.toml +++ b/examples/cli/commands/verify-signature/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "example-verify-signature" +name = "nym-example-verify-signature" version.workspace = true edition = "2021" [workspace] [dependencies] -nym-cli-commands = { git = "https://github.com/nymtech/nym", branch = "develop" } \ No newline at end of file +nym-cli-commands = { git = "https://github.com/nymtech/nym", branch = "develop" } diff --git a/nym-browser-extension/storage/Cargo.toml b/nym-browser-extension/storage/Cargo.toml index 49b6ce1298..ee16d9cd60 100644 --- a/nym-browser-extension/storage/Cargo.toml +++ b/nym-browser-extension/storage/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "extension-storage" +name = "nym-extension-storage" version.workspace = true edition = "2024" license = "Apache-2.0" @@ -13,20 +13,20 @@ authors = ["Nym Technologies SA "] crate-type = ["cdylib", "rlib"] [dependencies] -bip39 = { workspace = true } -zeroize = { workspace = true } +bip39 = { workspace = true } +zeroize = { workspace = true } -js-sys = { workspace = true } -wasm-bindgen = { workspace = true } -wasm-bindgen-futures = { workspace = true } +js-sys = { workspace = true } +wasm-bindgen = { workspace = true } +wasm-bindgen-futures = { workspace = true } serde-wasm-bindgen = { workspace = true } -thiserror = { workspace = true } +thiserror = { workspace = true } -console_error_panic_hook = { workspace = true, optional = true } +console_error_panic_hook = { workspace = true, optional = true } -wasm-utils = { path = "../../common/wasm/utils" } -wasm-storage = { path = "../../common/wasm/storage" } +nym-wasm-utils = { path = "../../common/wasm/utils" } +nym-wasm-storage = { path = "../../common/wasm/storage" } #[package.metadata.wasm-pack.profile.release] diff --git a/nym-credential-proxy/vpn-api-lib-wasm/Cargo.toml b/nym-credential-proxy/vpn-api-lib-wasm/Cargo.toml index 8bb958bf4d..3d42056c08 100644 --- a/nym-credential-proxy/vpn-api-lib-wasm/Cargo.toml +++ b/nym-credential-proxy/vpn-api-lib-wasm/Cargo.toml @@ -33,6 +33,7 @@ nym-compact-ecash = { path = "../../common/nym_offline_compact_ecash" } nym-credentials = { path = "../../common/credentials" } nym-credentials-interface = { path = "../../common/credentials-interface" } nym-ecash-time = { path = "../../common/ecash-time", features = ["expiration"] } -nym-credential-proxy-requests = { path = "../nym-credential-proxy-requests", default-features = false, features = ["tsify"] } -wasm-utils = { path = "../../common/wasm/utils" } - +nym-credential-proxy-requests = { path = "../nym-credential-proxy-requests", default-features = false, features = [ + "tsify", +] } +nym-wasm-utils = { path = "../../common/wasm/utils" } diff --git a/nym-credential-proxy/vpn-api-lib-wasm/src/error.rs b/nym-credential-proxy/vpn-api-lib-wasm/src/error.rs index 7322254064..5e1255bdbc 100644 --- a/nym-credential-proxy/vpn-api-lib-wasm/src/error.rs +++ b/nym-credential-proxy/vpn-api-lib-wasm/src/error.rs @@ -1,9 +1,9 @@ // Copyright 2024 Nym Technologies SA // SPDX-License-Identifier: GPL-3.0-only +use nym_wasm_utils::wasm_error; use serde_wasm_bindgen::Error; use thiserror::Error; -use wasm_utils::wasm_error; #[derive(Debug, Error)] pub enum VpnApiLibError { diff --git a/nym-credential-proxy/vpn-api-lib-wasm/src/lib.rs b/nym-credential-proxy/vpn-api-lib-wasm/src/lib.rs index 02c3b757f3..d9a2e5c165 100644 --- a/nym-credential-proxy/vpn-api-lib-wasm/src/lib.rs +++ b/nym-credential-proxy/vpn-api-lib-wasm/src/lib.rs @@ -19,12 +19,12 @@ use nym_credentials::{ use nym_credentials_interface::TicketType; use nym_crypto::asymmetric::ed25519; use nym_ecash_time::{ecash_default_expiration_date, EcashTime}; +use nym_wasm_utils::console_error; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use time::Date; use tsify::Tsify; use wasm_bindgen::prelude::*; -use wasm_utils::console_error; use zeroize::Zeroizing; pub mod error; @@ -264,11 +264,11 @@ pub struct FullSerialisedNymIssuedTicketbook { #[wasm_bindgen(start)] pub fn main() { - wasm_utils::console_log!("[rust main]: rust module loaded"); - wasm_utils::console_log!( + nym_wasm_utils::console_log!("[rust main]: rust module loaded"); + nym_wasm_utils::console_log!( "vpn-api-lib version used:\n{}", nym_bin_common::bin_info!().pretty_print() ); - wasm_utils::console_log!("[rust main]: setting panic hook"); - wasm_utils::set_panic_hook(); + nym_wasm_utils::console_log!("[rust main]: setting panic hook"); + nym_wasm_utils::set_panic_hook(); } diff --git a/sqlx-pool-guard/Cargo.toml b/nym-sqlx-pool-guard/Cargo.toml similarity index 96% rename from sqlx-pool-guard/Cargo.toml rename to nym-sqlx-pool-guard/Cargo.toml index 5e2e5e02d4..0efa2e6613 100644 --- a/sqlx-pool-guard/Cargo.toml +++ b/nym-sqlx-pool-guard/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sqlx-pool-guard" +name = "nym-sqlx-pool-guard" version.workspace = true edition = "2024" license.workspace = true diff --git a/sqlx-pool-guard/src/apple.rs b/nym-sqlx-pool-guard/src/apple.rs similarity index 100% rename from sqlx-pool-guard/src/apple.rs rename to nym-sqlx-pool-guard/src/apple.rs diff --git a/sqlx-pool-guard/src/lib.rs b/nym-sqlx-pool-guard/src/lib.rs similarity index 100% rename from sqlx-pool-guard/src/lib.rs rename to nym-sqlx-pool-guard/src/lib.rs diff --git a/sqlx-pool-guard/src/linux.rs b/nym-sqlx-pool-guard/src/linux.rs similarity index 100% rename from sqlx-pool-guard/src/linux.rs rename to nym-sqlx-pool-guard/src/linux.rs diff --git a/sqlx-pool-guard/src/windows.rs b/nym-sqlx-pool-guard/src/windows.rs similarity index 100% rename from sqlx-pool-guard/src/windows.rs rename to nym-sqlx-pool-guard/src/windows.rs diff --git a/nym-validator-rewarder/Cargo.toml b/nym-validator-rewarder/Cargo.toml index 80f2a1f82e..0fd9d5da12 100644 --- a/nym-validator-rewarder/Cargo.toml +++ b/nym-validator-rewarder/Cargo.toml @@ -18,7 +18,13 @@ clap = { workspace = true, features = ["cargo", "env"] } futures.workspace = true rand.workspace = true serde = { workspace = true, features = ["derive"] } -sqlx = { workspace = true, features = ["runtime-tokio-rustls", "sqlite", "macros", "migrate", "time"] } +sqlx = { workspace = true, features = [ + "runtime-tokio-rustls", + "sqlite", + "macros", + "migrate", + "time", +] } thiserror.workspace = true tokio = { workspace = true, features = ["rt-multi-thread", "time", "macros"] } tracing.workspace = true @@ -32,7 +38,10 @@ humantime = { workspace = true } humantime-serde.workspace = true # internal -nym-bin-common = { path = "../common/bin-common", features = ["output_format", "basic_tracing"] } +nym-bin-common = { path = "../common/bin-common", features = [ + "output_format", + "basic_tracing", +] } nym-config = { path = "../common/config" } nym-ecash-time = { path = "../common/ecash-time" } nym-contracts-common = { path = "../common/cosmwasm-smart-contracts/contracts-common" } @@ -43,13 +52,18 @@ nym-network-defaults = { path = "../common/network-defaults" } nym-task = { path = "../common/task" } nym-validator-client = { path = "../common/client-libs/validator-client" } nym-coconut-dkg-common = { path = "../common/cosmwasm-smart-contracts/coconut-dkg" } -nyxd-scraper = { path = "../common/nyxd-scraper" } +nym-nyxd-scraper = { path = "../common/nyxd-scraper" } nym-ticketbooks-merkle = { path = "../common/ticketbooks-merkle" } nym-serde-helpers = { path = "../common/serde-helpers", features = ["base64"] } nym-pemstore = { path = "../common/pemstore" } [build-dependencies] -sqlx = { workspace = true, features = ["runtime-tokio-rustls", "sqlite", "macros", "migrate"] } +sqlx = { workspace = true, features = [ + "runtime-tokio-rustls", + "sqlite", + "macros", + "migrate", +] } tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } [dev-dependencies] diff --git a/nym-validator-rewarder/src/cli/process_block.rs b/nym-validator-rewarder/src/cli/process_block.rs index c4f3563566..49e09aa0bb 100644 --- a/nym-validator-rewarder/src/cli/process_block.rs +++ b/nym-validator-rewarder/src/cli/process_block.rs @@ -3,7 +3,7 @@ use crate::cli::{try_load_current_config, ConfigOverridableArgs}; use crate::error::NymRewarderError; -use nyxd_scraper::NyxdScraper; +use nym_nyxd_scraper::NyxdScraper; use std::path::PathBuf; #[derive(Debug, clap::Args)] diff --git a/nym-validator-rewarder/src/cli/process_until.rs b/nym-validator-rewarder/src/cli/process_until.rs index 04a5809caf..a061b51252 100644 --- a/nym-validator-rewarder/src/cli/process_until.rs +++ b/nym-validator-rewarder/src/cli/process_until.rs @@ -3,7 +3,7 @@ use crate::cli::{try_load_current_config, ConfigOverridableArgs}; use crate::error::NymRewarderError; -use nyxd_scraper::NyxdScraper; +use nym_nyxd_scraper::NyxdScraper; use std::path::PathBuf; #[derive(Debug, clap::Args)] diff --git a/nym-validator-rewarder/src/config/mod.rs b/nym-validator-rewarder/src/config/mod.rs index e7681fdb64..6910a6433c 100644 --- a/nym-validator-rewarder/src/config/mod.rs +++ b/nym-validator-rewarder/src/config/mod.rs @@ -11,8 +11,8 @@ use nym_config::{ must_get_home, read_config_from_toml_file, save_formatted_config_to_file, NymConfigTemplate, DEFAULT_CONFIG_DIR, DEFAULT_CONFIG_FILENAME, DEFAULT_DATA_DIR, NYM_DIR, }; +use nym_nyxd_scraper::{PruningOptions, StartingBlockOpts}; use nym_validator_client::nyxd::{AccountId, Coin}; -use nyxd_scraper::{PruningOptions, StartingBlockOpts}; use serde::{Deserialize, Serialize}; use serde_with::{serde_as, DisplayFromStr}; use std::io; @@ -119,8 +119,8 @@ impl Config { } } - pub fn scraper_config(&self) -> nyxd_scraper::Config { - nyxd_scraper::Config { + pub fn scraper_config(&self) -> nym_nyxd_scraper::Config { + nym_nyxd_scraper::Config { websocket_url: self.nyxd_scraper.websocket_url.clone(), rpc_url: self.base.upstream_nyxd.clone(), database_path: self.storage_paths.nyxd_scraper.clone(), diff --git a/nym-validator-rewarder/src/error.rs b/nym-validator-rewarder/src/error.rs index 48150139df..2732a6e46c 100644 --- a/nym-validator-rewarder/src/error.rs +++ b/nym-validator-rewarder/src/error.rs @@ -78,7 +78,7 @@ pub enum NymRewarderError { #[error("chain scraping failure: {source}")] ScraperFailure { #[from] - source: nyxd_scraper::error::ScraperError, + source: nym_nyxd_scraper::error::ScraperError, }, // this should never happen but unwrapping everywhere was more cumbersome than just propagating the error diff --git a/nym-validator-rewarder/src/rewarder/block_signing/mod.rs b/nym-validator-rewarder/src/rewarder/block_signing/mod.rs index 5a32069a04..5b82728a27 100644 --- a/nym-validator-rewarder/src/rewarder/block_signing/mod.rs +++ b/nym-validator-rewarder/src/rewarder/block_signing/mod.rs @@ -5,9 +5,9 @@ use crate::error::NymRewarderError; use crate::rewarder::block_signing::types::{EpochSigningResults, RawValidatorResult}; use crate::rewarder::epoch::Epoch; use crate::rewarder::nyxd_client::NyxdClient; +use nym_nyxd_scraper::NyxdScraper; use nym_validator_client::nyxd::module_traits::staking; use nym_validator_client::nyxd::{AccountId, PageRequest}; -use nyxd_scraper::NyxdScraper; use std::cmp::min; use std::collections::HashMap; use std::ops::Range; diff --git a/nym-validator-rewarder/src/rewarder/block_signing/types.rs b/nym-validator-rewarder/src/rewarder/block_signing/types.rs index 0a27e2258b..ff740c1456 100644 --- a/nym-validator-rewarder/src/rewarder/block_signing/types.rs +++ b/nym-validator-rewarder/src/rewarder/block_signing/types.rs @@ -6,8 +6,8 @@ use crate::{ rewarder::helpers::{consensus_pubkey_to_address, operator_account_to_owner_account}, }; use cosmwasm_std::{Decimal, Uint128}; +use nym_nyxd_scraper::models; use nym_validator_client::nyxd::{module_traits::staking, AccountId, Coin}; -use nyxd_scraper::models; use std::collections::HashMap; use tracing::info; diff --git a/nym-validator-rewarder/src/rewarder/helpers.rs b/nym-validator-rewarder/src/rewarder/helpers.rs index 578d49c498..660bec3b2b 100644 --- a/nym-validator-rewarder/src/rewarder/helpers.rs +++ b/nym-validator-rewarder/src/rewarder/helpers.rs @@ -2,8 +2,8 @@ // SPDX-License-Identifier: GPL-3.0-only use crate::error::NymRewarderError; +use nym_nyxd_scraper::constants::{BECH32_CONSENSUS_ADDRESS_PREFIX, BECH32_PREFIX}; use nym_validator_client::nyxd::{AccountId, PublicKey}; -use nyxd_scraper::constants::{BECH32_CONSENSUS_ADDRESS_PREFIX, BECH32_PREFIX}; use sha2::{Digest, Sha256}; pub(crate) fn consensus_pubkey_to_address( diff --git a/nym-validator-rewarder/src/rewarder/mod.rs b/nym-validator-rewarder/src/rewarder/mod.rs index ed38ba1d3c..80f866827f 100644 --- a/nym-validator-rewarder/src/rewarder/mod.rs +++ b/nym-validator-rewarder/src/rewarder/mod.rs @@ -14,9 +14,9 @@ use futures::future::{FusedFuture, OptionFuture}; use futures::FutureExt; use nym_crypto::asymmetric::ed25519; use nym_ecash_time::{ecash_today, ecash_today_date, EcashTime}; +use nym_nyxd_scraper::NyxdScraper; use nym_task::TaskManager; use nym_validator_client::nyxd::{AccountId, Coin, Hash}; -use nyxd_scraper::NyxdScraper; use std::sync::Arc; use time::Date; use tokio::pin; diff --git a/nyx-chain-watcher/Cargo.toml b/nyx-chain-watcher/Cargo.toml index df4403de09..fd69203287 100644 --- a/nyx-chain-watcher/Cargo.toml +++ b/nyx-chain-watcher/Cargo.toml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-3.0-only [package] -name = "nyx-chain-watcher" +name = "nym-nyx-chain-watcher" version.workspace = true authors.workspace = true repository.workspace = true @@ -24,11 +24,15 @@ nym-bin-common = { path = "../common/bin-common", features = ["output_format"] } nym-network-defaults = { path = "../common/network-defaults" } nym-task = { path = "../common/task" } nym-validator-client = { path = "../common/client-libs/validator-client" } -nyxd-scraper = { path = "../common/nyxd-scraper" } +nym-nyxd-scraper = { path = "../common/nyxd-scraper" } reqwest = { workspace = true, features = ["rustls-tls"] } schemars = { workspace = true } serde = { workspace = true, features = ["derive"] } -sqlx = { workspace = true, features = ["runtime-tokio-rustls", "sqlite", "time"] } +sqlx = { workspace = true, features = [ + "runtime-tokio-rustls", + "sqlite", + "time", +] } thiserror = { workspace = true } time = { workspace = true } tokio = { workspace = true, features = ["process", "rt-multi-thread"] } diff --git a/nyx-chain-watcher/src/chain_scraper/mod.rs b/nyx-chain-watcher/src/chain_scraper/mod.rs index 21e716d580..afb26a393b 100644 --- a/nyx-chain-watcher/src/chain_scraper/mod.rs +++ b/nyx-chain-watcher/src/chain_scraper/mod.rs @@ -5,11 +5,11 @@ use crate::env::vars::{ }; use crate::http::state::BankScraperModuleState; use async_trait::async_trait; -use nym_validator_client::nyxd::{Any, Coin, CosmosCoin, Hash, Msg, MsgSend, Name}; -use nyxd_scraper::{ +use nym_nyxd_scraper::{ error::ScraperError, storage::StorageTransaction, MsgModule, NyxdScraper, ParsedTransactionResponse, PruningOptions, }; +use nym_validator_client::nyxd::{Any, Coin, CosmosCoin, Hash, Msg, MsgSend, Name}; use sqlx::SqlitePool; use std::fs; use tracing::{info, warn}; @@ -50,13 +50,13 @@ pub(crate) async fn run_chain_scraper( fs::remove_file(config.chain_scraper_database_path())?; } - let scraper = NyxdScraper::builder(nyxd_scraper::Config { + let scraper = NyxdScraper::builder(nym_nyxd_scraper::Config { websocket_url, rpc_url, database_path: config.chain_scraper_database_path().into(), pruning_options: PruningOptions::nothing(), store_precommits: false, - start_block: nyxd_scraper::StartingBlockOpts { + start_block: nym_nyxd_scraper::StartingBlockOpts { start_block_height, use_best_effort_start_height, }, diff --git a/nyx-chain-watcher/src/http/state.rs b/nyx-chain-watcher/src/http/state.rs index 3f0d813f44..cfd92e57ae 100644 --- a/nyx-chain-watcher/src/http/state.rs +++ b/nyx-chain-watcher/src/http/state.rs @@ -6,8 +6,8 @@ use crate::models::WebhookPayload; use axum::extract::FromRef; use nym_bin_common::bin_info; use nym_bin_common::build_information::BinaryBuildInformation; +use nym_nyxd_scraper::ParsedTransactionResponse; use nym_validator_client::nyxd::{Coin, MsgSend}; -use nyxd_scraper::ParsedTransactionResponse; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::ops::Deref; diff --git a/tools/echo-server/Cargo.toml b/tools/echo-server/Cargo.toml index 61f66286ca..a7abe12291 100644 --- a/tools/echo-server/Cargo.toml +++ b/tools/echo-server/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "echo-server" +name = "nym-echo-server" version.workspace = true authors.workspace = true repository.workspace = true diff --git a/tools/echo-server/src/echo-server.rs b/tools/echo-server/src/echo-server.rs index 09f0b3725d..2bb0417ac4 100644 --- a/tools/echo-server/src/echo-server.rs +++ b/tools/echo-server/src/echo-server.rs @@ -3,8 +3,8 @@ use anyhow::Result; use clap::Parser; -use echo_server::NymEchoServer; use nym_crypto::asymmetric::ed25519; +use nym_echo_server::NymEchoServer; use tracing::info; #[derive(Parser, Debug)] diff --git a/tools/ts-rs-cli/Cargo.toml b/tools/ts-rs-cli/Cargo.toml index 4b662d86b2..44fb14086a 100644 --- a/tools/ts-rs-cli/Cargo.toml +++ b/tools/ts-rs-cli/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ts-rs-cli" +name = "nym-ts-rs-cli" version.workspace = true edition = "2021" license.workspace = true @@ -12,10 +12,18 @@ ts-rs = { workspace = true } walkdir = { workspace = true } nym-validator-client = { path = "../../common/client-libs/validator-client", features = [ - "generate-ts" + "generate-ts", +] } +nym-api-requests = { path = "../../nym-api/nym-api-requests", features = [ + "generate-ts", +] } +nym-mixnet-contract-common = { path = "../../common/cosmwasm-smart-contracts/mixnet-contract", features = [ + "generate-ts", +] } +nym-vesting-contract-common = { path = "../../common/cosmwasm-smart-contracts/vesting-contract", features = [ + "generate-ts", ] } -nym-api-requests = { path = "../../nym-api/nym-api-requests", features = ["generate-ts"] } -nym-mixnet-contract-common = { path = "../../common/cosmwasm-smart-contracts/mixnet-contract", features = ["generate-ts"] } -nym-vesting-contract-common = { path = "../../common/cosmwasm-smart-contracts/vesting-contract", features = ["generate-ts"] } nym-types = { path = "../../common/types", features = ["generate-ts"] } -nym-wallet-types = { path = "../../nym-wallet/nym-wallet-types", features = ["generate-ts"] } +nym-wallet-types = { path = "../../nym-wallet/nym-wallet-types", features = [ + "generate-ts", +] } diff --git a/wasm/client/Cargo.toml b/wasm/client/Cargo.toml index d7513da8af..f45cbb7373 100644 --- a/wasm/client/Cargo.toml +++ b/wasm/client/Cargo.toml @@ -1,6 +1,9 @@ [package] name = "nym-client-wasm" -authors = ["Dave Hrycyszyn ", "Jedrzej Stuczynski "] +authors = [ + "Dave Hrycyszyn ", + "Jedrzej Stuczynski ", +] version.workspace = true edition = "2021" keywords = ["nym", "sphinx", "wasm", "webassembly", "privacy"] @@ -26,8 +29,8 @@ thiserror = { workspace = true } tsify = { workspace = true, features = ["js"] } nym-bin-common = { path = "../../common/bin-common" } -wasm-client-core = { path = "../../common/wasm/client-core" } -wasm-utils = { path = "../../common/wasm/utils" } +nym-wasm-client-core = { path = "../../common/wasm/client-core" } +nym-wasm-utils = { path = "../../common/wasm/utils" } nym-node-tester-utils = { path = "../../common/node-tester-utils", optional = true } nym-node-tester-wasm = { path = "../node-tester", optional = true } diff --git a/wasm/mix-fetch/Cargo.toml b/wasm/mix-fetch/Cargo.toml index 929a28327e..1581c1b594 100644 --- a/wasm/mix-fetch/Cargo.toml +++ b/wasm/mix-fetch/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "mix-fetch-wasm" +name = "nym-mix-fetch-wasm" authors = ["Jedrzej Stuczynski "] version.workspace = true edition = "2021" @@ -32,8 +32,8 @@ nym-http-api-client = { path = "../../common/http-api-client" } nym-socks5-requests = { path = "../../common/socks5/requests" } nym-ordered-buffer = { path = "../../common/socks5/ordered-buffer" } nym-service-providers-common = { path = "../../service-providers/common" } -wasm-client-core = { path = "../../common/wasm/client-core" } -wasm-utils = { path = "../../common/wasm/utils" } +nym-wasm-client-core = { path = "../../common/wasm/client-core" } +nym-wasm-utils = { path = "../../common/wasm/utils" } [package.metadata.wasm-pack.profile.release] wasm-opt = false diff --git a/wasm/node-tester/Cargo.toml b/wasm/node-tester/Cargo.toml index aea74e2ed9..979459592c 100644 --- a/wasm/node-tester/Cargo.toml +++ b/wasm/node-tester/Cargo.toml @@ -28,8 +28,8 @@ tsify = { workspace = true, features = ["js"] } wasmtimer = { workspace = true } nym-node-tester-utils = { path = "../../common/node-tester-utils" } -wasm-client-core = { path = "../../common/wasm/client-core" } -wasm-utils = { path = "../../common/wasm/utils" } +nym-wasm-client-core = { path = "../../common/wasm/client-core" } +nym-wasm-utils = { path = "../../common/wasm/utils" } [package.metadata.wasm-pack.profile.release] wasm-opt = false diff --git a/wasm/zknym-lib/Cargo.toml b/wasm/zknym-lib/Cargo.toml index 2e73cf5c0d..46be5d8663 100644 --- a/wasm/zknym-lib/Cargo.toml +++ b/wasm/zknym-lib/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "zknym-lib" +name = "nym-zknym-lib" version.workspace = true authors.workspace = true repository.workspace = true @@ -35,7 +35,7 @@ nym-compact-ecash = { path = "../../common/nym_offline_compact_ecash" } nym-credentials = { path = "../../common/credentials" } nym-crypto = { path = "../../common/crypto", features = ["asymmetric", "rand"] } nym-http-api-client = { path = "../../common/http-api-client" } -wasm-utils = { path = "../../common/wasm/utils" } +nym-wasm-utils = { path = "../../common/wasm/utils" } [dev-dependencies] anyhow = { workspace = true } @@ -43,4 +43,4 @@ tokio = { workspace = true, features = ["full"] } [package.metadata.wasm-pack.profile.release] -wasm-opt = false \ No newline at end of file +wasm-opt = false diff --git a/wasm/zknym-lib/src/error.rs b/wasm/zknym-lib/src/error.rs index f232daddf3..64069291a6 100644 --- a/wasm/zknym-lib/src/error.rs +++ b/wasm/zknym-lib/src/error.rs @@ -2,8 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 use crate::vpn_api_client::NymVpnApiClientError; +use nym_wasm_utils::wasm_error; use thiserror::Error; -use wasm_utils::wasm_error; #[derive(Debug, Error)] pub enum ZkNymError { diff --git a/wasm/zknym-lib/src/lib.rs b/wasm/zknym-lib/src/lib.rs index 4d0b342232..7bff719be4 100644 --- a/wasm/zknym-lib/src/lib.rs +++ b/wasm/zknym-lib/src/lib.rs @@ -23,8 +23,8 @@ pub(crate) mod vpn_api_client; #[wasm_bindgen(start)] // #[cfg(target_arch = "wasm32")] pub fn main() { - wasm_utils::console_log!("[rust main]: rust module loaded"); - wasm_utils::console_log!( + nym_wasm_utils::console_log!("[rust main]: rust module loaded"); + nym_wasm_utils::console_log!( "wasm zk-nym version used: {}", nym_bin_common::bin_info_owned!() );