diff --git a/.github/workflows/check-contract-schema.yml b/.github/workflows/check-contract-schema.yml index 700440bdd5..6de645dfa5 100644 --- a/.github/workflows/check-contract-schema.yml +++ b/.github/workflows/check-contract-schema.yml @@ -13,13 +13,19 @@ on: jobs: check-schema: name: Generate and check schema - runs-on: ubuntu-latest + runs-on: custom-runner-linux steps: - name: Check out repository code uses: actions/checkout@v2 - + + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Generate the schema run: make contract-schema - name: Check for diff - run: git diff --exit-code + run: git diff --exit-code -- contracts/*/schema diff --git a/.github/workflows/ci-dev.yml b/.github/workflows/ci-dev.yml index 82068fce76..80688c2ccc 100644 --- a/.github/workflows/ci-dev.yml +++ b/.github/workflows/ci-dev.yml @@ -1,6 +1,7 @@ name: CI dev-portal on: + workflow_dispatch: push: branches-ignore: master paths: diff --git a/.github/workflows/connect-mobile.yml b/.github/workflows/connect-mobile.yml deleted file mode 100644 index 05f0add6e2..0000000000 --- a/.github/workflows/connect-mobile.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Nym Connect - mobile (Rust) - -on: - push: - paths: - - "nym-connect/mobile/src-tauri/**" - - "nym-connect/mobile/src-tauri/Cargo.toml" - - "!nym-connect/mobile/src-tauri/gen/**" - - "clients/client-core/**" - - "clients/socks5/**" - - "common/**" - - "gateway/gateway-requests/**" - - "contracts/vesting/**" - - "nym-api/nym-api-requests/**" - pull_request: - paths: - - "nym-connect/mobile/src-tauri/**" - - "nym-connect/mobile/src-tauri/Cargo.toml" - - "!nym-connect/mobile/src-tauri/gen/**" - - "clients/client-core/**" - - "clients/socks5/**" - - "common/**" - - "gateway/gateway-requests/**" - - "contracts/vesting/**" - - "nym-api/nym-api-requests/**" - -jobs: - build: - #runs-on: [self-hosted, custom-linux] - runs-on: ubuntu-22.04 - #env: - #RUSTC_WRAPPER: /home/ubuntu/.cargo/bin/sccache - #defaults: - #run: - #working-directory: nym-connect/mobile/src-tauri/ - steps: - - name: Install Dependencies (Linux) - run: | - sudo apt-get update - sudo apt-get -y install \ - libwebkit2gtk-4.1-dev \ - build-essential \ - curl \ - wget \ - libssl-dev \ - libgtk-3-dev \ - squashfs-tools \ - libayatana-appindicator3-dev \ - librsvg2-dev \ - libsoup-3.0-dev \ - libjavascriptcoregtk-4.1-dev - - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - components: clippy, rustfmt - - - name: Check formatting - run: cargo fmt --manifest-path nym-connect/mobile/src-tauri/Cargo.toml -- --check - - - name: Build all binaries - run: cargo build --manifest-path nym-connect/mobile/src-tauri/Cargo.toml - - - name: Run all tests - run: cargo test --manifest-path nym-connect/mobile/src-tauri/Cargo.toml - - - name: Clippy - run: cargo clippy --manifest-path nym-connect/mobile/src-tauri/Cargo.toml --all-targets -- -D warnings diff --git a/.github/workflows/contracts-build.yml b/.github/workflows/contracts-build.yml index f44f291f1b..8a0a5d4122 100644 --- a/.github/workflows/contracts-build.yml +++ b/.github/workflows/contracts-build.yml @@ -14,7 +14,7 @@ jobs: - name: Install Rust stable uses: actions-rs/toolchain@v1 with: - toolchain: stable + toolchain: 1.69.0 target: wasm32-unknown-unknown override: true components: rustfmt, clippy diff --git a/.github/workflows/nym-connect-publish-macos.yml b/.github/workflows/nym-connect-publish-macos.yml index 827676f4d3..a5a0a65a8c 100644 --- a/.github/workflows/nym-connect-publish-macos.yml +++ b/.github/workflows/nym-connect-publish-macos.yml @@ -19,7 +19,7 @@ jobs: outputs: release_id: ${{ steps.create-release.outputs.id }} - release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].published_at }} + release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].created_at }} version: ${{ steps.release-info.outputs.version }} filename: ${{ steps.release-info.outputs.filename }} file_hash: ${{ steps.release-info.outputs.file_hash }} diff --git a/.github/workflows/nym-connect-publish-ubuntu.yml b/.github/workflows/nym-connect-publish-ubuntu.yml index caec73b10a..2e27f3044c 100644 --- a/.github/workflows/nym-connect-publish-ubuntu.yml +++ b/.github/workflows/nym-connect-publish-ubuntu.yml @@ -19,7 +19,7 @@ jobs: outputs: release_id: ${{ steps.create-release.outputs.id }} - release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].published_at }} + release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].created_at }} version: ${{ steps.release-info.outputs.version }} filename: ${{ steps.release-info.outputs.filename }} file_hash: ${{ steps.release-info.outputs.file_hash }} diff --git a/.github/workflows/nym-connect-publish-windows10.yml b/.github/workflows/nym-connect-publish-windows10.yml index aeb04dc872..12c296a16d 100644 --- a/.github/workflows/nym-connect-publish-windows10.yml +++ b/.github/workflows/nym-connect-publish-windows10.yml @@ -19,7 +19,7 @@ jobs: outputs: release_id: ${{ steps.create-release.outputs.id }} - release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].published_at }} + release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].created_at }} version: ${{ steps.release-info.outputs.version }} filename: ${{ steps.release-info.outputs.filename }} file_hash: ${{ steps.release-info.outputs.file_hash }} diff --git a/.github/workflows/nym-wallet-publish-macos.yml b/.github/workflows/nym-wallet-publish-macos.yml index 5db06a8f52..f8f342d291 100644 --- a/.github/workflows/nym-wallet-publish-macos.yml +++ b/.github/workflows/nym-wallet-publish-macos.yml @@ -19,7 +19,7 @@ jobs: outputs: release_id: ${{ steps.create-release.outputs.id }} - release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].published_at }} + release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].created_at }} version: ${{ steps.release-info.outputs.version }} filename: ${{ steps.release-info.outputs.filename }} file_hash: ${{ steps.release-info.outputs.file_hash }} diff --git a/.github/workflows/nym-wallet-publish-ubuntu.yml b/.github/workflows/nym-wallet-publish-ubuntu.yml index 52887950fa..c21824eacf 100644 --- a/.github/workflows/nym-wallet-publish-ubuntu.yml +++ b/.github/workflows/nym-wallet-publish-ubuntu.yml @@ -19,7 +19,7 @@ jobs: outputs: release_id: ${{ steps.create-release.outputs.id }} - release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].published_at }} + release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].created_at }} version: ${{ steps.release-info.outputs.version }} filename: ${{ steps.release-info.outputs.filename }} file_hash: ${{ steps.release-info.outputs.file_hash }} diff --git a/.github/workflows/nym-wallet-publish-windows10.yml b/.github/workflows/nym-wallet-publish-windows10.yml index a7be3e4a37..b2f710100c 100644 --- a/.github/workflows/nym-wallet-publish-windows10.yml +++ b/.github/workflows/nym-wallet-publish-windows10.yml @@ -19,7 +19,7 @@ jobs: outputs: release_id: ${{ steps.create-release.outputs.id }} - release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].published_at }} + release_date: ${{ fromJSON(steps.create-release.outputs.assets)[0].created_at }} version: ${{ steps.release-info.outputs.version }} filename: ${{ steps.release-info.outputs.filename }} file_hash: ${{ steps.release-info.outputs.file_hash }} diff --git a/.github/workflows/typescript-lint.yml b/.github/workflows/typescript-lint.yml index dcaa905f5d..a8318364a4 100644 --- a/.github/workflows/typescript-lint.yml +++ b/.github/workflows/typescript-lint.yml @@ -7,8 +7,6 @@ on: - "sdk/typescript/**" - "nym-connect/desktop/src/**" - "nym-connect/desktop/package.json" - - "nym-connect/mobile/src/**" - - "nym-connect/mobile/package.json" - "nym-wallet/src/**" - "nym-wallet/package.json" - "explorer/**" @@ -18,8 +16,6 @@ on: - "sdk/typescript/**" - "nym-connect/desktop/src/**" - "nym-connect/desktop/package.json" - - "nym-connect/mobile/src/**" - - "nym-connect/mobile/package.json" - "nym-wallet/src/**" - "nym-wallet/package.json" - "explorer/**" diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ec4a60145..19988720df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ Post 1.0.0 release, the changelog format is based on [Keep a Changelog](https:// ## [Unreleased] +## [1.1.27] (2023-08-16) + +- fix serialisation of contract types ([#3752]) +- Investigate spending credentials from the main API (coconut enabled to a gateway) from feature/ephemera branch ([#3741]) +- NymConnect UI stuck in showing "Gateway has issues" ([#3594]) +- [UPDATE] Update MiniBolt community-applications-and-guides dev docs ([#3754]) + +[#3752]: https://github.com/nymtech/nym/issues/3752 +[#3741]: https://github.com/nymtech/nym/issues/3741 +[#3594]: https://github.com/nymtech/nym/issues/3594 +[#3754]: https://github.com/nymtech/nym/pull/3754 + ## [v1.1.24] (2023-08-08) - Latency based gateway selection is serial and slow ([#3710]) diff --git a/Cargo.lock b/Cargo.lock index b072b0a686..bb62518ca4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,6 +8,15 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -39,9 +48,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", "cipher 0.4.4", @@ -50,12 +59,12 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c" +checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" dependencies = [ "aead", - "aes 0.8.2", + "aes 0.8.3", "cipher 0.4.4", "ctr 0.9.2", "ghash", @@ -86,24 +95,36 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "86b8f9420f797f2d9e935edf629310eb938a0d839f984e25327f3c7eed22300c" dependencies = [ "memchr", ] [[package]] -name = "android_log-sys" -version = "0.3.0" +name = "allocator-api2" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27f0fc03f560e1aebde41c2398b691cb98b5ea5996a6184a7a67bbbb77448969" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_log-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ecc8056bf6ab9892dcd53216c83d1597487d7dacac16c8df6b877d127df9937" [[package]] name = "android_logger" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fa490e751f3878eb9accb9f18988eca52c2337ce000a8bf31ef50d4c723ca9e" +checksum = "c494134f746c14dc653a35a4ea5aca24ac368529da5370ecf41fe0341c35772f" dependencies = [ "android_log-sys", "env_logger 0.10.0", @@ -143,15 +164,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" dependencies = [ "utf8parse", ] @@ -167,9 +188,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -177,18 +198,19 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" [[package]] name = "argon2" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95c2fcf79ad1932ac6269a738109997a83c227c09b75842ae564dc8ede6a861c" +checksum = "b2e554a8638bdc1e4eae9984845306cc95f8a9208ba8d49c3859fd958b46774d" dependencies = [ "base64ct", "blake2 0.10.6", + "cpufeatures", "password-hash", ] @@ -200,15 +222,15 @@ checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", "event-listener", @@ -244,18 +266,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -310,13 +332,13 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", - "bitflags", + "bitflags 1.3.2", "bytes", "futures-util", "http", @@ -353,6 +375,21 @@ dependencies = [ "tower-service", ] +[[package]] +name = "backtrace" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base16ct" version = "0.1.1" @@ -371,12 +408,6 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" -[[package]] -name = "base64" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" - [[package]] name = "base64" version = "0.21.2" @@ -417,7 +448,7 @@ dependencies = [ "pbkdf2", "rand_core 0.6.4", "ripemd", - "sha2 0.10.6", + "sha2 0.10.7", "subtle 2.4.1", "zeroize", ] @@ -429,8 +460,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", - "rand 0.8.5", - "rand_core 0.6.4", + "rand 0.6.5", + "rand_core 0.4.2", "serde", "unicode-normalization", "zeroize", @@ -448,6 +479,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + [[package]] name = "bitvec" version = "1.0.1" @@ -483,9 +520,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.3.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" +checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" dependencies = [ "arrayref", "arrayvec", @@ -559,14 +596,14 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" dependencies = [ - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] name = "bumpalo" -version = "3.12.2" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "byte-tools" @@ -603,11 +640,12 @@ checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -658,13 +696,13 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "serde", "time 0.1.45", @@ -725,17 +763,17 @@ version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ - "bitflags", + "bitflags 1.3.2", "clap_lex 0.2.4", - "indexmap", + "indexmap 1.9.3", "textwrap", ] [[package]] name = "clap" -version = "4.2.7" +version = "4.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d21f9bf1b425d2968943631ec91202fe5e837264063503708b83013f8fc938" +checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd" dependencies = [ "clap_builder", "clap_derive", @@ -744,47 +782,46 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.2.7" +version = "4.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914c8c79fb560f238ef6429439a30023c862f7a28e688c58f7203f12b29970bd" +checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa" dependencies = [ "anstream", "anstyle", - "bitflags", - "clap_lex 0.4.1", + "clap_lex 0.5.0", "once_cell", "strsim", ] [[package]] name = "clap_complete" -version = "4.2.3" +version = "4.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1594fe2312ec4abf402076e407628f5c313e54c32ade058521df4ee34ecac8a8" +checksum = "5fc443334c81a804575546c5a8a79b4913b50e28d69232903604cada1de817ce" dependencies = [ - "clap 4.2.7", + "clap 4.3.21", ] [[package]] name = "clap_complete_fig" -version = "4.2.0" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3af28956330989baa428ed4d3471b853715d445c62de21b67292e22cf8a41fa" +checksum = "99fee1d30a51305a6c2ed3fc5709be3c8af626c9c958e04dd9ae94e27bcbce9f" dependencies = [ - "clap 4.2.7", + "clap 4.3.21", "clap_complete", ] [[package]] name = "clap_derive" -version = "4.2.0" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -798,9 +835,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" [[package]] name = "cloudabi" @@ -808,7 +845,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -819,13 +856,13 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "colored" -version = "2.0.0" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ - "atty", + "is-terminal", "lazy_static", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -840,9 +877,9 @@ dependencies = [ [[package]] name = "comfy-table" -version = "6.1.4" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e7b787b0dc42e8111badfdbe4c3059158ccb2db8780352fa1b01e8ccf45cc4d" +checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba" dependencies = [ "crossterm", "strum 0.24.1", @@ -873,9 +910,9 @@ dependencies = [ [[package]] name = "console-subscriber" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ab2224a0311582eb03adba4caaf18644f7b1f10a760803a803b9b605187fc7" +checksum = "d4cf42660ac07fcebed809cfe561dd8730bcd35b075215e6479c516bcd0d11cb" dependencies = [ "console-api", "crossbeam-channel", @@ -897,31 +934,24 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "constant_time_eq" -version = "0.2.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "cookie" -version = "0.16.2" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" +checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24" dependencies = [ - "aes-gcm", - "base64 0.20.0", - "hkdf 0.12.3", - "hmac 0.12.1", "percent-encoding", - "rand 0.8.5", - "sha2 0.10.6", - "subtle 2.4.1", - "time 0.3.21", + "time 0.3.25", "version_check", ] @@ -975,9 +1005,9 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d076a08ec01ed23c4396aca98ec73a38fa1fee5f310465add52b4108181c7a8" +checksum = "7e272708a9745dad8b591ef8a718571512130f2b39b33e3d7a27c558e3069394" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -988,9 +1018,9 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec361f3c09d7b41221948fc17be9b3c96cb58e55a02f82da36f888a651f2584" +checksum = "296db6a3caca5283425ae0cf347f4e46999ba3f6620dbea8939a0e00347831ce" dependencies = [ "syn 1.0.109", ] @@ -1035,7 +1065,7 @@ dependencies = [ "schemars", "serde", "serde-json-wasm", - "sha2 0.10.6", + "sha2 0.10.7", "thiserror", ] @@ -1049,9 +1079,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -1154,9 +1184,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg 1.1.0", "cfg-if", @@ -1177,20 +1207,20 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] [[package]] name = "crossterm" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" +checksum = "a84cda67535339806297f1b331d6dd6320470d2a0fe65381e79ee9e156dd3d13" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crossterm_winapi", "libc", "mio", @@ -1202,9 +1232,9 @@ dependencies = [ [[package]] name = "crossterm_winapi" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" dependencies = [ "winapi", ] @@ -1322,15 +1352,15 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "socket2", + "socket2 0.4.9", "winapi", ] [[package]] name = "curl-sys" -version = "0.4.63+curl-8.1.2" +version = "0.4.65+curl-8.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeb0fef7046022a1e2ad67a004978f0e3cacb9e3123dc62ce768f92197b771dc" +checksum = "961ba061c9ef2fe34bbd12b807152d96f0badd2bebe7b90ce6c8c8b7572a0986" dependencies = [ "cc", "libc", @@ -1404,7 +1434,7 @@ dependencies = [ "cosmwasm-std", "cw2", "schemars", - "semver 1.0.17", + "semver 1.0.18", "serde", "thiserror", ] @@ -1511,15 +1541,15 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.4.0" +version = "5.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" +checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" dependencies = [ "cfg-if", - "hashbrown 0.12.3", + "hashbrown 0.14.0", "lock_api", "once_cell", - "parking_lot_core 0.9.7", + "parking_lot_core 0.9.8", ] [[package]] @@ -1534,14 +1564,23 @@ dependencies = [ [[package]] name = "der" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", ] +[[package]] +name = "deranged" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" +dependencies = [ + "serde", +] + [[package]] name = "derivative" version = "2.2.0" @@ -1555,9 +1594,9 @@ dependencies = [ [[package]] name = "devise" -version = "0.3.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c7580b072f1c8476148f16e0a0d5dedddab787da98d86c5082c5e9ed8ab595" +checksum = "d6eacefd3f541c66fc61433d65e54e0e46e0a029a819a7dbbc7a7b489e8a85f8" dependencies = [ "devise_codegen", "devise_core", @@ -1565,9 +1604,9 @@ dependencies = [ [[package]] name = "devise_codegen" -version = "0.3.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "123c73e7a6e51b05c75fe1a1b2f4e241399ea5740ed810b0e3e6cacd9db5e7b2" +checksum = "9c8cf4b8dd484ede80fd5c547592c46c3745a617c8af278e2b72bea86b2dfed6" dependencies = [ "devise_core", "quote", @@ -1575,15 +1614,15 @@ dependencies = [ [[package]] name = "devise_core" -version = "0.3.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841ef46f4787d9097405cac4e70fb8644fc037b526e8c14054247c0263c400d0" +checksum = "35b50dba0afdca80b187392b24f2499a88c336d5a8493e4b4ccfb608708be56a" dependencies = [ - "bitflags", + "bitflags 2.4.0", "proc-macro2", - "proc-macro2-diagnostics 0.9.1", + "proc-macro2-diagnostics", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] @@ -1677,9 +1716,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" [[package]] name = "ecdsa" @@ -1699,7 +1738,7 @@ version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "der 0.7.7", + "der 0.7.8", "digest 0.10.7", "elliptic-curve 0.13.5", "rfc6979 0.4.0", @@ -1719,9 +1758,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb04eee5d9d907f29e80ee6b0e78f7e2c82342c63e3580d8c4f69d9d5aad963" +checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ "pkcs8 0.10.2", "signature 2.1.0", @@ -1772,9 +1811,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" @@ -1841,7 +1880,7 @@ checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -1868,10 +1907,16 @@ dependencies = [ ] [[package]] -name = "errno" -version = "0.3.1" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" dependencies = [ "errno-dragonfly", "libc", @@ -1896,10 +1941,10 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "explorer-api" -version = "1.1.24" +version = "1.1.25" dependencies = [ "chrono", - "clap 4.2.7", + "clap 4.3.21", "dotenvy", "humantime-serde", "isocountry", @@ -1978,6 +2023,12 @@ dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + [[package]] name = "ff" version = "0.10.1" @@ -2020,27 +2071,27 @@ dependencies = [ [[package]] name = "figment" -version = "0.10.8" +version = "0.10.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e56602b469b2201400dec66a66aec5a9b8761ee97cd1b8c96ab2483fcc16cc9" +checksum = "4547e226f4c9ab860571e070a9034192b3175580ecea38da34fcdb53a018c9a5" dependencies = [ "atomic", "pear", "serde", - "toml 0.5.11", + "toml 0.7.6", "uncased", "version_check", ] [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] @@ -2099,9 +2150,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -2198,7 +2249,7 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "fastrand", + "fastrand 1.9.0", "futures-core", "futures-io", "memchr", @@ -2215,7 +2266,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -2256,9 +2307,9 @@ checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" [[package]] name = "generator" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e123d9ae7c02966b4d892e550bdc32164f05853cd40ab570650ad600596a8a" +checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" dependencies = [ "cc", "libc", @@ -2338,22 +2389,28 @@ dependencies = [ [[package]] name = "ghost" -version = "0.1.9" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e77ac7b51b8e6313251737fcef4b1c01a2ea102bde68415b62c0ee9268fec357" +checksum = "ba330b70a5341d3bc730b8e205aaee97ddab5d9c448c4f51a7c2d924266fa8f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + [[package]] name = "git2" version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0155506aab710a86160ddb504a480d2964d7ab5b9e62419be69e0032bc5931c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "libgit2-sys", "log", @@ -2426,9 +2483,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -2436,7 +2493,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -2483,11 +2540,12 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" dependencies = [ "ahash 0.8.3", + "allocator-api2", ] [[package]] @@ -2501,11 +2559,11 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0761a1b9491c4f2e3d66aa0f62d0fba0af9a0e2852e4d48ea506632a4b56e6aa" +checksum = "312f66718a2d7789ffef4f4b7b213138ed9f1eb3aa1d0d82fc99f88fb3ffd26f" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.14.0", ] [[package]] @@ -2528,7 +2586,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ "base64 0.13.1", - "bitflags", + "bitflags 1.3.2", "bytes", "headers-core", "http", @@ -2575,18 +2633,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -2680,9 +2729,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -2711,9 +2760,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -2726,7 +2775,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -2797,9 +2846,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2837,9 +2886,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2859,7 +2908,7 @@ checksum = "bfbcff6ae46750b15cc594bfd277b188cbddcfdc1817848f97f03f26f8625b9e" dependencies = [ "cfg-if", "js-sys", - "uuid 1.3.3", + "uuid 1.4.1", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -2876,6 +2925,16 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + [[package]] name = "inlinable_string" version = "0.1.15" @@ -2888,7 +2947,7 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" dependencies = [ - "bitflags", + "bitflags 1.3.2", "inotify-sys", "libc", ] @@ -2957,22 +3016,11 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "io-lifetimes" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" -dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "ipnetwork" @@ -2994,12 +3042,11 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", + "hermit-abi 0.3.2", "rustix", "windows-sys 0.48.0", ] @@ -3050,9 +3097,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jni" @@ -3103,7 +3150,7 @@ dependencies = [ "cfg-if", "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] @@ -3116,7 +3163,7 @@ dependencies = [ "ecdsa 0.16.8", "elliptic-curve 0.13.5", "once_cell", - "sha2 0.10.6", + "sha2 0.10.7", "signature 2.1.0", ] @@ -3128,9 +3175,9 @@ checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" [[package]] name = "kqueue" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8fc60ba15bf51257aa9807a48a61013db043fcf3a78cb0d916e8e396dcad98" +checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" dependencies = [ "kqueue-sys", "libc", @@ -3138,11 +3185,11 @@ dependencies = [ [[package]] name = "kqueue-sys" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", ] @@ -3202,9 +3249,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.144" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libgit2-sys" @@ -3237,9 +3284,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.9" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ "cc", "libc", @@ -3249,9 +3296,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.3.7" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" [[package]] name = "lioness" @@ -3267,9 +3314,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg 1.1.0", "scopeguard", @@ -3277,12 +3324,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "loom" @@ -3321,7 +3365,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] @@ -3332,9 +3376,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matchit" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" +checksum = "ed1202b2a6f884ae56f04cff409ab315c5ce26b5e58d7412e484f01fd52f52ef" [[package]] name = "maxminddb" @@ -3356,9 +3400,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg 1.1.0", ] @@ -3386,14 +3430,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -3456,7 +3500,7 @@ version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "729f63e1ca555a43fe3efa4f3efdf4801c479da85b432242a7b726f353c88486" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crossbeam-channel", "filetime", "fsevent-sys", @@ -3498,21 +3542,11 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg 1.1.0", - "num-traits", -] - [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg 1.1.0", "libm", @@ -3520,27 +3554,28 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] [[package]] name = "nym-api" -version = "1.1.25" +version = "1.1.26" dependencies = [ "anyhow", "async-trait", "bip39", "bs58 0.4.0", "cfg-if", - "clap 4.2.7", + "clap 4.3.21", "console-subscriber", "cosmwasm-std", "cw-utils", + "cw2", "cw3", "cw4", "dirs 4.0.0", @@ -3590,7 +3625,7 @@ dependencies = [ "sqlx 0.6.3", "tap", "thiserror", - "time 0.3.21", + "time 0.3.25", "tokio", "tokio-stream", "ts-rs", @@ -3634,7 +3669,7 @@ name = "nym-bin-common" version = "0.6.0" dependencies = [ "atty", - "clap 4.2.7", + "clap 4.3.21", "clap_complete", "clap_complete_fig", "log", @@ -3667,13 +3702,13 @@ dependencies = [ [[package]] name = "nym-cli" -version = "1.1.24" +version = "1.1.25" dependencies = [ "anyhow", "base64 0.13.1", "bip39", "bs58 0.4.0", - "clap 4.2.7", + "clap 4.3.21", "clap_complete", "clap_complete_fig", "dotenvy", @@ -3697,7 +3732,7 @@ dependencies = [ "bip39", "bs58 0.4.0", "cfg-if", - "clap 4.2.7", + "clap 4.3.21", "comfy-table", "cosmrs", "cosmwasm-std", @@ -3726,16 +3761,16 @@ dependencies = [ "serde_json", "tap", "thiserror", - "time 0.3.21", + "time 0.3.25", "toml 0.5.11", "url", ] [[package]] name = "nym-client" -version = "1.1.24" +version = "1.1.25" dependencies = [ - "clap 4.2.7", + "clap 4.3.21", "dirs 4.0.0", "futures", "lazy_static", @@ -3773,7 +3808,7 @@ version = "1.1.15" dependencies = [ "async-trait", "base64 0.21.2", - "dashmap 5.4.0", + "dashmap 5.5.0", "dirs 4.0.0", "futures", "gloo-timers", @@ -3797,12 +3832,12 @@ dependencies = [ "reqwest", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.7", "sqlx 0.6.3", "tap", "tempfile", "thiserror", - "time 0.3.21", + "time 0.3.25", "tokio", "tokio-stream", "tokio-tungstenite 0.14.0", @@ -3888,7 +3923,7 @@ dependencies = [ "log", "nym-network-defaults", "serde", - "toml 0.7.4", + "toml 0.7.6", "url", ] @@ -3909,7 +3944,7 @@ dependencies = [ name = "nym-credential-client" version = "0.1.0" dependencies = [ - "clap 4.2.7", + "clap 4.3.21", "log", "nym-bandwidth-controller", "nym-bin-common", @@ -3931,7 +3966,7 @@ version = "0.1.0" dependencies = [ "async-trait", "log", - "sqlx 0.5.13", + "sqlx 0.5.11", "thiserror", "tokio", ] @@ -3954,7 +3989,7 @@ dependencies = [ name = "nym-crypto" version = "0.4.0" dependencies = [ - "aes 0.8.2", + "aes 0.8.3", "blake3", "bs58 0.4.0", "cipher 0.4.4", @@ -4011,9 +4046,9 @@ dependencies = [ name = "nym-explorer-api-requests" version = "0.1.0" dependencies = [ + "nym-api-requests", "nym-contracts-common", "nym-mixnet-contract-common", - "nym-validator-client", "schemars", "serde", "ts-rs", @@ -4021,14 +4056,14 @@ dependencies = [ [[package]] name = "nym-gateway" -version = "1.1.24" +version = "1.1.25" dependencies = [ "anyhow", "async-trait", "atty", "bip39", "bs58 0.4.0", - "clap 4.2.7", + "clap 4.3.21", "colored", "dashmap 4.0.2", "dirs 4.0.0", @@ -4058,7 +4093,7 @@ dependencies = [ "rand 0.7.3", "serde", "serde_json", - "sqlx 0.5.13", + "sqlx 0.5.11", "subtle-encoding", "thiserror", "tokio", @@ -4170,18 +4205,18 @@ dependencies = [ "serde-json-wasm", "serde_repr", "thiserror", - "time 0.3.21", + "time 0.3.25", "ts-rs", ] [[package]] name = "nym-mixnode" -version = "1.1.25" +version = "1.1.26" dependencies = [ "anyhow", "bs58 0.4.0", "cfg-if", - "clap 4.2.7", + "clap 4.3.21", "colored", "cpu-cycles", "cupid", @@ -4286,6 +4321,7 @@ dependencies = [ "dotenvy", "hex-literal", "once_cell", + "schemars", "serde", "thiserror", "url", @@ -4293,13 +4329,13 @@ dependencies = [ [[package]] name = "nym-network-requester" -version = "1.1.24" +version = "1.1.25" dependencies = [ "anyhow", "async-file-watcher", "async-trait", "bs58 0.4.0", - "clap 4.2.7", + "clap 4.3.21", "dirs 4.0.0", "futures", "humantime-serde", @@ -4340,7 +4376,7 @@ dependencies = [ [[package]] name = "nym-network-statistics" -version = "1.1.24" +version = "1.1.25" dependencies = [ "dirs 4.0.0", "log", @@ -4350,7 +4386,7 @@ dependencies = [ "pretty_env_logger", "rocket", "serde", - "sqlx 0.5.13", + "sqlx 0.5.11", "thiserror", "tokio", ] @@ -4389,7 +4425,7 @@ name = "nym-nr-query" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.2.7", + "clap 4.3.21", "log", "nym-bin-common", "nym-network-defaults", @@ -4417,7 +4453,7 @@ dependencies = [ "chacha20poly1305", "criterion", "curve25519-dalek", - "fastrand", + "fastrand 1.9.0", "getrandom 0.2.10", "log", "rand 0.7.3", @@ -4498,9 +4534,9 @@ dependencies = [ [[package]] name = "nym-socks5-client" -version = "1.1.24" +version = "1.1.25" dependencies = [ - "clap 4.2.7", + "clap 4.3.21", "lazy_static", "log", "nym-bin-common", @@ -4768,7 +4804,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "sqlx 0.5.13", + "sqlx 0.5.11", "thiserror", "tokio", ] @@ -4852,6 +4888,9 @@ dependencies = [ "colored", "cosmrs", "cosmwasm-std", + "cw-controllers", + "cw-utils", + "cw2", "cw3", "cw4", "eyre", @@ -4883,6 +4922,7 @@ dependencies = [ "tokio", "ts-rs", "url", + "wasmtimer", "zeroize", ] @@ -4919,6 +4959,15 @@ dependencies = [ "ts-rs", ] +[[package]] +name = "object" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + [[package]] name = "okapi" version = "0.7.0-rc.1" @@ -4933,9 +4982,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "oorandom" @@ -4957,11 +5006,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.52" +version = "0.10.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" +checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "foreign-types", "libc", @@ -4978,7 +5027,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -4989,18 +5038,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.25.3+1.1.1t" +version = "111.27.0+1.1.1v" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924757a6a226bf60da5f7dd0311a34d2b52283dd82ddeb103208ddc66362f80c" +checksum = "06e8f197c82d7511c5b014030c9b1efeda40d7d5f99d23b4ceed3524a5e63f02" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.87" +version = "0.9.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" +checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" dependencies = [ "cc", "libc", @@ -5070,7 +5119,7 @@ dependencies = [ "fnv", "futures-channel", "futures-util", - "indexmap", + "indexmap 1.9.3", "once_cell", "pin-project-lite", "thiserror", @@ -5085,7 +5134,7 @@ checksum = "8b3a2a91fdbfdd4d212c0dcc2ab540de2c2bcbbd90be17de7a7daf8822d010c1" dependencies = [ "async-trait", "crossbeam-channel", - "dashmap 5.4.0", + "dashmap 5.5.0", "fnv", "futures-channel", "futures-executor", @@ -5116,9 +5165,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.5.0" +version = "6.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" +checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" [[package]] name = "overload" @@ -5168,7 +5217,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.7", + "parking_lot_core 0.9.8", ] [[package]] @@ -5187,15 +5236,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.1", ] [[package]] @@ -5211,9 +5260,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" @@ -5227,25 +5276,25 @@ dependencies = [ [[package]] name = "pear" -version = "0.2.4" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec95680a7087503575284e5063e14b694b7a9c0b065e5dceec661e0497127e8" +checksum = "61a386cd715229d399604b50d1361683fe687066f42d56f54be995bc6868f71c" dependencies = [ "inlinable_string", "pear_codegen", - "yansi", + "yansi 1.0.0-rc.1", ] [[package]] name = "pear_codegen" -version = "0.2.4" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9661a3a53f93f09f2ea882018e4d7c88f6ff2956d809a276060476fd8c879d3c" +checksum = "da9f0f13dac8069c139e8300a6510e3f4143ecf5259c60b116a9b271b4ca0d54" dependencies = [ "proc-macro2", - "proc-macro2-diagnostics 0.10.0", + "proc-macro2-diagnostics", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -5288,15 +5337,15 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" +checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" dependencies = [ "thiserror", "ucd-trie", @@ -5304,9 +5353,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" +checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853" dependencies = [ "pest", "pest_generator", @@ -5314,53 +5363,53 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" +checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] name = "pest_meta" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" +checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" dependencies = [ "once_cell", "pest", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] name = "pin-project" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" [[package]] name = "pin-utils" @@ -5384,7 +5433,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.7", + "der 0.7.8", "spki 0.7.2", ] @@ -5396,9 +5445,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plotters" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97" +checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" dependencies = [ "num-traits", "plotters-backend", @@ -5409,15 +5458,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" +checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" [[package]] name = "plotters-svg" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" dependencies = [ "plotters-backend", ] @@ -5429,7 +5478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg 1.1.0", - "bitflags", + "bitflags 1.3.2", "cfg-if", "concurrent-queue", "libc", @@ -5451,9 +5500,9 @@ dependencies = [ [[package]] name = "polyval" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" dependencies = [ "cfg-if", "cpufeatures", @@ -5513,37 +5562,24 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.58" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "proc-macro2-diagnostics" -version = "0.9.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" +checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", "version_check", - "yansi", -] - -[[package]] -name = "proc-macro2-diagnostics" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "606c4ba35817e2922a308af55ad51bab3645b59eae5c570d4a6cf07e36bd493b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.16", - "version_check", - "yansi", + "yansi 1.0.0-rc.1", ] [[package]] @@ -5603,9 +5639,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quote" -version = "1.0.27" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] @@ -5858,7 +5894,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -5867,7 +5903,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -5883,33 +5919,34 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" +checksum = "61ef7e18e8841942ddb1cf845054f8008410030a3997875d9e49b7a363063df1" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" +checksum = "2dfaf0c85b766276c797f3791f5bc6d5bd116b41d53049af2789666b0c0bc9fa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] name = "regex" -version = "1.8.4" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.2", + "regex-automata 0.3.6", + "regex-syntax 0.7.4", ] [[package]] @@ -5921,6 +5958,17 @@ dependencies = [ "regex-syntax 0.6.29", ] +[[package]] +name = "regex-automata" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.7.4", +] + [[package]] name = "regex-syntax" version = "0.6.29" @@ -5929,9 +5977,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "reqwest" @@ -6018,20 +6066,20 @@ dependencies = [ [[package]] name = "rocket" -version = "0.5.0-rc.2" +version = "0.5.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98ead083fce4a405feb349cf09abdf64471c6077f14e0ce59364aa90d4b99317" +checksum = "58734f7401ae5cfd129685b48f61182331745b357b96f2367f01aebaf1cc9cc9" dependencies = [ "async-stream", "async-trait", "atomic", - "atty", "binascii", "bytes", "either", "figment", "futures", - "indexmap", + "indexmap 1.9.3", + "is-terminal", "log", "memchr", "multer", @@ -6046,28 +6094,28 @@ dependencies = [ "serde_json", "state", "tempfile", - "time 0.3.21", + "time 0.3.25", "tokio", "tokio-stream", "tokio-util", "ubyte", "version_check", - "yansi", + "yansi 0.5.1", ] [[package]] name = "rocket_codegen" -version = "0.5.0-rc.2" +version = "0.5.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6aeb6bb9c61e9cd2c00d70ea267bf36f76a4cc615e5908b349c2f9d93999b47" +checksum = "7093353f14228c744982e409259fb54878ba9563d08214f2d880d59ff2fc508b" dependencies = [ "devise", "glob", - "indexmap", + "indexmap 1.9.3", "proc-macro2", "quote", "rocket_http", - "syn 1.0.109", + "syn 2.0.28", "unicode-xid", ] @@ -6088,16 +6136,16 @@ dependencies = [ [[package]] name = "rocket_http" -version = "0.5.0-rc.2" +version = "0.5.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ded65d127954de3c12471630bf4b81a2792f065984461e65b91d0fdaafc17a2" +checksum = "936012c99162a03a67f37f9836d5f938f662e26f2717809761a9ac46432090f4" dependencies = [ "cookie", "either", "futures", "http", "hyper", - "indexmap", + "indexmap 1.9.3", "log", "memchr", "pear", @@ -6108,16 +6156,16 @@ dependencies = [ "smallvec", "stable-pattern", "state", - "time 0.3.21", + "time 0.3.25", "tokio", "uncased", ] [[package]] name = "rocket_okapi" -version = "0.8.0-rc.2" +version = "0.8.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489f4f5b120762f7974e65b919fc462d0660fd8b839026d8985b850fe5acccb0" +checksum = "742098674565c8f0c35c77444f90344aafedebb71cfee9cdbf0185acc6b9cdb7" dependencies = [ "either", "log", @@ -6131,9 +6179,9 @@ dependencies = [ [[package]] name = "rocket_okapi_codegen" -version = "0.8.0-rc.2" +version = "0.8.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54f94d1ffe41472e08463d7a2674f1db04dc4df745285e8369b33d3cfd6b0308" +checksum = "8c43f8edc57d88750a220b0ec1870a36c1106204ec99cc35131b49de3b954a4a" dependencies = [ "darling", "proc-macro2", @@ -6142,6 +6190,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc_version" version = "0.2.3" @@ -6157,18 +6211,17 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver 1.0.18", ] [[package]] name = "rustix" -version = "0.37.19" +version = "0.38.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" dependencies = [ - "bitflags", + "bitflags 2.4.0", "errno", - "io-lifetimes", "libc", "linux-raw-sys", "windows-sys 0.48.0", @@ -6213,30 +6266,30 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ "base64 0.21.2", ] [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safer-ffi" -version = "0.1.0-rc1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7270b08a2af50909969cfc28a239cfdda9ab1b3df74749b265c46956183e5bf7" +checksum = "4f47f1d2f33598dab2baa9517fffa1cf722f2e3a30633f2a230f20f9da67c564" dependencies = [ "inventory", "libc", @@ -6251,9 +6304,9 @@ dependencies = [ [[package]] name = "safer_ffi-proc_macros" -version = "0.1.0-rc1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1438fb328c52f5148ea02a317603efd802f2cd6eb9e721adfd51b94bb55d9ddb" +checksum = "b08f58cf71a58bda5734758eb20051cdb66c06c9243badbc45092ced1be834df" dependencies = [ "macro_rules_attribute", "prettyplease", @@ -6273,11 +6326,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -6287,7 +6340,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" dependencies = [ "dyn-clone", - "indexmap", + "indexmap 1.9.3", "schemars_derive", "serde", "serde_json", @@ -6313,9 +6366,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -6358,7 +6411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct 0.2.0", - "der 0.7.7", + "der 0.7.8", "generic-array 0.14.7", "pkcs8 0.10.2", "subtle 2.4.1", @@ -6367,11 +6420,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.0" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2855b3715770894e67cbfa3df957790aa0c9edc3bf06efa1a84d77fa0839d1" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -6380,9 +6433,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -6408,9 +6461,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "semver-parser" @@ -6429,9 +6482,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.163" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" dependencies = [ "serde_derive", ] @@ -6458,22 +6511,22 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -6489,9 +6542,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" dependencies = [ "itoa", "ryu", @@ -6500,20 +6553,20 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.12" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] name = "serde_spanned" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ "serde", ] @@ -6580,9 +6633,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", @@ -6600,9 +6653,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ "libc", "signal-hook-registry", @@ -6670,15 +6723,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "snafu" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0656e7e3ffb70f6c39b3c2a86332bb74aa3c679da781642590f3c1118c5045" +checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" dependencies = [ "doc-comment", "snafu-derive", @@ -6686,9 +6739,9 @@ dependencies = [ [[package]] name = "snafu-derive" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475b3bbe5245c26f2d8a6f62d67c1f30eb9fffeccee721c45d162c3ebbdf81b2" +checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -6706,6 +6759,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "sphinx-packet" version = "0.1.0" @@ -6762,7 +6825,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.7", + "der 0.7.8", ] [[package]] @@ -6789,9 +6852,9 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.5.13" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551873805652ba0d912fec5bbb0f8b4cdd96baf8e2ebf5970e5671092966019b" +checksum = "fc15591eb44ffb5816a4a70a7efd5dd87bfd3aa84c4c200401c4396140525826" dependencies = [ "sqlx-core 0.5.13", "sqlx-macros 0.5.13", @@ -6815,7 +6878,7 @@ checksum = "e48c61941ccf5ddcada342cd59e3e5173b007c509e1e8e990dafc830294d9dc5" dependencies = [ "ahash 0.7.6", "atoi 0.4.0", - "bitflags", + "bitflags 1.3.2", "byteorder", "bytes", "chrono", @@ -6831,7 +6894,7 @@ dependencies = [ "futures-util", "hashlink 0.7.0", "hex", - "indexmap", + "indexmap 1.9.3", "itoa", "libc", "libsqlite3-sys", @@ -6841,7 +6904,7 @@ dependencies = [ "paste", "percent-encoding", "rustls 0.19.1", - "sha2 0.10.6", + "sha2 0.10.7", "smallvec", "sqlformat 0.1.8", "sqlx-rt 0.5.13", @@ -6861,7 +6924,7 @@ checksum = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029" dependencies = [ "ahash 0.7.6", "atoi 1.0.0", - "bitflags", + "bitflags 1.3.2", "byteorder", "bytes", "chrono", @@ -6876,9 +6939,9 @@ dependencies = [ "futures-executor", "futures-intrusive", "futures-util", - "hashlink 0.8.2", + "hashlink 0.8.3", "hex", - "indexmap", + "indexmap 1.9.3", "itoa", "libc", "libsqlite3-sys", @@ -6889,7 +6952,7 @@ dependencies = [ "percent-encoding", "rustls 0.20.8", "rustls-pemfile", - "sha2 0.10.6", + "sha2 0.10.7", "smallvec", "sqlformat 0.2.1", "sqlx-rt 0.6.3", @@ -6912,7 +6975,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "sha2 0.10.6", + "sha2 0.10.7", "sqlx-core 0.5.13", "sqlx-rt 0.5.13", "syn 1.0.109", @@ -6931,7 +6994,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "sha2 0.10.6", + "sha2 0.10.7", "sqlx-core 0.6.3", "sqlx-rt 0.6.3", "syn 1.0.109", @@ -6980,9 +7043,9 @@ dependencies = [ [[package]] name = "stringprep" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" +checksum = "db3737bde7edce97102e0e2b15365bf7a20bfdb5f60f4f9e8d7004258a51a8da" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -7075,9 +7138,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" dependencies = [ "proc-macro2", "quote", @@ -7113,15 +7176,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.5.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" dependencies = [ "cfg-if", - "fastrand", + "fastrand 2.0.0", "redox_syscall 0.3.5", "rustix", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -7132,7 +7195,7 @@ checksum = "3f0a7d05cf78524782337f8edd55cbc578d159a16ad4affe2135c92f7dbac7f0" dependencies = [ "bytes", "digest 0.10.7", - "ed25519 2.2.1", + "ed25519 2.2.2", "ed25519-consensus", "flex-error", "futures", @@ -7146,12 +7209,12 @@ dependencies = [ "serde_bytes", "serde_json", "serde_repr", - "sha2 0.10.6", + "sha2 0.10.7", "signature 2.1.0", "subtle 2.4.1", "subtle-encoding", "tendermint-proto", - "time 0.3.21", + "time 0.3.25", "zeroize", ] @@ -7184,7 +7247,7 @@ dependencies = [ "serde", "serde_bytes", "subtle-encoding", - "time 0.3.21", + "time 0.3.25", ] [[package]] @@ -7204,7 +7267,7 @@ dependencies = [ "hyper-rustls", "peg", "pin-project", - "semver 1.0.17", + "semver 1.0.18", "serde", "serde_bytes", "serde_json", @@ -7214,7 +7277,7 @@ dependencies = [ "tendermint-config", "tendermint-proto", "thiserror", - "time 0.3.21", + "time 0.3.25", "tokio", "tracing", "url", @@ -7239,22 +7302,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -7302,10 +7365,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" dependencies = [ + "deranged", "itoa", "js-sys", "serde", @@ -7321,9 +7385,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" dependencies = [ "time-core", ] @@ -7355,11 +7419,11 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.1" +version = "1.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" +checksum = "40de3a2ba249dcb097e01be5e67a5ff53cf250397715a071a81543e8a832a920" dependencies = [ - "autocfg 1.1.0", + "backtrace", "bytes", "libc", "mio", @@ -7367,7 +7431,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.3", "tokio-macros", "tracing", "windows-sys 0.48.0", @@ -7391,7 +7455,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -7514,9 +7578,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" dependencies = [ "serde", "serde_spanned", @@ -7526,20 +7590,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.10" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap", + "indexmap 2.0.0", "serde", "serde_spanned", "toml_datetime", @@ -7582,7 +7646,7 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", - "indexmap", + "indexmap 1.9.3", "pin-project", "pin-project-lite", "rand 0.8.5", @@ -7621,13 +7685,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -7695,11 +7759,11 @@ dependencies = [ [[package]] name = "tracing-tree" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f9742d8df709837409dbb22aa25dd7769c260406f20ff48a2320b80a4a6aed0" +checksum = "92d6b63348fad3ae0439b8bebf8d38fb5bda0b115d7a8a7e6f165f12790c58c3" dependencies = [ - "atty", + "is-terminal", "nu-ansi-term", "tracing-core", "tracing-log", @@ -7806,9 +7870,9 @@ dependencies = [ [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uncased" @@ -7847,9 +7911,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -7895,9 +7959,9 @@ dependencies = [ [[package]] name = "universal-hash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3160b73c9a19f7e2939a2fdad446c57c1bbbbf4d919d3213ff1267a580d8b5" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", "subtle 2.4.1", @@ -7917,21 +7981,21 @@ checksum = "0976c77def3f1f75c4ef892a292c31c0bbe9e3d0702c63044d7c76db298171a3" [[package]] name = "url" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", - "idna 0.3.0", + "idna 0.4.0", "percent-encoding", "serde", ] [[package]] name = "urlencoding" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8db7427f936968176eaa7cdf81b7f98b980b18495ec28f1b5791ac3bfe3eea9" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "utf-8" @@ -7953,9 +8017,9 @@ checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" [[package]] name = "uuid" -version = "1.3.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ "getrandom 0.2.10", "wasm-bindgen", @@ -7987,7 +8051,7 @@ dependencies = [ "rustc_version 0.4.0", "rustversion", "thiserror", - "time 0.3.21", + "time 0.3.25", ] [[package]] @@ -8014,11 +8078,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -8223,22 +8286,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.48.1", ] [[package]] @@ -8256,7 +8304,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] @@ -8276,9 +8324,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm 0.48.0", "windows_aarch64_msvc 0.48.0", @@ -8375,9 +8423,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "5504cc7644f4b593cbc05c4a55bf9bd4e94b867c3c0bd440934174d50482427d" dependencies = [ "memchr", ] @@ -8438,6 +8486,12 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +[[package]] +name = "yansi" +version = "1.0.0-rc.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1367295b8f788d371ce2dbc842c7b709c73ee1364d30351dd300ec2203b12377" + [[package]] name = "zeroize" version = "1.6.0" @@ -8455,5 +8509,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] diff --git a/Cargo.toml b/Cargo.toml index 9d609443f0..8ba5452d11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -134,6 +134,7 @@ cw3 = { version = "=1.1.0" } cw4 = { version = "=1.1.0" } cw-controllers = { version = "=1.1.0" } dotenvy = "0.15.6" +futures = "0.3.28" generic-array = "0.14.7" getrandom = "0.2.10" k256 = "0.13" @@ -148,7 +149,7 @@ tap = "1.0.1" tendermint-rpc = "0.32" # same version as used by cosmrs thiserror = "1.0.38" tokio = "1.24.1" -url = "2.2" +url = "2.4" zeroize = "1.6.0" # wasm-related dependencies diff --git a/clients/credential/src/client.rs b/clients/credential/src/client.rs index 2db71d8e5e..9eb0a7da75 100644 --- a/clients/credential/src/client.rs +++ b/clients/credential/src/client.rs @@ -4,14 +4,14 @@ use crate::error::Result; use bip39::Mnemonic; use nym_network_defaults::{NymNetworkDetails, VOUCHER_INFO}; -use nym_validator_client::nyxd; -use nym_validator_client::nyxd::traits::CoconutBandwidthSigningClient; -use nym_validator_client::nyxd::{Coin, DirectSigningNyxdClient, Fee, NyxdClient}; +use nym_validator_client::nyxd::contract_traits::CoconutBandwidthSigningClient; +use nym_validator_client::nyxd::{self, DirectSigningHttpRpcNyxdClient}; +use nym_validator_client::nyxd::{Coin, Fee, NyxdClient}; use std::str::FromStr; use url::Url; pub(crate) struct Client { - nyxd_client: NyxdClient, + nyxd_client: DirectSigningHttpRpcNyxdClient, mix_denom_base: String, } diff --git a/clients/credential/src/commands.rs b/clients/credential/src/commands.rs index 64993d2d7d..da603eb84b 100644 --- a/clients/credential/src/commands.rs +++ b/clients/credential/src/commands.rs @@ -6,7 +6,7 @@ use log::*; use nym_bandwidth_controller::acquire::state::State; use nym_bin_common::completions::ArgShell; use nym_credential_storage::persistent_storage::PersistentStorage; -use nym_validator_client::nyxd::traits::DkgQueryClient; +use nym_validator_client::nyxd::contract_traits::DkgQueryClient; use crate::error::Result; use crate::recovery_storage::RecoveryStorage; diff --git a/clients/credential/src/main.rs b/clients/credential/src/main.rs index e37a825403..982ef02823 100644 --- a/clients/credential/src/main.rs +++ b/clients/credential/src/main.rs @@ -17,9 +17,9 @@ use std::time::{Duration, SystemTime}; use clap::{CommandFactory, Parser}; use nym_bin_common::logging::setup_logging; use nym_client_core::config::disk_persistence::CommonClientPaths; -use nym_validator_client::nyxd::traits::DkgQueryClient; -use nym_validator_client::nyxd::{Coin, CosmWasmClient}; -use nym_validator_client::Config; +use nym_validator_client::nyxd::contract_traits::DkgQueryClient; +use nym_validator_client::nyxd::{Coin, Config}; +use nym_validator_client::DirectSigningHttpRpcNyxdClient; const SAFETY_BUFFER_SECS: u64 = 60; // 1 minute @@ -34,11 +34,11 @@ struct Cli { pub(crate) command: Command, } -async fn block_until_coconut_is_available( - client: &nym_validator_client::Client, +async fn block_until_coconut_is_available( + client: &C, ) -> Result<()> { loop { - let epoch = client.nyxd.get_current_epoch().await?; + let epoch = client.get_current_epoch().await?; let current_timestamp_secs = SystemTime::now() .duration_since(SystemTime::UNIX_EPOCH)? .as_secs(); @@ -89,15 +89,18 @@ async fn main() -> Result<()> { r.amount as u128, network_details.chain_details.mix_denom.base, ); - let client = - nym_validator_client::Client::new_signing(config, r.mnemonic.parse().unwrap())?; + let endpoint = network_details.endpoints[0].nyxd_url.as_str(); + let client = DirectSigningHttpRpcNyxdClient::connect_with_mnemonic( + config, + endpoint, + r.mnemonic.parse().unwrap(), + )?; block_until_coconut_is_available(&client).await?; info!("Starting depositing funds, don't kill the process"); if !r.recovery_mode { - let state = - nym_bandwidth_controller::acquire::deposit(&client.nyxd, amount).await?; + let state = nym_bandwidth_controller::acquire::deposit(&client, amount).await?; if nym_bandwidth_controller::acquire::get_credential( &state, &client, @@ -117,7 +120,7 @@ async fn main() -> Result<()> { } } } else { - recover_credentials(&client.nyxd, &recovery_storage, &shared_storage).await?; + recover_credentials(&client, &recovery_storage, &shared_storage).await?; } } Command::Completions(c) => c.generate(&mut Cli::command(), bin_name), diff --git a/clients/native/Cargo.toml b/clients/native/Cargo.toml index 2135883752..9bf16e89ad 100644 --- a/clients/native/Cargo.toml +++ b/clients/native/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-client" -version = "1.1.24" +version = "1.1.25" authors = ["Dave Hrycyszyn ", "JÄ™drzej StuczyÅ„ski "] description = "Implementation of the Nym Client" edition = "2021" @@ -14,11 +14,11 @@ path = "src/lib.rs" [dependencies] # dependencies to review: -futures = "0.3" # bunch of futures stuff, however, now that I think about it, it could perhaps be completely removed +futures = { workspace = true } # bunch of futures stuff, however, now that I think about it, it could perhaps be completely removed # the AsyncRead, AsyncWrite, Stream, Sink, etc. traits could be used from tokio # channels should really be replaced with crossbeam due to that implementation being more efficient # and the single instance of abortable we have should really be refactored anyway -url = "2.2" +url = { workspace = true } clap = { version = "4.0", features = ["cargo", "derive"] } dirs = "4.0" @@ -28,7 +28,7 @@ pretty_env_logger = "0.4" # for formatting log messages rand = { version = "0.7.3", features = ["wasm-bindgen"] } # rng-related traits + some rng implementation to use serde = { workspace = true, features = ["derive"] } # for config serialization/deserialization serde_json = { workspace = true } -thiserror = "1.0.34" +thiserror = { workspace = true } tap = "1.0.1" tokio = { version = "1.24.1", features = ["rt-multi-thread", "net", "signal"] } # async runtime tokio-tungstenite = "0.14" # websocket diff --git a/clients/native/src/client/mod.rs b/clients/native/src/client/mod.rs index 8457268d79..6f3982038f 100644 --- a/clients/native/src/client/mod.rs +++ b/clients/native/src/client/mod.rs @@ -19,8 +19,7 @@ use nym_sphinx::anonymous_replies::requests::AnonymousSenderTag; use nym_sphinx::params::PacketType; use nym_task::connections::TransmissionLane; use nym_task::TaskManager; -use nym_validator_client::nyxd::QueryNyxdClient; -use nym_validator_client::Client; +use nym_validator_client::QueryHttpRpcNyxdClient; use std::error::Error; use tokio::sync::watch::error::SendError; @@ -29,7 +28,7 @@ pub use nym_sphinx::receiver::ReconstructedMessage; pub mod config; -type NativeClientBuilder<'a> = BaseClientBuilder<'a, Client, OnDiskPersistent>; +type NativeClientBuilder<'a> = BaseClientBuilder<'a, QueryHttpRpcNyxdClient, OnDiskPersistent>; pub struct SocketClient { /// Client configuration options, including, among other things, packet sending rates, diff --git a/clients/native/src/commands/init.rs b/clients/native/src/commands/init.rs index eca33f433c..d61b31b52d 100644 --- a/clients/native/src/commands/init.rs +++ b/clients/native/src/commands/init.rs @@ -174,14 +174,15 @@ pub(crate) async fn execute(args: &Init) -> Result<(), ClientError> { let details_store = OnDiskGatewayDetails::new(&config.storage_paths.common_paths.gateway_details); let init_details = nym_client_core::init::setup_gateway( - &gateway_setup, + gateway_setup, &key_store, &details_store, register_gateway, Some(&config.base.client.nym_api_urls), ) .await - .tap_err(|err| eprintln!("Failed to setup gateway\nError: {err}"))?; + .tap_err(|err| eprintln!("Failed to setup gateway\nError: {err}"))? + .details; let config_save_location = config.default_location(); config.save_to_default_location().tap_err(|_| { diff --git a/clients/socks5/Cargo.toml b/clients/socks5/Cargo.toml index afbf36178f..a574f28985 100644 --- a/clients/socks5/Cargo.toml +++ b/clients/socks5/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-socks5-client" -version = "1.1.24" +version = "1.1.25" authors = ["Dave Hrycyszyn "] description = "A SOCKS5 localhost proxy that converts incoming messages to Sphinx and sends them to a Nym address" edition = "2021" @@ -14,9 +14,9 @@ pretty_env_logger = "0.4" serde = { workspace = true, features = ["derive"] } # for config serialization/deserialization serde_json = { workspace = true } tap = "1.0.1" -thiserror = "1.0.34" +thiserror = { workspace = true } tokio = { version = "1.24.1", features = ["rt-multi-thread", "net", "signal"] } -url = "2.2" +url = { workspace = true } # internal nym-bin-common = { path = "../../common/bin-common", features = ["output_format"] } diff --git a/clients/socks5/src/commands/init.rs b/clients/socks5/src/commands/init.rs index ef370c54b8..77782ed262 100644 --- a/clients/socks5/src/commands/init.rs +++ b/clients/socks5/src/commands/init.rs @@ -186,14 +186,15 @@ pub(crate) async fn execute(args: &Init) -> Result<(), Socks5ClientError> { let details_store = OnDiskGatewayDetails::new(&config.storage_paths.common_paths.gateway_details); let init_details = nym_client_core::init::setup_gateway( - &gateway_setup, + gateway_setup, &key_store, &details_store, register_gateway, Some(&config.core.base.client.nym_api_urls), ) .await - .tap_err(|err| eprintln!("Failed to setup gateway\nError: {err}"))?; + .tap_err(|err| eprintln!("Failed to setup gateway\nError: {err}"))? + .details; // TODO: ask the service provider we specified for its interface version and set it in the config diff --git a/clients/webassembly/Cargo.lock b/clients/webassembly/Cargo.lock index 0ea047444e..c5aa4a2830 100644 --- a/clients/webassembly/Cargo.lock +++ b/clients/webassembly/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -33,9 +42,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if 1.0.0", "cipher 0.4.4", @@ -44,12 +53,12 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c" +checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" dependencies = [ "aead", - "aes 0.8.2", + "aes 0.8.3", "cipher 0.4.4", "ctr 0.9.2", "ghash", @@ -80,13 +89,19 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "86b8f9420f797f2d9e935edf629310eb938a0d839f984e25327f3c7eed22300c" dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "anstream" version = "0.3.2" @@ -104,15 +119,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" dependencies = [ "utf8parse", ] @@ -123,33 +138,34 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" [[package]] name = "argon2" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95c2fcf79ad1932ac6269a738109997a83c227c09b75842ae564dc8ede6a861c" +checksum = "b2e554a8638bdc1e4eae9984845306cc95f8a9208ba8d49c3859fd958b46774d" dependencies = [ "base64ct", "blake2 0.10.6", + "cpufeatures", "password-hash", ] @@ -161,19 +177,19 @@ checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -211,6 +227,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base16ct" version = "0.1.1" @@ -254,7 +285,7 @@ dependencies = [ "pbkdf2", "rand_core 0.6.4", "ripemd", - "sha2 0.10.6", + "sha2 0.10.7", "subtle 2.4.1", "zeroize", ] @@ -285,6 +316,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + [[package]] name = "bitvec" version = "1.0.1" @@ -320,9 +357,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.3.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" +checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" dependencies = [ "arrayref", "arrayvec", @@ -396,14 +433,14 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" dependencies = [ - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] name = "bumpalo" -version = "3.12.2" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "byte-tools" @@ -428,11 +465,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -503,9 +541,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.2.7" +version = "4.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d21f9bf1b425d2968943631ec91202fe5e837264063503708b83013f8fc938" +checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd" dependencies = [ "clap_builder", "clap_derive", @@ -514,31 +552,30 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.2.7" +version = "4.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914c8c79fb560f238ef6429439a30023c862f7a28e688c58f7203f12b29970bd" +checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa" dependencies = [ "anstream", "anstyle", - "bitflags", "clap_lex", "strsim", ] [[package]] name = "clap_complete" -version = "4.2.3" +version = "4.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1594fe2312ec4abf402076e407628f5c313e54c32ade058521df4ee34ecac8a8" +checksum = "5fc443334c81a804575546c5a8a79b4913b50e28d69232903604cada1de817ce" dependencies = [ "clap", ] [[package]] name = "clap_complete_fig" -version = "4.2.0" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3af28956330989baa428ed4d3471b853715d445c62de21b67292e22cf8a41fa" +checksum = "99fee1d30a51305a6c2ed3fc5709be3c8af626c9c958e04dd9ae94e27bcbce9f" dependencies = [ "clap", "clap_complete", @@ -546,21 +583,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.2.0" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] name = "clap_lex" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" [[package]] name = "colorchoice" @@ -570,13 +607,13 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "colored" -version = "2.0.0" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ - "atty", + "is-terminal", "lazy_static", - "winapi", + "windows-sys", ] [[package]] @@ -591,15 +628,15 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "constant_time_eq" -version = "0.2.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation" @@ -651,9 +688,9 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d076a08ec01ed23c4396aca98ec73a38fa1fee5f310465add52b4108181c7a8" +checksum = "7e272708a9745dad8b591ef8a718571512130f2b39b33e3d7a27c558e3069394" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -664,9 +701,9 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec361f3c09d7b41221948fc17be9b3c96cb58e55a02f82da36f888a651f2584" +checksum = "296db6a3caca5283425ae0cf347f4e46999ba3f6620dbea8939a0e00347831ce" dependencies = [ "syn 1.0.109", ] @@ -711,15 +748,15 @@ dependencies = [ "schemars", "serde", "serde-json-wasm", - "sha2 0.10.6", + "sha2 0.10.7", "thiserror", ] [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -786,9 +823,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if 1.0.0", @@ -809,9 +846,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if 1.0.0", ] @@ -961,7 +998,7 @@ dependencies = [ "cosmwasm-std", "cw2", "schemars", - "semver 1.0.17", + "semver 1.0.18", "serde", "thiserror", ] @@ -1023,15 +1060,15 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.4.0" +version = "5.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" +checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.12.3", + "hashbrown 0.14.0", "lock_api", "once_cell", - "parking_lot_core 0.9.7", + "parking_lot_core 0.9.8", ] [[package]] @@ -1046,14 +1083,20 @@ dependencies = [ [[package]] name = "der" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", ] +[[package]] +name = "deranged" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" + [[package]] name = "derivative" version = "2.2.0" @@ -1133,7 +1176,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -1150,9 +1193,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" [[package]] name = "ecdsa" @@ -1172,7 +1215,7 @@ version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "der 0.7.7", + "der 0.7.8", "digest 0.10.7", "elliptic-curve 0.13.5", "rfc6979 0.4.0", @@ -1192,9 +1235,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb04eee5d9d907f29e80ee6b0e78f7e2c82342c63e3580d8c4f69d9d5aad963" +checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ "pkcs8 0.10.2", "signature 2.1.0", @@ -1245,9 +1288,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" @@ -1314,7 +1357,7 @@ checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -1331,14 +1374,20 @@ dependencies = [ ] [[package]] -name = "errno" -version = "0.3.1" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" dependencies = [ "errno-dragonfly", "libc", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -1369,12 +1418,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" [[package]] name = "ff" @@ -1471,9 +1517,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -1557,7 +1603,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -1659,13 +1705,19 @@ dependencies = [ "polyval", ] +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + [[package]] name = "git2" version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0155506aab710a86160ddb504a480d2964d7ab5b9e62419be69e0032bc5931c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "libgit2-sys", "log", @@ -1732,9 +1784,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -1742,7 +1794,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -1783,11 +1835,12 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" dependencies = [ "ahash 0.8.3", + "allocator-api2", ] [[package]] @@ -1801,11 +1854,11 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0761a1b9491c4f2e3d66aa0f62d0fba0af9a0e2852e4d48ea506632a4b56e6aa" +checksum = "312f66718a2d7789ffef4f4b7b213138ed9f1eb3aa1d0d82fc99f88fb3ffd26f" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.14.0", ] [[package]] @@ -1815,7 +1868,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ "base64 0.13.1", - "bitflags", + "bitflags 1.3.2", "bytes", "headers-core", "http", @@ -1853,18 +1906,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -1946,9 +1990,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -1977,9 +2021,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -1992,7 +2036,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -2051,9 +2095,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2073,7 +2117,7 @@ checksum = "bfbcff6ae46750b15cc594bfd277b188cbddcfdc1817848f97f03f26f8625b9e" dependencies = [ "cfg-if 1.0.0", "js-sys", - "uuid 1.3.3", + "uuid 1.4.1", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -2090,6 +2134,16 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + [[package]] name = "inout" version = "0.1.3" @@ -2117,33 +2171,21 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "io-lifetimes" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" -dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", + "hermit-abi 0.3.2", "rustix", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -2157,9 +2199,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" @@ -2188,7 +2230,7 @@ dependencies = [ "cfg-if 1.0.0", "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] @@ -2201,7 +2243,7 @@ dependencies = [ "ecdsa 0.16.8", "elliptic-curve 0.13.5", "once_cell", - "sha2 0.10.6", + "sha2 0.10.7", "signature 2.1.0", ] @@ -2219,9 +2261,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.144" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libgit2-sys" @@ -2254,9 +2296,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.9" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ "cc", "libc", @@ -2266,9 +2308,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.3.7" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" [[package]] name = "lioness" @@ -2284,9 +2326,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -2294,12 +2336,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memchr" @@ -2309,9 +2348,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -2345,14 +2384,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "windows-sys", ] [[package]] @@ -2396,9 +2434,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", "libm", @@ -2406,11 +2444,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] @@ -2489,7 +2527,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.7", "sqlx 0.6.3", "tap", "thiserror", @@ -2605,7 +2643,7 @@ dependencies = [ "log", "nym-network-defaults", "serde", - "toml 0.7.4", + "toml 0.7.6", "url", ] @@ -2649,7 +2687,7 @@ dependencies = [ name = "nym-crypto" version = "0.4.0" dependencies = [ - "aes 0.8.2", + "aes 0.8.3", "blake3", "bs58 0.4.0", "cipher 0.4.4", @@ -2695,9 +2733,9 @@ dependencies = [ name = "nym-explorer-api-requests" version = "0.1.0" dependencies = [ + "nym-api-requests", "nym-contracts-common", "nym-mixnet-contract-common", - "nym-validator-client", "schemars", "serde", ] @@ -2819,6 +2857,7 @@ dependencies = [ "dotenvy", "hex-literal", "once_cell", + "schemars", "serde", "thiserror", "url", @@ -3090,6 +3129,9 @@ dependencies = [ "colored", "cosmrs", "cosmwasm-std", + "cw-controllers", + "cw-utils", + "cw2", "cw3", "cw4", "eyre", @@ -3120,6 +3162,7 @@ dependencies = [ "thiserror", "tokio", "url", + "wasmtimer", "zeroize", ] @@ -3136,10 +3179,19 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.17.1" +name = "object" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -3155,11 +3207,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.52" +version = "0.10.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" +checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "foreign-types", "libc", @@ -3176,7 +3228,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -3187,18 +3239,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.26.0+1.1.1u" +version = "111.27.0+1.1.1v" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efc62c9f12b22b8f5208c23a7200a442b2e5999f8bdf80233852122b5a4f6f37" +checksum = "06e8f197c82d7511c5b014030c9b1efeda40d7d5f99d23b4ceed3524a5e63f02" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.87" +version = "0.9.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" +checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" dependencies = [ "cc", "libc", @@ -3249,7 +3301,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.7", + "parking_lot_core 0.9.8", ] [[package]] @@ -3268,15 +3320,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "smallvec", - "windows-sys 0.45.0", + "windows-targets", ] [[package]] @@ -3292,9 +3344,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" @@ -3346,15 +3398,15 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" +checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" dependencies = [ "thiserror", "ucd-trie", @@ -3362,9 +3414,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" +checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853" dependencies = [ "pest", "pest_generator", @@ -3372,53 +3424,53 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" +checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] name = "pest_meta" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" +checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" dependencies = [ "once_cell", "pest", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] name = "pin-project" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" [[package]] name = "pin-utils" @@ -3442,7 +3494,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.7", + "der 0.7.8", "spki 0.7.2", ] @@ -3465,9 +3517,9 @@ dependencies = [ [[package]] name = "polyval" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -3517,9 +3569,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.58" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -3570,9 +3622,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quote" -version = "1.0.27" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] @@ -3692,7 +3744,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -3701,7 +3753,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -3717,9 +3769,21 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" dependencies = [ "aho-corasick", "memchr", @@ -3728,9 +3792,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "reqwest" @@ -3814,27 +3878,32 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver 1.0.18", ] [[package]] name = "rustix" -version = "0.37.19" +version = "0.38.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" dependencies = [ - "bitflags", + "bitflags 2.4.0", "errno", - "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -3876,24 +3945,24 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ "base64 0.21.2", ] [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -3906,11 +3975,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -3920,7 +3989,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" dependencies = [ "dyn-clone", - "indexmap", + "indexmap 1.9.3", "schemars_derive", "serde", "serde_json", @@ -3946,9 +4015,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -3991,7 +4060,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct 0.2.0", - "der 0.7.7", + "der 0.7.8", "generic-array 0.14.7", "pkcs8 0.10.2", "subtle 2.4.1", @@ -4000,11 +4069,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.0" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2855b3715770894e67cbfa3df957790aa0c9edc3bf06efa1a84d77fa0839d1" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -4013,9 +4082,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -4032,9 +4101,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "semver-parser" @@ -4047,9 +4116,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.163" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" dependencies = [ "serde_derive", ] @@ -4076,22 +4145,22 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -4107,9 +4176,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" dependencies = [ "itoa", "ryu", @@ -4118,20 +4187,20 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.12" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] name = "serde_spanned" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ "serde", ] @@ -4187,9 +4256,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -4236,9 +4305,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "socket2" @@ -4250,6 +4319,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys", +] + [[package]] name = "sphinx-packet" version = "0.1.0" @@ -4306,7 +4385,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.7", + "der 0.7.8", ] [[package]] @@ -4359,7 +4438,7 @@ checksum = "e48c61941ccf5ddcada342cd59e3e5173b007c509e1e8e990dafc830294d9dc5" dependencies = [ "ahash 0.7.6", "atoi 0.4.0", - "bitflags", + "bitflags 1.3.2", "byteorder", "bytes", "crc 2.1.0", @@ -4374,7 +4453,7 @@ dependencies = [ "futures-util", "hashlink 0.7.0", "hex", - "indexmap", + "indexmap 1.9.3", "itoa", "libc", "libsqlite3-sys", @@ -4384,7 +4463,7 @@ dependencies = [ "paste", "percent-encoding", "rustls 0.19.1", - "sha2 0.10.6", + "sha2 0.10.7", "smallvec", "sqlformat 0.1.8", "sqlx-rt 0.5.13", @@ -4404,7 +4483,7 @@ checksum = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029" dependencies = [ "ahash 0.7.6", "atoi 1.0.0", - "bitflags", + "bitflags 1.3.2", "byteorder", "bytes", "crc 3.0.1", @@ -4418,9 +4497,9 @@ dependencies = [ "futures-executor", "futures-intrusive", "futures-util", - "hashlink 0.8.2", + "hashlink 0.8.3", "hex", - "indexmap", + "indexmap 1.9.3", "itoa", "libc", "libsqlite3-sys", @@ -4431,7 +4510,7 @@ dependencies = [ "percent-encoding", "rustls 0.20.8", "rustls-pemfile", - "sha2 0.10.6", + "sha2 0.10.7", "smallvec", "sqlformat 0.2.1", "sqlx-rt 0.6.3", @@ -4454,7 +4533,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "sha2 0.10.6", + "sha2 0.10.7", "sqlx-core 0.5.13", "sqlx-rt 0.5.13", "syn 1.0.109", @@ -4473,7 +4552,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "sha2 0.10.6", + "sha2 0.10.7", "sqlx-core 0.6.3", "sqlx-rt 0.6.3", "syn 1.0.109", @@ -4504,9 +4583,9 @@ dependencies = [ [[package]] name = "stringprep" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" +checksum = "db3737bde7edce97102e0e2b15365bf7a20bfdb5f60f4f9e8d7004258a51a8da" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -4558,9 +4637,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" dependencies = [ "proc-macro2", "quote", @@ -4575,15 +4654,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.5.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" dependencies = [ "cfg-if 1.0.0", "fastrand", "redox_syscall 0.3.5", "rustix", - "windows-sys 0.45.0", + "windows-sys", ] [[package]] @@ -4594,7 +4673,7 @@ checksum = "3f0a7d05cf78524782337f8edd55cbc578d159a16ad4affe2135c92f7dbac7f0" dependencies = [ "bytes", "digest 0.10.7", - "ed25519 2.2.1", + "ed25519 2.2.2", "ed25519-consensus", "flex-error", "futures", @@ -4608,7 +4687,7 @@ dependencies = [ "serde_bytes", "serde_json", "serde_repr", - "sha2 0.10.6", + "sha2 0.10.7", "signature 2.1.0", "subtle 2.4.1", "subtle-encoding", @@ -4666,7 +4745,7 @@ dependencies = [ "hyper-rustls", "peg", "pin-project", - "semver 1.0.17", + "semver 1.0.18", "serde", "serde_bytes", "serde_json", @@ -4695,30 +4774,31 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] name = "time" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" dependencies = [ + "deranged", "itoa", "js-sys", "serde", @@ -4734,9 +4814,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" dependencies = [ "time-core", ] @@ -4758,20 +4838,20 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.1" +version = "1.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" +checksum = "40de3a2ba249dcb097e01be5e67a5ff53cf250397715a071a81543e8a832a920" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", "num_cpus", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.3", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -4782,7 +4862,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] [[package]] @@ -4868,9 +4948,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" dependencies = [ "serde", "serde_spanned", @@ -4880,20 +4960,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.10" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap", + "indexmap 2.0.0", "serde", "serde_spanned", "toml_datetime", @@ -4960,9 +5040,9 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "unicode-bidi" @@ -4972,9 +5052,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -4999,9 +5079,9 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] name = "universal-hash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3160b73c9a19f7e2939a2fdad446c57c1bbbbf4d919d3213ff1267a580d8b5" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", "subtle 2.4.1", @@ -5015,9 +5095,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna", @@ -5045,9 +5125,9 @@ checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" [[package]] name = "uuid" -version = "1.3.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ "getrandom 0.2.10", "wasm-bindgen", @@ -5094,11 +5174,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -5329,147 +5408,66 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.42.2" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows-targets" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" -dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.0" @@ -5478,9 +5476,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "5504cc7644f4b593cbc05c4a55bf9bd4e94b867c3c0bd440934174d50482427d" dependencies = [ "memchr", ] @@ -5532,5 +5530,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.28", ] diff --git a/clients/webassembly/Cargo.toml b/clients/webassembly/Cargo.toml index 7405002cea..d68b5d37f6 100644 --- a/clients/webassembly/Cargo.toml +++ b/clients/webassembly/Cargo.toml @@ -3,7 +3,7 @@ name = "nym-client-wasm" authors = ["Dave Hrycyszyn ", "Jedrzej Stuczynski "] version = "1.1.1" edition = "2021" -keywords = ["nym", "sphinx", "wasm", "webassembly", "privacy", "client"] +keywords = ["nym", "sphinx", "wasm", "webassembly", "privacy"] license = "Apache-2.0" repository = "https://github.com/nymtech/nym" description = "A webassembly client which can be used to interact with the the Nym privacy platform. Wasm is used for Sphinx packet generation." diff --git a/clients/webassembly/src/client/mod.rs b/clients/webassembly/src/client/mod.rs index 74af0c2c8e..733521ea97 100644 --- a/clients/webassembly/src/client/mod.rs +++ b/clients/webassembly/src/client/mod.rs @@ -14,7 +14,6 @@ use crate::storage::traits::FullWasmClientStorage; use crate::storage::ClientStorage; use crate::topology::WasmNymTopology; use js_sys::Promise; -use nym_bandwidth_controller::wasm_mockups::{Client as FakeClient, DirectSigningNyxdClient}; use nym_client_core::client::base_client::{ BaseClientBuilder, ClientInput, ClientOutput, ClientState, }; @@ -26,6 +25,7 @@ use nym_task::TaskManager; use nym_topology::provider_trait::{HardcodedTopologyProvider, TopologyProvider}; use nym_topology::NymTopology; use nym_validator_client::client::IdentityKey; +use nym_validator_client::QueryReqwestRpcNyxdClient; use rand::rngs::OsRng; use rand::RngCore; use std::sync::Arc; @@ -152,7 +152,7 @@ impl NymClientBuilder { let maybe_topology_provider = self.topology_provider(); let mut base_builder: BaseClientBuilder<_, FullWasmClientStorage> = - BaseClientBuilder::, _>::new( + BaseClientBuilder::::new( &self.config.base, storage, None, diff --git a/clients/webassembly/src/helpers.rs b/clients/webassembly/src/helpers.rs index 19557c8fb3..68831dd19b 100644 --- a/clients/webassembly/src/helpers.rs +++ b/clients/webassembly/src/helpers.rs @@ -8,7 +8,7 @@ use js_sys::Promise; use nym_client_core::client::replies::reply_storage::browser_backend; use nym_client_core::config; use nym_client_core::init::helpers::current_gateways; -use nym_client_core::init::{setup_gateway_from, GatewaySetup, InitialisationDetails}; +use nym_client_core::init::{setup_gateway_from, GatewaySetup, InitialisationResult}; use nym_sphinx::addressing::clients::Recipient; use nym_sphinx::anonymous_replies::requests::AnonymousSenderTag; use nym_topology::{gateway, NymTopology}; @@ -82,14 +82,14 @@ async fn setup_gateway( client_store: &ClientStorage, chosen_gateway: Option, gateways: &[gateway::Node], -) -> Result { +) -> Result { let setup = if client_store.has_full_gateway_info().await? { GatewaySetup::MustLoad } else { GatewaySetup::new_fresh(chosen_gateway.clone(), None) }; - setup_gateway_from(&setup, client_store, client_store, false, Some(gateways)) + setup_gateway_from(setup, client_store, client_store, false, Some(gateways)) .await .map_err(Into::into) } @@ -98,7 +98,7 @@ pub(crate) async fn setup_gateway_from_api( client_store: &ClientStorage, chosen_gateway: Option, nym_apis: &[Url], -) -> Result { +) -> Result { let mut rng = thread_rng(); let gateways = current_gateways(&mut rng, nym_apis).await?; setup_gateway(client_store, chosen_gateway, &gateways).await @@ -108,7 +108,7 @@ pub(crate) async fn setup_from_topology( explicit_gateway: Option, topology: &NymTopology, client_store: &ClientStorage, -) -> Result { +) -> Result { let gateways = topology.gateways(); setup_gateway(client_store, explicit_gateway, gateways).await } diff --git a/clients/webassembly/src/tester/mod.rs b/clients/webassembly/src/tester/mod.rs index 1ce59a4024..ba70062f3b 100644 --- a/clients/webassembly/src/tester/mod.rs +++ b/clients/webassembly/src/tester/mod.rs @@ -12,10 +12,9 @@ use crate::tester::helpers::{ use crate::topology::WasmNymTopology; use futures::channel::mpsc; use js_sys::Promise; -use nym_bandwidth_controller::wasm_mockups::{Client as FakeClient, DirectSigningNyxdClient}; use nym_bandwidth_controller::BandwidthController; use nym_client_core::client::key_manager::ManagedKeys; -use nym_client_core::init::InitialisationDetails; +use nym_client_core::init::{InitialisationDetails, InitialisationResult}; use nym_credential_storage::ephemeral_storage::EphemeralStorage; use nym_gateway_client::GatewayClient; use nym_node_tester_utils::receiver::SimpleMessageReceiver; @@ -27,6 +26,7 @@ use nym_sphinx::preparer::PreparedFragment; use nym_task::TaskManager; use nym_topology::NymTopology; use nym_validator_client::client::IdentityKey; +use nym_validator_client::QueryReqwestRpcNyxdClient; use rand::rngs::OsRng; use std::collections::HashSet; use std::sync::atomic::{AtomicBool, AtomicU32, Ordering}; @@ -42,7 +42,7 @@ pub(crate) mod helpers; pub type NodeTestMessage = TestMessage; type LockedGatewayClient = - Arc, EphemeralStorage>>>; + Arc>>; pub(crate) const DEFAULT_TEST_TIMEOUT: Duration = Duration::from_secs(10); pub(crate) const DEFAULT_TEST_PACKETS: u32 = 20; @@ -78,8 +78,7 @@ pub struct NymNodeTesterBuilder { base_topology: NymTopology, // unimplemented - bandwidth_controller: - Option, EphemeralStorage>>, + bandwidth_controller: Option>, } fn address(keys: &ManagedKeys, gateway_identity: NodeIdentity) -> Recipient { @@ -130,9 +129,9 @@ impl NymNodeTesterBuilder { async fn gateway_info( &self, client_store: &ClientStorage, - ) -> Result { + ) -> Result { if let Ok(loaded) = InitialisationDetails::try_load(client_store, client_store).await { - Ok(loaded) + Ok(loaded.into()) } else { setup_from_topology(self.gateway.clone(), &self.base_topology, client_store).await } @@ -148,26 +147,37 @@ impl NymNodeTesterBuilder { }; let client_store = ClientStorage::new_async(&storage_id, None).await?; - - let init_details = self.gateway_info(&client_store).await?; + let initialisation_result = self.gateway_info(&client_store).await?; + let init_details = initialisation_result.details; + let managed_keys = init_details.managed_keys; let gateway_endpoint = init_details.gateway_details; let gateway_identity = gateway_endpoint.try_get_gateway_identity_key()?; - let managed_keys = init_details.managed_keys; let (mixnet_message_sender, mixnet_message_receiver) = mpsc::unbounded(); let (ack_sender, ack_receiver) = mpsc::unbounded(); - let mut gateway_client = GatewayClient::new( - gateway_endpoint.gateway_listener, - managed_keys.identity_keypair(), - gateway_identity, - Some(managed_keys.must_get_gateway_shared_key()), - mixnet_message_sender, - ack_sender, - Duration::from_secs(10), - self.bandwidth_controller.take(), - task_manager.subscribe(), - ); + let mut gateway_client = + if let Some(existing_client) = initialisation_result.authenticated_ephemeral_client { + existing_client.upgrade( + mixnet_message_sender, + ack_sender, + Duration::from_secs(10), + self.bandwidth_controller.take(), + task_manager.subscribe(), + ) + } else { + GatewayClient::new( + gateway_endpoint.gateway_listener, + managed_keys.identity_keypair(), + gateway_identity, + Some(managed_keys.must_get_gateway_shared_key()), + mixnet_message_sender, + ack_sender, + Duration::from_secs(10), + self.bandwidth_controller.take(), + task_manager.subscribe(), + ) + }; gateway_client.set_disabled_credentials_mode(true); gateway_client.authenticate_and_start().await?; diff --git a/common/async-file-watcher/Cargo.toml b/common/async-file-watcher/Cargo.toml index 05e7035cf2..0a44f239cf 100644 --- a/common/async-file-watcher/Cargo.toml +++ b/common/async-file-watcher/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" [dependencies] log = "0.4" tokio = { workspace = true, features = ["time"] } -futures = "0.3" +futures = { workspace = true } notify = "5.1.0" diff --git a/common/bandwidth-controller/Cargo.toml b/common/bandwidth-controller/Cargo.toml index 5b168d8b9f..3ce1f01454 100644 --- a/common/bandwidth-controller/Cargo.toml +++ b/common/bandwidth-controller/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" bip39 = { workspace = true } rand = "0.7.3" thiserror = "1.0" -url = "2.2" +url = { workspace = true } nym-coconut-interface = { path = "../coconut-interface" } nym-credential-storage = { path = "../credential-storage" } @@ -20,4 +20,4 @@ nym-validator-client = { path = "../client-libs/validator-client", default-featu [target."cfg(not(target_arch = \"wasm32\"))".dependencies.nym-validator-client] path = "../client-libs/validator-client" -features = ["signing"] +features = ["http-client"] diff --git a/common/bandwidth-controller/src/acquire/mod.rs b/common/bandwidth-controller/src/acquire/mod.rs index cdf72c3b00..c03ae8e90a 100644 --- a/common/bandwidth-controller/src/acquire/mod.rs +++ b/common/bandwidth-controller/src/acquire/mod.rs @@ -8,11 +8,11 @@ use nym_credentials::coconut::bandwidth::{BandwidthVoucher, TOTAL_ATTRIBUTES}; use nym_credentials::coconut::utils::obtain_aggregate_signature; use nym_crypto::asymmetric::{encryption, identity}; use nym_network_defaults::VOUCHER_INFO; -use nym_validator_client::nyxd::traits::CoconutBandwidthSigningClient; -use nym_validator_client::nyxd::traits::DkgQueryClient; +use nym_validator_client::coconut::all_coconut_api_clients; +use nym_validator_client::nyxd::contract_traits::CoconutBandwidthSigningClient; +use nym_validator_client::nyxd::contract_traits::DkgQueryClient; use nym_validator_client::nyxd::Coin; use nym_validator_client::nyxd::Hash; -use nym_validator_client::CoconutApiClient; use rand::rngs::OsRng; use state::{KeyPair, State}; use std::str::FromStr; @@ -21,7 +21,7 @@ pub mod state; pub async fn deposit(client: &C, amount: Coin) -> Result where - C: CoconutBandwidthSigningClient, + C: CoconutBandwidthSigningClient + Sync, { let mut rng = OsRng; let signing_keypair = KeyPair::from(identity::KeyPair::new(&mut rng)); @@ -70,7 +70,8 @@ where .get_current_epoch_threshold() .await? .ok_or(BandwidthControllerError::NoThreshold)?; - let coconut_api_clients = CoconutApiClient::all_coconut_api_clients(client, epoch_id).await?; + + let coconut_api_clients = all_coconut_api_clients(client, epoch_id).await?; let signature = obtain_aggregate_signature( &state.params, diff --git a/common/bandwidth-controller/src/error.rs b/common/bandwidth-controller/src/error.rs index e9a862ebff..5f464c82e5 100644 --- a/common/bandwidth-controller/src/error.rs +++ b/common/bandwidth-controller/src/error.rs @@ -6,15 +6,18 @@ use nym_credential_storage::error::StorageError; use nym_credentials::error::Error as CredentialsError; use nym_crypto::asymmetric::encryption::KeyRecoveryError; use nym_crypto::asymmetric::identity::Ed25519RecoveryError; +use nym_validator_client::coconut::CoconutApiError; use nym_validator_client::error::ValidatorClientError; use thiserror::Error; #[derive(Debug, Error)] pub enum BandwidthControllerError { - #[cfg(not(target_arch = "wasm32"))] #[error("Nyxd error: {0}")] Nyxd(#[from] nym_validator_client::nyxd::error::NyxdError), + #[error("coconut api query failure: {0}")] + CoconutApiError(#[from] CoconutApiError), + #[error("There was a credential storage error - {0}")] CredentialStorageError(Box), diff --git a/common/bandwidth-controller/src/lib.rs b/common/bandwidth-controller/src/lib.rs index 66a6f0a6d2..d9a714b263 100644 --- a/common/bandwidth-controller/src/lib.rs +++ b/common/bandwidth-controller/src/lib.rs @@ -2,10 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 use crate::error::BandwidthControllerError; - use nym_credential_storage::error::StorageError; use nym_credential_storage::storage::Storage; - +use nym_validator_client::coconut::all_coconut_api_clients; +use nym_validator_client::nyxd::contract_traits::DkgQueryClient; use std::str::FromStr; use { nym_coconut_interface::Base58, @@ -14,17 +14,8 @@ use { }, }; -#[cfg(not(target_arch = "wasm32"))] -use nym_validator_client::nyxd::traits::DkgQueryClient; - -#[cfg(target_arch = "wasm32")] -use crate::wasm_mockups::DkgQueryClient; - -#[cfg(not(target_arch = "wasm32"))] pub mod acquire; pub mod error; -#[cfg(target_arch = "wasm32")] -pub mod wasm_mockups; pub struct BandwidthController { storage: St, @@ -64,12 +55,8 @@ impl BandwidthController { let epoch_id = u64::from_str(&bandwidth_credential.epoch_id) .map_err(|_| StorageError::InconsistentData)?; - #[cfg(not(target_arch = "wasm32"))] - let coconut_api_clients = - nym_validator_client::CoconutApiClient::all_coconut_api_clients(&self.client, epoch_id) - .await?; - #[cfg(target_arch = "wasm32")] - let coconut_api_clients = vec![]; + let coconut_api_clients = all_coconut_api_clients(&self.client, epoch_id).await?; + let verification_key = obtain_aggregate_verification_key(&coconut_api_clients).await?; // the below would only be executed once we know where we want to spend it (i.e. which gateway and stuff) diff --git a/common/bandwidth-controller/src/wasm_mockups.rs b/common/bandwidth-controller/src/wasm_mockups.rs deleted file mode 100644 index be7ee06a79..0000000000 --- a/common/bandwidth-controller/src/wasm_mockups.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2022-2023 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use std::marker::PhantomData; - -pub struct DirectSigningNyxdClient {} - -pub trait DkgQueryClient {} - -// impl CosmWasmClient for DirectSigningNyxdClient {} - -#[derive(Clone)] -pub struct Client { - _phantom: PhantomData, -} - -impl DkgQueryClient for Client {} diff --git a/common/client-core/Cargo.toml b/common/client-core/Cargo.toml index 0811b08add..bcb21899fe 100644 --- a/common/client-core/Cargo.toml +++ b/common/client-core/Cargo.toml @@ -12,7 +12,7 @@ async-trait = { workspace = true } base64 = "0.21.2" dashmap = "5.4.0" dirs = "4.0" -futures = "0.3" +futures = { workspace = true } humantime-serde = "1.0" log = { workspace = true } rand = { version = "0.7.3", features = ["wasm-bindgen"] } @@ -25,7 +25,7 @@ thiserror = "1.0.34" time = "0.3.17" tokio = { version = "1.24.1", features = ["macros"]} tungstenite = { version = "0.13.0", default-features = false } -url = { version ="2.2", features = ["serde"] } +url = { workspace = true, features = ["serde"] } zeroize = { workspace = true } # internal @@ -45,10 +45,6 @@ nym-task = { path = "../task" } nym-credential-storage = { path = "../credential-storage" } nym-network-defaults = { path = "../network-defaults" } -[target."cfg(not(target_arch = \"wasm32\"))".dependencies.nym-validator-client] -path = "../client-libs/validator-client" -features = ["signing", "http-client"] - [target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio-stream] version = "0.1.11" features = ["time"] diff --git a/common/client-core/src/client/base_client/mod.rs b/common/client-core/src/client/base_client/mod.rs index a934793953..2f2e7d0072 100644 --- a/common/client-core/src/client/base_client/mod.rs +++ b/common/client-core/src/client/base_client/mod.rs @@ -3,11 +3,11 @@ use super::received_buffer::ReceivedBufferMessage; use super::topology_control::geo_aware_provider::GeoAwareTopologyProvider; +use crate::client::base_client::storage::gateway_details::GatewayDetailsStore; use crate::client::base_client::storage::MixnetClientStorage; use crate::client::cover_traffic_stream::LoopCoverTrafficStream; use crate::client::inbound_messages::{InputMessage, InputMessageReceiver, InputMessageSender}; use crate::client::key_manager::persistence::KeyStore; -use crate::client::key_manager::ManagedKeys; use crate::client::mix_traffic::{BatchMixMessageSender, MixTrafficController}; use crate::client::real_messages_control; use crate::client::real_messages_control::RealMessagesController; @@ -23,8 +23,9 @@ use crate::client::topology_control::nym_api_provider::NymApiTopologyProvider; use crate::client::topology_control::{ TopologyAccessor, TopologyRefresher, TopologyRefresherConfig, }; -use crate::config::{Config, DebugConfig, GatewayEndpointConfig}; +use crate::config::{Config, DebugConfig}; use crate::error::ClientCoreError; +use crate::init::{setup_gateway, GatewaySetup, InitialisationDetails, InitialisationResult}; use crate::{config, spawn_future}; use futures::channel::mpsc; use log::{debug, info}; @@ -43,18 +44,11 @@ use nym_sphinx::receiver::{ReconstructedMessage, SphinxMessageReceiver}; use nym_task::connections::{ConnectionCommandReceiver, ConnectionCommandSender, LaneQueueLengths}; use nym_task::{TaskClient, TaskManager}; use nym_topology::provider_trait::TopologyProvider; +use nym_validator_client::nyxd::contract_traits::DkgQueryClient; use std::sync::Arc; use tap::TapFallible; use url::Url; -#[cfg(target_arch = "wasm32")] -use nym_bandwidth_controller::wasm_mockups::DkgQueryClient; - -use crate::client::base_client::storage::gateway_details::GatewayDetailsStore; -use crate::init::{setup_gateway, GatewaySetup, InitialisationDetails}; -#[cfg(not(target_arch = "wasm32"))] -use nym_validator_client::nyxd::traits::DkgQueryClient; - #[cfg(all(not(target_arch = "wasm32"), feature = "fs-surb-storage"))] pub mod non_wasm_helpers; @@ -200,16 +194,13 @@ where // note: do **NOT** make this method public as its only valid usage is from within `start_base` // because it relies on the crypto keys being already loaded - fn mix_address( - managed_keys: &ManagedKeys, - gateway_config: &GatewayEndpointConfig, - ) -> Recipient { + fn mix_address(details: &InitialisationDetails) -> Recipient { Recipient::new( - *managed_keys.identity_public_key(), - *managed_keys.encryption_public_key(), + *details.managed_keys.identity_public_key(), + *details.managed_keys.encryption_public_key(), // TODO: below only works under assumption that gateway address == gateway id // (which currently is true) - NodeIdentity::from_base58_string(&gateway_config.gateway_id).unwrap(), + NodeIdentity::from_base58_string(&details.gateway_details.gateway_id).unwrap(), ) } @@ -294,8 +285,7 @@ where async fn start_gateway_client( config: &Config, - gateway_config: GatewayEndpointConfig, - managed_keys: &ManagedKeys, + initialisation_result: InitialisationResult, bandwidth_controller: Option>, mixnet_message_sender: MixnetMessageSender, ack_sender: AcknowledgementSender, @@ -305,24 +295,39 @@ where ::StorageError: Send + Sync + 'static, ::StorageError: Send + Sync + 'static, { - let gateway_address = gateway_config.gateway_listener.clone(); - let gateway_id = gateway_config.gateway_id; + let managed_keys = initialisation_result.details.managed_keys; - // TODO: in theory, at this point, this should be infallible - let gateway_identity = identity::PublicKey::from_base58_string(gateway_id) - .map_err(ClientCoreError::UnableToCreatePublicKeyFromGatewayId)?; + let mut gateway_client = + if let Some(existing_client) = initialisation_result.authenticated_ephemeral_client { + existing_client.upgrade( + mixnet_message_sender, + ack_sender, + config.debug.gateway_connection.gateway_response_timeout, + bandwidth_controller, + shutdown, + ) + } else { + let gateway_config = initialisation_result.details.gateway_details; - let mut gateway_client = GatewayClient::new( - gateway_address, - managed_keys.identity_keypair(), - gateway_identity, - Some(managed_keys.must_get_gateway_shared_key()), - mixnet_message_sender, - ack_sender, - config.debug.gateway_connection.gateway_response_timeout, - bandwidth_controller, - shutdown, - ); + let gateway_address = gateway_config.gateway_listener.clone(); + let gateway_id = gateway_config.gateway_id; + + // TODO: in theory, at this point, this should be infallible + let gateway_identity = identity::PublicKey::from_base58_string(gateway_id) + .map_err(ClientCoreError::UnableToCreatePublicKeyFromGatewayId)?; + + GatewayClient::new( + gateway_address, + managed_keys.identity_keypair(), + gateway_identity, + Some(managed_keys.must_get_gateway_shared_key()), + mixnet_message_sender, + ack_sender, + config.debug.gateway_connection.gateway_response_timeout, + bandwidth_controller, + shutdown, + ) + }; gateway_client.set_disabled_credentials_mode(config.client.disabled_credentials_mode); @@ -445,17 +450,23 @@ where Ok(mem_store) } - async fn initialise_keys_and_gateway(&self) -> Result + async fn initialise_keys_and_gateway( + setup_method: GatewaySetup, + key_store: &S::KeyStore, + details_store: &S::GatewayDetailsStore, + overwrite_data: bool, + validator_servers: Option<&[Url]>, + ) -> Result where ::StorageError: Sync + Send, ::StorageError: Sync + Send, { setup_gateway( - &self.setup_method, - self.client_store.key_store(), - self.client_store.gateway_details_store(), - false, - Some(&self.config.client.nym_api_urls), + setup_method, + key_store, + details_store, + overwrite_data, + validator_servers, ) .await } @@ -471,9 +482,14 @@ where info!("Starting nym client"); // derive (or load) client keys and gateway configuration - let details = self.initialise_keys_and_gateway().await?; - let gateway_config = details.gateway_details; - let managed_keys = details.managed_keys; + let init_res = Self::initialise_keys_and_gateway( + self.setup_method, + self.client_store.key_store(), + self.client_store.gateway_details_store(), + false, + Some(&self.config.client.nym_api_urls), + ) + .await?; let (reply_storage_backend, credential_store) = self.client_store.into_runtime_stores(); @@ -507,14 +523,15 @@ where let (reply_controller_sender, reply_controller_receiver) = reply_controller::requests::new_control_channels(); - let self_address = Self::mix_address(&managed_keys, &gateway_config); + let self_address = Self::mix_address(&init_res.details); + let ack_key = init_res.details.managed_keys.ack_key(); + let encryption_keys = init_res.details.managed_keys.encryption_keypair(); // the components are started in very specific order. Unless you know what you are doing, // do not change that. let gateway_client = Self::start_gateway_client( self.config, - gateway_config, - &managed_keys, + init_res, bandwidth_controller, mixnet_messages_sender, ack_sender, @@ -541,7 +558,7 @@ where .await?; Self::start_received_messages_buffer_controller( - managed_keys.encryption_keypair(), + encryption_keys, received_buffer_request_receiver, mixnet_messages_receiver, reply_storage.key_storage(), @@ -566,7 +583,7 @@ where let controller_config = real_messages_control::Config::new( &self.config.debug, - managed_keys.ack_key(), + Arc::clone(&ack_key), self_address, ); @@ -593,7 +610,7 @@ where { Self::start_cover_traffic_stream( &self.config.debug, - managed_keys.ack_key(), + ack_key, self_address, shared_topology_accessor.clone(), message_sender, diff --git a/common/client-core/src/client/base_client/non_wasm_helpers.rs b/common/client-core/src/client/base_client/non_wasm_helpers.rs index 6b901f0f82..d0d2d5a058 100644 --- a/common/client-core/src/client/base_client/non_wasm_helpers.rs +++ b/common/client-core/src/client/base_client/non_wasm_helpers.rs @@ -10,8 +10,8 @@ use crate::error::ClientCoreError; use log::{error, info}; use nym_bandwidth_controller::BandwidthController; use nym_credential_storage::storage::Storage as CredentialStorage; -use nym_validator_client::nyxd::QueryNyxdClient; -use nym_validator_client::Client; +use nym_validator_client::nyxd; +use nym_validator_client::QueryHttpRpcNyxdClient; use std::path::Path; use std::{fs, io}; use time::OffsetDateTime; @@ -104,48 +104,38 @@ pub async fn setup_fs_reply_surb_backend>( pub fn create_bandwidth_controller( config: &Config, storage: St, -) -> BandwidthController, St> { +) -> BandwidthController { let nyxd_url = config .get_validator_endpoints() .pop() .expect("No nyxd validator endpoint provided"); - let api_url = config - .get_nym_api_endpoints() - .pop() - .expect("No validator api endpoint provided"); - create_bandwidth_controller_with_urls(nyxd_url, api_url, storage) + create_bandwidth_controller_with_urls(nyxd_url, storage) } pub fn create_bandwidth_controller_with_urls( nyxd_url: Url, - nym_api_url: Url, storage: St, -) -> BandwidthController, St> { - let client = default_query_dkg_client(nyxd_url, nym_api_url); +) -> BandwidthController { + let client = default_query_dkg_client(nyxd_url); BandwidthController::new(storage, client) } -pub fn default_query_dkg_client_from_config(config: &Config) -> Client { +pub fn default_query_dkg_client_from_config(config: &Config) -> QueryHttpRpcNyxdClient { let nyxd_url = config .get_validator_endpoints() .pop() .expect("No nyxd validator endpoint provided"); - let api_url = config - .get_nym_api_endpoints() - .pop() - .expect("No validator api endpoint provided"); - default_query_dkg_client(nyxd_url, api_url) + default_query_dkg_client(nyxd_url) } -pub fn default_query_dkg_client(nyxd_url: Url, nym_api_url: Url) -> Client { +pub fn default_query_dkg_client(nyxd_url: Url) -> QueryHttpRpcNyxdClient { let details = nym_network_defaults::NymNetworkDetails::new_from_env(); - let mut client_config = nym_validator_client::Config::try_from_nym_network_details(&details) + let client_config = nyxd::Config::try_from_nym_network_details(&details) .expect("failed to construct validator client config"); // overwrite env configuration with config URLs - client_config = client_config.with_urls(nyxd_url, nym_api_url); - nym_validator_client::Client::new_query(client_config) + QueryHttpRpcNyxdClient::connect(client_config, nyxd_url.as_str()) .expect("Could not construct query client") } diff --git a/common/client-core/src/client/mix_traffic.rs b/common/client-core/src/client/mix_traffic.rs index 8e7f7ce2fb..cb12a55d85 100644 --- a/common/client-core/src/client/mix_traffic.rs +++ b/common/client-core/src/client/mix_traffic.rs @@ -3,15 +3,10 @@ use crate::spawn_future; use log::*; +use nym_credential_storage::storage::Storage; use nym_gateway_client::GatewayClient; use nym_sphinx::forwarding::packet::MixPacket; - -use nym_credential_storage::storage::Storage; -#[cfg(not(target_arch = "wasm32"))] -use nym_validator_client::nyxd::traits::DkgQueryClient; - -#[cfg(target_arch = "wasm32")] -use nym_bandwidth_controller::wasm_mockups::DkgQueryClient; +use nym_validator_client::nyxd::contract_traits::DkgQueryClient; pub type BatchMixMessageSender = tokio::sync::mpsc::Sender>; pub type BatchMixMessageReceiver = tokio::sync::mpsc::Receiver>; diff --git a/common/client-core/src/init/helpers.rs b/common/client-core/src/init/helpers.rs index 723e9d02a2..adfd9ad623 100644 --- a/common/client-core/src/init/helpers.rs +++ b/common/client-core/src/init/helpers.rs @@ -3,11 +3,11 @@ use crate::config::GatewayEndpointConfig; use crate::error::ClientCoreError; +use crate::init::RegistrationResult; use futures::{SinkExt, StreamExt}; use log::{debug, info, trace, warn}; use nym_crypto::asymmetric::identity; use nym_gateway_client::GatewayClient; -use nym_gateway_requests::registration::handshake::SharedKeys; use nym_topology::{filter::VersionFilterable, gateway}; use rand::{seq::SliceRandom, Rng}; use std::{sync::Arc, time::Duration}; @@ -15,8 +15,6 @@ use tap::TapFallible; use tungstenite::Message; use url::Url; -#[cfg(not(target_arch = "wasm32"))] -use nym_validator_client::nyxd::DirectSigningNyxdClient; #[cfg(not(target_arch = "wasm32"))] use tokio::net::TcpStream; #[cfg(not(target_arch = "wasm32"))] @@ -30,8 +28,6 @@ type WsConn = WebSocketStream>; #[cfg(not(target_arch = "wasm32"))] use tokio::time::sleep; -#[cfg(target_arch = "wasm32")] -use nym_bandwidth_controller::wasm_mockups::DirectSigningNyxdClient; #[cfg(target_arch = "wasm32")] use wasm_utils::websocket::JSWebsocket; #[cfg(target_arch = "wasm32")] @@ -205,9 +201,9 @@ pub(super) fn uniformly_random_gateway( pub(super) async fn register_with_gateway( gateway: &GatewayEndpointConfig, our_identity: Arc, -) -> Result, ClientCoreError> { +) -> Result { let timeout = Duration::from_millis(1500); - let mut gateway_client: GatewayClient = GatewayClient::new_init( + let mut gateway_client = GatewayClient::new_init( gateway.gateway_listener.clone(), gateway.try_get_gateway_identity_key()?, our_identity.clone(), @@ -221,5 +217,8 @@ pub(super) async fn register_with_gateway( .perform_initial_authentication() .await .tap_err(|_| log::warn!("Failed to register with the gateway!"))?; - Ok(shared_keys) + Ok(RegistrationResult { + shared_keys, + authenticated_ephemeral_client: Some(gateway_client), + }) } diff --git a/common/client-core/src/init/mod.rs b/common/client-core/src/init/mod.rs index 6ebc123b4b..8e848837ef 100644 --- a/common/client-core/src/init/mod.rs +++ b/common/client-core/src/init/mod.rs @@ -14,16 +14,39 @@ use crate::{ error::ClientCoreError, }; use nym_crypto::asymmetric::identity; +use nym_gateway_client::client::InitOnly; +use nym_gateway_client::GatewayClient; +use nym_gateway_requests::registration::handshake::SharedKeys; use nym_sphinx::addressing::{clients::Recipient, nodes::NodeIdentity}; use nym_topology::gateway; use nym_validator_client::client::IdentityKey; use rand::rngs::OsRng; use serde::Serialize; use std::fmt::{Debug, Display}; +use std::sync::Arc; use url::Url; pub mod helpers; +pub struct RegistrationResult { + pub shared_keys: Arc, + pub authenticated_ephemeral_client: Option>, +} + +pub struct InitialisationResult { + pub details: InitialisationDetails, + pub authenticated_ephemeral_client: Option>, +} + +impl From for InitialisationResult { + fn from(details: InitialisationDetails) -> Self { + InitialisationResult { + details, + authenticated_ephemeral_client: None, + } + } +} + // TODO: rename to something better... #[derive(Debug)] pub struct InitialisationDetails { @@ -74,7 +97,6 @@ impl InitialisationDetails { } } -#[derive(Debug, Clone)] pub enum GatewaySetup { /// The gateway specification MUST BE loaded from the underlying storage. MustLoad, @@ -92,6 +114,13 @@ pub enum GatewaySetup { /// Full gateway configuration details: PersistedGatewayDetails, }, + ReuseConnection { + /// The authenticated ephemeral client that was created during `init` + authenticated_ephemeral_client: GatewayClient, + + /// Details of this pre-initialised client + details: InitialisationDetails, + }, } impl From for GatewaySetup { @@ -266,18 +295,32 @@ fn ensure_valid_details( } pub async fn setup_gateway_from( - setup: &GatewaySetup, + setup: GatewaySetup, key_store: &K, details_store: &D, overwrite_data: bool, gateways: Option<&[gateway::Node]>, -) -> Result +) -> Result where K: KeyStore, D: GatewayDetailsStore, K::StorageError: Send + Sync + 'static, D::StorageError: Send + Sync + 'static, { + // I don't like how we can't deal with this variant in the match below, but we need to take ownership of internal values. + if let GatewaySetup::ReuseConnection { + authenticated_ephemeral_client, + details, + } = setup + { + // if we have already performed the full setup, forward the details. + // it's up to the caller to ensure persistence + return Ok(InitialisationResult { + details, + authenticated_ephemeral_client: Some(authenticated_ephemeral_client), + }); + } + let mut rng = OsRng; // try load gateway details @@ -286,14 +329,14 @@ where // try load keys and decide what to do based on the GatewaySetup let mut managed_keys = match ManagedKeys::try_load(key_store).await { Ok(loaded_keys) => { - match setup { + match &setup { GatewaySetup::MustLoad => { // get EVERYTHING from the storage let details = loaded_details?; ensure_valid_details(&details, &loaded_keys)?; // no need to persist anything as we got everything from the storage - return Ok(InitialisationDetails::new(details.into(), loaded_keys)); + return Ok(InitialisationDetails::new(details.into(), loaded_keys).into()); } GatewaySetup::Predefined { details } => { // we already have defined gateway details AND a shared key @@ -304,10 +347,9 @@ where _store_gateway_details(details_store, details).await?; } - return Ok(InitialisationDetails::new( - details.clone().into(), - loaded_keys, - )); + return Ok( + InitialisationDetails::new(details.clone().into(), loaded_keys).into(), + ); } GatewaySetup::Specified { gateway_identity } => { // if that data was already stored... @@ -323,7 +365,8 @@ where return Ok(InitialisationDetails::new( existing_gateway.into(), loaded_keys, - )); + ) + .into()); } } @@ -341,7 +384,8 @@ where return Ok(InitialisationDetails::new( existing_gateway.into(), loaded_keys, - )); + ) + .into()); } // we didn't get full details from the store and we have loaded some keys @@ -352,6 +396,9 @@ where return Err(ClientCoreError::ForbiddenKeyOverwrite); } } + GatewaySetup::ReuseConnection { .. } => { + unreachable!("the reuse connection variant was already manually covered") + } } } Err(_) => { @@ -371,7 +418,9 @@ where let our_identity = managed_keys.identity_keypair(); // Establish connection, authenticate and generate keys for talking with the gateway - let shared_keys = helpers::register_with_gateway(&gateway_details, our_identity).await?; + let registration_result = + helpers::register_with_gateway(&gateway_details, our_identity).await?; + let shared_keys = registration_result.shared_keys; let persisted_details = PersistedGatewayDetails::new(gateway_details, &shared_keys); @@ -386,19 +435,19 @@ where // persist gateway config _store_gateway_details(details_store, &persisted_details).await?; - Ok(InitialisationDetails::new( - persisted_details.into(), - managed_keys, - )) + Ok(InitialisationResult { + details: InitialisationDetails::new(persisted_details.into(), managed_keys), + authenticated_ephemeral_client: registration_result.authenticated_ephemeral_client, + }) } pub async fn setup_gateway( - setup: &GatewaySetup, + setup: GatewaySetup, key_store: &K, details_store: &D, overwrite_data: bool, validator_servers: Option<&[Url]>, -) -> Result +) -> Result where K: KeyStore, D: GatewayDetailsStore, diff --git a/common/client-libs/gateway-client/Cargo.toml b/common/client-libs/gateway-client/Cargo.toml index 197acdadef..3f8f4ac0e4 100644 --- a/common/client-libs/gateway-client/Cargo.toml +++ b/common/client-libs/gateway-client/Cargo.toml @@ -9,10 +9,10 @@ edition = "2021" [dependencies] # TODO: (for this and other crates), similarly to 'tokio', import only required "futures" modules rather than # the entire crate -futures = "0.3" +futures = { workspace = true } log = { workspace = true } -thiserror = "1.0" -url = "2.2" +thiserror = { workspace = true } +url = { workspace = true } rand = { version = "0.7.3", features = ["wasm-bindgen"] } tokio = { version = "1.24.1", features = ["macros"] } @@ -25,7 +25,7 @@ nym-gateway-requests = { path = "../../../gateway/gateway-requests" } nym-network-defaults = { path = "../../network-defaults" } nym-sphinx = { path = "../../nymsphinx" } nym-pemstore = { path = "../../pemstore" } -nym-validator-client = { path = "../validator-client" } +nym-validator-client = { path = "../validator-client", default-features = false } nym-task = { path = "../../task" } serde = { workspace = true, features = ["derive"] } diff --git a/common/client-libs/gateway-client/src/client.rs b/common/client-libs/gateway-client/src/client.rs index bdc2c626df..188d84e2c9 100644 --- a/common/client-libs/gateway-client/src/client.rs +++ b/common/client-libs/gateway-client/src/client.rs @@ -1,4 +1,4 @@ -// Copyright 2021 - Nym Technologies SA +// Copyright 2021-2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 use crate::error::GatewayClientError; @@ -22,21 +22,18 @@ use nym_gateway_requests::{BinaryRequest, ClientControlRequest, ServerResponse, use nym_network_defaults::{REMAINING_BANDWIDTH_THRESHOLD, TOKENS_TO_BURN}; use nym_sphinx::forwarding::packet::MixPacket; use nym_task::TaskClient; +use nym_validator_client::nyxd::contract_traits::DkgQueryClient; use rand::rngs::OsRng; use std::convert::TryFrom; use std::sync::Arc; use std::time::Duration; use tungstenite::protocol::Message; -#[cfg(not(target_arch = "wasm32"))] -use nym_validator_client::nyxd::traits::DkgQueryClient; #[cfg(not(target_arch = "wasm32"))] use tokio::time::sleep; #[cfg(not(target_arch = "wasm32"))] use tokio_tungstenite::connect_async; -#[cfg(target_arch = "wasm32")] -use nym_bandwidth_controller::wasm_mockups::DkgQueryClient; #[cfg(target_arch = "wasm32")] use wasm_utils::websocket::JSWebsocket; #[cfg(target_arch = "wasm32")] @@ -45,7 +42,7 @@ use wasmtimer::tokio::sleep; const DEFAULT_RECONNECTION_ATTEMPTS: usize = 10; const DEFAULT_RECONNECTION_BACKOFF: Duration = Duration::from_secs(5); -pub struct GatewayClient { +pub struct GatewayClient { authenticated: bool, disabled_credentials_mode: bool, bandwidth_remaining: i64, @@ -199,7 +196,6 @@ impl GatewayClient { return Ok(()); } - #[cfg(not(target_arch = "wasm32"))] sleep(self.reconnection_backoff).await; } @@ -471,6 +467,14 @@ impl GatewayClient { pub async fn perform_initial_authentication( &mut self, ) -> Result, GatewayClientError> { + if self.authenticated { + return if let Some(shared_key) = &self.shared_key { + Ok(Arc::clone(shared_key)) + } else { + Err(GatewayClientError::AuthenticationFailure) + }; + } + if self.shared_key.is_some() { self.authenticate(None).await?; } else { @@ -755,7 +759,9 @@ impl GatewayClient { } } -impl GatewayClient { +pub struct InitOnly; + +impl GatewayClient { // for initialisation we do not need credential storage. Though it's still a bit weird we have to set the generic... pub fn new_init( gateway_address: String, @@ -772,7 +778,7 @@ impl GatewayClient { let shutdown = TaskClient::dummy(); let packet_router = PacketRouter::new(ack_tx, mix_tx, shutdown.clone()); - GatewayClient:: { + GatewayClient { authenticated: false, disabled_credentials_mode: true, bandwidth_remaining: 0, @@ -790,4 +796,37 @@ impl GatewayClient { shutdown, } } + + pub fn upgrade( + self, + mixnet_message_sender: MixnetMessageSender, + ack_sender: AcknowledgementSender, + response_timeout_duration: Duration, + bandwidth_controller: Option>, + shutdown: TaskClient, + ) -> GatewayClient { + // invariants that can't be broken + // (unless somebody decided to expose some field that wasn't meant to be exposed) + assert!(self.authenticated); + assert!(self.connection.is_available()); + assert!(self.shared_key.is_some()); + + GatewayClient { + authenticated: self.authenticated, + disabled_credentials_mode: self.disabled_credentials_mode, + bandwidth_remaining: self.bandwidth_remaining, + gateway_address: self.gateway_address, + gateway_identity: self.gateway_identity, + local_identity: self.local_identity, + shared_key: self.shared_key, + connection: self.connection, + packet_router: PacketRouter::new(ack_sender, mixnet_message_sender, shutdown.clone()), + response_timeout_duration, + bandwidth_controller, + should_reconnect_on_failure: self.should_reconnect_on_failure, + reconnection_attempts: self.reconnection_attempts, + reconnection_backoff: self.reconnection_backoff, + shutdown, + } + } } diff --git a/common/client-libs/mixnet-client/Cargo.toml b/common/client-libs/mixnet-client/Cargo.toml index fabcca892d..9eede069da 100644 --- a/common/client-libs/mixnet-client/Cargo.toml +++ b/common/client-libs/mixnet-client/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -futures = "0.3" +futures = { workspace = true } log = { workspace = true } tokio = { version = "1.24.1", features = ["time", "net", "rt"] } tokio-util = { version = "0.7.4", features = ["codec"] } diff --git a/common/client-libs/validator-client/Cargo.toml b/common/client-libs/validator-client/Cargo.toml index 5ac785a9c7..952d106e97 100644 --- a/common/client-libs/validator-client/Cargo.toml +++ b/common/client-libs/validator-client/Cargo.toml @@ -22,43 +22,48 @@ nym-group-contract-common = { path = "../../cosmwasm-smart-contracts/group-contr nym-service-provider-directory-common = { path = "../../cosmwasm-smart-contracts/service-provider-directory" } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } -reqwest = { version = "0.11", features = ["json"] } -thiserror = "1" +reqwest = { workspace = true, features = ["json"] } +thiserror = { workspace = true } log = { workspace = true } -url = { version = "2.2", features = ["serde"] } -tokio = { version = "1.24.1", features = ["sync", "time"] } -futures = "0.3" -openssl = { version = "0.10", features = ["vendored"], optional = true } +url = { workspace = true, features = ["serde"] } +tokio = { workspace = true, features = ["sync", "time"] } +futures = { workspace = true } +openssl = { version = "^0.10.55", features = ["vendored"], optional = true } nym-coconut-interface = { path = "../../coconut-interface" } nym-network-defaults = { path = "../../network-defaults" } nym-api-requests = { path = "../../../nym-api/nym-api-requests" } async-trait = { workspace = true } -bip39 = { workspace = true, features = ["rand"], optional = true } +bip39 = { workspace = true, features = ["rand"] } nym-config = { path = "../../config" } cosmrs = { workspace = true, features = ["bip32", "cosmwasm"] } -#cosmrs = { workspace = true, features = ["bip32", "rpc", "cosmwasm"], optional = true } # note that this has the same version as used by cosmrs # import it just for the `Client` trait tendermint-rpc = { workspace = true } -eyre = { version = "0.6", optional = true } +eyre = { version = "0.6" } +cw-utils = { workspace = true } +cw2 = { workspace = true } cw3 = { workspace = true } cw4 = { workspace = true } +cw-controllers = { workspace = true } prost = { version = "0.11", default-features = false } flate2 = { version = "1.0.20" } sha2 = { version = "0.9.5" } itertools = { version = "0.10" } -zeroize = { version = "1.5.7", optional = true, features = ["zeroize_derive"] } +zeroize = { workspace = true, features = ["zeroize_derive"] } cosmwasm-std = { workspace = true } +# required for polling for broadcast result +[target."cfg(target_arch = \"wasm32\")".dependencies.wasmtimer] +workspace = true +features = ["tokio"] + [dev-dependencies] bip39 = { workspace = true } -#cosmrs = { workspace = true, features = ["rpc", "bip32"] } cosmrs = { workspace = true, features = ["bip32"] } -tokio = { version = "1.24.1", features = ["rt-multi-thread", "macros"] } ts-rs = "6.1.2" [[example]] @@ -66,24 +71,18 @@ name = "offline_signing" # it should only really require the "signing" feature, # but that would require another round of refactoring to make it possible # (traits would need to be moved around and refactored themselves) -required-features = ["http-client", "signing"] +required-features = ["http-client"] [[example]] name = "query_service_provider_directory" -# TODO: validate the requirements -required-features = ["http-client", "signing"] +required-features = ["http-client"] [[example]] name = "query_name_service" -# TODO: validate the requirements -required-features = ["http-client", "signing"] +required-features = ["http-client"] [features] +default = ["http-client"] http-client = ["cosmrs/rpc", "openssl"] -signing = [ - "bip39", - "eyre", - "zeroize" -] generate-ts = [] diff --git a/common/client-libs/validator-client/examples/offline_signing.rs b/common/client-libs/validator-client/examples/offline_signing.rs index a21bfa4475..baa2d10035 100644 --- a/common/client-libs/validator-client/examples/offline_signing.rs +++ b/common/client-libs/validator-client/examples/offline_signing.rs @@ -23,7 +23,7 @@ async fn main() { let signer_address = signer.try_derive_accounts().unwrap()[0].address().clone(); // local 'client' ONLY signing messages - let tx_signer = TxSigner::new(signer); + let tx_signer = signer; // possibly remote client that doesn't do ANY signing // (only broadcasts + queries for sequence numbers) diff --git a/common/client-libs/validator-client/examples/query_name_service.rs b/common/client-libs/validator-client/examples/query_name_service.rs index 2f6e36b3bc..68e4da4cf2 100644 --- a/common/client-libs/validator-client/examples/query_name_service.rs +++ b/common/client-libs/validator-client/examples/query_name_service.rs @@ -3,7 +3,9 @@ use std::str::FromStr; use cosmrs::AccountId; use nym_name_service_common::Address; use nym_network_defaults::{setup_env, NymNetworkDetails}; -use nym_validator_client::nyxd::traits::NameServiceQueryClient; +use nym_validator_client::nyxd::contract_traits::{ + NameServiceQueryClient, PagedNameServiceQueryClient, +}; #[tokio::main] async fn main() { @@ -26,7 +28,7 @@ async fn main() { let names_by_owner = client.nyxd.get_names_by_owner(owner).await.unwrap(); println!("names (by owner): {names_by_owner:#?}"); - let nym_address = Address::new("client_id.client_key@gateway_id"); + let nym_address = Address::new("client_id.client_key@gateway_id").unwrap(); let names_by_address = client.nyxd.get_names_by_address(nym_address).await.unwrap(); println!("names (by address): {names_by_address:#?}"); diff --git a/common/client-libs/validator-client/examples/query_service_provider_directory.rs b/common/client-libs/validator-client/examples/query_service_provider_directory.rs index 12369b2696..d0f6f7ce46 100644 --- a/common/client-libs/validator-client/examples/query_service_provider_directory.rs +++ b/common/client-libs/validator-client/examples/query_service_provider_directory.rs @@ -3,7 +3,9 @@ use std::str::FromStr; use cosmrs::AccountId; use nym_network_defaults::{setup_env, NymNetworkDetails}; use nym_service_provider_directory_common::NymAddress; -use nym_validator_client::nyxd::traits::SpDirectoryQueryClient; +use nym_validator_client::nyxd::contract_traits::{ + PagedSpDirectoryQueryClient, SpDirectoryQueryClient, +}; #[tokio::main] async fn main() { diff --git a/common/client-libs/validator-client/src/client.rs b/common/client-libs/validator-client/src/client.rs index 54539403fb..e70cbdaf2f 100644 --- a/common/client-libs/validator-client/src/client.rs +++ b/common/client-libs/validator-client/src/client.rs @@ -1,41 +1,33 @@ // Copyright 2021-2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -use crate::{nym_api, ValidatorClientError}; +use crate::nyxd::{self, NyxdClient}; +use crate::signing::direct_wallet::DirectSecp256k1HdWallet; +use crate::signing::signer::{NoSigner, OfflineSigner}; +use crate::{ + nym_api, DirectSigningReqwestRpcValidatorClient, QueryReqwestRpcValidatorClient, + ReqwestRpcClient, ValidatorClientError, +}; use nym_api_requests::coconut::{ BlindSignRequestBody, BlindedSignatureResponse, VerifyCredentialBody, VerifyCredentialResponse, }; +use nym_api_requests::models::MixNodeBondAnnotated; use nym_api_requests::models::{ GatewayCoreStatusResponse, MixnodeCoreStatusResponse, MixnodeStatusResponse, RewardEstimationResponse, StakeSaturationResponse, }; -use nym_coconut_dkg_common::types::NodeIndex; -use nym_coconut_interface::VerificationKey; +use nym_network_defaults::NymNetworkDetails; +use url::Url; + pub use nym_mixnet_contract_common::{ mixnode::MixNodeDetails, GatewayBond, IdentityKey, IdentityKeyRef, MixId, }; -use url::Url; -use crate::nyxd::traits::{DkgQueryClient, MixnetQueryClient}; +// re-export the type to not break existing imports +pub use crate::coconut::CoconutApiClient; + #[cfg(feature = "http-client")] -use crate::nyxd::QueryNyxdClient; -use crate::nyxd::{self, CosmWasmClient, NyxdClient}; -use nym_api_requests::models::MixNodeBondAnnotated; -use nym_coconut_dkg_common::{types::EpochId, verification_key::ContractVKShare}; -use nym_coconut_interface::Base58; -use nym_mixnet_contract_common::{ - families::{Family, FamilyHead}, - mixnode::MixNodeBond, - pending_events::{PendingEpochEvent, PendingIntervalEvent}, - Delegation, RewardedSetNodeStatus, UnbondedMixnode, -}; -use nym_network_defaults::NymNetworkDetails; -use std::str::FromStr; - -#[cfg(all(feature = "signing", feature = "http-client"))] -use crate::nyxd::SigningNyxdClient; -#[cfg(all(feature = "signing", feature = "http-client"))] -use crate::signing::direct_wallet::DirectSecp256k1HdWallet; +use crate::{DirectSigningHttpRpcValidatorClient, HttpRpcClient, QueryHttpRpcValidatorClient}; #[must_use] #[derive(Debug, Clone)] @@ -44,13 +36,7 @@ pub struct Config { nyxd_url: Url, // TODO: until refactored, this is a dead field under some features - #[allow(dead_code)] nyxd_config: nyxd::Config, - - mixnode_page_limit: Option, - gateway_page_limit: Option, - mixnode_delegations_page_limit: Option, - rewarded_set_page_limit: Option, } impl Config { @@ -75,10 +61,6 @@ impl Config { .parse() .map_err(ValidatorClientError::MalformedUrlProvided)?, nyxd_config: nyxd::Config::try_from_nym_network_details(details)?, - mixnode_page_limit: None, - gateway_page_limit: None, - mixnode_delegations_page_limit: None, - rewarded_set_page_limit: None, }) } @@ -95,87 +77,57 @@ impl Config { self } - pub fn with_mixnode_page_limit(mut self, limit: Option) -> Config { - self.mixnode_page_limit = limit; - self - } - - pub fn with_gateway_page_limit(mut self, limit: Option) -> Config { - self.gateway_page_limit = limit; - self - } - - pub fn with_mixnode_delegations_page_limit(mut self, limit: Option) -> Config { - self.mixnode_delegations_page_limit = limit; - self - } - - pub fn with_rewarded_set_page_limit(mut self, limit: Option) -> Config { - self.rewarded_set_page_limit = limit; + pub fn with_simulated_gas_multiplier(mut self, gas_multiplier: f32) -> Self { + self.nyxd_config.simulated_gas_multiplier = gas_multiplier; self } } -pub struct Client { - mixnode_page_limit: Option, - gateway_page_limit: Option, - mixnode_delegations_page_limit: Option, - rewarded_set_page_limit: Option, - +pub struct Client { // ideally they would have been read-only, but unfortunately rust doesn't have such features pub nym_api: nym_api::Client, - pub nyxd: NyxdClient, + pub nyxd: NyxdClient, } -#[cfg(all(feature = "signing", feature = "http-client"))] -impl Client> { +#[cfg(feature = "http-client")] +impl Client { pub fn new_signing( config: Config, mnemonic: bip39::Mnemonic, - ) -> Result>, ValidatorClientError> { - let nym_api_client = nym_api::Client::new(config.api_url.clone()); - let nyxd_client = NyxdClient::connect_with_mnemonic( - config.nyxd_config.clone(), - config.nyxd_url.as_str(), - mnemonic, - None, - )?; + ) -> Result { + let rpc_client = HttpRpcClient::new(config.nyxd_url.as_str())?; + let prefix = &config.nyxd_config.chain_details.bech32_account_prefix; + let wallet = DirectSecp256k1HdWallet::from_mnemonic(prefix, mnemonic); - Ok(Client { - mixnode_page_limit: config.mixnode_page_limit, - gateway_page_limit: config.gateway_page_limit, - mixnode_delegations_page_limit: config.mixnode_delegations_page_limit, - rewarded_set_page_limit: config.rewarded_set_page_limit, - nym_api: nym_api_client, - nyxd: nyxd_client, - }) + Ok(Self::new_signing_with_rpc_client( + config, rpc_client, wallet, + )) } pub fn change_nyxd(&mut self, new_endpoint: Url) -> Result<(), ValidatorClientError> { self.nyxd.change_endpoint(new_endpoint.as_ref())?; Ok(()) } +} - pub fn set_nyxd_simulated_gas_multiplier(&mut self, multiplier: f32) { - self.nyxd.set_simulated_gas_multiplier(multiplier) +impl Client { + pub fn new_reqwest_signing( + config: Config, + mnemonic: bip39::Mnemonic, + ) -> DirectSigningReqwestRpcValidatorClient { + let rpc_client = ReqwestRpcClient::new(config.nyxd_url.clone()); + let prefix = &config.nyxd_config.chain_details.bech32_account_prefix; + let wallet = DirectSecp256k1HdWallet::from_mnemonic(prefix, mnemonic); + + Self::new_signing_with_rpc_client(config, rpc_client, wallet) } } #[cfg(feature = "http-client")] -impl Client { - pub fn new_query(config: Config) -> Result, ValidatorClientError> { - let nym_api_client = nym_api::Client::new(config.api_url.clone()); - let nyxd_client = - NyxdClient::connect(config.nyxd_config.clone(), config.nyxd_url.as_str())?; - - Ok(Client { - mixnode_page_limit: config.mixnode_page_limit, - gateway_page_limit: config.gateway_page_limit, - mixnode_delegations_page_limit: config.mixnode_delegations_page_limit, - rewarded_set_page_limit: config.rewarded_set_page_limit, - nym_api: nym_api_client, - nyxd: nyxd_client, - }) +impl Client { + pub fn new_query(config: Config) -> Result { + let rpc_client = HttpRpcClient::new(config.nyxd_url.as_str())?; + Ok(Self::new_with_rpc_client(config, rpc_client)) } pub fn change_nyxd(&mut self, new_endpoint: Url) -> Result<(), ValidatorClientError> { @@ -184,390 +136,40 @@ impl Client { } } -// nyxd wrappers +impl Client { + pub fn new_reqwest_query(config: Config) -> QueryReqwestRpcValidatorClient { + let rpc_client = ReqwestRpcClient::new(config.nyxd_url.clone()); + Self::new_with_rpc_client(config, rpc_client) + } +} + impl Client { - // use case: somebody initialised client without a contract in order to upload and initialise one - // and now they want to actually use it without making new client + pub fn new_with_rpc_client(config: Config, rpc_client: C) -> Self { + let nym_api_client = nym_api::Client::new(config.api_url.clone()); - pub fn set_mixnet_contract_address(&mut self, mixnet_contract_address: cosmrs::AccountId) { - self.nyxd - .set_mixnet_contract_address(mixnet_contract_address) - } - - pub fn get_mixnet_contract_address(&self) -> cosmrs::AccountId { - self.nyxd.mixnet_contract_address().clone() - } - - pub async fn get_all_node_families(&self) -> Result, ValidatorClientError> - where - C: CosmWasmClient + Sync + Send, - { - let mut families = Vec::new(); - let mut start_after = None; - - loop { - let paged_response = self - .nyxd - .get_all_node_families_paged(start_after.take(), None) - .await?; - families.extend(paged_response.families); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } + Client { + nym_api: nym_api_client, + nyxd: NyxdClient::new(config.nyxd_config, rpc_client), } - - Ok(families) } +} - pub async fn get_all_family_members( - &self, - ) -> Result, ValidatorClientError> +impl Client { + pub fn new_signing_with_rpc_client(config: Config, rpc_client: C, signer: S) -> Self where - C: CosmWasmClient + Sync + Send, + S: OfflineSigner, { - let mut members = Vec::new(); - let mut start_after = None; + let nym_api_client = nym_api::Client::new(config.api_url.clone()); - loop { - let paged_response = self - .nyxd - .get_all_family_members_paged(start_after.take(), None) - .await?; - members.extend(paged_response.members); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } + Client { + nym_api: nym_api_client, + nyxd: NyxdClient::new_signing(config.nyxd_config, rpc_client, signer), } - - Ok(members) - } - - // basically handles paging for us - pub async fn get_all_nyxd_rewarded_set_mixnodes( - &self, - ) -> Result, ValidatorClientError> - where - C: CosmWasmClient + Sync + Send, - { - let mut identities = Vec::new(); - let mut start_after = None; - - loop { - let mut paged_response = self - .nyxd - .get_rewarded_set_paged(start_after.take(), self.rewarded_set_page_limit) - .await?; - identities.append(&mut paged_response.nodes); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(identities) - } - - pub async fn get_all_nyxd_mixnode_bonds(&self) -> Result, ValidatorClientError> - where - C: CosmWasmClient + Sync + Send, - { - let mut mixnodes = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .nyxd - .get_mixnode_bonds_paged(self.mixnode_page_limit, start_after.take()) - .await?; - mixnodes.append(&mut paged_response.nodes); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(mixnodes) - } - - pub async fn get_all_nyxd_mixnodes_detailed( - &self, - ) -> Result, ValidatorClientError> - where - C: CosmWasmClient + Sync + Send, - { - let mut mixnodes = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .nyxd - .get_mixnodes_detailed_paged(self.mixnode_page_limit, start_after.take()) - .await?; - mixnodes.append(&mut paged_response.nodes); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(mixnodes) - } - - pub async fn get_all_nyxd_unbonded_mixnodes( - &self, - ) -> Result, ValidatorClientError> - where - C: CosmWasmClient + Sync + Send, - { - let mut mixnodes = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .nyxd - .get_unbonded_paged(self.mixnode_page_limit, start_after.take()) - .await?; - mixnodes.append(&mut paged_response.nodes); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(mixnodes) - } - - pub async fn get_all_nyxd_unbonded_mixnodes_by_owner( - &self, - owner: &cosmrs::AccountId, - ) -> Result, ValidatorClientError> - where - C: CosmWasmClient + Sync + Send, - { - let mut mixnodes = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .nyxd - .get_unbonded_by_owner_paged(owner, self.mixnode_page_limit, start_after.take()) - .await?; - mixnodes.append(&mut paged_response.nodes); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(mixnodes) - } - - pub async fn get_all_nyxd_unbonded_mixnodes_by_identity( - &self, - identity_key: String, - ) -> Result, ValidatorClientError> - where - C: CosmWasmClient + Sync + Send, - { - let mut mixnodes = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .nyxd - .get_unbonded_by_identity_paged( - identity_key.clone(), - self.mixnode_page_limit, - start_after.take(), - ) - .await?; - mixnodes.append(&mut paged_response.nodes); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(mixnodes) - } - - pub async fn get_all_nyxd_gateways(&self) -> Result, ValidatorClientError> - where - C: CosmWasmClient + Sync + Send, - { - let mut gateways = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .nyxd - .get_gateways_paged(start_after.take(), self.gateway_page_limit) - .await?; - gateways.append(&mut paged_response.nodes); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(gateways) - } - - pub async fn get_all_nyxd_single_mixnode_delegations( - &self, - mix_id: MixId, - ) -> Result, ValidatorClientError> - where - C: CosmWasmClient + Sync + Send, - { - let mut delegations = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .nyxd - .get_mixnode_delegations_paged( - mix_id, - start_after.take(), - self.mixnode_delegations_page_limit, - ) - .await?; - delegations.append(&mut paged_response.delegations); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(delegations) - } - - pub async fn get_all_delegator_delegations( - &self, - delegation_owner: &cosmrs::AccountId, - ) -> Result, ValidatorClientError> - where - C: CosmWasmClient + Sync + Send, - { - let mut delegations = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .nyxd - .get_delegator_delegations_paged( - delegation_owner.to_string(), - start_after.take(), - self.mixnode_delegations_page_limit, - ) - .await?; - delegations.append(&mut paged_response.delegations); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(delegations) - } - - pub async fn get_all_network_delegations(&self) -> Result, ValidatorClientError> - where - C: CosmWasmClient + Sync + Send, - { - let mut delegations = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .nyxd - .get_all_network_delegations_paged( - start_after.take(), - self.mixnode_delegations_page_limit, - ) - .await?; - delegations.append(&mut paged_response.delegations); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(delegations) - } - - pub async fn get_all_nyxd_pending_epoch_events( - &self, - ) -> Result, ValidatorClientError> - where - C: CosmWasmClient + Sync + Send, - { - let mut events = Vec::new(); - let mut start_after = None; - - loop { - let mut paged_response = self - .nyxd - .get_pending_epoch_events_paged(start_after.take(), self.rewarded_set_page_limit) - .await?; - events.append(&mut paged_response.events); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(events) - } - - pub async fn get_all_nyxd_pending_interval_events( - &self, - ) -> Result, ValidatorClientError> - where - C: CosmWasmClient + Sync + Send, - { - let mut events = Vec::new(); - let mut start_after = None; - - loop { - let mut paged_response = self - .nyxd - .get_pending_interval_events_paged(start_after.take(), self.rewarded_set_page_limit) - .await?; - events.append(&mut paged_response.events); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(events) } } // validator-api wrappers -impl Client { +impl Client { pub fn change_nym_api(&mut self, new_endpoint: Url) { self.nym_api.change_url(new_endpoint) } @@ -624,85 +226,42 @@ impl Client { } } -#[derive(Clone)] -pub struct CoconutApiClient { - pub api_client: NymApiClient, - pub verification_key: VerificationKey, - pub node_id: NodeIndex, - pub cosmos_address: cosmrs::AccountId, -} - -impl CoconutApiClient { - pub async fn all_coconut_api_clients( - client: &C, - epoch_id: EpochId, - ) -> Result, ValidatorClientError> - where - C: DkgQueryClient + Sync + Send, - { - Ok(client - .get_all_verification_key_shares(epoch_id) - .await? - .into_iter() - .filter_map(Self::try_from) - .collect()) - } - - fn try_from(share: ContractVKShare) -> Option { - if share.verified { - if let Ok(url_address) = Url::parse(&share.announce_address) { - if let Ok(verification_key) = VerificationKey::try_from_bs58(&share.share) { - if let Ok(cosmos_address) = cosmrs::AccountId::from_str(share.owner.as_str()) { - return Some(CoconutApiClient { - api_client: NymApiClient::new(url_address), - verification_key, - node_id: share.node_index, - cosmos_address, - }); - } - } - } - } - None - } -} - #[derive(Clone)] pub struct NymApiClient { - pub nym_api_client: nym_api::Client, + pub nym_api: nym_api::Client, // TODO: perhaps if we really need it at some (currently I don't see any reasons for it) // we could re-implement the communication with the REST API on port 1317 } impl NymApiClient { pub fn new(api_url: Url) -> Self { - let nym_api_client = nym_api::Client::new(api_url); + let nym_api = nym_api::Client::new(api_url); - NymApiClient { nym_api_client } + NymApiClient { nym_api } } pub fn change_nym_api(&mut self, new_endpoint: Url) { - self.nym_api_client.change_url(new_endpoint); + self.nym_api.change_url(new_endpoint); } pub async fn get_cached_active_mixnodes( &self, ) -> Result, ValidatorClientError> { - Ok(self.nym_api_client.get_active_mixnodes().await?) + Ok(self.nym_api.get_active_mixnodes().await?) } pub async fn get_cached_rewarded_mixnodes( &self, ) -> Result, ValidatorClientError> { - Ok(self.nym_api_client.get_rewarded_mixnodes().await?) + Ok(self.nym_api.get_rewarded_mixnodes().await?) } pub async fn get_cached_mixnodes(&self) -> Result, ValidatorClientError> { - Ok(self.nym_api_client.get_mixnodes().await?) + Ok(self.nym_api.get_mixnodes().await?) } pub async fn get_cached_gateways(&self) -> Result, ValidatorClientError> { - Ok(self.nym_api_client.get_gateways().await?) + Ok(self.nym_api.get_gateways().await?) } pub async fn get_gateway_core_status_count( @@ -711,7 +270,7 @@ impl NymApiClient { since: Option, ) -> Result { Ok(self - .nym_api_client + .nym_api .get_gateway_core_status_count(identity, since) .await?) } @@ -722,7 +281,7 @@ impl NymApiClient { since: Option, ) -> Result { Ok(self - .nym_api_client + .nym_api .get_mixnode_core_status_count(mix_id, since) .await?) } @@ -731,34 +290,28 @@ impl NymApiClient { &self, mix_id: MixId, ) -> Result { - Ok(self.nym_api_client.get_mixnode_status(mix_id).await?) + Ok(self.nym_api.get_mixnode_status(mix_id).await?) } pub async fn get_mixnode_reward_estimation( &self, mix_id: MixId, ) -> Result { - Ok(self - .nym_api_client - .get_mixnode_reward_estimation(mix_id) - .await?) + Ok(self.nym_api.get_mixnode_reward_estimation(mix_id).await?) } pub async fn get_mixnode_stake_saturation( &self, mix_id: MixId, ) -> Result { - Ok(self - .nym_api_client - .get_mixnode_stake_saturation(mix_id) - .await?) + Ok(self.nym_api.get_mixnode_stake_saturation(mix_id).await?) } pub async fn blind_sign( &self, request_body: &BlindSignRequestBody, ) -> Result { - Ok(self.nym_api_client.blind_sign(request_body).await?) + Ok(self.nym_api.blind_sign(request_body).await?) } pub async fn verify_bandwidth_credential( @@ -766,7 +319,7 @@ impl NymApiClient { request_body: &VerifyCredentialBody, ) -> Result { Ok(self - .nym_api_client + .nym_api .verify_bandwidth_credential(request_body) .await?) } diff --git a/common/client-libs/validator-client/src/coconut/mod.rs b/common/client-libs/validator-client/src/coconut/mod.rs new file mode 100644 index 0000000000..97ac95cad7 --- /dev/null +++ b/common/client-libs/validator-client/src/coconut/mod.rs @@ -0,0 +1,97 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::nyxd::contract_traits::{DkgQueryClient, PagedDkgQueryClient}; +use crate::nyxd::error::NyxdError; +use crate::NymApiClient; +use nym_coconut_dkg_common::types::{EpochId, NodeIndex}; +use nym_coconut_dkg_common::verification_key::ContractVKShare; +use nym_coconut_interface::{Base58, CoconutError, VerificationKey}; +use thiserror::Error; +use url::Url; + +// TODO: it really doesn't feel like this should live in this crate. +#[derive(Clone)] +pub struct CoconutApiClient { + pub api_client: NymApiClient, + pub verification_key: VerificationKey, + pub node_id: NodeIndex, + pub cosmos_address: cosmrs::AccountId, +} + +// TODO: this should be using the coconut error +// (which is in different crate; perhaps this client should be moved there?) + +#[derive(Debug, Error)] +pub enum CoconutApiError { + // TODO: ask @BN whether this is a correct error message + #[error("the provided key share hasn't been verified")] + UnverifiedShare, + + #[error("failed to query the contract: {source}")] + ContractQueryFailure { + #[from] + source: NyxdError, + }, + + #[error("the provided announce address is malformed: {source}")] + MalformedAnnounceAddress { + #[from] + source: url::ParseError, + }, + + #[error("the provided verification key is malformed: {source}")] + MalformedVerificationKey { + #[from] + source: CoconutError, + }, + + #[error("the provided account address is malformed: {source}")] + MalformedAccountAddress { + #[from] + source: cosmrs::ErrorReport, + }, +} + +impl TryFrom for CoconutApiClient { + type Error = CoconutApiError; + + fn try_from(share: ContractVKShare) -> Result { + if !share.verified { + return Err(CoconutApiError::UnverifiedShare); + } + + let url_address = Url::parse(&share.announce_address)?; + + Ok(CoconutApiClient { + api_client: NymApiClient::new(url_address), + verification_key: VerificationKey::try_from_bs58(&share.share)?, + node_id: share.node_index, + cosmos_address: share.owner.as_str().parse()?, + }) + } +} + +pub async fn all_coconut_api_clients( + client: &C, + epoch_id: EpochId, +) -> Result, CoconutApiError> +where + C: DkgQueryClient + Sync + Send, +{ + // TODO: this will error out if there's an invalid share out there. is that what we want? + client + .get_all_verification_key_shares(epoch_id) + .await? + .into_iter() + .map(TryInto::try_into) + .collect::, _>>() + + // ... if not, let's switch to the below: + // client + // .get_all_verification_key_shares(epoch_id) + // .await? + // .into_iter() + // .filter_map(TryInto::try_into) + // .collect::, _>>() +} diff --git a/common/client-libs/validator-client/src/connection_tester.rs b/common/client-libs/validator-client/src/connection_tester.rs index 800399d415..15d2efe250 100644 --- a/common/client-libs/validator-client/src/connection_tester.rs +++ b/common/client-libs/validator-client/src/connection_tester.rs @@ -1,8 +1,7 @@ +use crate::nyxd::contract_traits::MixnetQueryClient; use crate::nyxd::error::NyxdError; -use crate::nyxd::{Config as ClientConfig, NyxdClient, QueryNyxdClient}; -use crate::{NymApiClient, ValidatorClientError}; - -use crate::nyxd::traits::MixnetQueryClient; +use crate::nyxd::Config as ClientConfig; +use crate::{NymApiClient, QueryHttpRpcNyxdClient, ValidatorClientError}; use colored::Colorize; use core::fmt; use itertools::Itertools; @@ -53,7 +52,7 @@ pub async fn test_nyxd_url_connection( let config = ClientConfig::try_from_nym_network_details(&network) .expect("failed to create valid nyxd client config"); - let mut nyxd_client = NyxdClient::::connect(config, nyxd_url.as_str())?; + let mut nyxd_client = QueryHttpRpcNyxdClient::connect(config, nyxd_url.as_str())?; // possibly redundant, but lets just leave it here nyxd_client.set_mixnet_contract_address(address); match test_nyxd_connection(network, &nyxd_url, &nyxd_client).await { @@ -75,7 +74,7 @@ fn setup_connection_tests( let config = ClientConfig::try_from_nym_network_details(&network) .expect("failed to create valid nyxd client config"); - if let Ok(mut client) = NyxdClient::::connect(config, url.as_str()) { + if let Ok(mut client) = QueryHttpRpcNyxdClient::connect(config, url.as_str()) { // possibly redundant, but lets just leave it here client.set_mixnet_contract_address(address); Some(ClientForConnectionTest::Nyxd( @@ -112,7 +111,7 @@ fn extract_and_collect_results_into_map( async fn test_nyxd_connection( network: NymNetworkDetails, url: &Url, - client: &NyxdClient, + client: &QueryHttpRpcNyxdClient, ) -> ConnectionResult { let result = match timeout( Duration::from_secs(CONNECTION_TEST_TIMEOUT_SEC), @@ -186,7 +185,7 @@ async fn test_nym_api_connection( } enum ClientForConnectionTest { - Nyxd(NymNetworkDetails, Url, Box>), + Nyxd(NymNetworkDetails, Url, Box), Api(NymNetworkDetails, Url, NymApiClient), } diff --git a/common/client-libs/validator-client/src/error.rs b/common/client-libs/validator-client/src/error.rs index a675a27717..d439a86848 100644 --- a/common/client-libs/validator-client/src/error.rs +++ b/common/client-libs/validator-client/src/error.rs @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::nym_api; +pub use tendermint_rpc::error::Error as TendermintRpcError; use thiserror::Error; #[derive(Error, Debug)] @@ -12,6 +13,9 @@ pub enum ValidatorClientError { source: nym_api::error::NymAPIError, }, + #[error("Tendermint RPC request failure: {0}")] + TendermintErrorRpc(#[from] TendermintRpcError), + #[error("One of the provided URLs was malformed - {0}")] MalformedUrlProvided(#[from] url::ParseError), diff --git a/common/client-libs/validator-client/src/lib.rs b/common/client-libs/validator-client/src/lib.rs index ab0cff646e..c6391673a0 100644 --- a/common/client-libs/validator-client/src/lib.rs +++ b/common/client-libs/validator-client/src/lib.rs @@ -1,18 +1,44 @@ -// Copyright 2021 - Nym Technologies SA +// Copyright 2021-2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 pub mod client; +pub mod coconut; #[cfg(feature = "http-client")] pub mod connection_tester; pub mod error; pub mod nym_api; pub mod nyxd; - -#[cfg(feature = "signing")] +pub mod rpc; pub mod signing; pub use crate::error::ValidatorClientError; +pub use crate::rpc::reqwest::ReqwestRpcClient; +pub use crate::signing::direct_wallet::DirectSecp256k1HdWallet; pub use client::NymApiClient; +pub use client::{Client, CoconutApiClient, Config}; pub use nym_api_requests::*; -pub use client::{Client, CoconutApiClient, Config}; +#[cfg(feature = "http-client")] +pub use cosmrs::rpc::HttpClient as HttpRpcClient; + +// some type aliasing + +pub type ValidatorClient = Client; +pub type SigningValidatorClient = Client; + +#[cfg(feature = "http-client")] +pub type QueryHttpRpcValidatorClient = Client; +#[cfg(feature = "http-client")] +pub type QueryHttpRpcNyxdClient = nyxd::NyxdClient; + +#[cfg(feature = "http-client")] +pub type DirectSigningHttpRpcValidatorClient = Client; +#[cfg(feature = "http-client")] +pub type DirectSigningHttpRpcNyxdClient = nyxd::NyxdClient; + +pub type QueryReqwestRpcValidatorClient = Client; +pub type QueryReqwestRpcNyxdClient = nyxd::NyxdClient; + +pub type DirectSigningReqwestRpcValidatorClient = Client; +pub type DirectSigningReqwestRpcNyxdClient = + nyxd::NyxdClient; diff --git a/common/client-libs/validator-client/src/nym_api/mod.rs b/common/client-libs/validator-client/src/nym_api/mod.rs index 67b62decd9..a7d2f1c1c1 100644 --- a/common/client-libs/validator-client/src/nym_api/mod.rs +++ b/common/client-libs/validator-client/src/nym_api/mod.rs @@ -7,11 +7,11 @@ use nym_api_requests::coconut::{ BlindSignRequestBody, BlindedSignatureResponse, VerifyCredentialBody, VerifyCredentialResponse, }; use nym_api_requests::models::{ - ComputeRewardEstParam, GatewayCoreStatusResponse, GatewayStatusReportResponse, - GatewayUptimeHistoryResponse, InclusionProbabilityResponse, MixNodeBondAnnotated, - MixnodeCoreStatusResponse, MixnodeStatusReportResponse, MixnodeStatusResponse, - MixnodeUptimeHistoryResponse, RequestError, RewardEstimationResponse, StakeSaturationResponse, - UptimeResponse, + ComputeRewardEstParam, GatewayBondAnnotated, GatewayCoreStatusResponse, + GatewayStatusReportResponse, GatewayUptimeHistoryResponse, InclusionProbabilityResponse, + MixNodeBondAnnotated, MixnodeCoreStatusResponse, MixnodeStatusReportResponse, + MixnodeStatusResponse, MixnodeUptimeHistoryResponse, RequestError, RewardEstimationResponse, + StakeSaturationResponse, UptimeResponse, }; use nym_mixnet_contract_common::mixnode::MixNodeDetails; use nym_mixnet_contract_common::{GatewayBond, IdentityKeyRef, MixId}; @@ -148,6 +148,19 @@ impl Client { .await } + pub async fn get_gateways_detailed(&self) -> Result, NymAPIError> { + self.query_nym_api( + &[ + routes::API_VERSION, + routes::STATUS, + routes::GATEWAYS, + routes::DETAILED, + ], + NO_PARAMS, + ) + .await + } + pub async fn get_mixnodes_detailed_unfiltered( &self, ) -> Result, NymAPIError> { diff --git a/common/client-libs/validator-client/src/nyxd/contract_traits/coconut_bandwidth_query_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/coconut_bandwidth_query_client.rs new file mode 100644 index 0000000000..1737edf613 --- /dev/null +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/coconut_bandwidth_query_client.rs @@ -0,0 +1,100 @@ +// Copyright 2022-2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::collect_paged; +use crate::nyxd::contract_traits::NymContractsProvider; +use crate::nyxd::error::NyxdError; +use crate::nyxd::CosmWasmClient; +use async_trait::async_trait; +use nym_coconut_bandwidth_contract_common::msg::QueryMsg as CoconutBandwidthQueryMsg; +use nym_coconut_bandwidth_contract_common::spend_credential::{ + PagedSpendCredentialResponse, SpendCredential, SpendCredentialResponse, +}; +use serde::Deserialize; + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait CoconutBandwidthQueryClient { + async fn query_coconut_bandwidth_contract( + &self, + query: CoconutBandwidthQueryMsg, + ) -> Result + where + for<'a> T: Deserialize<'a>; + + async fn get_spent_credential( + &self, + blinded_serial_number: String, + ) -> Result { + self.query_coconut_bandwidth_contract(CoconutBandwidthQueryMsg::GetSpentCredential { + blinded_serial_number, + }) + .await + } + + async fn get_all_spent_credential_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_coconut_bandwidth_contract(CoconutBandwidthQueryMsg::GetAllSpentCredentials { + limit, + start_after, + }) + .await + } +} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait PagedCoconutBandwidthQueryClient: CoconutBandwidthQueryClient { + async fn get_all_spent_credentials(&self) -> Result, NyxdError> { + collect_paged!(self, get_all_spent_credential_paged, spend_credentials) + } +} + +#[async_trait] +impl PagedCoconutBandwidthQueryClient for T where T: CoconutBandwidthQueryClient {} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl CoconutBandwidthQueryClient for C +where + C: CosmWasmClient + NymContractsProvider + Send + Sync, +{ + async fn query_coconut_bandwidth_contract( + &self, + query: CoconutBandwidthQueryMsg, + ) -> Result + where + for<'a> T: Deserialize<'a>, + { + let coconut_bandwidth_contract_address = self + .coconut_bandwidth_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("coconut bandwidth contract"))?; + self.query_contract_smart(coconut_bandwidth_contract_address, &query) + .await + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::IgnoreValue; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_query_variants_are_covered( + client: C, + msg: CoconutBandwidthQueryMsg, + ) { + match msg { + CoconutBandwidthQueryMsg::GetSpentCredential { + blinded_serial_number, + } => client.get_spent_credential(blinded_serial_number).ignore(), + CoconutBandwidthQueryMsg::GetAllSpentCredentials { limit, start_after } => client + .get_all_spent_credential_paged(start_after, limit) + .ignore(), + }; + } +} diff --git a/common/client-libs/validator-client/src/nyxd/contract_traits/coconut_bandwidth_signing_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/coconut_bandwidth_signing_client.rs new file mode 100644 index 0000000000..030d78b29a --- /dev/null +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/coconut_bandwidth_signing_client.rs @@ -0,0 +1,153 @@ +// Copyright 2022 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::nyxd::contract_traits::NymContractsProvider; +use crate::nyxd::cosmwasm_client::types::ExecuteResult; +use crate::nyxd::error::NyxdError; +use crate::nyxd::{Coin, Fee, SigningCosmWasmClient}; +use crate::signing::signer::OfflineSigner; +use async_trait::async_trait; +use nym_coconut_bandwidth_contract_common::spend_credential::SpendCredentialData; +use nym_coconut_bandwidth_contract_common::{ + deposit::DepositData, msg::ExecuteMsg as CoconutBandwidthExecuteMsg, +}; + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait CoconutBandwidthSigningClient { + async fn execute_coconut_bandwidth_contract( + &self, + fee: Option, + msg: CoconutBandwidthExecuteMsg, + memo: String, + funds: Vec, + ) -> Result; + + async fn deposit( + &self, + amount: Coin, + info: String, + verification_key: String, + encryption_key: String, + fee: Option, + ) -> Result { + let req = CoconutBandwidthExecuteMsg::DepositFunds { + data: DepositData::new(info.to_string(), verification_key, encryption_key), + }; + self.execute_coconut_bandwidth_contract( + fee, + req, + "CoconutBandwidth::Deposit".to_string(), + vec![amount], + ) + .await + } + + async fn spend_credential( + &self, + funds: Coin, + blinded_serial_number: String, + gateway_cosmos_address: String, + fee: Option, + ) -> Result { + let req = CoconutBandwidthExecuteMsg::SpendCredential { + data: SpendCredentialData::new( + funds.into(), + blinded_serial_number, + gateway_cosmos_address, + ), + }; + self.execute_coconut_bandwidth_contract( + fee, + req, + "CoconutBandwidth::SpendCredential".to_string(), + vec![], + ) + .await + } + + async fn release_funds( + &self, + amount: Coin, + fee: Option, + ) -> Result { + self.execute_coconut_bandwidth_contract( + fee, + CoconutBandwidthExecuteMsg::ReleaseFunds { + funds: amount.into(), + }, + "CoconutBandwidth::ReleaseFunds".to_string(), + vec![], + ) + .await + } +} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl CoconutBandwidthSigningClient for C +where + C: SigningCosmWasmClient + NymContractsProvider + Sync, + NyxdError: From<::Error>, +{ + async fn execute_coconut_bandwidth_contract( + &self, + fee: Option, + msg: CoconutBandwidthExecuteMsg, + memo: String, + funds: Vec, + ) -> Result { + let coconut_bandwidth_contract_address = self + .coconut_bandwidth_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("coconut bandwidth contract"))?; + + let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier()))); + let signer_address = &self.signer_addresses()?[0]; + + self.execute( + signer_address, + coconut_bandwidth_contract_address, + &msg, + fee, + memo, + funds, + ) + .await + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::{mock_coin, IgnoreValue}; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_execute_variants_are_covered( + client: C, + msg: CoconutBandwidthExecuteMsg, + ) { + match msg { + CoconutBandwidthExecuteMsg::DepositFunds { data } => client + .deposit( + mock_coin(), + data.deposit_info().to_string(), + data.identity_key().to_string(), + data.encryption_key().to_string(), + None, + ) + .ignore(), + CoconutBandwidthExecuteMsg::SpendCredential { data } => client + .spend_credential( + mock_coin(), + data.blinded_serial_number().to_string(), + data.gateway_cosmos_address().to_string(), + None, + ) + .ignore(), + CoconutBandwidthExecuteMsg::ReleaseFunds { funds } => { + client.release_funds(funds.into(), None).ignore() + } + }; + } +} diff --git a/common/client-libs/validator-client/src/nyxd/contract_traits/dkg_query_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/dkg_query_client.rs new file mode 100644 index 0000000000..d3ac4807e8 --- /dev/null +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/dkg_query_client.rs @@ -0,0 +1,182 @@ +// Copyright 2022 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::collect_paged; +use crate::nyxd::contract_traits::NymContractsProvider; +use crate::nyxd::error::NyxdError; +use crate::nyxd::CosmWasmClient; +use async_trait::async_trait; +use cosmrs::AccountId; +use nym_coconut_dkg_common::dealer::{ + ContractDealing, DealerDetailsResponse, PagedDealerResponse, PagedDealingsResponse, +}; +use nym_coconut_dkg_common::msg::QueryMsg as DkgQueryMsg; +use nym_coconut_dkg_common::types::{DealerDetails, Epoch, EpochId, InitialReplacementData}; +use nym_coconut_dkg_common::verification_key::{ContractVKShare, PagedVKSharesResponse}; +use serde::Deserialize; + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait DkgQueryClient { + async fn query_dkg_contract(&self, query: DkgQueryMsg) -> Result + where + for<'a> T: Deserialize<'a>; + + async fn get_current_epoch(&self) -> Result { + let request = DkgQueryMsg::GetCurrentEpochState {}; + self.query_dkg_contract(request).await + } + async fn get_current_epoch_threshold(&self) -> Result, NyxdError> { + let request = DkgQueryMsg::GetCurrentEpochThreshold {}; + self.query_dkg_contract(request).await + } + + async fn get_initial_dealers(&self) -> Result, NyxdError> { + let request = DkgQueryMsg::GetInitialDealers {}; + self.query_dkg_contract(request).await + } + + async fn get_dealer_details( + &self, + address: &AccountId, + ) -> Result { + let request = DkgQueryMsg::GetDealerDetails { + dealer_address: address.to_string(), + }; + self.query_dkg_contract(request).await + } + + async fn get_current_dealers_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + let request = DkgQueryMsg::GetCurrentDealers { start_after, limit }; + self.query_dkg_contract(request).await + } + + async fn get_past_dealers_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + let request = DkgQueryMsg::GetPastDealers { start_after, limit }; + self.query_dkg_contract(request).await + } + + async fn get_dealings_paged( + &self, + idx: u64, + start_after: Option, + limit: Option, + ) -> Result { + let request = DkgQueryMsg::GetDealing { + idx, + limit, + start_after, + }; + self.query_dkg_contract(request).await + } + + async fn get_vk_shares_paged( + &self, + epoch_id: EpochId, + start_after: Option, + limit: Option, + ) -> Result { + let request = DkgQueryMsg::GetVerificationKeys { + epoch_id, + limit, + start_after, + }; + self.query_dkg_contract(request).await + } +} + +// extension trait to the query client to deal with the paged queries +// (it didn't feel appropriate to combine it with the existing trait +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait PagedDkgQueryClient: DkgQueryClient { + async fn get_all_current_dealers(&self) -> Result, NyxdError> { + collect_paged!(self, get_current_dealers_paged, dealers) + } + + async fn get_all_past_dealers(&self) -> Result, NyxdError> { + collect_paged!(self, get_past_dealers_paged, dealers) + } + + async fn get_all_epoch_dealings(&self, idx: u64) -> Result, NyxdError> { + collect_paged!(self, get_dealings_paged, dealings, idx) + } + + async fn get_all_verification_key_shares( + &self, + epoch_id: EpochId, + ) -> Result, NyxdError> { + collect_paged!(self, get_vk_shares_paged, shares, epoch_id) + } +} + +#[async_trait] +impl PagedDkgQueryClient for T where T: DkgQueryClient {} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl DkgQueryClient for C +where + C: CosmWasmClient + NymContractsProvider + Send + Sync, +{ + async fn query_dkg_contract(&self, query: DkgQueryMsg) -> Result + where + for<'a> T: Deserialize<'a>, + { + let dkg_contract_address = &self + .dkg_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("dkg contract"))?; + self.query_contract_smart(dkg_contract_address, &query) + .await + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::IgnoreValue; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_query_variants_are_covered( + client: C, + msg: DkgQueryMsg, + ) { + match msg { + DkgQueryMsg::GetCurrentEpochState {} => client.get_current_epoch().ignore(), + DkgQueryMsg::GetCurrentEpochThreshold {} => { + client.get_current_epoch_threshold().ignore() + } + DkgQueryMsg::GetInitialDealers {} => client.get_initial_dealers().ignore(), + DkgQueryMsg::GetDealerDetails { dealer_address } => client + .get_dealer_details(&dealer_address.parse().unwrap()) + .ignore(), + DkgQueryMsg::GetCurrentDealers { limit, start_after } => client + .get_current_dealers_paged(start_after, limit) + .ignore(), + DkgQueryMsg::GetPastDealers { limit, start_after } => { + client.get_past_dealers_paged(start_after, limit).ignore() + } + DkgQueryMsg::GetDealing { + idx, + limit, + start_after, + } => client.get_dealings_paged(idx, start_after, limit).ignore(), + DkgQueryMsg::GetVerificationKeys { + epoch_id, + limit, + start_after, + } => client + .get_vk_shares_paged(epoch_id, start_after, limit) + .ignore(), + }; + } +} diff --git a/common/client-libs/validator-client/src/nyxd/contract_traits/dkg_signing_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/dkg_signing_client.rs new file mode 100644 index 0000000000..73bce467b7 --- /dev/null +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/dkg_signing_client.rs @@ -0,0 +1,176 @@ +// Copyright 2022 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::nyxd::contract_traits::NymContractsProvider; +use crate::nyxd::cosmwasm_client::types::ExecuteResult; +use crate::nyxd::error::NyxdError; +use crate::nyxd::{Coin, Fee, SigningCosmWasmClient}; +use crate::signing::signer::OfflineSigner; +use async_trait::async_trait; +use cosmrs::AccountId; +use cosmwasm_std::Addr; +use nym_coconut_dkg_common::msg::ExecuteMsg as DkgExecuteMsg; +use nym_coconut_dkg_common::types::EncodedBTEPublicKeyWithProof; +use nym_coconut_dkg_common::verification_key::VerificationKeyShare; +use nym_contracts_common::dealings::ContractSafeBytes; + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait DkgSigningClient { + async fn execute_dkg_contract( + &self, + fee: Option, + msg: DkgExecuteMsg, + memo: String, + funds: Vec, + ) -> Result; + + async fn advance_dkg_epoch_state(&self, fee: Option) -> Result { + let req = DkgExecuteMsg::AdvanceEpochState {}; + + self.execute_dkg_contract(fee, req, "advancing DKG state".to_string(), vec![]) + .await + } + + async fn surpass_threshold(&self, fee: Option) -> Result { + let req = DkgExecuteMsg::SurpassedThreshold {}; + + self.execute_dkg_contract(fee, req, "surpass DKG threshold".to_string(), vec![]) + .await + } + + async fn register_dealer( + &self, + bte_key: EncodedBTEPublicKeyWithProof, + announce_address: String, + resharing: bool, + fee: Option, + ) -> Result { + let req = DkgExecuteMsg::RegisterDealer { + bte_key_with_proof: bte_key, + announce_address, + resharing, + }; + + self.execute_dkg_contract(fee, req, "registering as a dealer".to_string(), vec![]) + .await + } + + async fn submit_dealing_bytes( + &self, + dealing_bytes: ContractSafeBytes, + resharing: bool, + fee: Option, + ) -> Result { + let req = DkgExecuteMsg::CommitDealing { + dealing_bytes, + resharing, + }; + + self.execute_dkg_contract(fee, req, "dealing commitment".to_string(), vec![]) + .await + } + + async fn submit_verification_key_share( + &self, + share: VerificationKeyShare, + resharing: bool, + fee: Option, + ) -> Result { + let req = DkgExecuteMsg::CommitVerificationKeyShare { share, resharing }; + + self.execute_dkg_contract( + fee, + req, + "verification key share commitment".to_string(), + vec![], + ) + .await + } + + async fn verify_verification_key_share( + &self, + owner: &AccountId, + resharing: bool, + fee: Option, + ) -> Result { + // the call to unchecked is fine as we're converting from pre-validated `AccountId` + let owner = Addr::unchecked(owner.to_string()); + let req = DkgExecuteMsg::VerifyVerificationKeyShare { owner, resharing }; + + self.execute_dkg_contract( + fee, + req, + "verification key VerifyVerificationKeyShare".to_string(), + vec![], + ) + .await + } +} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl DkgSigningClient for C +where + C: SigningCosmWasmClient + NymContractsProvider + Sync, + NyxdError: From<::Error>, +{ + async fn execute_dkg_contract( + &self, + fee: Option, + msg: DkgExecuteMsg, + memo: String, + funds: Vec, + ) -> Result { + let dkg_contract_address = self + .dkg_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("dkg contract"))?; + + let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier()))); + let signer_address = &self.signer_addresses()?[0]; + + self.execute(signer_address, dkg_contract_address, &msg, fee, memo, funds) + .await + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::IgnoreValue; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_execute_variants_are_covered( + client: C, + msg: DkgExecuteMsg, + ) { + match msg { + DkgExecuteMsg::RegisterDealer { + bte_key_with_proof, + announce_address, + resharing, + } => client + .register_dealer(bte_key_with_proof, announce_address, resharing, None) + .ignore(), + DkgExecuteMsg::CommitDealing { + dealing_bytes, + resharing, + } => client + .submit_dealing_bytes(dealing_bytes, resharing, None) + .ignore(), + DkgExecuteMsg::CommitVerificationKeyShare { share, resharing } => client + .submit_verification_key_share(share, resharing, None) + .ignore(), + DkgExecuteMsg::VerifyVerificationKeyShare { owner, resharing } => client + .verify_verification_key_share( + &owner.into_string().parse().unwrap(), + resharing, + None, + ) + .ignore(), + DkgExecuteMsg::SurpassedThreshold {} => client.surpass_threshold(None).ignore(), + DkgExecuteMsg::AdvanceEpochState {} => client.advance_dkg_epoch_state(None).ignore(), + }; + } +} diff --git a/common/client-libs/validator-client/src/nyxd/contract_traits/group_query_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/group_query_client.rs new file mode 100644 index 0000000000..8513dfa5bb --- /dev/null +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/group_query_client.rs @@ -0,0 +1,118 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::nyxd::contract_traits::NymContractsProvider; +use crate::nyxd::error::NyxdError; +use crate::nyxd::CosmWasmClient; +use async_trait::async_trait; +use cw4::{Member, MemberListResponse, MemberResponse, TotalWeightResponse}; +use nym_group_contract_common::msg::QueryMsg as GroupQueryMsg; +use serde::Deserialize; + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait GroupQueryClient { + async fn query_group_contract(&self, query: GroupQueryMsg) -> Result + where + for<'a> T: Deserialize<'a>; + + async fn admin(&self) -> Result { + self.query_group_contract(GroupQueryMsg::Admin {}).await + } + + async fn total_weight(&self, at_height: Option) -> Result { + self.query_group_contract(GroupQueryMsg::TotalWeight { at_height }) + .await + } + + async fn list_members_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_group_contract(GroupQueryMsg::ListMembers { start_after, limit }) + .await + } + + async fn member( + &self, + addr: String, + at_height: Option, + ) -> Result { + self.query_group_contract(GroupQueryMsg::Member { addr, at_height }) + .await + } + + async fn hooks(&self) -> Result { + self.query_group_contract(GroupQueryMsg::Hooks {}).await + } +} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait PagedGroupQueryClient: GroupQueryClient { + // can't use the macro due to different paging behaviour + async fn get_all_members(&self) -> Result, NyxdError> { + let mut members = Vec::new(); + let mut start_after = None; + + loop { + let mut paged_response = self.list_members_paged(start_after.take(), None).await?; + + let last_id = paged_response.members.last().map(|mem| mem.addr.clone()); + members.append(&mut paged_response.members); + + if let Some(start_after_res) = last_id { + start_after = Some(start_after_res) + } else { + break; + } + } + + Ok(members) + } +} + +#[async_trait] +impl PagedGroupQueryClient for T where T: GroupQueryClient {} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl GroupQueryClient for C +where + C: CosmWasmClient + NymContractsProvider + Send + Sync, +{ + async fn query_group_contract(&self, query: GroupQueryMsg) -> Result + where + for<'a> T: Deserialize<'a>, + { + let group_contract_address = &self + .group_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("group contract"))?; + self.query_contract_smart(group_contract_address, &query) + .await + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::IgnoreValue; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_query_variants_are_covered( + client: C, + msg: GroupQueryMsg, + ) { + match msg { + GroupQueryMsg::Admin {} => client.admin().ignore(), + GroupQueryMsg::TotalWeight { at_height } => client.total_weight(at_height).ignore(), + GroupQueryMsg::ListMembers { start_after, limit } => { + client.list_members_paged(start_after, limit).ignore() + } + GroupQueryMsg::Member { addr, at_height } => client.member(addr, at_height).ignore(), + GroupQueryMsg::Hooks {} => client.hooks().ignore(), + }; + } +} diff --git a/common/client-libs/validator-client/src/nyxd/contract_traits/group_signing_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/group_signing_client.rs new file mode 100644 index 0000000000..5ac1954849 --- /dev/null +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/group_signing_client.rs @@ -0,0 +1,131 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::nyxd::contract_traits::NymContractsProvider; +use crate::nyxd::cosmwasm_client::types::ExecuteResult; +use crate::nyxd::error::NyxdError; +use crate::nyxd::{Coin, Fee, SigningCosmWasmClient}; +use crate::signing::signer::OfflineSigner; +use async_trait::async_trait; +use cw4::Member; +use nym_group_contract_common::msg::ExecuteMsg as GroupExecuteMsg; + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait GroupSigningClient { + async fn execute_group_contract( + &self, + fee: Option, + msg: GroupExecuteMsg, + memo: String, + funds: Vec, + ) -> Result; + + async fn update_admin( + &self, + admin: Option, + fee: Option, + ) -> Result { + self.execute_group_contract( + fee, + GroupExecuteMsg::UpdateAdmin { admin }, + "GroupExecuteMsg::UpdateAdmin".to_string(), + vec![], + ) + .await + } + + async fn update_members( + &self, + add: Vec, + remove: Vec, + fee: Option, + ) -> Result { + self.execute_group_contract( + fee, + GroupExecuteMsg::UpdateMembers { add, remove }, + "GroupExecuteMsg::UpdateMembers".to_string(), + vec![], + ) + .await + } + + async fn add_hook(&self, addr: String, fee: Option) -> Result { + self.execute_group_contract( + fee, + GroupExecuteMsg::AddHook { addr }, + "GroupExecuteMsg::AddHook".to_string(), + vec![], + ) + .await + } + + async fn remove_hook( + &self, + addr: String, + fee: Option, + ) -> Result { + self.execute_group_contract( + fee, + GroupExecuteMsg::RemoveHook { addr }, + "GroupExecuteMsg::RemoveHook".to_string(), + vec![], + ) + .await + } +} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl GroupSigningClient for C +where + C: SigningCosmWasmClient + NymContractsProvider + Sync, + NyxdError: From<::Error>, +{ + async fn execute_group_contract( + &self, + fee: Option, + msg: GroupExecuteMsg, + memo: String, + funds: Vec, + ) -> Result { + let group_contract_address = self + .group_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("group contract"))?; + + let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier()))); + + let signer_address = &self.signer_addresses()?[0]; + self.execute( + signer_address, + group_contract_address, + &msg, + fee, + memo, + funds, + ) + .await + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::IgnoreValue; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_execute_variants_are_covered( + client: C, + msg: GroupExecuteMsg, + ) { + match msg { + GroupExecuteMsg::UpdateAdmin { admin } => client.update_admin(admin, None).ignore(), + GroupExecuteMsg::UpdateMembers { remove, add } => { + client.update_members(add, remove, None).ignore() + } + GroupExecuteMsg::AddHook { addr } => client.add_hook(addr, None).ignore(), + GroupExecuteMsg::RemoveHook { addr } => client.remove_hook(addr, None).ignore(), + }; + } +} diff --git a/common/client-libs/validator-client/src/nyxd/contract_traits/mixnet_query_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/mixnet_query_client.rs new file mode 100644 index 0000000000..95d692d592 --- /dev/null +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/mixnet_query_client.rs @@ -0,0 +1,745 @@ +// Copyright 2022-2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::collect_paged; +use crate::nyxd::contract_traits::NymContractsProvider; +use crate::nyxd::error::NyxdError; +use crate::nyxd::CosmWasmClient; +use async_trait::async_trait; +use cosmrs::AccountId; +use nym_contracts_common::signing::Nonce; +use nym_mixnet_contract_common::{ + delegation, + delegation::{MixNodeDelegationResponse, OwnerProxySubKey}, + families::{Family, FamilyHead}, + mixnode::{ + MixnodeRewardingDetailsResponse, PagedMixnodesDetailsResponse, + PagedUnbondedMixnodesResponse, StakeSaturationResponse, UnbondedMixnodeResponse, + }, + reward_params::{Performance, RewardingParams}, + rewarding::{EstimatedCurrentEpochRewardResponse, PendingRewardResponse}, + ContractBuildInformation, ContractState, ContractStateParams, CurrentIntervalResponse, + Delegation, EpochEventId, EpochStatus, FamilyByHeadResponse, FamilyByLabelResponse, + FamilyMembersByHeadResponse, FamilyMembersByLabelResponse, GatewayBond, GatewayBondResponse, + GatewayOwnershipResponse, IdentityKey, IdentityKeyRef, IntervalEventId, LayerDistribution, + MixId, MixNodeBond, MixNodeDetails, MixOwnershipResponse, MixnodeDetailsByIdentityResponse, + MixnodeDetailsResponse, NumberOfPendingEventsResponse, PagedAllDelegationsResponse, + PagedDelegatorDelegationsResponse, PagedFamiliesResponse, PagedGatewayResponse, + PagedMembersResponse, PagedMixNodeDelegationsResponse, PagedMixnodeBondsResponse, + PagedRewardedSetResponse, PendingEpochEvent, PendingEpochEventResponse, + PendingEpochEventsResponse, PendingIntervalEvent, PendingIntervalEventResponse, + PendingIntervalEventsResponse, QueryMsg as MixnetQueryMsg, RewardedSetNodeStatus, + UnbondedMixnode, +}; +use serde::Deserialize; + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait MixnetQueryClient { + async fn query_mixnet_contract(&self, query: MixnetQueryMsg) -> Result + where + for<'a> T: Deserialize<'a>; + + // state/sys-params-related + + async fn get_mixnet_contract_version(&self) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetContractVersion {}) + .await + } + + async fn get_mixnet_contract_cw2_version(&self) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetCW2ContractVersion {}) + .await + } + + async fn get_rewarding_validator_address(&self) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetRewardingValidatorAddress {}) + .await + } + + async fn get_mixnet_contract_settings(&self) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetStateParams {}) + .await + } + + async fn get_mixnet_contract_state_params(&self) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetStateParams {}) + .await + } + + async fn get_mixnet_contract_state(&self) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetState {}) + .await + } + + async fn get_rewarding_parameters(&self) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetRewardingParams {}) + .await + } + + async fn get_current_epoch_status(&self) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetEpochStatus {}) + .await + } + + async fn get_current_interval_details(&self) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetCurrentIntervalDetails {}) + .await + } + + async fn get_rewarded_set_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetRewardedSet { limit, start_after }) + .await + } + + async fn get_all_node_families_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetAllFamiliesPaged { limit, start_after }) + .await + } + + async fn get_all_family_members_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetAllMembersPaged { limit, start_after }) + .await + } + + async fn get_family_members_by_head + Send>( + &self, + head: S, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetFamilyMembersByHead { head: head.into() }) + .await + } + + async fn get_family_members_by_label + Send>( + &self, + label: S, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetFamilyMembersByLabel { + label: label.into(), + }) + .await + } + + // mixnode-related: + + async fn get_mixnode_bonds_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetMixNodeBonds { limit, start_after }) + .await + } + + async fn get_mixnodes_detailed_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetMixNodesDetailed { limit, start_after }) + .await + } + + async fn get_unbonded_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetUnbondedMixNodes { limit, start_after }) + .await + } + + async fn get_unbonded_by_owner_paged( + &self, + owner: &AccountId, + start_after: Option, + limit: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetUnbondedMixNodesByOwner { + owner: owner.to_string(), + limit, + start_after, + }) + .await + } + + async fn get_unbonded_by_identity_paged( + &self, + identity_key: IdentityKeyRef<'_>, + start_after: Option, + limit: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetUnbondedMixNodesByIdentityKey { + identity_key: identity_key.to_string(), + limit, + start_after, + }) + .await + } + + async fn get_owned_mixnode( + &self, + address: &AccountId, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetOwnedMixnode { + address: address.to_string(), + }) + .await + } + + async fn get_mixnode_details( + &self, + mix_id: MixId, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetMixnodeDetails { mix_id }) + .await + } + + async fn get_mixnode_details_by_identity( + &self, + mix_identity: IdentityKey, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetBondedMixnodeDetailsByIdentity { + mix_identity, + }) + .await + } + + async fn get_mixnode_rewarding_details( + &self, + mix_id: MixId, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetMixnodeRewardingDetails { mix_id }) + .await + } + + async fn get_mixnode_stake_saturation( + &self, + mix_id: MixId, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetStakeSaturation { mix_id }) + .await + } + + async fn get_unbonded_mixnode_information( + &self, + mix_id: MixId, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetUnbondedMixNodeInformation { mix_id }) + .await + } + + async fn get_layer_distribution(&self) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetLayerDistribution {}) + .await + } + + // gateway-related: + + async fn get_gateways_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetGateways { start_after, limit }) + .await + } + + /// Checks whether there is a bonded gateway associated with the provided identity key + async fn get_gateway_bond( + &self, + identity: IdentityKey, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetGatewayBond { identity }) + .await + } + + /// Checks whether there is a bonded gateway associated with the provided client's address + async fn get_owned_gateway( + &self, + address: &AccountId, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetOwnedGateway { + address: address.to_string(), + }) + .await + } + + // delegation-related: + + /// Gets list of all delegations towards particular mixnode on particular page. + async fn get_mixnode_delegations_paged( + &self, + mix_id: MixId, + start_after: Option, + limit: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetMixnodeDelegations { + mix_id, + start_after, + limit, + }) + .await + } + + /// Gets list of all the mixnodes to which a particular address delegated. + async fn get_delegator_delegations_paged( + &self, + delegator: &AccountId, + start_after: Option<(MixId, OwnerProxySubKey)>, + limit: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetDelegatorDelegations { + delegator: delegator.to_string(), + start_after, + limit, + }) + .await + } + + /// Checks value of delegation of given client towards particular mixnode. + async fn get_delegation_details( + &self, + mix_id: MixId, + delegator: &AccountId, + proxy: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetDelegationDetails { + mix_id, + delegator: delegator.to_string(), + proxy, + }) + .await + } + + /// Gets all the delegations on the entire network + async fn get_all_network_delegations_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetAllDelegations { start_after, limit }) + .await + } + + // rewards related + async fn get_pending_operator_reward( + &self, + operator: &AccountId, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetPendingOperatorReward { + address: operator.to_string(), + }) + .await + } + + async fn get_pending_mixnode_operator_reward( + &self, + mix_id: MixId, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetPendingMixNodeOperatorReward { mix_id }) + .await + } + + async fn get_pending_delegator_reward( + &self, + delegator: &AccountId, + mix_id: MixId, + proxy: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetPendingDelegatorReward { + address: delegator.to_string(), + mix_id, + proxy, + }) + .await + } + + // given the provided performance, estimate the reward at the end of the current epoch + async fn get_estimated_current_epoch_operator_reward( + &self, + mix_id: MixId, + estimated_performance: Performance, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetEstimatedCurrentEpochOperatorReward { + mix_id, + estimated_performance, + }) + .await + } + + // given the provided performance, estimate the reward at the end of the current epoch + async fn get_estimated_current_epoch_delegator_reward( + &self, + delegator: &AccountId, + mix_id: MixId, + proxy: Option, + estimated_performance: Performance, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetEstimatedCurrentEpochDelegatorReward { + address: delegator.to_string(), + mix_id, + proxy, + estimated_performance, + }) + .await + } + + // interval-related + + async fn get_pending_epoch_events_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetPendingEpochEvents { start_after, limit }) + .await + } + + async fn get_pending_interval_events_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetPendingIntervalEvents { start_after, limit }) + .await + } + + async fn get_pending_epoch_event( + &self, + event_id: EpochEventId, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetPendingEpochEvent { event_id }) + .await + } + + async fn get_pending_interval_event( + &self, + event_id: IntervalEventId, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetPendingIntervalEvent { event_id }) + .await + } + + async fn get_number_of_pending_events( + &self, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetNumberOfPendingEvents {}) + .await + } + + async fn get_signing_nonce(&self, address: &AccountId) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetSigningNonce { + address: address.to_string(), + }) + .await + } + + async fn get_node_family_by_label( + &self, + label: String, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetFamilyByLabel { label }) + .await + } + + async fn get_node_family_by_head( + &self, + head: String, + ) -> Result { + self.query_mixnet_contract(MixnetQueryMsg::GetFamilyByHead { head }) + .await + } +} + +// extension trait to the query client to deal with the paged queries +// (it didn't feel appropriate to combine it with the existing trait +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait PagedMixnetQueryClient: MixnetQueryClient { + async fn get_all_node_families(&self) -> Result, NyxdError> { + collect_paged!(self, get_all_node_families_paged, families) + } + + async fn get_all_family_members(&self) -> Result, NyxdError> { + collect_paged!(self, get_all_family_members_paged, members) + } + + async fn get_all_rewarded_set_mixnodes( + &self, + ) -> Result, NyxdError> { + collect_paged!(self, get_rewarded_set_paged, nodes) + } + + async fn get_all_mixnode_bonds(&self) -> Result, NyxdError> { + collect_paged!(self, get_mixnode_bonds_paged, nodes) + } + + async fn get_all_mixnodes_detailed(&self) -> Result, NyxdError> { + collect_paged!(self, get_mixnodes_detailed_paged, nodes) + } + + async fn get_all_unbonded_mixnodes(&self) -> Result, NyxdError> { + collect_paged!(self, get_unbonded_paged, nodes) + } + + async fn get_all_unbonded_mixnodes_by_owner( + &self, + owner: &AccountId, + ) -> Result, NyxdError> { + collect_paged!(self, get_unbonded_by_owner_paged, nodes, owner) + } + + async fn get_all_unbonded_mixnodes_by_identity( + &self, + identity_key: IdentityKeyRef<'_>, + ) -> Result, NyxdError> { + collect_paged!(self, get_unbonded_by_identity_paged, nodes, identity_key) + } + + async fn get_all_gateways(&self) -> Result, NyxdError> { + collect_paged!(self, get_gateways_paged, nodes) + } + + async fn get_all_single_mixnode_delegations( + &self, + mix_id: MixId, + ) -> Result, NyxdError> { + collect_paged!(self, get_mixnode_delegations_paged, delegations, mix_id) + } + + async fn get_all_delegator_delegations( + &self, + delegation_owner: &AccountId, + ) -> Result, NyxdError> { + collect_paged!( + self, + get_delegator_delegations_paged, + delegations, + delegation_owner + ) + } + + async fn get_all_network_delegations(&self) -> Result, NyxdError> { + collect_paged!(self, get_all_network_delegations_paged, delegations) + } + + async fn get_all_pending_epoch_events(&self) -> Result, NyxdError> { + collect_paged!(self, get_pending_epoch_events_paged, events) + } + + async fn get_all_pending_interval_events( + &self, + ) -> Result, NyxdError> { + collect_paged!(self, get_pending_interval_events_paged, events) + } +} + +#[async_trait] +impl PagedMixnetQueryClient for T where T: MixnetQueryClient {} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl MixnetQueryClient for C +where + C: CosmWasmClient + NymContractsProvider + Send + Sync, +{ + async fn query_mixnet_contract(&self, query: MixnetQueryMsg) -> Result + where + for<'a> T: Deserialize<'a>, + { + let mixnet_contract_address = &self + .mixnet_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("mixnet contract"))?; + self.query_contract_smart(mixnet_contract_address, &query) + .await + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::IgnoreValue; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_query_variants_are_covered( + client: C, + msg: MixnetQueryMsg, + ) -> u32 { + match msg { + MixnetQueryMsg::GetAllFamiliesPaged { limit, start_after } => client + .get_all_family_members_paged(start_after, limit) + .ignore(), + MixnetQueryMsg::GetAllMembersPaged { limit, start_after } => client + .get_all_family_members_paged(start_after, limit) + .ignore(), + MixnetQueryMsg::GetFamilyByHead { head } => { + client.get_node_family_by_head(head).ignore() + } + MixnetQueryMsg::GetFamilyByLabel { label } => { + client.get_node_family_by_label(label).ignore() + } + MixnetQueryMsg::GetFamilyMembersByHead { head } => { + client.get_family_members_by_head(head).ignore() + } + MixnetQueryMsg::GetFamilyMembersByLabel { label } => { + client.get_family_members_by_label(label).ignore() + } + MixnetQueryMsg::GetContractVersion {} => client.get_mixnet_contract_version().ignore(), + MixnetQueryMsg::GetCW2ContractVersion {} => { + client.get_mixnet_contract_cw2_version().ignore() + } + MixnetQueryMsg::GetRewardingValidatorAddress {} => { + client.get_rewarding_validator_address().ignore() + } + MixnetQueryMsg::GetStateParams {} => client.get_mixnet_contract_state_params().ignore(), + MixnetQueryMsg::GetState {} => client.get_mixnet_contract_state().ignore(), + MixnetQueryMsg::GetRewardingParams {} => client.get_rewarding_parameters().ignore(), + MixnetQueryMsg::GetEpochStatus {} => client.get_current_epoch_status().ignore(), + MixnetQueryMsg::GetCurrentIntervalDetails {} => { + client.get_current_interval_details().ignore() + } + MixnetQueryMsg::GetRewardedSet { limit, start_after } => { + client.get_rewarded_set_paged(start_after, limit).ignore() + } + MixnetQueryMsg::GetMixNodeBonds { limit, start_after } => { + client.get_mixnode_bonds_paged(start_after, limit).ignore() + } + MixnetQueryMsg::GetMixNodesDetailed { limit, start_after } => client + .get_mixnodes_detailed_paged(start_after, limit) + .ignore(), + MixnetQueryMsg::GetUnbondedMixNodes { limit, start_after } => { + client.get_unbonded_paged(start_after, limit).ignore() + } + MixnetQueryMsg::GetUnbondedMixNodesByOwner { + owner, + limit, + start_after, + } => client + .get_unbonded_by_owner_paged(&owner.parse().unwrap(), start_after, limit) + .ignore(), + MixnetQueryMsg::GetUnbondedMixNodesByIdentityKey { + identity_key, + limit, + start_after, + } => client + .get_unbonded_by_identity_paged(&identity_key, start_after, limit) + .ignore(), + MixnetQueryMsg::GetOwnedMixnode { address } => { + client.get_owned_mixnode(&address.parse().unwrap()).ignore() + } + MixnetQueryMsg::GetMixnodeDetails { mix_id } => { + client.get_mixnode_details(mix_id).ignore() + } + MixnetQueryMsg::GetMixnodeRewardingDetails { mix_id } => { + client.get_mixnode_rewarding_details(mix_id).ignore() + } + MixnetQueryMsg::GetStakeSaturation { mix_id } => { + client.get_mixnode_stake_saturation(mix_id).ignore() + } + MixnetQueryMsg::GetUnbondedMixNodeInformation { mix_id } => { + client.get_unbonded_mixnode_information(mix_id).ignore() + } + MixnetQueryMsg::GetBondedMixnodeDetailsByIdentity { mix_identity } => client + .get_mixnode_details_by_identity(mix_identity) + .ignore(), + MixnetQueryMsg::GetLayerDistribution {} => client.get_layer_distribution().ignore(), + MixnetQueryMsg::GetGateways { start_after, limit } => { + client.get_gateways_paged(start_after, limit).ignore() + } + MixnetQueryMsg::GetGatewayBond { identity } => { + client.get_gateway_bond(identity).ignore() + } + MixnetQueryMsg::GetOwnedGateway { address } => { + client.get_owned_gateway(&address.parse().unwrap()).ignore() + } + MixnetQueryMsg::GetMixnodeDelegations { + mix_id, + start_after, + limit, + } => client + .get_mixnode_delegations_paged(mix_id, start_after, limit) + .ignore(), + MixnetQueryMsg::GetDelegatorDelegations { + delegator, + start_after, + limit, + } => client + .get_delegator_delegations_paged(&delegator.parse().unwrap(), start_after, limit) + .ignore(), + MixnetQueryMsg::GetDelegationDetails { + mix_id, + delegator, + proxy, + } => client + .get_delegation_details(mix_id, &delegator.parse().unwrap(), proxy) + .ignore(), + MixnetQueryMsg::GetAllDelegations { start_after, limit } => client + .get_all_network_delegations_paged(start_after, limit) + .ignore(), + MixnetQueryMsg::GetPendingOperatorReward { address } => client + .get_pending_operator_reward(&address.parse().unwrap()) + .ignore(), + MixnetQueryMsg::GetPendingMixNodeOperatorReward { mix_id } => { + client.get_pending_mixnode_operator_reward(mix_id).ignore() + } + MixnetQueryMsg::GetPendingDelegatorReward { + address, + mix_id, + proxy, + } => client + .get_pending_delegator_reward(&address.parse().unwrap(), mix_id, proxy) + .ignore(), + MixnetQueryMsg::GetEstimatedCurrentEpochOperatorReward { + mix_id, + estimated_performance, + } => client + .get_estimated_current_epoch_operator_reward(mix_id, estimated_performance) + .ignore(), + MixnetQueryMsg::GetEstimatedCurrentEpochDelegatorReward { + address, + mix_id, + proxy, + estimated_performance, + } => client + .get_estimated_current_epoch_delegator_reward( + &address.parse().unwrap(), + mix_id, + proxy, + estimated_performance, + ) + .ignore(), + MixnetQueryMsg::GetPendingEpochEvents { limit, start_after } => client + .get_pending_epoch_events_paged(start_after, limit) + .ignore(), + MixnetQueryMsg::GetPendingIntervalEvents { limit, start_after } => client + .get_pending_interval_events_paged(start_after, limit) + .ignore(), + MixnetQueryMsg::GetPendingEpochEvent { event_id } => { + client.get_pending_epoch_event(event_id).ignore() + } + MixnetQueryMsg::GetPendingIntervalEvent { event_id } => { + client.get_pending_interval_event(event_id).ignore() + } + MixnetQueryMsg::GetNumberOfPendingEvents {} => { + client.get_number_of_pending_events().ignore() + } + MixnetQueryMsg::GetSigningNonce { address } => { + client.get_signing_nonce(&address.parse().unwrap()).ignore() + } + } + } +} diff --git a/common/client-libs/validator-client/src/nyxd/traits/mixnet_signing_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/mixnet_signing_client.rs similarity index 62% rename from common/client-libs/validator-client/src/nyxd/traits/mixnet_signing_client.rs rename to common/client-libs/validator-client/src/nyxd/contract_traits/mixnet_signing_client.rs index 49fc651d5d..f8b5521e0d 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/mixnet_signing_client.rs +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/mixnet_signing_client.rs @@ -2,10 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 use crate::nyxd::coin::Coin; -pub use crate::nyxd::cosmwasm_client::client::CosmWasmClient; +use crate::nyxd::contract_traits::NymContractsProvider; use crate::nyxd::cosmwasm_client::types::ExecuteResult; use crate::nyxd::error::NyxdError; -use crate::nyxd::{Fee, NyxdClient, SigningCosmWasmClient}; +use crate::nyxd::{Fee, SigningCosmWasmClient}; +use crate::signing::signer::OfflineSigner; use async_trait::async_trait; use cosmrs::AccountId; use nym_contracts_common::signing::MessageSignature; @@ -14,10 +15,12 @@ use nym_mixnet_contract_common::gateway::GatewayConfigUpdate; use nym_mixnet_contract_common::mixnode::{MixNodeConfigUpdate, MixNodeCostParams}; use nym_mixnet_contract_common::reward_params::{IntervalRewardingParamsUpdate, Performance}; use nym_mixnet_contract_common::{ - ContractStateParams, ExecuteMsg as MixnetExecuteMsg, Gateway, LayerAssignment, MixId, MixNode, + ContractStateParams, ExecuteMsg as MixnetExecuteMsg, Gateway, Layer, LayerAssignment, MixId, + MixNode, }; -#[async_trait] +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] pub trait MixnetSigningClient { async fn execute_mixnet_contract( &self, @@ -131,6 +134,20 @@ pub trait MixnetSigningClient { .await } + async fn assign_node_layer( + &self, + mix_id: MixId, + layer: Layer, + fee: Option, + ) -> Result { + self.execute_mixnet_contract( + fee, + MixnetExecuteMsg::AssignNodeLayer { mix_id, layer }, + vec![], + ) + .await + } + async fn reconcile_epoch_events( &self, limit: Option, @@ -665,12 +682,26 @@ pub trait MixnetSigningClient { ) .await } + + #[cfg(feature = "nym_mixnet_contract_common/contract-testing")] + async fn testing_resolve_all_pending_events( + fee: Option, + ) -> Result { + self.execute_mixnet_contract( + fee, + MixnetExecuteMsg::TestingResolveAllPendingEvents {}, + vec![], + ) + .await + } } -#[async_trait] -impl MixnetSigningClient for NyxdClient +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl MixnetSigningClient for C where - C: SigningCosmWasmClient + Sync + Send, + C: SigningCosmWasmClient + NymContractsProvider + Sync, + NyxdError: From<::Error>, { async fn execute_mixnet_contract( &self, @@ -678,32 +709,229 @@ where msg: MixnetExecuteMsg, funds: Vec, ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + let mixnet_contract_address = &self + .mixnet_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("mixnet contract"))?; + + let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier()))); let memo = msg.default_memo(); - self.client - .execute( - self.address(), - self.mixnet_contract_address(), - &msg, - fee, - memo, - funds, - ) - .await + + let signer_address = &self.signer_addresses()?[0]; + self.execute( + signer_address, + mixnet_contract_address, + &msg, + fee, + memo, + funds, + ) + .await } } -#[async_trait] -impl MixnetSigningClient for crate::Client -where - C: SigningCosmWasmClient + Sync + Send + Clone, -{ - async fn execute_mixnet_contract( - &self, - fee: Option, +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::{mock_coin, IgnoreValue}; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_execute_variants_are_covered( + client: C, msg: MixnetExecuteMsg, - funds: Vec, - ) -> Result { - self.nyxd.execute_mixnet_contract(fee, msg, funds).await + ) { + match msg { + MixnetExecuteMsg::AssignNodeLayer { mix_id, layer } => { + client.assign_node_layer(mix_id, layer, None).ignore() + } + MixnetExecuteMsg::CreateFamily { label } => client.create_family(label, None).ignore(), + MixnetExecuteMsg::JoinFamily { + join_permit, + family_head, + } => client.join_family(join_permit, family_head, None).ignore(), + MixnetExecuteMsg::LeaveFamily { family_head } => { + client.leave_family(family_head, None).ignore() + } + MixnetExecuteMsg::KickFamilyMember { member } => { + client.kick_family_member(member, None).ignore() + } + MixnetExecuteMsg::CreateFamilyOnBehalf { + owner_address, + label, + } => client + .create_family_on_behalf(owner_address, label, None) + .ignore(), + MixnetExecuteMsg::JoinFamilyOnBehalf { + member_address, + join_permit, + family_head, + } => client + .join_family_on_behalf(member_address, join_permit, family_head, None) + .ignore(), + MixnetExecuteMsg::LeaveFamilyOnBehalf { + member_address, + family_head, + } => client + .leave_family_on_behalf(member_address, family_head, None) + .ignore(), + MixnetExecuteMsg::KickFamilyMemberOnBehalf { + head_address, + member, + } => client + .kick_family_member_on_behalf(head_address, member, None) + .ignore(), + MixnetExecuteMsg::UpdateRewardingValidatorAddress { address } => client + .update_rewarding_validator_address(address.parse().unwrap(), None) + .ignore(), + MixnetExecuteMsg::UpdateContractStateParams { updated_parameters } => client + .update_contract_state_params(updated_parameters, None) + .ignore(), + MixnetExecuteMsg::UpdateActiveSetSize { + active_set_size, + force_immediately, + } => client + .update_active_set_size(active_set_size, force_immediately, None) + .ignore(), + MixnetExecuteMsg::UpdateRewardingParams { + updated_params, + force_immediately, + } => client + .update_rewarding_parameters(updated_params, force_immediately, None) + .ignore(), + MixnetExecuteMsg::UpdateIntervalConfig { + epochs_in_interval, + epoch_duration_secs, + force_immediately, + } => client + .update_interval_config( + epochs_in_interval, + epoch_duration_secs, + force_immediately, + None, + ) + .ignore(), + MixnetExecuteMsg::BeginEpochTransition {} => { + client.begin_epoch_transition(None).ignore() + } + MixnetExecuteMsg::AdvanceCurrentEpoch { + new_rewarded_set, + expected_active_set_size, + } => client + .advance_current_epoch(new_rewarded_set, expected_active_set_size, None) + .ignore(), + MixnetExecuteMsg::ReconcileEpochEvents { limit } => { + client.reconcile_epoch_events(limit, None).ignore() + } + MixnetExecuteMsg::BondMixnode { + mix_node, + cost_params, + owner_signature, + } => client + .bond_mixnode(mix_node, cost_params, owner_signature, mock_coin(), None) + .ignore(), + MixnetExecuteMsg::BondMixnodeOnBehalf { + mix_node, + cost_params, + owner_signature, + owner, + } => client + .bond_mixnode_on_behalf( + owner.parse().unwrap(), + mix_node, + cost_params, + owner_signature, + mock_coin(), + None, + ) + .ignore(), + MixnetExecuteMsg::PledgeMore {} => client.pledge_more(mock_coin(), None).ignore(), + MixnetExecuteMsg::PledgeMoreOnBehalf { owner } => client + .pledge_more_on_behalf(owner.parse().unwrap(), mock_coin(), None) + .ignore(), + MixnetExecuteMsg::DecreasePledge { decrease_by } => { + client.decrease_pledge(decrease_by.into(), None).ignore() + } + MixnetExecuteMsg::DecreasePledgeOnBehalf { owner, decrease_by } => client + .decrease_pledge_on_behalf(owner.parse().unwrap(), decrease_by.into(), None) + .ignore(), + MixnetExecuteMsg::UnbondMixnode {} => client.unbond_mixnode(None).ignore(), + MixnetExecuteMsg::UnbondMixnodeOnBehalf { owner } => client + .unbond_mixnode_on_behalf(owner.parse().unwrap(), None) + .ignore(), + MixnetExecuteMsg::UpdateMixnodeCostParams { new_costs } => { + client.update_mixnode_cost_params(new_costs, None).ignore() + } + MixnetExecuteMsg::UpdateMixnodeCostParamsOnBehalf { new_costs, owner } => client + .update_mixnode_cost_params_on_behalf(owner.parse().unwrap(), new_costs, None) + .ignore(), + MixnetExecuteMsg::UpdateMixnodeConfig { new_config } => { + client.update_mixnode_config(new_config, None).ignore() + } + MixnetExecuteMsg::UpdateMixnodeConfigOnBehalf { new_config, owner } => client + .update_mixnode_config_on_behalf(owner.parse().unwrap(), new_config, None) + .ignore(), + MixnetExecuteMsg::BondGateway { + gateway, + owner_signature, + } => client + .bond_gateway(gateway, owner_signature, mock_coin(), None) + .ignore(), + MixnetExecuteMsg::BondGatewayOnBehalf { + gateway, + owner, + owner_signature, + } => client + .bond_gateway_on_behalf( + owner.parse().unwrap(), + gateway, + owner_signature, + mock_coin(), + None, + ) + .ignore(), + MixnetExecuteMsg::UnbondGateway {} => client.unbond_gateway(None).ignore(), + MixnetExecuteMsg::UnbondGatewayOnBehalf { owner } => client + .unbond_gateway_on_behalf(owner.parse().unwrap(), None) + .ignore(), + MixnetExecuteMsg::UpdateGatewayConfig { new_config } => { + client.update_gateway_config(new_config, None).ignore() + } + MixnetExecuteMsg::UpdateGatewayConfigOnBehalf { new_config, owner } => client + .update_gateway_config_on_behalf(owner.parse().unwrap(), new_config, None) + .ignore(), + MixnetExecuteMsg::DelegateToMixnode { mix_id } => client + .delegate_to_mixnode(mix_id, mock_coin(), None) + .ignore(), + MixnetExecuteMsg::DelegateToMixnodeOnBehalf { mix_id, delegate } => client + .delegate_to_mixnode_on_behalf(delegate.parse().unwrap(), mix_id, mock_coin(), None) + .ignore(), + MixnetExecuteMsg::UndelegateFromMixnode { mix_id } => { + client.undelegate_from_mixnode(mix_id, None).ignore() + } + MixnetExecuteMsg::UndelegateFromMixnodeOnBehalf { mix_id, delegate } => client + .undelegate_to_mixnode_on_behalf(delegate.parse().unwrap(), mix_id, None) + .ignore(), + MixnetExecuteMsg::RewardMixnode { + mix_id, + performance, + } => client.reward_mixnode(mix_id, performance, None).ignore(), + MixnetExecuteMsg::WithdrawOperatorReward {} => { + client.withdraw_operator_reward(None).ignore() + } + MixnetExecuteMsg::WithdrawOperatorRewardOnBehalf { owner } => client + .withdraw_operator_reward_on_behalf(owner.parse().unwrap(), None) + .ignore(), + MixnetExecuteMsg::WithdrawDelegatorReward { mix_id } => { + client.withdraw_delegator_reward(mix_id, None).ignore() + } + MixnetExecuteMsg::WithdrawDelegatorRewardOnBehalf { mix_id, owner } => client + .withdraw_delegator_reward_on_behalf(owner.parse().unwrap(), mix_id, None) + .ignore(), + + #[cfg(feature = "nym_mixnet_contract_common/contract-testing")] + MixnetExecuteMsg::TestingResolveAllPendingEvents {} => { + client.testing_resolve_all_pending_events(None).ignore() + } + }; } } diff --git a/common/client-libs/validator-client/src/nyxd/contract_traits/mod.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/mod.rs new file mode 100644 index 0000000000..545fdf05ec --- /dev/null +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/mod.rs @@ -0,0 +1,179 @@ +// Copyright 2021-2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use cosmrs::AccountId; +use nym_network_defaults::NymContracts; +use std::str::FromStr; + +// TODO: all of those could/should be derived via a macro + +// query clients +mod coconut_bandwidth_query_client; +mod dkg_query_client; +mod group_query_client; +mod mixnet_query_client; +mod multisig_query_client; +mod name_service_query_client; +mod sp_directory_query_client; +mod vesting_query_client; + +// signing clients +mod coconut_bandwidth_signing_client; +mod dkg_signing_client; +mod group_signing_client; +mod mixnet_signing_client; +mod multisig_signing_client; +mod name_service_signing_client; +mod sp_directory_signing_client; +mod vesting_signing_client; + +// re-export query traits +pub use coconut_bandwidth_query_client::{ + CoconutBandwidthQueryClient, PagedCoconutBandwidthQueryClient, +}; +pub use dkg_query_client::{DkgQueryClient, PagedDkgQueryClient}; +pub use group_query_client::{GroupQueryClient, PagedGroupQueryClient}; +pub use mixnet_query_client::{MixnetQueryClient, PagedMixnetQueryClient}; +pub use multisig_query_client::{MultisigQueryClient, PagedMultisigQueryClient}; +pub use name_service_query_client::{NameServiceQueryClient, PagedNameServiceQueryClient}; +pub use sp_directory_query_client::{PagedSpDirectoryQueryClient, SpDirectoryQueryClient}; +pub use vesting_query_client::{PagedVestingQueryClient, VestingQueryClient}; + +// re-export signing traits +pub use coconut_bandwidth_signing_client::CoconutBandwidthSigningClient; +pub use dkg_signing_client::DkgSigningClient; +pub use group_signing_client::GroupSigningClient; +pub use mixnet_signing_client::MixnetSigningClient; +pub use multisig_signing_client::MultisigSigningClient; +pub use name_service_signing_client::NameServiceSigningClient; +pub use sp_directory_signing_client::SpDirectorySigningClient; +pub use vesting_signing_client::VestingSigningClient; + +// helper for providing blanket implementation for query clients +pub trait NymContractsProvider { + // main + fn mixnet_contract_address(&self) -> Option<&AccountId>; + fn vesting_contract_address(&self) -> Option<&AccountId>; + + // coconut-related + fn coconut_bandwidth_contract_address(&self) -> Option<&AccountId>; + fn dkg_contract_address(&self) -> Option<&AccountId>; + fn group_contract_address(&self) -> Option<&AccountId>; + fn multisig_contract_address(&self) -> Option<&AccountId>; + + // SPs + fn name_service_contract_address(&self) -> Option<&AccountId>; + fn service_provider_contract_address(&self) -> Option<&AccountId>; +} + +#[derive(Debug, Clone)] +pub struct TypedNymContracts { + pub mixnet_contract_address: Option, + pub vesting_contract_address: Option, + + pub coconut_bandwidth_contract_address: Option, + pub group_contract_address: Option, + pub multisig_contract_address: Option, + pub coconut_dkg_contract_address: Option, + + pub service_provider_directory_contract_address: Option, + pub name_service_contract_address: Option, +} + +impl TryFrom for TypedNymContracts { + type Error = ::Err; + + fn try_from(value: NymContracts) -> Result { + Ok(TypedNymContracts { + mixnet_contract_address: value + .mixnet_contract_address + .map(|addr| addr.parse()) + .transpose()?, + vesting_contract_address: value + .vesting_contract_address + .map(|addr| addr.parse()) + .transpose()?, + coconut_bandwidth_contract_address: value + .coconut_bandwidth_contract_address + .map(|addr| addr.parse()) + .transpose()?, + group_contract_address: value + .group_contract_address + .map(|addr| addr.parse()) + .transpose()?, + multisig_contract_address: value + .multisig_contract_address + .map(|addr| addr.parse()) + .transpose()?, + coconut_dkg_contract_address: value + .coconut_dkg_contract_address + .map(|addr| addr.parse()) + .transpose()?, + service_provider_directory_contract_address: value + .service_provider_directory_contract_address + .map(|addr| addr.parse()) + .transpose()?, + name_service_contract_address: value + .name_service_contract_address + .map(|addr| addr.parse()) + .transpose()?, + }) + } +} + +// a simple helper macro to define to repeatedly call a paged query until a full response is constructed +#[macro_export] +macro_rules! collect_paged { + // TODO: deal with the args in a nicer way + ( $self:ident, $f: ident, $field: ident ) => {{ + let mut res = Vec::new(); + let mut start_after = None; + loop { + let paged_response = $self.$f(start_after.take(), None).await?; + res.extend(paged_response.$field); + + if let Some(start_next_after) = paged_response.start_next_after { + start_after = Some(start_next_after.into()) + } else { + break Ok(res); + } + } + }}; + + ( $self:ident, $f: ident, $field: ident, $($args:tt),*) => {{ + let mut res = Vec::new(); + let mut start_after = None; + loop { + let paged_response = $self.$f($($args),*, start_after.take(), None).await?; + res.extend(paged_response.$field); + + if let Some(start_next_after) = paged_response.start_next_after { + start_after = Some(start_next_after.into()) + } else { + break Ok(res); + } + } + }}; +} + +#[cfg(test)] +mod tests { + use crate::nyxd::Coin; + + pub(crate) trait IgnoreValue { + fn ignore(self) -> u32 + where + Self: Sized, + { + 42 + // reason we're returning a value as opposed to just `()` is that whenever we match on all enums + // we don't want to accidentally miss a variant because compiler will treat it the same way + } + } + + impl IgnoreValue for T {} + + pub(crate) fn mock_coin() -> Coin { + Coin::new(42, "ufoomp") + } +} diff --git a/common/client-libs/validator-client/src/nyxd/contract_traits/multisig_query_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/multisig_query_client.rs new file mode 100644 index 0000000000..48fcadc050 --- /dev/null +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/multisig_query_client.rs @@ -0,0 +1,178 @@ +// Copyright 2022-2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::nyxd::contract_traits::NymContractsProvider; +use crate::nyxd::error::NyxdError; +use crate::nyxd::CosmWasmClient; +use async_trait::async_trait; +use cw3::{ + ProposalListResponse, ProposalResponse, VoteListResponse, VoteResponse, VoterListResponse, + VoterResponse, +}; +use cw_utils::ThresholdResponse; +use nym_multisig_contract_common::msg::QueryMsg as MultisigQueryMsg; +use serde::Deserialize; + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait MultisigQueryClient { + async fn query_multisig_contract(&self, query: MultisigQueryMsg) -> Result + where + for<'a> T: Deserialize<'a>; + + async fn query_threshold(&self) -> Result { + self.query_multisig_contract(MultisigQueryMsg::Threshold {}) + .await + } + + async fn query_proposal(&self, proposal_id: u64) -> Result { + self.query_multisig_contract(MultisigQueryMsg::Proposal { proposal_id }) + .await + } + + async fn list_proposals( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_multisig_contract(MultisigQueryMsg::ListProposals { start_after, limit }) + .await + } + + async fn reverse_proposals( + &self, + start_before: Option, + limit: Option, + ) -> Result { + self.query_multisig_contract(MultisigQueryMsg::ReverseProposals { + start_before, + limit, + }) + .await + } + + async fn query_vote(&self, proposal_id: u64, voter: String) -> Result { + self.query_multisig_contract(MultisigQueryMsg::Vote { proposal_id, voter }) + .await + } + + async fn list_votes( + &self, + proposal_id: u64, + start_after: Option, + limit: Option, + ) -> Result { + self.query_multisig_contract(MultisigQueryMsg::ListVotes { + proposal_id, + start_after, + limit, + }) + .await + } + + async fn query_voter(&self, address: String) -> Result { + self.query_multisig_contract(MultisigQueryMsg::Voter { address }) + .await + } + + async fn list_voters( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_multisig_contract(MultisigQueryMsg::ListVoters { start_after, limit }) + .await + } + + async fn query_config(&self) -> Result<(), NyxdError> { + unimplemented!("requires exporting state::Config type") + } +} + +// extension trait to the query client to deal with the paged queries +// (it didn't feel appropriate to combine it with the existing trait +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait PagedMultisigQueryClient: MultisigQueryClient { + // can't use the macro due to different paging behaviour + async fn get_all_proposals(&self) -> Result, NyxdError> { + let mut proposals = Vec::new(); + let mut start_after = None; + + loop { + let mut paged_response = self.list_proposals(start_after.take(), None).await?; + + let last_id = paged_response.proposals.last().map(|prop| prop.id); + proposals.append(&mut paged_response.proposals); + + if let Some(start_after_res) = last_id { + start_after = Some(start_after_res) + } else { + break; + } + } + + Ok(proposals) + } +} + +#[async_trait] +impl PagedMultisigQueryClient for T where T: MultisigQueryClient {} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl MultisigQueryClient for C +where + C: CosmWasmClient + NymContractsProvider + Send + Sync, +{ + async fn query_multisig_contract(&self, query: MultisigQueryMsg) -> Result + where + for<'a> T: Deserialize<'a>, + { + let multisig_contract_address = &self + .multisig_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("multisig contract"))?; + self.query_contract_smart(multisig_contract_address, &query) + .await + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::IgnoreValue; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_query_variants_are_covered( + client: C, + msg: MultisigQueryMsg, + ) { + match msg { + MultisigQueryMsg::Threshold {} => client.query_threshold().ignore(), + MultisigQueryMsg::Proposal { proposal_id } => { + client.query_proposal(proposal_id).ignore() + } + MultisigQueryMsg::ListProposals { start_after, limit } => { + client.list_proposals(start_after, limit).ignore() + } + MultisigQueryMsg::ReverseProposals { + start_before, + limit, + } => client.reverse_proposals(start_before, limit).ignore(), + MultisigQueryMsg::Vote { proposal_id, voter } => { + client.query_vote(proposal_id, voter).ignore() + } + MultisigQueryMsg::ListVotes { + proposal_id, + start_after, + limit, + } => client.list_votes(proposal_id, start_after, limit).ignore(), + MultisigQueryMsg::Voter { address } => client.query_voter(address).ignore(), + MultisigQueryMsg::ListVoters { start_after, limit } => { + client.list_voters(start_after, limit).ignore() + } + MultisigQueryMsg::Config {} => client.query_config().ignore(), + }; + } +} diff --git a/common/client-libs/validator-client/src/nyxd/contract_traits/multisig_signing_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/multisig_signing_client.rs new file mode 100644 index 0000000000..f7249f02ea --- /dev/null +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/multisig_signing_client.rs @@ -0,0 +1,192 @@ +// Copyright 2022 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::nyxd::contract_traits::NymContractsProvider; +use crate::nyxd::cosmwasm_client::types::ExecuteResult; +use crate::nyxd::error::NyxdError; +use crate::nyxd::{Coin, Fee, SigningCosmWasmClient}; +use crate::signing::signer::OfflineSigner; +use async_trait::async_trait; +use cosmwasm_std::{to_binary, CosmosMsg, WasmMsg}; +use cw3::Vote; +use cw4::{MemberChangedHookMsg, MemberDiff}; +use nym_coconut_bandwidth_contract_common::msg::ExecuteMsg as CoconutBandwidthExecuteMsg; +use nym_multisig_contract_common::msg::ExecuteMsg as MultisigExecuteMsg; + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait MultisigSigningClient: NymContractsProvider { + async fn execute_multisig_contract( + &self, + fee: Option, + msg: MultisigExecuteMsg, + memo: String, + funds: Vec, + ) -> Result; + + async fn propose_release_funds( + &self, + title: String, + blinded_serial_number: String, + voucher_value: Coin, + fee: Option, + ) -> Result { + let coconut_bandwidth_contract_address = self + .coconut_bandwidth_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("coconut bandwidth contract"))?; + + let release_funds_req = CoconutBandwidthExecuteMsg::ReleaseFunds { + funds: voucher_value.into(), + }; + let release_funds_msg = CosmosMsg::Wasm(WasmMsg::Execute { + contract_addr: coconut_bandwidth_contract_address.to_string(), + msg: to_binary(&release_funds_req)?, + funds: vec![], + }); + let req = MultisigExecuteMsg::Propose { + title, + description: blinded_serial_number, + msgs: vec![release_funds_msg], + latest: None, + }; + self.execute_multisig_contract( + fee, + req, + "Multisig::Propose::Execute::ReleaseFunds".to_string(), + vec![], + ) + .await + } + + async fn vote_proposal( + &self, + proposal_id: u64, + vote_yes: bool, + fee: Option, + ) -> Result { + let vote = if vote_yes { Vote::Yes } else { Vote::No }; + let req = MultisigExecuteMsg::Vote { proposal_id, vote }; + self.execute_multisig_contract(fee, req, "Multisig::Vote".to_string(), vec![]) + .await + } + + // alternative variant to vote_proposal that lets you to abstain and veto a proposal + async fn vote( + &self, + proposal_id: u64, + vote: Vote, + fee: Option, + ) -> Result { + self.execute_multisig_contract( + fee, + MultisigExecuteMsg::Vote { proposal_id, vote }, + "Multisig::Vote".to_string(), + vec![], + ) + .await + } + + async fn execute_proposal( + &self, + proposal_id: u64, + fee: Option, + ) -> Result { + let req = MultisigExecuteMsg::Execute { proposal_id }; + self.execute_multisig_contract(fee, req, "Multisig::Execute".to_string(), vec![]) + .await + } + + async fn close_proposal( + &self, + proposal_id: u64, + fee: Option, + ) -> Result { + self.execute_multisig_contract( + fee, + MultisigExecuteMsg::Close { proposal_id }, + "Multisig::Close".to_string(), + vec![], + ) + .await + } + + async fn changed_member_hook( + &self, + member_diff: Vec, + fee: Option, + ) -> Result { + self.execute_multisig_contract( + fee, + MultisigExecuteMsg::MemberChangedHook(MemberChangedHookMsg::new(member_diff)), + "Multisig::MemberChangedHook".to_string(), + vec![], + ) + .await + } +} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl MultisigSigningClient for C +where + C: SigningCosmWasmClient + NymContractsProvider + Sync, + NyxdError: From<::Error>, +{ + async fn execute_multisig_contract( + &self, + fee: Option, + msg: MultisigExecuteMsg, + memo: String, + funds: Vec, + ) -> Result { + let multisig_contract_address = self + .multisig_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("multisig contract"))?; + + let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier()))); + + let signer_address = &self.signer_addresses()?[0]; + self.execute( + signer_address, + multisig_contract_address, + &msg, + fee, + memo, + funds, + ) + .await + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::{mock_coin, IgnoreValue}; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_execute_variants_are_covered( + client: C, + msg: MultisigExecuteMsg, + ) { + match msg { + MultisigExecuteMsg::Propose { + title, description, .. + } => client + .propose_release_funds(title, description, mock_coin(), None) + .ignore(), + MultisigExecuteMsg::Vote { proposal_id, vote } => { + client.vote(proposal_id, vote, None).ignore() + } + MultisigExecuteMsg::Execute { proposal_id } => { + client.execute_proposal(proposal_id, None).ignore() + } + MultisigExecuteMsg::Close { proposal_id } => { + client.close_proposal(proposal_id, None).ignore() + } + MultisigExecuteMsg::MemberChangedHook(hook_msg) => { + client.changed_member_hook(hook_msg.diffs, None).ignore() + } + }; + } +} diff --git a/common/client-libs/validator-client/src/nyxd/contract_traits/name_service_query_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/name_service_query_client.rs new file mode 100644 index 0000000000..60071f674d --- /dev/null +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/name_service_query_client.rs @@ -0,0 +1,144 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::collect_paged; +use crate::nyxd::contract_traits::NymContractsProvider; +use crate::nyxd::{error::NyxdError, CosmWasmClient}; +use async_trait::async_trait; +use cosmrs::AccountId; +use nym_contracts_common::{signing::Nonce, ContractBuildInformation}; +use nym_name_service_common::{ + msg::QueryMsg as NameQueryMsg, + response::{ConfigResponse, NamesListResponse, PagedNamesListResponse}, + Address, NameId, NymName, RegisteredName, +}; +use serde::Deserialize; + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait NameServiceQueryClient { + async fn query_name_service_contract(&self, query: NameQueryMsg) -> Result + where + for<'a> T: Deserialize<'a>; + + async fn get_name_service_config(&self) -> Result { + self.query_name_service_contract(NameQueryMsg::Config {}) + .await + } + + async fn get_name_entry(&self, name_id: NameId) -> Result { + self.query_name_service_contract(NameQueryMsg::NameId { name_id }) + .await + } + + async fn get_names_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_name_service_contract(NameQueryMsg::All { limit, start_after }) + .await + } + + async fn get_name_signing_nonce(&self, address: &AccountId) -> Result { + self.query_name_service_contract(NameQueryMsg::SigningNonce { + address: address.to_string(), + }) + .await + } + + async fn get_names_by_owner(&self, owner: AccountId) -> Result { + self.query_name_service_contract(NameQueryMsg::ByOwner { + owner: owner.to_string(), + }) + .await + } + + async fn get_names_by_nym_name(&self, name: NymName) -> Result { + self.query_name_service_contract(NameQueryMsg::ByName { name }) + .await + } + + async fn get_names_by_address(&self, address: Address) -> Result { + self.query_name_service_contract(NameQueryMsg::ByAddress { address }) + .await + } + + async fn get_name_service_contract_version( + &self, + ) -> Result { + self.query_name_service_contract(NameQueryMsg::GetContractVersion {}) + .await + } + + async fn get_name_service_contract_cw2_version( + &self, + ) -> Result { + self.query_name_service_contract(NameQueryMsg::GetCW2ContractVersion {}) + .await + } +} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait PagedNameServiceQueryClient: NameServiceQueryClient { + async fn get_all_names(&self) -> Result, NyxdError> { + collect_paged!(self, get_names_paged, names) + } +} + +#[async_trait] +impl PagedNameServiceQueryClient for T where T: NameServiceQueryClient {} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl NameServiceQueryClient for C +where + C: CosmWasmClient + NymContractsProvider + Send + Sync, +{ + async fn query_name_service_contract(&self, query: NameQueryMsg) -> Result + where + for<'a> T: Deserialize<'a>, + { + let name_service_contract_address = &self + .name_service_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("name service contract"))?; + self.query_contract_smart(name_service_contract_address, &query) + .await + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::IgnoreValue; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_query_variants_are_covered( + client: C, + msg: NameQueryMsg, + ) { + match msg { + NameQueryMsg::NameId { name_id } => client.get_name_entry(name_id).ignore(), + NameQueryMsg::ByOwner { owner } => { + client.get_names_by_owner(owner.parse().unwrap()).ignore() + } + NameQueryMsg::ByName { name } => client.get_names_by_nym_name(name).ignore(), + NameQueryMsg::ByAddress { address } => client.get_names_by_address(address).ignore(), + NameQueryMsg::All { limit, start_after } => { + client.get_names_paged(limit, start_after).ignore() + } + NameQueryMsg::SigningNonce { address } => client + .get_name_signing_nonce(&address.parse().unwrap()) + .ignore(), + NameQueryMsg::Config {} => client.get_name_service_config().ignore(), + NameQueryMsg::GetContractVersion {} => { + client.get_name_service_contract_version().ignore() + } + NameQueryMsg::GetCW2ContractVersion {} => { + client.get_name_service_contract_cw2_version().ignore() + } + }; + } +} diff --git a/common/client-libs/validator-client/src/nyxd/traits/name_service_signing_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/name_service_signing_client.rs similarity index 52% rename from common/client-libs/validator-client/src/nyxd/traits/name_service_signing_client.rs rename to common/client-libs/validator-client/src/nyxd/contract_traits/name_service_signing_client.rs index 1235043094..0a363f991b 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/name_service_signing_client.rs +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/name_service_signing_client.rs @@ -5,12 +5,14 @@ use async_trait::async_trait; use nym_contracts_common::signing::MessageSignature; use nym_name_service_common::{msg::ExecuteMsg as NameExecuteMsg, NameDetails, NameId, NymName}; +use crate::nyxd::contract_traits::NymContractsProvider; use crate::nyxd::{ - coin::Coin, cosmwasm_client::types::ExecuteResult, error::NyxdError, Fee, NyxdClient, - SigningCosmWasmClient, + coin::Coin, cosmwasm_client::types::ExecuteResult, error::NyxdError, Fee, SigningCosmWasmClient, }; +use crate::signing::signer::OfflineSigner; -#[async_trait] +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] pub trait NameServiceSigningClient { async fn execute_name_service_contract( &self, @@ -71,10 +73,12 @@ pub trait NameServiceSigningClient { } } -#[async_trait] -impl NameServiceSigningClient for NyxdClient +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl NameServiceSigningClient for C where - C: SigningCosmWasmClient + Sync + Send, + C: SigningCosmWasmClient + NymContractsProvider + Sync, + NyxdError: From<::Error>, { async fn execute_name_service_contract( &self, @@ -82,19 +86,53 @@ where msg: NameExecuteMsg, funds: Vec, ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + let name_service_contract_address = &self + .name_service_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("name service contract"))?; + + let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier()))); let memo = msg.default_memo(); - self.client - .execute( - self.address(), - self.name_service_contract_address().ok_or( - NyxdError::NoContractAddressAvailable("name service contract".to_string()), - )?, - &msg, - fee, - memo, - funds, - ) - .await + + let signer_address = &self.signer_addresses()?[0]; + self.execute( + signer_address, + name_service_contract_address, + &msg, + fee, + memo, + funds, + ) + .await + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::{mock_coin, IgnoreValue}; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_execute_variants_are_covered( + client: C, + msg: NameExecuteMsg, + ) { + match msg { + NameExecuteMsg::Register { + name, + owner_signature, + } => client + .register_name(name, owner_signature, mock_coin(), None) + .ignore(), + NameExecuteMsg::DeleteId { name_id } => { + client.delete_name_by_id(name_id, None).ignore() + } + NameExecuteMsg::DeleteName { name } => { + client.delete_service_provider_by_name(name, None).ignore() + } + NameExecuteMsg::UpdateDepositRequired { deposit_required } => client + .update_deposit_required(deposit_required.into(), None) + .ignore(), + }; } } diff --git a/common/client-libs/validator-client/src/nyxd/contract_traits/sp_directory_query_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/sp_directory_query_client.rs new file mode 100644 index 0000000000..09279c543a --- /dev/null +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/sp_directory_query_client.rs @@ -0,0 +1,142 @@ +use crate::collect_paged; +use async_trait::async_trait; +use cosmrs::AccountId; +use nym_contracts_common::{signing::Nonce, ContractBuildInformation}; +use nym_service_provider_directory_common::{ + msg::QueryMsg as SpQueryMsg, + response::{ + ConfigResponse, PagedServicesListResponse, ServiceInfoResponse, ServicesListResponse, + }, + NymAddress, Service, ServiceId, +}; +use serde::Deserialize; + +use crate::nyxd::contract_traits::NymContractsProvider; +use crate::nyxd::{error::NyxdError, CosmWasmClient}; + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait SpDirectoryQueryClient { + async fn query_service_provider_contract(&self, query: SpQueryMsg) -> Result + where + for<'a> T: Deserialize<'a>; + + async fn get_service_config(&self) -> Result { + self.query_service_provider_contract(SpQueryMsg::Config {}) + .await + } + + async fn get_service_info( + &self, + service_id: ServiceId, + ) -> Result { + self.query_service_provider_contract(SpQueryMsg::ServiceId { service_id }) + .await + } + + async fn get_services_paged( + &self, + start_after: Option, + limit: Option, + ) -> Result { + self.query_service_provider_contract(SpQueryMsg::All { limit, start_after }) + .await + } + + async fn get_services_by_announcer( + &self, + announcer: AccountId, + ) -> Result { + self.query_service_provider_contract(SpQueryMsg::ByAnnouncer { + announcer: announcer.to_string(), + }) + .await + } + + async fn get_services_by_nym_address( + &self, + nym_address: NymAddress, + ) -> Result { + self.query_service_provider_contract(SpQueryMsg::ByNymAddress { nym_address }) + .await + } + + async fn get_sp_contract_version(&self) -> Result { + self.query_service_provider_contract(SpQueryMsg::GetContractVersion {}) + .await + } + + async fn get_sp_contract_cw2_version(&self) -> Result { + self.query_service_provider_contract(SpQueryMsg::GetCW2ContractVersion {}) + .await + } + + async fn get_service_signing_nonce(&self, address: &AccountId) -> Result { + self.query_service_provider_contract(SpQueryMsg::SigningNonce { + address: address.to_string(), + }) + .await + } +} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait PagedSpDirectoryQueryClient: SpDirectoryQueryClient { + async fn get_all_services(&self) -> Result, NyxdError> { + collect_paged!(self, get_services_paged, services) + } +} + +#[async_trait] +impl PagedSpDirectoryQueryClient for T where T: SpDirectoryQueryClient {} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl SpDirectoryQueryClient for C +where + C: CosmWasmClient + NymContractsProvider + Send + Sync, +{ + async fn query_service_provider_contract(&self, query: SpQueryMsg) -> Result + where + for<'a> T: Deserialize<'a>, + { + let sp_directory_contract_address = + &self.service_provider_contract_address().ok_or_else(|| { + NyxdError::unavailable_contract_address("service provider directory contract") + })?; + self.query_contract_smart(sp_directory_contract_address, &query) + .await + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::IgnoreValue; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_query_variants_are_covered( + client: C, + msg: SpQueryMsg, + ) { + match msg { + SpQueryMsg::ServiceId { service_id } => client.get_service_info(service_id).ignore(), + SpQueryMsg::ByAnnouncer { announcer } => client + .get_services_by_announcer(announcer.parse().unwrap()) + .ignore(), + SpQueryMsg::ByNymAddress { nym_address } => { + client.get_services_by_nym_address(nym_address).ignore() + } + SpQueryMsg::All { limit, start_after } => { + client.get_services_paged(start_after, limit).ignore() + } + SpQueryMsg::SigningNonce { address } => client + .get_service_signing_nonce(&address.parse().unwrap()) + .ignore(), + SpQueryMsg::Config {} => client.get_service_config().ignore(), + SpQueryMsg::GetContractVersion {} => client.get_sp_contract_version().ignore(), + SpQueryMsg::GetCW2ContractVersion {} => client.get_sp_contract_cw2_version().ignore(), + }; + } +} diff --git a/common/client-libs/validator-client/src/nyxd/traits/sp_directory_signing_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/sp_directory_signing_client.rs similarity index 54% rename from common/client-libs/validator-client/src/nyxd/traits/sp_directory_signing_client.rs rename to common/client-libs/validator-client/src/nyxd/contract_traits/sp_directory_signing_client.rs index 31cf30839a..c1efde20f5 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/sp_directory_signing_client.rs +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/sp_directory_signing_client.rs @@ -1,18 +1,19 @@ // Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +use crate::nyxd::contract_traits::NymContractsProvider; +use crate::nyxd::{ + coin::Coin, cosmwasm_client::types::ExecuteResult, error::NyxdError, Fee, SigningCosmWasmClient, +}; +use crate::signing::signer::OfflineSigner; use async_trait::async_trait; use nym_contracts_common::signing::MessageSignature; use nym_service_provider_directory_common::{ msg::ExecuteMsg as SpExecuteMsg, NymAddress, ServiceDetails, ServiceId, }; -use crate::nyxd::{ - coin::Coin, cosmwasm_client::types::ExecuteResult, error::NyxdError, Fee, NyxdClient, - SigningCosmWasmClient, -}; - -#[async_trait] +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] pub trait SpDirectorySigningClient { async fn execute_service_provider_directory_contract( &self, @@ -81,10 +82,12 @@ pub trait SpDirectorySigningClient { } } -#[async_trait] -impl SpDirectorySigningClient for NyxdClient +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl SpDirectorySigningClient for C where - C: SigningCosmWasmClient + Sync + Send, + C: SigningCosmWasmClient + NymContractsProvider + Sync, + NyxdError: From<::Error>, { async fn execute_service_provider_directory_contract( &self, @@ -92,21 +95,54 @@ where msg: SpExecuteMsg, funds: Vec, ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + let sp_directory_contract_address = + &self.service_provider_contract_address().ok_or_else(|| { + NyxdError::unavailable_contract_address("service provider directory contract") + })?; + + let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier()))); let memo = msg.default_memo(); - self.client - .execute( - self.address(), - self.service_provider_contract_address().ok_or( - NyxdError::NoContractAddressAvailable( - "service provider directory contract".to_string(), - ), - )?, - &msg, - fee, - memo, - funds, - ) - .await + + let signer_address = &self.signer_addresses()?[0]; + self.execute( + signer_address, + sp_directory_contract_address, + &msg, + fee, + memo, + funds, + ) + .await + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::{mock_coin, IgnoreValue}; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_execute_variants_are_covered( + client: C, + msg: SpExecuteMsg, + ) { + match msg { + SpExecuteMsg::Announce { + service, + owner_signature, + } => client + .announce_service_provider(service, owner_signature, mock_coin(), None) + .ignore(), + SpExecuteMsg::DeleteId { service_id } => client + .delete_service_provider_by_id(service_id, None) + .ignore(), + SpExecuteMsg::DeleteNymAddress { nym_address } => client + .delete_service_provider_by_nym_address(nym_address, None) + .ignore(), + SpExecuteMsg::UpdateDepositRequired { deposit_required } => client + .update_deposit_required(deposit_required.into(), None) + .ignore(), + }; } } diff --git a/common/client-libs/validator-client/src/nyxd/traits/vesting_query_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/vesting_query_client.rs similarity index 58% rename from common/client-libs/validator-client/src/nyxd/traits/vesting_query_client.rs rename to common/client-libs/validator-client/src/nyxd/contract_traits/vesting_query_client.rs index c70f0a78ca..fa6bd643fa 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/vesting_query_client.rs +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/vesting_query_client.rs @@ -1,10 +1,11 @@ -// Copyright 2021 - Nym Technologies SA +// Copyright 2021-2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +use crate::collect_paged; use crate::nyxd::coin::Coin; -pub use crate::nyxd::cosmwasm_client::client::CosmWasmClient; +use crate::nyxd::contract_traits::NymContractsProvider; use crate::nyxd::error::NyxdError; -use crate::nyxd::NyxdClient; +use crate::nyxd::CosmWasmClient; use async_trait::async_trait; use cosmwasm_std::{Coin as CosmWasmCoin, Timestamp}; use nym_contracts_common::ContractBuildInformation; @@ -16,7 +17,8 @@ use nym_vesting_contract_common::{ }; use serde::Deserialize; -#[async_trait] +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] pub trait VestingQueryClient { async fn query_vesting_contract(&self, query: VestingQueryMsg) -> Result where @@ -27,6 +29,11 @@ pub trait VestingQueryClient { .await } + async fn get_vesting_contract_cw2_version(&self) -> Result { + self.query_vesting_contract(VestingQueryMsg::GetCW2ContractVersion {}) + .await + } + async fn get_all_accounts_paged( &self, start_next_after: Option, @@ -274,73 +281,161 @@ pub trait VestingQueryClient { self.query_vesting_contract(VestingQueryMsg::GetAllDelegations { start_after, limit }) .await } +} +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait PagedVestingQueryClient: VestingQueryClient { async fn get_all_vesting_delegations(&self) -> Result, NyxdError> { - let mut delegations = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .get_all_vesting_delegations_paged(start_after.take(), None) - .await?; - delegations.append(&mut paged_response.delegations); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(delegations) + collect_paged!(self, get_all_vesting_delegations_paged, delegations) } async fn get_all_accounts_info(&self) -> Result, NyxdError> { - let mut accounts = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .get_all_accounts_paged(start_after.take(), None) - .await?; - accounts.append(&mut paged_response.accounts); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res.into_string()) - } else { - break; - } - } - - Ok(accounts) + collect_paged!(self, get_all_accounts_paged, accounts) } async fn get_all_accounts_vesting_coins(&self) -> Result, NyxdError> { - let mut accounts = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .get_all_accounts_vesting_coins_paged(start_after.take(), None) - .await?; - accounts.append(&mut paged_response.accounts); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res.into_string()) - } else { - break; - } - } - - Ok(accounts) + collect_paged!(self, get_all_accounts_vesting_coins_paged, accounts) } } #[async_trait] -impl VestingQueryClient for NyxdClient { +impl PagedVestingQueryClient for T where T: VestingQueryClient {} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl VestingQueryClient for C +where + C: CosmWasmClient + NymContractsProvider + Send + Sync, +{ async fn query_vesting_contract(&self, query: VestingQueryMsg) -> Result where for<'a> T: Deserialize<'a>, { - self.client - .query_contract_smart(self.vesting_contract_address(), &query) + let vesting_contract_address = &self + .vesting_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("vesting contract"))?; + self.query_contract_smart(vesting_contract_address, &query) .await } } + +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::IgnoreValue; + + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_query_variants_are_covered( + client: C, + msg: VestingQueryMsg, + ) { + match msg { + VestingQueryMsg::GetContractVersion {} => { + client.get_vesting_contract_version().ignore() + } + VestingQueryMsg::GetCW2ContractVersion {} => { + client.get_vesting_contract_cw2_version().ignore() + } + VestingQueryMsg::GetAccountsPaged { + start_next_after, + limit, + } => client + .get_all_accounts_paged(start_next_after, limit) + .ignore(), + VestingQueryMsg::GetAccountsVestingCoinsPaged { + start_next_after, + limit, + } => client + .get_all_accounts_vesting_coins_paged(start_next_after, limit) + .ignore(), + VestingQueryMsg::LockedCoins { + vesting_account_address, + block_time, + } => client + .locked_coins(&vesting_account_address, block_time) + .ignore(), + VestingQueryMsg::SpendableCoins { + vesting_account_address, + block_time, + } => client + .spendable_coins(&vesting_account_address, block_time) + .ignore(), + VestingQueryMsg::GetVestedCoins { + vesting_account_address, + block_time, + } => client + .vested_coins(&vesting_account_address, block_time) + .ignore(), + VestingQueryMsg::GetVestingCoins { + vesting_account_address, + block_time, + } => client + .vesting_coins(&vesting_account_address, block_time) + .ignore(), + VestingQueryMsg::GetStartTime { + vesting_account_address, + } => client.vesting_start_time(&vesting_account_address).ignore(), + VestingQueryMsg::GetEndTime { + vesting_account_address, + } => client.vesting_end_time(&vesting_account_address).ignore(), + VestingQueryMsg::GetOriginalVesting { + vesting_account_address, + } => client.original_vesting(&vesting_account_address).ignore(), + VestingQueryMsg::GetHistoricalVestingStakingReward { + vesting_account_address, + } => client + .get_historical_vesting_staking_reward(&vesting_account_address) + .ignore(), + VestingQueryMsg::GetSpendableVestedCoins { + vesting_account_address, + } => client + .get_spendable_vested_coins(&vesting_account_address) + .ignore(), + VestingQueryMsg::GetSpendableRewardCoins { + vesting_account_address, + } => client + .get_spendable_reward_coins(&vesting_account_address) + .ignore(), + VestingQueryMsg::GetDelegatedCoins { + vesting_account_address, + } => client + .get_delegated_coins(&vesting_account_address) + .ignore(), + VestingQueryMsg::GetPledgedCoins { + vesting_account_address, + } => client.get_pledged_coins(&vesting_account_address).ignore(), + VestingQueryMsg::GetStakedCoins { + vesting_account_address, + } => client.get_staked_coins(&vesting_account_address).ignore(), + VestingQueryMsg::GetWithdrawnCoins { + vesting_account_address, + } => client + .get_withdrawn_coins(&vesting_account_address) + .ignore(), + VestingQueryMsg::GetAccount { address } => client.get_account(&address).ignore(), + VestingQueryMsg::GetMixnode { address } => client.get_mixnode_pledge(&address).ignore(), + VestingQueryMsg::GetGateway { address } => client.get_gateway_pledge(&address).ignore(), + VestingQueryMsg::GetCurrentVestingPeriod { address } => { + client.get_current_vesting_period(&address).ignore() + } + VestingQueryMsg::GetDelegation { + address, + mix_id, + block_timestamp_secs, + } => client + .get_vesting_delegation(&address, mix_id, block_timestamp_secs) + .ignore(), + VestingQueryMsg::GetTotalDelegationAmount { address, mix_id } => client + .get_total_delegation_amount(&address, mix_id) + .ignore(), + VestingQueryMsg::GetDelegationTimes { address, mix_id } => { + client.get_delegation_timestamps(&address, mix_id).ignore() + } + VestingQueryMsg::GetAllDelegations { start_after, limit } => client + .get_all_vesting_delegations_paged(start_after, limit) + .ignore(), + }; + } +} diff --git a/common/client-libs/validator-client/src/nyxd/traits/vesting_signing_client.rs b/common/client-libs/validator-client/src/nyxd/contract_traits/vesting_signing_client.rs similarity index 52% rename from common/client-libs/validator-client/src/nyxd/traits/vesting_signing_client.rs rename to common/client-libs/validator-client/src/nyxd/contract_traits/vesting_signing_client.rs index f1354566dd..11c449fccd 100644 --- a/common/client-libs/validator-client/src/nyxd/traits/vesting_signing_client.rs +++ b/common/client-libs/validator-client/src/nyxd/contract_traits/vesting_signing_client.rs @@ -1,10 +1,11 @@ -// Copyright 2021 - Nym Technologies SA +// Copyright 2021-2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -pub use crate::nyxd::cosmwasm_client::signing_client::SigningCosmWasmClient; +use crate::nyxd::contract_traits::NymContractsProvider; use crate::nyxd::cosmwasm_client::types::ExecuteResult; use crate::nyxd::error::NyxdError; -use crate::nyxd::{Coin, Fee, NyxdClient}; +use crate::nyxd::{Coin, Fee, SigningCosmWasmClient}; +use crate::signing::signer::OfflineSigner; use async_trait::async_trait; use cosmrs::AccountId; use nym_contracts_common::signing::MessageSignature; @@ -15,7 +16,8 @@ use nym_mixnet_contract_common::{Gateway, MixId, MixNode}; use nym_vesting_contract_common::messages::ExecuteMsg as VestingExecuteMsg; use nym_vesting_contract_common::{PledgeCap, VestingSpecification}; -#[async_trait] +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] pub trait VestingSigningClient { async fn execute_vesting_contract( &self, @@ -28,25 +30,64 @@ pub trait VestingSigningClient { &self, new_costs: MixNodeCostParams, fee: Option, - ) -> Result; + ) -> Result { + self.execute_vesting_contract( + fee, + VestingExecuteMsg::UpdateMixnodeCostParams { new_costs }, + vec![], + ) + .await + } async fn vesting_update_mixnode_config( &self, new_config: MixNodeConfigUpdate, fee: Option, - ) -> Result; + ) -> Result { + let req = VestingExecuteMsg::UpdateMixnodeConfig { new_config }; + self.execute_vesting_contract(fee, req, vec![]).await + } async fn vesting_update_gateway_config( &self, new_config: GatewayConfigUpdate, fee: Option, - ) -> Result; + ) -> Result { + self.execute_vesting_contract( + fee, + VestingExecuteMsg::UpdateGatewayConfig { new_config }, + vec![], + ) + .await + } async fn update_mixnet_address( &self, address: &str, fee: Option, - ) -> Result; + ) -> Result { + let req = VestingExecuteMsg::UpdateMixnetAddress { + address: address.to_string(), + }; + self.execute_vesting_contract(fee, req, vec![]).await + } + + async fn vesting_track_decrease_pledge( + &self, + owner: String, + amount: Coin, + fee: Option, + ) -> Result { + self.execute_vesting_contract( + fee, + VestingExecuteMsg::TrackDecreasePledge { + owner, + amount: amount.into(), + }, + Vec::new(), + ) + .await + } async fn vesting_bond_gateway( &self, @@ -54,16 +95,31 @@ pub trait VestingSigningClient { owner_signature: MessageSignature, pledge: Coin, fee: Option, - ) -> Result; - - async fn vesting_unbond_gateway(&self, fee: Option) -> Result; + ) -> Result { + let req = VestingExecuteMsg::BondGateway { + gateway, + owner_signature, + amount: pledge.into(), + }; + self.execute_vesting_contract(fee, req, vec![]).await + } + async fn vesting_unbond_gateway(&self, fee: Option) -> Result { + let req = VestingExecuteMsg::UnbondGateway {}; + self.execute_vesting_contract(fee, req, vec![]).await + } async fn vesting_track_unbond_gateway( &self, owner: &str, amount: Coin, fee: Option, - ) -> Result; + ) -> Result { + let req = VestingExecuteMsg::TrackUnbondGateway { + owner: owner.to_string(), + amount: amount.into(), + }; + self.execute_vesting_contract(fee, req, vec![]).await + } async fn vesting_bond_mixnode( &self, @@ -72,7 +128,19 @@ pub trait VestingSigningClient { owner_signature: MessageSignature, pledge: Coin, fee: Option, - ) -> Result; + ) -> Result { + self.execute_vesting_contract( + fee, + VestingExecuteMsg::BondMixnode { + mix_node, + cost_params, + owner_signature, + amount: pledge.into(), + }, + vec![], + ) + .await + } async fn vesting_pledge_more( &self, @@ -104,20 +172,34 @@ pub trait VestingSigningClient { .await } - async fn vesting_unbond_mixnode(&self, fee: Option) -> Result; + async fn vesting_unbond_mixnode(&self, fee: Option) -> Result { + let req = VestingExecuteMsg::UnbondMixnode {}; + self.execute_vesting_contract(fee, req, vec![]).await + } async fn vesting_track_unbond_mixnode( &self, owner: &str, amount: Coin, fee: Option, - ) -> Result; + ) -> Result { + let req = VestingExecuteMsg::TrackUnbondMixnode { + owner: owner.to_string(), + amount: amount.into(), + }; + self.execute_vesting_contract(fee, req, vec![]).await + } async fn withdraw_vested_coins( &self, amount: Coin, fee: Option, - ) -> Result; + ) -> Result { + let req = VestingExecuteMsg::WithdrawVestedCoins { + amount: amount.into(), + }; + self.execute_vesting_contract(fee, req, vec![]).await + } async fn vesting_track_undelegation( &self, @@ -125,7 +207,18 @@ pub trait VestingSigningClient { mix_id: MixId, amount: Coin, fee: Option, - ) -> Result; + ) -> Result { + self.execute_vesting_contract( + fee, + VestingExecuteMsg::TrackUndelegation { + owner: address.to_string(), + mix_id, + amount: amount.into(), + }, + vec![], + ) + .await + } async fn vesting_delegate_to_mixnode( &self, @@ -133,14 +226,35 @@ pub trait VestingSigningClient { amount: Coin, on_behalf_of: Option, fee: Option, - ) -> Result; + ) -> Result { + self.execute_vesting_contract( + fee, + VestingExecuteMsg::DelegateToMixnode { + mix_id, + amount: amount.into(), + on_behalf_of, + }, + vec![], + ) + .await + } async fn vesting_undelegate_from_mixnode( &self, mix_id: MixId, on_behalf_of: Option, fee: Option, - ) -> Result; + ) -> Result { + self.execute_vesting_contract( + fee, + VestingExecuteMsg::UndelegateFromMixnode { + mix_id, + on_behalf_of, + }, + vec![], + ) + .await + } async fn create_periodic_vesting_account( &self, @@ -150,7 +264,32 @@ pub trait VestingSigningClient { amount: Coin, cap: Option, fee: Option, - ) -> Result; + ) -> Result { + let req = VestingExecuteMsg::CreateAccount { + owner_address: owner_address.to_string(), + staking_address, + vesting_spec, + cap, + }; + self.execute_vesting_contract(fee, req, vec![amount]).await + } + + async fn vesting_track_reward( + &self, + amount: Coin, + address: String, + fee: Option, + ) -> Result { + self.execute_vesting_contract( + fee, + VestingExecuteMsg::TrackReward { + amount: amount.into(), + address, + }, + Vec::new(), + ) + .await + } async fn vesting_withdraw_operator_reward( &self, @@ -173,6 +312,32 @@ pub trait VestingSigningClient { .await } + async fn vesting_transfer_ownership( + &self, + to_address: String, + fee: Option, + ) -> Result { + self.execute_vesting_contract( + fee, + VestingExecuteMsg::TransferOwnership { to_address }, + Vec::new(), + ) + .await + } + + async fn update_staking_address( + &self, + to_address: Option, + fee: Option, + ) -> Result { + self.execute_vesting_contract( + fee, + VestingExecuteMsg::UpdateStakingAddress { to_address }, + Vec::new(), + ) + .await + } + async fn update_locked_pledge_cap( &self, address: AccountId, @@ -235,317 +400,166 @@ pub trait VestingSigningClient { } } -#[async_trait] -impl VestingSigningClient for NyxdClient { +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl VestingSigningClient for C +where + C: SigningCosmWasmClient + NymContractsProvider + Sync, + NyxdError: From<::Error>, +{ async fn execute_vesting_contract( &self, fee: Option, msg: VestingExecuteMsg, funds: Vec, ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + let vesting_contract_address = &self + .vesting_contract_address() + .ok_or_else(|| NyxdError::unavailable_contract_address("vesting contract"))?; + + let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier()))); let memo = msg.name().to_string(); - self.client - .execute( - self.address(), - self.vesting_contract_address(), - &msg, - fee, - memo, - funds, - ) - .await - } - async fn vesting_update_mixnode_cost_params( - &self, - new_costs: MixNodeCostParams, - fee: Option, - ) -> Result { - self.execute_vesting_contract( + let signer_address = &self.signer_addresses()?[0]; + self.execute( + signer_address, + vesting_contract_address, + &msg, fee, - VestingExecuteMsg::UpdateMixnodeCostParams { new_costs }, - vec![], + memo, + funds, ) .await } +} - async fn vesting_update_mixnode_config( - &self, - new_config: MixNodeConfigUpdate, - fee: Option, - ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); - let req = VestingExecuteMsg::UpdateMixnodeConfig { new_config }; - self.client - .execute( - self.address(), - self.vesting_contract_address(), - &req, - fee, - "VestingContract::UpdateMixnetConfig", - vec![], - ) - .await - } +#[cfg(test)] +mod tests { + use super::*; + use crate::nyxd::contract_traits::tests::{mock_coin, IgnoreValue}; - async fn vesting_update_gateway_config( - &self, - new_config: GatewayConfigUpdate, - fee: Option, - ) -> Result { - self.execute_vesting_contract( - fee, - VestingExecuteMsg::UpdateGatewayConfig { new_config }, - vec![], - ) - .await - } - - async fn update_mixnet_address( - &self, - address: &str, - fee: Option, - ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); - let req = VestingExecuteMsg::UpdateMixnetAddress { - address: address.to_string(), - }; - self.client - .execute( - self.address(), - self.vesting_contract_address(), - &req, - fee, - "VestingContract::UpdateMixnetAddress", - vec![], - ) - .await - } - - async fn vesting_bond_gateway( - &self, - gateway: Gateway, - owner_signature: MessageSignature, - pledge: Coin, - fee: Option, - ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); - let req = VestingExecuteMsg::BondGateway { - gateway, - owner_signature, - amount: pledge.into(), - }; - self.client - .execute( - self.address(), - self.vesting_contract_address(), - &req, - fee, - "VestingContract::BondGateway", - vec![], - ) - .await - } - - async fn vesting_unbond_gateway(&self, fee: Option) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); - let req = VestingExecuteMsg::UnbondGateway {}; - self.client - .execute( - self.address(), - self.vesting_contract_address(), - &req, - fee, - "VestingContract::UnbondGateway", - vec![], - ) - .await - } - - async fn vesting_track_unbond_gateway( - &self, - owner: &str, - amount: Coin, - fee: Option, - ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); - let req = VestingExecuteMsg::TrackUnbondGateway { - owner: owner.to_string(), - amount: amount.into(), - }; - self.client - .execute( - self.address(), - self.vesting_contract_address(), - &req, - fee, - "VestingContract::TrackUnbondGateway", - vec![], - ) - .await - } - - async fn vesting_bond_mixnode( - &self, - mix_node: MixNode, - cost_params: MixNodeCostParams, - owner_signature: MessageSignature, - pledge: Coin, - fee: Option, - ) -> Result { - self.execute_vesting_contract( - fee, + // it's enough that this compiles and clippy is happy about it + #[allow(dead_code)] + fn all_execute_variants_are_covered( + client: C, + msg: VestingExecuteMsg, + ) { + match msg { + VestingExecuteMsg::CreateFamily { label } => { + client.vesting_create_family(label, None).ignore() + } + VestingExecuteMsg::JoinFamily { + join_permit, + family_head, + } => client + .vesting_join_family(join_permit, family_head, None) + .ignore(), + VestingExecuteMsg::LeaveFamily { family_head } => { + client.vesting_leave_family(family_head, None).ignore() + } + VestingExecuteMsg::KickFamilyMember { member } => { + client.vesting_kick_family_member(member, None).ignore() + } + VestingExecuteMsg::TrackReward { amount, address } => client + .vesting_track_reward(amount.into(), address, None) + .ignore(), + VestingExecuteMsg::ClaimOperatorReward {} => { + client.vesting_withdraw_operator_reward(None).ignore() + } + VestingExecuteMsg::ClaimDelegatorReward { mix_id } => client + .vesting_withdraw_delegator_reward(mix_id, None) + .ignore(), + VestingExecuteMsg::UpdateMixnodeCostParams { new_costs } => client + .vesting_update_mixnode_cost_params(new_costs, None) + .ignore(), + VestingExecuteMsg::UpdateMixnodeConfig { new_config } => client + .vesting_update_mixnode_config(new_config, None) + .ignore(), + VestingExecuteMsg::UpdateMixnetAddress { address } => { + client.update_mixnet_address(&address, None).ignore() + } + VestingExecuteMsg::DelegateToMixnode { + mix_id, + amount, + on_behalf_of, + } => client + .vesting_delegate_to_mixnode(mix_id, amount.into(), on_behalf_of, None) + .ignore(), + VestingExecuteMsg::UndelegateFromMixnode { + mix_id, + on_behalf_of, + } => client + .vesting_undelegate_from_mixnode(mix_id, on_behalf_of, None) + .ignore(), + VestingExecuteMsg::CreateAccount { + owner_address, + staking_address, + vesting_spec, + cap, + } => client + .create_periodic_vesting_account( + &owner_address, + staking_address, + vesting_spec, + mock_coin(), + cap, + None, + ) + .ignore(), + VestingExecuteMsg::WithdrawVestedCoins { amount } => { + client.withdraw_vested_coins(amount.into(), None).ignore() + } + VestingExecuteMsg::TrackUndelegation { + owner, + mix_id, + amount, + } => client + .vesting_track_undelegation(&owner, mix_id, amount.into(), None) + .ignore(), VestingExecuteMsg::BondMixnode { mix_node, cost_params, owner_signature, - amount: pledge.into(), - }, - vec![], - ) - .await - } - - async fn vesting_unbond_mixnode(&self, fee: Option) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); - let req = VestingExecuteMsg::UnbondMixnode {}; - self.client - .execute( - self.address(), - self.vesting_contract_address(), - &req, - fee, - "VestingContract::UnbondMixnode", - vec![], - ) - .await - } - - async fn vesting_track_unbond_mixnode( - &self, - owner: &str, - amount: Coin, - fee: Option, - ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); - let req = VestingExecuteMsg::TrackUnbondMixnode { - owner: owner.to_string(), - amount: amount.into(), + amount, + } => client + .vesting_bond_mixnode(mix_node, cost_params, owner_signature, amount.into(), None) + .ignore(), + VestingExecuteMsg::PledgeMore { amount } => { + client.vesting_pledge_more(amount.into(), None).ignore() + } + VestingExecuteMsg::DecreasePledge { amount } => { + client.vesting_decrease_pledge(amount.into(), None).ignore() + } + VestingExecuteMsg::UnbondMixnode {} => client.vesting_unbond_mixnode(None).ignore(), + VestingExecuteMsg::TrackUnbondMixnode { owner, amount } => client + .vesting_track_unbond_mixnode(&owner, amount.into(), None) + .ignore(), + VestingExecuteMsg::TrackDecreasePledge { owner, amount } => client + .vesting_track_decrease_pledge(owner, amount.into(), None) + .ignore(), + VestingExecuteMsg::BondGateway { + gateway, + owner_signature, + amount, + } => client + .vesting_bond_gateway(gateway, owner_signature, amount.into(), None) + .ignore(), + VestingExecuteMsg::UnbondGateway {} => client.vesting_unbond_gateway(None).ignore(), + VestingExecuteMsg::TrackUnbondGateway { owner, amount } => client + .vesting_track_unbond_gateway(&owner, amount.into(), None) + .ignore(), + VestingExecuteMsg::UpdateGatewayConfig { new_config } => client + .vesting_update_gateway_config(new_config, None) + .ignore(), + VestingExecuteMsg::TransferOwnership { to_address } => { + client.vesting_transfer_ownership(to_address, None).ignore() + } + VestingExecuteMsg::UpdateStakingAddress { to_address } => { + client.update_staking_address(to_address, None).ignore() + } + VestingExecuteMsg::UpdateLockedPledgeCap { address, cap } => client + .update_locked_pledge_cap(address.parse().unwrap(), cap, None) + .ignore(), }; - self.client - .execute( - self.address(), - self.vesting_contract_address(), - &req, - fee, - "VestingContract::TrackUnbondMixnode", - vec![], - ) - .await - } - - async fn withdraw_vested_coins( - &self, - amount: Coin, - fee: Option, - ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); - let req = VestingExecuteMsg::WithdrawVestedCoins { - amount: amount.into(), - }; - self.client - .execute( - self.address(), - self.vesting_contract_address(), - &req, - fee, - "VestingContract::WithdrawVested", - vec![], - ) - .await - } - - async fn vesting_track_undelegation( - &self, - address: &str, - mix_id: MixId, - amount: Coin, - fee: Option, - ) -> Result { - self.execute_vesting_contract( - fee, - VestingExecuteMsg::TrackUndelegation { - owner: address.to_string(), - mix_id, - amount: amount.into(), - }, - vec![], - ) - .await - } - - async fn vesting_delegate_to_mixnode( - &self, - mix_id: MixId, - amount: Coin, - on_behalf_of: Option, - fee: Option, - ) -> Result { - self.execute_vesting_contract( - fee, - VestingExecuteMsg::DelegateToMixnode { - mix_id, - amount: amount.into(), - on_behalf_of, - }, - vec![], - ) - .await - } - - async fn vesting_undelegate_from_mixnode( - &self, - mix_id: MixId, - on_behalf_of: Option, - fee: Option, - ) -> Result { - self.execute_vesting_contract( - fee, - VestingExecuteMsg::UndelegateFromMixnode { - mix_id, - on_behalf_of, - }, - vec![], - ) - .await - } - - async fn create_periodic_vesting_account( - &self, - owner_address: &str, - staking_address: Option, - vesting_spec: Option, - amount: Coin, - cap: Option, - fee: Option, - ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); - let req = VestingExecuteMsg::CreateAccount { - owner_address: owner_address.to_string(), - staking_address, - vesting_spec, - cap, - }; - self.client - .execute( - self.address(), - self.vesting_contract_address(), - &req, - fee, - "VestingContract::CreatePeriodicVestingAccount", - vec![amount], - ) - .await } } diff --git a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/mod.rs b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/mod.rs new file mode 100644 index 0000000000..bfa126ba37 --- /dev/null +++ b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/mod.rs @@ -0,0 +1,8 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +pub mod query_client; +pub mod signing_client; + +pub use query_client::CosmWasmClient; +pub use signing_client::SigningCosmWasmClient; diff --git a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client.rs b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/query_client.rs similarity index 90% rename from common/client-libs/validator-client/src/nyxd/cosmwasm_client/client.rs rename to common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/query_client.rs index 4a512a02db..69e94b3387 100644 --- a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client.rs +++ b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/query_client.rs @@ -1,4 +1,4 @@ -// Copyright 2021-2023 - Nym Technologies SA +// Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 use crate::nyxd; @@ -8,7 +8,7 @@ use crate::nyxd::cosmwasm_client::types::{ Account, CodeDetails, Contract, ContractCodeId, SequenceResponse, SimulateResponse, }; use crate::nyxd::error::NyxdError; -use crate::nyxd::TendermintClient; +use crate::rpc::TendermintRpcClient; use async_trait::async_trait; use cosmrs::cosmwasm::{CodeInfoResponse, ContractCodeHistoryEntry}; use cosmrs::proto::cosmos::auth::v1beta1::{QueryAccountRequest, QueryAccountResponse}; @@ -28,6 +28,7 @@ use cosmrs::proto::cosmwasm::wasm::v1::{ }; use cosmrs::tendermint::{block, chain, Hash}; use cosmrs::{AccountId, Coin as CosmosCoin, Tx}; +use log::trace; use prost::Message; use serde::{Deserialize, Serialize}; use std::convert::TryFrom; @@ -38,25 +39,26 @@ use tendermint_rpc::{ Order, }; +#[cfg(not(target_arch = "wasm32"))] +use tokio::time::sleep; +#[cfg(not(target_arch = "wasm32"))] +use tokio::time::Instant; + +#[cfg(target_arch = "wasm32")] +use wasmtimer::std::Instant; +#[cfg(target_arch = "wasm32")] +use wasmtimer::tokio::sleep; + +pub const DEFAULT_BROADCAST_POLLING_RATE: Duration = Duration::from_secs(4); +pub const DEFAULT_BROADCAST_TIMEOUT: Duration = Duration::from_secs(60); + #[cfg(feature = "http-client")] #[async_trait] -impl CosmWasmClient for cosmrs::rpc::HttpClient { - fn broadcast_polling_rate(&self) -> Duration { - Duration::from_secs(4) - } - - fn broadcast_timeout(&self) -> Duration { - Duration::from_secs(60) - } -} - -#[async_trait] -pub trait CosmWasmClient: TendermintClient { - // this should probably get redesigned, but I'm leaving those like that temporarily to fix - // the underlying issue more quickly - fn broadcast_polling_rate(&self) -> Duration; - fn broadcast_timeout(&self) -> Duration; +impl CosmWasmClient for cosmrs::rpc::HttpClient {} +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait CosmWasmClient: TendermintRpcClient { // helper method to remove duplicate code involved in making abci requests with protobuf messages // TODO: perhaps it should have an additional argument to determine whether the response should // require proof? @@ -69,6 +71,9 @@ pub trait CosmWasmClient: TendermintClient { Req: Message, Res: Message + Default, { + if let Some(ref abci_path) = path { + trace!("performing query on abci path {abci_path}") + } let mut buf = Vec::with_capacity(req.encoded_len()); req.encode(&mut buf)?; @@ -242,7 +247,7 @@ pub trait CosmWasmClient: TendermintClient { where T: Into> + Send, { - Ok(tendermint_rpc::client::Client::broadcast_tx_async(self, tx).await?) + Ok(TendermintRpcClient::broadcast_tx_async(self, tx).await?) } /// Broadcast a transaction, returning the response from `CheckTx`. @@ -250,7 +255,7 @@ pub trait CosmWasmClient: TendermintClient { where T: Into> + Send, { - Ok(tendermint_rpc::client::Client::broadcast_tx_sync(self, tx).await?) + Ok(TendermintRpcClient::broadcast_tx_sync(self, tx).await?) } /// Broadcast a transaction, returning the response from `DeliverTx`. @@ -261,13 +266,23 @@ pub trait CosmWasmClient: TendermintClient { where T: Into> + Send, { - Ok(tendermint_rpc::client::Client::broadcast_tx_commit(self, tx).await?) + Ok(TendermintRpcClient::broadcast_tx_commit(self, tx).await?) } - async fn broadcast_tx(&self, tx: T) -> Result + async fn broadcast_tx( + &self, + tx: T, + timeout: impl Into> + Send, + poll_interval: impl Into> + Send, + ) -> Result where T: Into> + Send, { + let timeout = timeout.into().unwrap_or(DEFAULT_BROADCAST_TIMEOUT); + let poll_interval = poll_interval + .into() + .unwrap_or(DEFAULT_BROADCAST_POLLING_RATE); + let broadcasted = CosmWasmClient::broadcast_tx_sync(self, tx).await?; if broadcasted.code.is_err() { @@ -282,16 +297,16 @@ pub trait CosmWasmClient: TendermintClient { let tx_hash = broadcasted.hash; - let start = tokio::time::Instant::now(); + let start = Instant::now(); loop { log::debug!( "Polling for result of including {} in a block...", broadcasted.hash ); - if tokio::time::Instant::now().duration_since(start) >= self.broadcast_timeout() { + if Instant::now().duration_since(start) >= timeout { return Err(NyxdError::BroadcastTimeout { hash: tx_hash, - timeout: self.broadcast_timeout(), + timeout, }); } @@ -299,7 +314,7 @@ pub trait CosmWasmClient: TendermintClient { return Ok(poll_res); } - tokio::time::sleep(self.broadcast_polling_rate()).await; + sleep(poll_interval).await; } } @@ -477,6 +492,7 @@ pub trait CosmWasmClient: TendermintClient { .make_abci_query::<_, QuerySmartContractStateResponse>(path, req) .await?; + trace!("raw query response: {}", String::from_utf8_lossy(&res.data)); Ok(serde_json::from_slice(&res.data)?) } diff --git a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/signing_client.rs b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/signing_client.rs similarity index 85% rename from common/client-libs/validator-client/src/nyxd/cosmwasm_client/signing_client.rs rename to common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/signing_client.rs index f4d6a41829..5b3deadb68 100644 --- a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/signing_client.rs +++ b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/client_traits/signing_client.rs @@ -1,7 +1,7 @@ -// Copyright 2021-2023 - Nym Technologies SA +// Copyright 2023 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -use crate::nyxd::cosmwasm_client::client::CosmWasmClient; +use crate::nyxd::cosmwasm_client::client_traits::CosmWasmClient; use crate::nyxd::cosmwasm_client::helpers::{compress_wasm_code, CheckResponse}; use crate::nyxd::cosmwasm_client::logs::{self, parse_raw_logs}; use crate::nyxd::cosmwasm_client::types::*; @@ -9,6 +9,7 @@ use crate::nyxd::error::NyxdError; use crate::nyxd::fee::{Fee, DEFAULT_SIMULATED_GAS_MULTIPLIER}; use crate::nyxd::{Coin, GasAdjustable, GasPrice, TxResponse}; use crate::signing::signer::OfflineSigner; +use crate::signing::tx_signer::TxSigner; use crate::signing::SignerData; use async_trait::async_trait; use cosmrs::abci::GasInfo; @@ -26,21 +27,9 @@ use serde::Serialize; use sha2::Digest; use sha2::Sha256; use std::convert::TryInto; -use std::time::{Duration, SystemTime}; +use std::time::SystemTime; use tendermint_rpc::endpoint::broadcast; -#[cfg(feature = "http-client")] -use crate::signing::tx_signer::TxSigner; - -#[cfg(feature = "http-client")] -use tendermint_rpc::{Error as TendermintRpcError, SimpleRequest}; - -#[cfg(feature = "http-client")] -use cosmrs::rpc::{HttpClient, HttpClientUrl}; - -pub const DEFAULT_BROADCAST_POLLING_RATE: Duration = Duration::from_secs(4); -pub const DEFAULT_BROADCAST_TIMEOUT: Duration = Duration::from_secs(60); - fn empty_fee() -> tx::Fee { tx::Fee { amount: vec![], @@ -64,18 +53,17 @@ fn single_unspecified_signer_auth( .auth_info(empty_fee()) } -#[async_trait] -pub trait SigningCosmWasmClient: CosmWasmClient { - type Signer: OfflineSigner + Send + Sync; - - fn signer(&self) -> &Self::Signer; - +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait SigningCosmWasmClient: CosmWasmClient + TxSigner +where + NyxdError: From<::Error>, +{ + // TODO: would it somehow be possible to get rid of this method and allow for + // blanket implementation for anything that provides CosmWasmClient + TxSigner? fn gas_price(&self) -> &GasPrice; - fn signer_public_key(&self, signer_address: &AccountId) -> Option { - let account = self.signer().find_account(signer_address).ok()?; - Some(account.public_key().into()) - } + fn simulated_gas_multiplier(&self) -> f32; async fn simulate( &self, @@ -587,9 +575,9 @@ pub trait SigningCosmWasmClient: CosmWasmClient { let multiplier = multiplier.unwrap_or(DEFAULT_SIMULATED_GAS_MULTIPLIER); let gas = gas_estimation.adjust_gas(multiplier); - debug!("Gas estimation: {}", gas_estimation); - debug!("Multiplying the estimation by {}", multiplier); - debug!("Final gas limit used: {}", gas); + debug!("Gas estimation: {gas_estimation}"); + debug!("Multiplying the estimation by {multiplier}"); + debug!("Final gas limit used: {gas}"); let fee = self.gas_price() * gas; Ok::(tx::Fee::from_amount_and_gas(fee, gas)) @@ -687,7 +675,7 @@ pub trait SigningCosmWasmClient: CosmWasmClient { .to_bytes() .map_err(|_| NyxdError::SerializationError("Tx".to_owned()))?; - self.broadcast_tx(tx_bytes).await + self.broadcast_tx(tx_bytes, None, None).await } async fn sign( @@ -710,161 +698,14 @@ pub trait SigningCosmWasmClient: CosmWasmClient { } }; - self.sign_direct(signer_address, messages, fee, memo, signer_data) - } - - fn sign_amino( - &self, - signer_address: &AccountId, - messages: Vec, - fee: tx::Fee, - memo: impl Into + Send + 'static, - signer_data: SignerData, - ) -> Result; - - fn sign_direct( - &self, - signer_address: &AccountId, - messages: Vec, - fee: tx::Fee, - memo: impl Into + Send + 'static, - signer_data: SignerData, - ) -> Result; -} - -#[cfg(feature = "http-client")] -#[derive(Debug)] -pub struct Client { - // TODO: somehow nicely hide this guy if we decide to use our client in offline mode, - // maybe just convert it into an option? - // or maybe we need another level of indirection. tbd. - rpc_client: HttpClient, - tx_signer: TxSigner, - gas_price: GasPrice, - - broadcast_polling_rate: Duration, - broadcast_timeout: Duration, -} - -#[cfg(feature = "http-client")] -impl Client { - pub fn connect_with_signer( - endpoint: U, - signer: S, - gas_price: GasPrice, - ) -> Result - where - U: TryInto, - { - let rpc_client = HttpClient::new(endpoint)?; - Ok(Client { - rpc_client, - tx_signer: TxSigner::new(signer), - gas_price, - broadcast_polling_rate: DEFAULT_BROADCAST_POLLING_RATE, - broadcast_timeout: DEFAULT_BROADCAST_TIMEOUT, - }) - } - - pub fn offline(signer: S) -> TxSigner - where - S: OfflineSigner, - { - TxSigner::new(signer) - } - - pub fn change_endpoint(&mut self, new_endpoint: U) -> Result<(), NyxdError> - where - U: TryInto, - { - let new_rpc_client = HttpClient::new(new_endpoint)?; - self.rpc_client = new_rpc_client; - Ok(()) - } - - pub fn into_signer(self) -> S { - self.tx_signer.into_inner_signer() - } - - pub fn set_broadcast_polling_rate(&mut self, broadcast_polling_rate: Duration) { - self.broadcast_polling_rate = broadcast_polling_rate - } - - pub fn set_broadcast_timeout(&mut self, broadcast_timeout: Duration) { - self.broadcast_timeout = broadcast_timeout - } -} - -#[cfg(feature = "http-client")] -#[async_trait] -impl tendermint_rpc::client::Client for Client -where - S: Send + Sync, -{ - async fn perform(&self, request: R) -> Result - where - R: SimpleRequest, - { - self.rpc_client.perform(request).await - } -} - -#[cfg(feature = "http-client")] -#[async_trait] -impl CosmWasmClient for Client -where - S: Send + Sync, -{ - fn broadcast_polling_rate(&self) -> Duration { - self.broadcast_polling_rate - } - - fn broadcast_timeout(&self) -> Duration { - self.broadcast_timeout - } -} - -#[cfg(feature = "http-client")] -#[async_trait] -impl SigningCosmWasmClient for Client -where - S: OfflineSigner + Send + Sync, - NyxdError: From, -{ - type Signer = S; - - fn signer(&self) -> &Self::Signer { - self.tx_signer.signer() - } - - fn gas_price(&self) -> &GasPrice { - &self.gas_price - } - - fn sign_amino( - &self, - signer_address: &AccountId, - messages: Vec, - fee: tx::Fee, - memo: impl Into + Send + 'static, - signer_data: SignerData, - ) -> Result { - Ok(self - .tx_signer - .sign_amino(signer_address, messages, fee, memo, signer_data)?) - } - - fn sign_direct( - &self, - signer_address: &AccountId, - messages: Vec, - fee: tx::Fee, - memo: impl Into + Send + 'static, - signer_data: SignerData, - ) -> Result { - Ok(self - .tx_signer - .sign_direct(signer_address, messages, fee, memo, signer_data)?) + Ok(::sign_direct( + self, + signer_address, + messages, + fee, + memo, + signer_data, + )?) } } diff --git a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/helpers.rs b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/helpers.rs index 64c2fd25fa..b639b223e3 100644 --- a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/helpers.rs +++ b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/helpers.rs @@ -48,7 +48,6 @@ impl CheckResponse for crate::nyxd::TxResponse { } } -#[cfg(feature = "signing")] pub(crate) fn compress_wasm_code(code: &[u8]) -> Result, NyxdError> { use flate2::write::GzEncoder; use flate2::Compression; diff --git a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/mod.rs b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/mod.rs index 0a2d2c7c32..7ebff2ef16 100644 --- a/common/client-libs/validator-client/src/nyxd/cosmwasm_client/mod.rs +++ b/common/client-libs/validator-client/src/nyxd/cosmwasm_client/mod.rs @@ -1,37 +1,158 @@ // Copyright 2021 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -#[cfg(feature = "http-client")] +use crate::nyxd::cosmwasm_client::client_traits::{CosmWasmClient, SigningCosmWasmClient}; use crate::nyxd::error::NyxdError; -#[cfg(feature = "http-client")] -use cosmrs::rpc::{Error as TendermintRpcError, HttpClient, HttpClientUrl}; -#[cfg(feature = "http-client")] -use std::convert::TryInto; +use crate::nyxd::{Config, GasPrice}; +use crate::rpc::TendermintRpcClient; +use crate::signing::{ + signer::{NoSigner, OfflineSigner}, + AccountData, +}; +use async_trait::async_trait; +use tendermint_rpc::{Error as TendermintRpcError, SimpleRequest}; -pub mod client; +#[cfg(feature = "http-client")] +use cosmrs::rpc::{HttpClient, HttpClientUrl}; +use cosmrs::tx::{Raw, SignDoc}; + +pub mod client_traits; mod helpers; pub mod logs; pub mod types; -#[cfg(feature = "signing")] -pub mod signing_client; +#[derive(Debug)] +pub(crate) struct SigningClientOptions { + gas_price: GasPrice, + simulated_gas_multiplier: f32, +} + +impl<'a> From<&'a Config> for SigningClientOptions { + fn from(value: &'a Config) -> Self { + SigningClientOptions { + gas_price: value.gas_price.clone(), + simulated_gas_multiplier: value.simulated_gas_multiplier, + } + } +} + +// convenience wrapper around query client to allow for optional signing +#[derive(Debug)] +pub(crate) struct MaybeSigningClient { + client: C, + signer: S, + opts: SigningClientOptions, +} + +impl MaybeSigningClient { + pub(crate) fn new(client: C, opts: SigningClientOptions) -> Self { + MaybeSigningClient { + client, + signer: Default::default(), + opts, + } + } +} + +impl MaybeSigningClient { + pub(crate) fn new_signing(client: C, signer: S, opts: SigningClientOptions) -> Self + where + S: OfflineSigner, + { + MaybeSigningClient { + client, + signer, + opts, + } + } +} #[cfg(feature = "http-client")] -pub fn connect(endpoint: U) -> Result -where - U: TryInto, -{ - Ok(HttpClient::new(endpoint)?) +impl MaybeSigningClient { + pub(crate) fn change_endpoint(&mut self, new_endpoint: U) -> Result<(), NyxdError> + where + U: TryInto, + { + self.client = HttpClient::new(new_endpoint)?; + Ok(()) + } } -#[cfg(all(feature = "signing", feature = "http-client"))] -pub fn connect_with_signer( - endpoint: U, - signer: S, - gas_price: crate::nyxd::GasPrice, -) -> Result, NyxdError> +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl TendermintRpcClient for MaybeSigningClient where - U: TryInto, + C: TendermintRpcClient + Send + Sync, + S: Send + Sync, { - signing_client::Client::connect_with_signer(endpoint, signer, gas_price) + async fn perform(&self, request: R) -> Result + where + R: SimpleRequest, + { + self.client.perform(request).await + } } + +impl OfflineSigner for MaybeSigningClient +where + S: OfflineSigner, +{ + type Error = S::Error; + + fn get_accounts(&self) -> Result, Self::Error> { + self.signer.get_accounts() + } + + fn sign_direct_with_account( + &self, + signer: &AccountData, + sign_doc: SignDoc, + ) -> Result { + self.signer.sign_direct_with_account(signer, sign_doc) + } +} + +#[async_trait] +impl CosmWasmClient for MaybeSigningClient +where + C: TendermintRpcClient + Send + Sync, + S: Send + Sync, +{ +} + +#[async_trait] +impl SigningCosmWasmClient for MaybeSigningClient +where + C: TendermintRpcClient + Send + Sync, + S: OfflineSigner + Send + Sync, + NyxdError: From, +{ + fn gas_price(&self) -> &GasPrice { + &self.opts.gas_price + } + + fn simulated_gas_multiplier(&self) -> f32 { + self.opts.simulated_gas_multiplier + } +} + +// +// #[cfg(feature = "http-client")] +// pub fn connect(endpoint: U) -> Result, NyxdError> +// where +// U: TryInto, +// { +// Ok(HttpClient::new(endpoint)?) +// } +// +// #[cfg(all(feature = "signing", feature = "http-client"))] +// pub fn connect_with_signer( +// endpoint: U, +// signer: S, +// gas_price: crate::nyxd::GasPrice, +// ) -> Result, NyxdError> +// where +// U: TryInto, +// { +// signing_client::Client::connect_with_signer(endpoint, signer, gas_price) +// } diff --git a/common/client-libs/validator-client/src/nyxd/error.rs b/common/client-libs/validator-client/src/nyxd/error.rs index b63be6e75c..e247dff6a1 100644 --- a/common/client-libs/validator-client/src/nyxd/error.rs +++ b/common/client-libs/validator-client/src/nyxd/error.rs @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::nyxd::cosmwasm_client::types::ContractCodeId; +use crate::signing::direct_wallet::DirectSecp256k1HdWalletError; use cosmrs::tendermint::Hash; use cosmrs::{ tendermint::{abci::Code as AbciCode, block}, @@ -11,9 +12,6 @@ use std::{io, time::Duration}; use tendermint_rpc::endpoint::abci_query::AbciQuery; use thiserror::Error; -#[cfg(feature = "signing")] -use crate::signing::direct_wallet::DirectSecp256k1HdWalletError; - pub use cosmrs::tendermint::error::Error as TendermintError; pub use tendermint_rpc::{ error::{Error as TendermintRpcError, ErrorDetail as TendermintRpcErrorDetail}, @@ -25,7 +23,6 @@ pub enum NyxdError { #[error("No contract address is available to perform the call: {0}")] NoContractAddressAvailable(String), - #[cfg(feature = "signing")] #[error(transparent)] WalletError(#[from] DirectSecp256k1HdWalletError), @@ -224,4 +221,8 @@ impl NyxdError { _ => false, } } + + pub fn unavailable_contract_address>(contract_type: S) -> Self { + NyxdError::NoContractAddressAvailable(contract_type.into()) + } } diff --git a/common/client-libs/validator-client/src/nyxd/fee/gas_price.rs b/common/client-libs/validator-client/src/nyxd/fee/gas_price.rs index caccceb436..6f68dbbcf2 100644 --- a/common/client-libs/validator-client/src/nyxd/fee/gas_price.rs +++ b/common/client-libs/validator-client/src/nyxd/fee/gas_price.rs @@ -6,6 +6,7 @@ use cosmrs::Coin; use cosmrs::Gas; use cosmwasm_std::{Decimal, Fraction, Uint128}; use nym_config::defaults; +use nym_network_defaults::NymNetworkDetails; use std::ops::Mul; use std::str::FromStr; @@ -73,6 +74,19 @@ impl FromStr for GasPrice { } } +impl<'a> TryFrom<&'a NymNetworkDetails> for GasPrice { + type Error = NyxdError; + + fn try_from(value: &'a NymNetworkDetails) -> Result { + format!( + "{}{}", + value.default_gas_price_amount(), + value.chain_details.mix_denom.base + ) + .parse() + } +} + impl GasPrice { pub fn new_with_default_price(denom: &str) -> Result { format!("{}{}", defaults::GAS_PRICE_AMOUNT, denom).parse() diff --git a/common/client-libs/validator-client/src/nyxd/mod.rs b/common/client-libs/validator-client/src/nyxd/mod.rs index 9a4ee1eba4..d0cf1e0b3e 100644 --- a/common/client-libs/validator-client/src/nyxd/mod.rs +++ b/common/client-libs/validator-client/src/nyxd/mod.rs @@ -1,18 +1,31 @@ // Copyright 2021 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -use crate::nyxd::cosmwasm_client::types::Account; +use crate::nyxd::contract_traits::{NymContractsProvider, TypedNymContracts}; +use crate::nyxd::cosmwasm_client::types::{ + ChangeAdminResult, ContractCodeId, ExecuteResult, InstantiateOptions, InstantiateResult, + MigrateResult, SequenceResponse, SimulateResponse, UploadResult, +}; +use crate::nyxd::cosmwasm_client::MaybeSigningClient; use crate::nyxd::error::NyxdError; -use log::{debug, trace}; +use crate::nyxd::fee::DEFAULT_SIMULATED_GAS_MULTIPLIER; +use crate::signing::signer::NoSigner; +use crate::signing::signer::OfflineSigner; +use crate::signing::tx_signer::TxSigner; +use crate::signing::AccountData; +use async_trait::async_trait; +use cosmrs::cosmwasm; +use cosmrs::tx::{Msg, Raw, SignDoc}; +use cosmwasm_std::Addr; use nym_network_defaults::{ChainDetails, NymNetworkDetails}; -use serde::{Deserialize, Serialize}; -use tendermint_rpc::{endpoint::block::Response as BlockResponse, query::Query}; - -#[cfg(feature = "http-client")] +use serde::Serialize; +use std::time::SystemTime; +use tendermint_rpc::endpoint::block::Response as BlockResponse; use tendermint_rpc::Error as TendermintRpcError; -pub use crate::nyxd::cosmwasm_client::client::CosmWasmClient; +pub use crate::nyxd::cosmwasm_client::client_traits::{CosmWasmClient, SigningCosmWasmClient}; pub use crate::nyxd::fee::Fee; +pub use crate::rpc::TendermintRpcClient; pub use coin::Coin; pub use cosmrs::bank::MsgSend; pub use cosmrs::tendermint::abci::{response::DeliverTx, Event, EventAttribute}; @@ -26,269 +39,312 @@ pub use cosmrs::Gas; pub use cosmrs::{bip32, AccountId, Denom}; pub use cosmwasm_std::Coin as CosmWasmCoin; pub use fee::{gas_price::GasPrice, GasAdjustable, GasAdjustment}; -pub use tendermint_rpc::{client::Client as TendermintClient, Request, Response, SimpleRequest}; pub use tendermint_rpc::{ endpoint::{tx::Response as TxResponse, validators::Response as ValidatorResponse}, Paging, }; +pub use tendermint_rpc::{Request, Response, SimpleRequest}; -#[cfg(feature = "http-client")] -pub use cosmrs::rpc::{HttpClient as QueryNyxdClient, HttpClientUrl}; - -#[cfg(all(feature = "signing", feature = "http-client"))] -use crate::nyxd::cosmwasm_client::signing_client; -#[cfg(feature = "signing")] -use crate::nyxd::cosmwasm_client::types::{ - ChangeAdminResult, ContractCodeId, ExecuteResult, InstantiateOptions, InstantiateResult, - MigrateResult, SequenceResponse, SimulateResponse, UploadResult, -}; -#[cfg(all(feature = "signing", feature = "http-client"))] +// #[cfg(feature = "http-client")] use crate::signing::direct_wallet::DirectSecp256k1HdWallet; -#[cfg(all(feature = "signing", feature = "http-client"))] -use crate::signing::signer::OfflineSigner; -#[cfg(feature = "signing")] -use cosmrs::cosmwasm; -#[cfg(feature = "signing")] -use cosmrs::tx::Msg; -#[cfg(feature = "signing")] -use cosmwasm_std::Addr; -#[cfg(feature = "signing")] -use std::time::SystemTime; - -#[cfg(feature = "signing")] -pub use crate::nyxd::cosmwasm_client::signing_client::SigningCosmWasmClient; - -#[cfg(all(feature = "signing", feature = "http-client"))] -pub use signing_client::Client as SigningNyxdClient; - -#[cfg(all(feature = "signing", feature = "http-client"))] -pub type DirectSigningNyxdClient = SigningNyxdClient; +#[cfg(feature = "http-client")] +use crate::{DirectSigningHttpRpcNyxdClient, QueryHttpRpcNyxdClient}; +use crate::{DirectSigningReqwestRpcNyxdClient, QueryReqwestRpcNyxdClient, ReqwestRpcClient}; +#[cfg(feature = "http-client")] +use cosmrs::rpc::{HttpClient, HttpClientUrl}; +use url::Url; pub mod coin; +pub mod contract_traits; pub mod cosmwasm_client; pub mod error; pub mod fee; -pub mod traits; #[derive(Debug, Clone)] pub struct Config { pub(crate) chain_details: ChainDetails, - - // I'd love to have used `NymContracts` struct directly here instead, - // however, I'd really prefer to use something more strongly typed (i.e. AccountId vs String) - pub(crate) mixnet_contract_address: Option, - pub(crate) vesting_contract_address: Option, - pub(crate) coconut_bandwidth_contract_address: Option, - pub(crate) group_contract_address: Option, - pub(crate) multisig_contract_address: Option, - pub(crate) coconut_dkg_contract_address: Option, - pub(crate) service_provider_contract_address: Option, - pub(crate) name_service_contract_address: Option, - // TODO: add this in later commits - // pub(crate) gas_price: GasPrice, + pub(crate) contracts: TypedNymContracts, + pub(crate) gas_price: GasPrice, + pub(crate) simulated_gas_multiplier: f32, } impl Config { - fn parse_optional_account( - raw: Option<&String>, - expected_prefix: &str, - ) -> Result, NyxdError> { - if let Some(address) = raw { - trace!("Raw address:{:?}", raw); - trace!("Expected prefix:{:?}", expected_prefix); - let parsed: AccountId = address - .parse() - .map_err(|_| NyxdError::MalformedAccountAddress(address.clone()))?; - debug!("Parsed prefix:{:?}", parsed); - if parsed.prefix() != expected_prefix { - Err(NyxdError::UnexpectedBech32Prefix { - got: parsed.prefix().into(), - expected: expected_prefix.into(), - }) - } else { - Ok(Some(parsed)) - } - } else { - Ok(None) - } - } - pub fn try_from_nym_network_details(details: &NymNetworkDetails) -> Result { - let prefix = &details.chain_details.bech32_account_prefix; Ok(Config { chain_details: details.chain_details.clone(), - mixnet_contract_address: Self::parse_optional_account( - details.contracts.mixnet_contract_address.as_ref(), - prefix, - )?, - vesting_contract_address: Self::parse_optional_account( - details.contracts.vesting_contract_address.as_ref(), - prefix, - )?, - coconut_bandwidth_contract_address: Self::parse_optional_account( - details - .contracts - .coconut_bandwidth_contract_address - .as_ref(), - prefix, - )?, - group_contract_address: Self::parse_optional_account( - details.contracts.group_contract_address.as_ref(), - prefix, - )?, - multisig_contract_address: Self::parse_optional_account( - details.contracts.multisig_contract_address.as_ref(), - prefix, - )?, - coconut_dkg_contract_address: Self::parse_optional_account( - details.contracts.coconut_dkg_contract_address.as_ref(), - prefix, - )?, - service_provider_contract_address: Self::parse_optional_account( - details - .contracts - .service_provider_directory_contract_address - .as_ref(), - prefix, - )?, - name_service_contract_address: Self::parse_optional_account( - details.contracts.name_service_contract_address.as_ref(), - prefix, - )?, + contracts: TypedNymContracts::try_from(details.contracts.clone())?, + gas_price: details.try_into()?, + simulated_gas_multiplier: DEFAULT_SIMULATED_GAS_MULTIPLIER, }) } + + pub fn with_simulated_gas_multplier(mut self, simulated_gas_multiplier: f32) -> Self { + self.simulated_gas_multiplier = simulated_gas_multiplier; + self + } } #[derive(Debug)] -pub struct NyxdClient { - client: C, +pub struct NyxdClient { + client: MaybeSigningClient, config: Config, - // TODO: refactor because that field is only really used for signing - #[allow(dead_code)] - client_address: Option>, - simulated_gas_multiplier: f32, } +// terrible name, but can't really change it because it will break so many uses #[cfg(feature = "http-client")] -impl NyxdClient { - pub fn connect(config: Config, endpoint: U) -> Result, NyxdError> +impl NyxdClient { + pub fn connect(config: Config, endpoint: U) -> Result where U: TryInto, { + let client = HttpClient::new(endpoint)?; + Ok(NyxdClient { - client: QueryNyxdClient::new(endpoint)?, + client: MaybeSigningClient::new(client, (&config).into()), config, - client_address: None, - simulated_gas_multiplier: crate::nyxd::fee::DEFAULT_SIMULATED_GAS_MULTIPLIER, }) } } -#[cfg(all(feature = "signing", feature = "http-client"))] -impl NyxdClient> { - // TODO: rename this one - pub fn connect_with_mnemonic( +impl NyxdClient { + pub fn connect_reqwest( + config: Config, + endpoint: Url, + ) -> Result { + let client = ReqwestRpcClient::new(endpoint); + + Ok(NyxdClient { + client: MaybeSigningClient::new(client, (&config).into()), + config, + }) + } +} + +impl NyxdClient { + pub fn new(config: Config, client: C) -> Self { + NyxdClient { + client: MaybeSigningClient::new(client, (&config).into()), + config, + } + } +} + +// terrible name, but can't really change it because it will break so many uses +#[cfg(feature = "http-client")] +impl NyxdClient { + pub fn connect_with_mnemonic( config: Config, endpoint: U, mnemonic: bip39::Mnemonic, - gas_price: Option, - ) -> Result>, NyxdError> + ) -> Result where U: TryInto, { + let client = HttpClient::new(endpoint)?; + let prefix = &config.chain_details.bech32_account_prefix; let wallet = DirectSecp256k1HdWallet::from_mnemonic(prefix, mnemonic); - Self::connect_with_signer(config, endpoint, wallet, gas_price) + Ok(Self::connect_with_signer(config, client, wallet)) } } -#[cfg(all(feature = "signing", feature = "http-client"))] -impl NyxdClient> +impl NyxdClient { + pub fn connect_reqwest_with_mnemonic( + config: Config, + endpoint: Url, + mnemonic: bip39::Mnemonic, + ) -> DirectSigningReqwestRpcNyxdClient { + let client = ReqwestRpcClient::new(endpoint); + + let prefix = &config.chain_details.bech32_account_prefix; + let wallet = DirectSecp256k1HdWallet::from_mnemonic(prefix, mnemonic); + Self::connect_with_signer(config, client, wallet) + } +} + +impl NyxdClient where S: OfflineSigner, - // I have no idea why S::Error: Into bound wouldn't do the trick - NyxdError: From, { - #[cfg(feature = "http-client")] - pub fn connect_with_signer( - config: Config, - endpoint: U, - signer: S, - gas_price: Option, - ) -> Result>, NyxdError> - where - U: TryInto, - { - let denom = &config.chain_details.mix_denom.base; - let client_address = signer - .get_accounts()? - .into_iter() - .map(|account| account.address) - .collect(); - let gas_price = gas_price.unwrap_or(GasPrice::new_with_default_price(denom)?); - - Ok(NyxdClient { - client: SigningNyxdClient::connect_with_signer(endpoint, signer, gas_price)?, + pub fn connect_with_signer(config: Config, client: C, signer: S) -> NyxdClient { + NyxdClient { + client: MaybeSigningClient::new_signing(client, signer, (&config).into()), config, - client_address: Some(client_address), - simulated_gas_multiplier: crate::nyxd::fee::DEFAULT_SIMULATED_GAS_MULTIPLIER, - }) + } } +} - #[cfg(feature = "http-client")] +#[cfg(feature = "http-client")] +impl NyxdClient { pub fn change_endpoint(&mut self, new_endpoint: U) -> Result<(), NyxdError> where U: TryInto, { self.client.change_endpoint(new_endpoint) } +} - pub fn into_signer(self) -> S { - self.client.into_signer() +// no trait bounds +impl NyxdClient { + pub fn new_signing(config: Config, client: C, signer: S) -> Self + where + S: OfflineSigner, + { + NyxdClient { + client: MaybeSigningClient::new_signing(client, signer, (&config).into()), + config, + } + } + + pub fn current_config(&self) -> &Config { + &self.config + } + + pub fn current_chain_details(&self) -> &ChainDetails { + &self.config.chain_details + } + + pub fn set_mixnet_contract_address(&mut self, address: AccountId) { + self.config.contracts.mixnet_contract_address = Some(address); + } + + pub fn set_vesting_contract_address(&mut self, address: AccountId) { + self.config.contracts.vesting_contract_address = Some(address); + } + + pub fn set_coconut_bandwidth_contract_address(&mut self, address: AccountId) { + self.config.contracts.coconut_bandwidth_contract_address = Some(address); + } + + pub fn set_multisig_contract_address(&mut self, address: AccountId) { + self.config.contracts.multisig_contract_address = Some(address); + } + + pub fn set_service_provider_contract_address(&mut self, address: AccountId) { + self.config + .contracts + .service_provider_directory_contract_address = Some(address); + } + + pub fn set_simulated_gas_multiplier(&mut self, multiplier: f32) { + self.config.simulated_gas_multiplier = multiplier; } } -#[cfg(feature = "signing")] -impl NyxdClient -where - C: SigningCosmWasmClient + Sync, -{ - pub fn address(&self) -> &AccountId - where - C: SigningCosmWasmClient, - { - // if this is a signing client (as required by the trait bound), it must have the address set - &self.client_address.as_ref().unwrap()[0] +impl NymContractsProvider for NyxdClient { + fn mixnet_contract_address(&self) -> Option<&AccountId> { + self.config.contracts.mixnet_contract_address.as_ref() } - pub fn cw_address(&self) -> Addr - where - C: SigningCosmWasmClient, - { + fn vesting_contract_address(&self) -> Option<&AccountId> { + self.config.contracts.vesting_contract_address.as_ref() + } + + fn coconut_bandwidth_contract_address(&self) -> Option<&AccountId> { + self.config + .contracts + .coconut_bandwidth_contract_address + .as_ref() + } + + fn dkg_contract_address(&self) -> Option<&AccountId> { + self.config.contracts.coconut_dkg_contract_address.as_ref() + } + + fn group_contract_address(&self) -> Option<&AccountId> { + self.config.contracts.group_contract_address.as_ref() + } + + fn multisig_contract_address(&self) -> Option<&AccountId> { + self.config.contracts.multisig_contract_address.as_ref() + } + + fn name_service_contract_address(&self) -> Option<&AccountId> { + self.config.contracts.name_service_contract_address.as_ref() + } + + fn service_provider_contract_address(&self) -> Option<&AccountId> { + self.config + .contracts + .service_provider_directory_contract_address + .as_ref() + } +} + +// queries +impl NyxdClient +where + C: TendermintRpcClient + Send + Sync, + S: Send + Sync, +{ + pub async fn get_account_public_key( + &self, + address: &AccountId, + ) -> Result, NyxdError> { + if let Some(account) = self.client.get_account(address).await? { + let base_account = account.try_get_base_account()?; + return Ok(base_account.pubkey); + } + + Ok(None) + } + + pub async fn get_current_block_timestamp(&self) -> Result { + self.get_block_timestamp(None).await + } + + pub async fn get_block_timestamp( + &self, + height: Option, + ) -> Result { + Ok(self.client.get_block(height).await?.block.header.time) + } + + pub async fn get_block(&self, height: Option) -> Result { + self.client.get_block(height).await + } + + pub async fn get_current_block_height(&self) -> Result { + self.client.get_height().await + } + + /// Obtains the hash of a block specified by the provided height. + /// + /// # Arguments + /// + /// * `height`: height of the block for which we want to obtain the hash. + pub async fn get_block_hash(&self, height: u32) -> Result { + self.client + .get_block(Some(height)) + .await + .map(|block| block.block_id.hash) + } +} + +// signing +impl NyxdClient +where + C: TendermintRpcClient + Send + Sync, + S: OfflineSigner + Send + Sync, + NyxdError: From<::Error>, +{ + pub fn address(&self) -> AccountId { + match self.client.signer_addresses() { + Ok(addresses) => addresses[0].clone(), + Err(_) => { + panic!("key derivation failure") + } + } + } + + pub fn cw_address(&self) -> Addr { // the call to unchecked is fine here as we're converting directly from `AccountId` // which must have been a valid bech32 address Addr::unchecked(self.address().as_ref()) } - pub async fn account_sequence(&self) -> Result - where - C: SigningCosmWasmClient + Sync, - { - self.client.get_sequence(self.address()).await - } - - pub fn signer(&self) -> &::Signer - where - C: SigningCosmWasmClient, - { - self.client.signer() - } - - pub fn gas_price(&self) -> &GasPrice - where - C: SigningCosmWasmClient, - { - self.client.gas_price() + pub async fn account_sequence(&self) -> Result { + self.client.get_sequence(&self.address()).await } pub fn wrap_contract_execute_message( @@ -298,11 +354,10 @@ where funds: Vec, ) -> Result where - C: SigningCosmWasmClient, M: ?Sized + Serialize, { Ok(cosmwasm::MsgExecuteContract { - sender: self.address().clone(), + sender: self.address(), contract: contract_address.clone(), msg: serde_json::to_vec(msg)?, funds: funds.into_iter().map(Into::into).collect(), @@ -311,13 +366,12 @@ where pub async fn simulate(&self, messages: I) -> Result where - C: SigningCosmWasmClient + Sync, I: IntoIterator + Send, M: Msg, { self.client .simulate( - self.address(), + &self.address(), messages .into_iter() .map(|msg| msg.into_any()) @@ -337,13 +391,10 @@ where amount: Vec, memo: impl Into + Send + 'static, fee: Option, - ) -> Result - where - C: SigningCosmWasmClient + Sync, - { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + ) -> Result { + let fee = fee.unwrap_or(Fee::Auto(Some(self.config.simulated_gas_multiplier))); self.client - .send_tokens(self.address(), recipient, amount, fee, memo) + .send_tokens(&self.address(), recipient, amount, fee, memo) .await } @@ -353,13 +404,10 @@ where msgs: Vec<(AccountId, Vec)>, memo: impl Into + Send + 'static, fee: Option, - ) -> Result - where - C: SigningCosmWasmClient + Sync, - { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + ) -> Result { + let fee = fee.unwrap_or(Fee::Auto(Some(self.config.simulated_gas_multiplier))); self.client - .send_tokens_multiple(self.address(), msgs, fee, memo) + .send_tokens_multiple(&self.address(), msgs, fee, memo) .await } @@ -372,14 +420,11 @@ where allowed_messages: Vec, memo: impl Into + Send + 'static, fee: Option, - ) -> Result - where - C: SigningCosmWasmClient + Sync, - { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + ) -> Result { + let fee = fee.unwrap_or(Fee::Auto(Some(self.config.simulated_gas_multiplier))); self.client .grant_allowance( - self.address(), + &self.address(), grantee, spend_limit, expiration, @@ -396,13 +441,10 @@ where grantee: &AccountId, memo: impl Into + Send + 'static, fee: Option, - ) -> Result - where - C: SigningCosmWasmClient + Sync, - { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + ) -> Result { + let fee = fee.unwrap_or(Fee::Auto(Some(self.config.simulated_gas_multiplier))); self.client - .revoke_allowance(self.address(), grantee, fee, memo) + .revoke_allowance(&self.address(), grantee, fee, memo) .await } @@ -415,12 +457,11 @@ where funds: Vec, ) -> Result where - C: SigningCosmWasmClient + Sync, M: ?Sized + Serialize + Sync, { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + let fee = fee.unwrap_or(Fee::Auto(Some(self.config.simulated_gas_multiplier))); self.client - .execute(self.address(), contract_address, msg, fee, memo, funds) + .execute(&self.address(), contract_address, msg, fee, memo, funds) .await } @@ -432,13 +473,12 @@ where memo: impl Into + Send + 'static, ) -> Result where - C: SigningCosmWasmClient + Sync, I: IntoIterator)> + Send, M: Serialize, { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + let fee = fee.unwrap_or(Fee::Auto(Some(self.config.simulated_gas_multiplier))); self.client - .execute_multiple(self.address(), contract_address, msgs, fee, memo) + .execute_multiple(&self.address(), contract_address, msgs, fee, memo) .await } @@ -447,13 +487,10 @@ where wasm_code: Vec, memo: impl Into + Send + 'static, fee: Option, - ) -> Result - where - C: SigningCosmWasmClient + Sync, - { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + ) -> Result { + let fee = fee.unwrap_or(Fee::Auto(Some(self.config.simulated_gas_multiplier))); self.client - .upload(self.address(), wasm_code, fee, memo) + .upload(&self.address(), wasm_code, fee, memo) .await } @@ -467,12 +504,11 @@ where fee: Option, ) -> Result where - C: SigningCosmWasmClient + Sync, M: ?Sized + Serialize + Sync, { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + let fee = fee.unwrap_or(Fee::Auto(Some(self.config.simulated_gas_multiplier))); self.client - .instantiate(self.address(), code_id, msg, label, fee, memo, options) + .instantiate(&self.address(), code_id, msg, label, fee, memo, options) .await } @@ -482,13 +518,10 @@ where new_admin: &AccountId, memo: impl Into + Send + 'static, fee: Option, - ) -> Result - where - C: SigningCosmWasmClient + Sync, - { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + ) -> Result { + let fee = fee.unwrap_or(Fee::Auto(Some(self.config.simulated_gas_multiplier))); self.client - .update_admin(self.address(), contract_address, new_admin, fee, memo) + .update_admin(&self.address(), contract_address, new_admin, fee, memo) .await } @@ -497,13 +530,10 @@ where contract_address: &AccountId, memo: impl Into + Send + 'static, fee: Option, - ) -> Result - where - C: SigningCosmWasmClient + Sync, - { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + ) -> Result { + let fee = fee.unwrap_or(Fee::Auto(Some(self.config.simulated_gas_multiplier))); self.client - .clear_admin(self.address(), contract_address, fee, memo) + .clear_admin(&self.address(), contract_address, fee, memo) .await } @@ -516,258 +546,71 @@ where fee: Option, ) -> Result where - C: SigningCosmWasmClient + Sync, M: ?Sized + Serialize + Sync, { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); + let fee = fee.unwrap_or(Fee::Auto(Some(self.config.simulated_gas_multiplier))); self.client - .migrate(self.address(), contract_address, code_id, fee, msg, memo) + .migrate(&self.address(), contract_address, code_id, fee, msg, memo) .await } } -impl NyxdClient { - pub fn current_config(&self) -> &Config { - &self.config - } +// ugh. is there a way to avoid that nasty trait implementation? - pub fn current_chain_details(&self) -> &ChainDetails { - &self.config.chain_details - } - - pub fn set_mixnet_contract_address(&mut self, address: AccountId) { - self.config.mixnet_contract_address = Some(address); - } - - pub fn set_vesting_contract_address(&mut self, address: AccountId) { - self.config.vesting_contract_address = Some(address); - } - - pub fn set_coconut_bandwidth_contract_address(&mut self, address: AccountId) { - self.config.coconut_bandwidth_contract_address = Some(address); - } - - pub fn set_multisig_contract_address(&mut self, address: AccountId) { - self.config.multisig_contract_address = Some(address); - } - - pub fn set_service_provider_contract_address(&mut self, address: AccountId) { - self.config.service_provider_contract_address = Some(address); - } - - // TODO: this should get changed into Result<&AccountId, NyxdError> (or Option<&AccountId> in future commits - // note: what unwrap is doing here is just moving a failure that would have normally - // occurred in `connect` when attempting to parse an empty address, - // so it's not introducing new source of failure (just moves it) - pub fn mixnet_contract_address(&self) -> &AccountId { - self.config.mixnet_contract_address.as_ref().unwrap() - } - - // TODO: this should get changed into Result<&AccountId, NyxdError> (or Option<&AccountId> in future commits - // note: what unwrap is doing here is just moving a failure that would have normally - // occurred in `connect` when attempting to parse an empty address, - // so it's not introducing new source of failure (just moves it) - pub fn vesting_contract_address(&self) -> &AccountId { - self.config.vesting_contract_address.as_ref().unwrap() - } - - // TODO: this should get changed into Result<&AccountId, NyxdError> (or Option<&AccountId> in future commits - // note: what unwrap is doing here is just moving a failure that would have normally - // occurred in `connect` when attempting to parse an empty address, - // so it's not introducing new source of failure (just moves it) - pub fn coconut_bandwidth_contract_address(&self) -> &AccountId { - self.config - .coconut_bandwidth_contract_address - .as_ref() - .unwrap() - } - - pub fn group_contract_address(&self) -> &AccountId { - self.config.group_contract_address.as_ref().unwrap() - } - - // TODO: this should get changed into Result<&AccountId, NyxdError> (or Option<&AccountId> in future commits - // note: what unwrap is doing here is just moving a failure that would have normally - // occurred in `connect` when attempting to parse an empty address, - // so it's not introducing new source of failure (just moves it) - pub fn multisig_contract_address(&self) -> &AccountId { - self.config.multisig_contract_address.as_ref().unwrap() - } - - // TODO: this should get changed into Result<&AccountId, NyxdError> (or Option<&AccountId> in future commits - // note: what unwrap is doing here is just moving a failure that would have normally - // occurred in `connect` when attempting to parse an empty address, - // so it's not introducing new source of failure (just moves it) - pub fn coconut_dkg_contract_address(&self) -> &AccountId { - self.config.coconut_dkg_contract_address.as_ref().unwrap() - } - - // The service provider directory contract is optional, so we return an Option not a Result - pub fn service_provider_contract_address(&self) -> Option<&AccountId> { - self.config.service_provider_contract_address.as_ref() - } - - // The name service contract is optional, so we return an Option not a Result - pub fn name_service_contract_address(&self) -> Option<&AccountId> { - self.config.name_service_contract_address.as_ref() - } - - pub fn set_simulated_gas_multiplier(&mut self, multiplier: f32) { - self.simulated_gas_multiplier = multiplier; - } - - pub async fn query_contract_smart( - &self, - contract: &AccountId, - query_msg: &M, - ) -> Result +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl TendermintRpcClient for NyxdClient +where + C: TendermintRpcClient + Send + Sync, + S: Send + Sync, +{ + async fn perform(&self, request: R) -> Result where - C: CosmWasmClient + Sync, - M: ?Sized + Serialize + Sync, - for<'a> T: Deserialize<'a>, + R: SimpleRequest, { - self.client.query_contract_smart(contract, query_msg).await - } - - pub async fn query_contract_raw( - &self, - contract: &AccountId, - query_data: Vec, - ) -> Result, NyxdError> - where - C: CosmWasmClient + Sync, - { - self.client.query_contract_raw(contract, query_data).await - } - - pub fn gas_adjustment(&self) -> GasAdjustment { - self.simulated_gas_multiplier - } - - // ============= - // CHAIN RELATED - // ============= - - // CHAIN QUERIES - - pub async fn get_account_details( - &self, - address: &AccountId, - ) -> Result, NyxdError> - where - C: CosmWasmClient + Sync, - { - self.client.get_account(address).await - } - - pub async fn get_account_public_key( - &self, - address: &AccountId, - ) -> Result, NyxdError> - where - C: CosmWasmClient + Sync, - { - if let Some(account) = self.client.get_account(address).await? { - let base_account = account.try_get_base_account()?; - return Ok(base_account.pubkey); - } - - Ok(None) - } - - pub async fn get_current_block_timestamp(&self) -> Result - where - C: CosmWasmClient + Sync, - { - self.get_block_timestamp(None).await - } - - pub async fn get_block_timestamp( - &self, - height: Option, - ) -> Result - where - C: CosmWasmClient + Sync, - { - Ok(self.client.get_block(height).await?.block.header.time) - } - - pub async fn get_block(&self, height: Option) -> Result - where - C: CosmWasmClient + Sync, - { - self.client.get_block(height).await - } - - pub async fn get_current_block_height(&self) -> Result - where - C: CosmWasmClient + Sync, - { - self.client.get_height().await - } - - /// Obtains the hash of a block specified by the provided height. - /// - /// # Arguments - /// - /// * `height`: height of the block for which we want to obtain the hash. - pub async fn get_block_hash(&self, height: u32) -> Result - where - C: CosmWasmClient + Sync, - { - self.client - .get_block(Some(height)) - .await - .map(|block| block.block_id.hash) - } - - pub async fn get_validators( - &self, - height: u64, - paging: Paging, - ) -> Result - where - C: CosmWasmClient + Sync, - { - Ok(self.client.validators(height as u32, paging).await?) - } - - pub async fn get_balance( - &self, - address: &AccountId, - denom: String, - ) -> Result, NyxdError> - where - C: CosmWasmClient + Sync, - { - self.client.get_balance(address, denom).await - } - - pub async fn get_all_balances(&self, address: &AccountId) -> Result, NyxdError> - where - C: CosmWasmClient + Sync, - { - self.client.get_all_balances(address).await - } - - pub async fn get_tx(&self, id: Hash) -> Result - where - C: CosmWasmClient + Sync, - { - self.client.get_tx(id).await - } - - pub async fn search_tx(&self, query: Query) -> Result, NyxdError> - where - C: CosmWasmClient + Sync, - { - self.client.search_tx(query).await - } - - pub async fn get_total_supply(&self) -> Result, NyxdError> - where - C: CosmWasmClient + Sync, - { - self.client.get_total_supply().await + self.client.perform(request).await + } +} + +#[async_trait] +impl CosmWasmClient for NyxdClient +where + C: TendermintRpcClient + Send + Sync, + S: Send + Sync, +{ +} + +impl OfflineSigner for NyxdClient +where + S: OfflineSigner, +{ + type Error = S::Error; + + fn get_accounts(&self) -> Result, Self::Error> { + self.client.get_accounts() + } + + fn sign_direct_with_account( + &self, + signer: &AccountData, + sign_doc: SignDoc, + ) -> Result { + self.client.sign_direct_with_account(signer, sign_doc) + } +} + +#[async_trait] +impl SigningCosmWasmClient for NyxdClient +where + C: TendermintRpcClient + Send + Sync, + S: TxSigner + Send + Sync, + NyxdError: From, +{ + fn gas_price(&self) -> &GasPrice { + self.client.gas_price() + } + + fn simulated_gas_multiplier(&self) -> f32 { + self.client.simulated_gas_multiplier() } } diff --git a/common/client-libs/validator-client/src/nyxd/traits/coconut_bandwidth_query_client.rs b/common/client-libs/validator-client/src/nyxd/traits/coconut_bandwidth_query_client.rs deleted file mode 100644 index 66ac21947b..0000000000 --- a/common/client-libs/validator-client/src/nyxd/traits/coconut_bandwidth_query_client.rs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2022 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use crate::nyxd::error::NyxdError; -use crate::nyxd::{CosmWasmClient, NyxdClient}; - -use nym_coconut_bandwidth_contract_common::msg::QueryMsg; -use nym_coconut_bandwidth_contract_common::spend_credential::SpendCredentialResponse; - -use async_trait::async_trait; - -#[async_trait] -pub trait CoconutBandwidthQueryClient { - async fn get_spent_credential( - &self, - blinded_serial_number: String, - ) -> Result; -} - -#[async_trait] -impl CoconutBandwidthQueryClient for NyxdClient { - async fn get_spent_credential( - &self, - blinded_serial_number: String, - ) -> Result { - let request = QueryMsg::GetSpentCredential { - blinded_serial_number, - }; - self.client - .query_contract_smart(self.coconut_bandwidth_contract_address(), &request) - .await - } -} diff --git a/common/client-libs/validator-client/src/nyxd/traits/coconut_bandwidth_signing_client.rs b/common/client-libs/validator-client/src/nyxd/traits/coconut_bandwidth_signing_client.rs deleted file mode 100644 index 1efb4bf494..0000000000 --- a/common/client-libs/validator-client/src/nyxd/traits/coconut_bandwidth_signing_client.rs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2022 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -pub use crate::nyxd::cosmwasm_client::signing_client::SigningCosmWasmClient; -use crate::nyxd::cosmwasm_client::types::ExecuteResult; -use crate::nyxd::error::NyxdError; -use crate::nyxd::{Coin, Fee, NyxdClient}; -use nym_coconut_bandwidth_contract_common::spend_credential::SpendCredentialData; -use nym_coconut_bandwidth_contract_common::{deposit::DepositData, msg::ExecuteMsg}; - -use async_trait::async_trait; - -#[async_trait] -pub trait CoconutBandwidthSigningClient { - async fn deposit( - &self, - amount: Coin, - info: String, - verification_key: String, - encryption_key: String, - fee: Option, - ) -> Result; - async fn spend_credential( - &self, - funds: Coin, - blinded_serial_number: String, - gateway_cosmos_address: String, - fee: Option, - ) -> Result; -} - -#[async_trait] -impl CoconutBandwidthSigningClient for NyxdClient { - async fn deposit( - &self, - amount: Coin, - info: String, - verification_key: String, - encryption_key: String, - fee: Option, - ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); - let req = ExecuteMsg::DepositFunds { - data: DepositData::new(info.to_string(), verification_key, encryption_key), - }; - self.client - .execute( - self.address(), - self.coconut_bandwidth_contract_address(), - &req, - fee, - "CoconutBandwidth::Deposit", - vec![amount], - ) - .await - } - async fn spend_credential( - &self, - funds: Coin, - blinded_serial_number: String, - gateway_cosmos_address: String, - fee: Option, - ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); - let req = ExecuteMsg::SpendCredential { - data: SpendCredentialData::new( - funds.into(), - blinded_serial_number, - gateway_cosmos_address, - ), - }; - self.client - .execute( - self.address(), - self.coconut_bandwidth_contract_address(), - &req, - fee, - "CoconutBandwidth::SpendCredential", - vec![], - ) - .await - } -} diff --git a/common/client-libs/validator-client/src/nyxd/traits/dkg_query_client.rs b/common/client-libs/validator-client/src/nyxd/traits/dkg_query_client.rs deleted file mode 100644 index 92334424c2..0000000000 --- a/common/client-libs/validator-client/src/nyxd/traits/dkg_query_client.rs +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright 2022 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use crate::nyxd::error::NyxdError; -use crate::nyxd::{CosmWasmClient, NyxdClient}; -use async_trait::async_trait; -use cosmrs::AccountId; -use nym_coconut_dkg_common::dealer::{ - ContractDealing, DealerDetailsResponse, PagedDealerResponse, PagedDealingsResponse, -}; -use nym_coconut_dkg_common::msg::QueryMsg as DkgQueryMsg; -use nym_coconut_dkg_common::types::{DealerDetails, Epoch, EpochId, InitialReplacementData}; -use nym_coconut_dkg_common::verification_key::{ContractVKShare, PagedVKSharesResponse}; -use serde::Deserialize; - -#[async_trait] -pub trait DkgQueryClient { - async fn query_dkg_contract(&self, query: DkgQueryMsg) -> Result - where - for<'a> T: Deserialize<'a>; - - async fn get_current_epoch(&self) -> Result { - let request = DkgQueryMsg::GetCurrentEpochState {}; - self.query_dkg_contract(request).await - } - async fn get_current_epoch_threshold(&self) -> Result, NyxdError> { - let request = DkgQueryMsg::GetCurrentEpochThreshold {}; - self.query_dkg_contract(request).await - } - - async fn get_initial_dealers(&self) -> Result, NyxdError> { - let request = DkgQueryMsg::GetInitialDealers {}; - self.query_dkg_contract(request).await - } - - async fn get_dealer_details( - &self, - address: &AccountId, - ) -> Result { - let request = DkgQueryMsg::GetDealerDetails { - dealer_address: address.to_string(), - }; - self.query_dkg_contract(request).await - } - - async fn get_current_dealers_paged( - &self, - start_after: Option, - page_limit: Option, - ) -> Result { - let request = DkgQueryMsg::GetCurrentDealers { - start_after, - limit: page_limit, - }; - self.query_dkg_contract(request).await - } - - async fn get_past_dealers_paged( - &self, - start_after: Option, - page_limit: Option, - ) -> Result { - let request = DkgQueryMsg::GetPastDealers { - start_after, - limit: page_limit, - }; - self.query_dkg_contract(request).await - } - - async fn get_dealings_paged( - &self, - idx: usize, - start_after: Option, - page_limit: Option, - ) -> Result { - let request = DkgQueryMsg::GetDealing { - idx: idx as u64, - limit: page_limit, - start_after, - }; - self.query_dkg_contract(request).await - } - - async fn get_vk_shares_paged( - &self, - epoch_id: EpochId, - start_after: Option, - page_limit: Option, - ) -> Result { - let request = DkgQueryMsg::GetVerificationKeys { - epoch_id, - limit: page_limit, - start_after, - }; - self.query_dkg_contract(request).await - } - - async fn get_all_current_dealers(&self) -> Result, NyxdError> { - let mut dealers = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .get_current_dealers_paged(start_after.take(), None) - .await?; - dealers.append(&mut paged_response.dealers); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res.into_string()) - } else { - break; - } - } - - Ok(dealers) - } - - async fn get_all_past_dealers(&self) -> Result, NyxdError> { - let mut dealers = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .get_past_dealers_paged(start_after.take(), None) - .await?; - dealers.append(&mut paged_response.dealers); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res.into_string()) - } else { - break; - } - } - - Ok(dealers) - } - - async fn get_all_epoch_dealings(&self, idx: usize) -> Result, NyxdError> { - let mut dealings = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .get_dealings_paged(idx, start_after.take(), None) - .await?; - dealings.append(&mut paged_response.dealings); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res.into_string()) - } else { - break; - } - } - - Ok(dealings) - } - - async fn get_all_verification_key_shares( - &self, - epoch_id: EpochId, - ) -> Result, NyxdError> { - let mut shares = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self - .get_vk_shares_paged(epoch_id, start_after.take(), None) - .await?; - shares.append(&mut paged_response.shares); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res.into_string()) - } else { - break; - } - } - - Ok(shares) - } -} - -#[async_trait] -impl DkgQueryClient for NyxdClient -where - C: CosmWasmClient + Send + Sync, -{ - async fn query_dkg_contract(&self, query: DkgQueryMsg) -> Result - where - for<'a> T: Deserialize<'a>, - { - self.client - .query_contract_smart(self.coconut_dkg_contract_address(), &query) - .await - } -} - -#[async_trait] -impl DkgQueryClient for crate::Client -where - C: CosmWasmClient + Sync + Send, -{ - async fn query_dkg_contract(&self, query: DkgQueryMsg) -> Result - where - for<'a> T: Deserialize<'a>, - { - self.nyxd.query_dkg_contract(query).await - } -} diff --git a/common/client-libs/validator-client/src/nyxd/traits/dkg_signing_client.rs b/common/client-libs/validator-client/src/nyxd/traits/dkg_signing_client.rs deleted file mode 100644 index c35747f40f..0000000000 --- a/common/client-libs/validator-client/src/nyxd/traits/dkg_signing_client.rs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2022 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use crate::nyxd::cosmwasm_client::types::ExecuteResult; -use crate::nyxd::error::NyxdError; -use crate::nyxd::{Fee, NyxdClient, SigningCosmWasmClient}; -use async_trait::async_trait; -use nym_coconut_dkg_common::msg::ExecuteMsg as DkgExecuteMsg; -use nym_coconut_dkg_common::types::EncodedBTEPublicKeyWithProof; -use nym_coconut_dkg_common::verification_key::VerificationKeyShare; -use nym_contracts_common::dealings::ContractSafeBytes; - -#[async_trait] -pub trait DkgSigningClient { - async fn advance_dkg_epoch_state(&self, fee: Option) -> Result; - async fn register_dealer( - &self, - bte_key: EncodedBTEPublicKeyWithProof, - announce_address: String, - resharing: bool, - fee: Option, - ) -> Result; - - async fn submit_dealing_bytes( - &self, - commitment: ContractSafeBytes, - resharing: bool, - fee: Option, - ) -> Result; - - async fn submit_verification_key_share( - &self, - share: VerificationKeyShare, - resharing: bool, - fee: Option, - ) -> Result; -} - -#[async_trait] -impl DkgSigningClient for NyxdClient -where - C: SigningCosmWasmClient + Send + Sync, -{ - async fn advance_dkg_epoch_state(&self, fee: Option) -> Result { - let req = DkgExecuteMsg::AdvanceEpochState {}; - - self.client - .execute( - self.address(), - self.coconut_dkg_contract_address(), - &req, - fee.unwrap_or_default(), - "advancing DKG state", - vec![], - ) - .await - } - - async fn register_dealer( - &self, - bte_key: EncodedBTEPublicKeyWithProof, - announce_address: String, - resharing: bool, - fee: Option, - ) -> Result { - let req = DkgExecuteMsg::RegisterDealer { - bte_key_with_proof: bte_key, - announce_address, - resharing, - }; - - self.client - .execute( - self.address(), - self.coconut_dkg_contract_address(), - &req, - fee.unwrap_or_default(), - format!("registering {} as a dealer", self.address()), - vec![], - ) - .await - } - - async fn submit_dealing_bytes( - &self, - dealing_bytes: ContractSafeBytes, - resharing: bool, - fee: Option, - ) -> Result { - let req = DkgExecuteMsg::CommitDealing { - dealing_bytes, - resharing, - }; - - self.client - .execute( - self.address(), - self.coconut_dkg_contract_address(), - &req, - fee.unwrap_or_default(), - "dealing commitment", - vec![], - ) - .await - } - - async fn submit_verification_key_share( - &self, - share: VerificationKeyShare, - resharing: bool, - fee: Option, - ) -> Result { - let req = DkgExecuteMsg::CommitVerificationKeyShare { share, resharing }; - - self.client - .execute( - self.address(), - self.coconut_dkg_contract_address(), - &req, - fee.unwrap_or_default(), - "verification key share commitment", - vec![], - ) - .await - } -} diff --git a/common/client-libs/validator-client/src/nyxd/traits/group_query_client.rs b/common/client-libs/validator-client/src/nyxd/traits/group_query_client.rs deleted file mode 100644 index b5b4c1d1ee..0000000000 --- a/common/client-libs/validator-client/src/nyxd/traits/group_query_client.rs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2023 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use crate::nyxd::error::NyxdError; -use crate::nyxd::{CosmWasmClient, NyxdClient}; - -use nym_group_contract_common::msg::QueryMsg; - -use async_trait::async_trait; -use cw4::MemberResponse; - -#[async_trait] -pub trait GroupQueryClient { - async fn member(&self, addr: String) -> Result; -} - -#[async_trait] -impl GroupQueryClient for NyxdClient { - async fn member(&self, addr: String) -> Result { - let request = QueryMsg::Member { - addr, - at_height: None, - }; - self.client - .query_contract_smart(self.group_contract_address(), &request) - .await - } -} diff --git a/common/client-libs/validator-client/src/nyxd/traits/mixnet_query_client.rs b/common/client-libs/validator-client/src/nyxd/traits/mixnet_query_client.rs deleted file mode 100644 index 0297b90452..0000000000 --- a/common/client-libs/validator-client/src/nyxd/traits/mixnet_query_client.rs +++ /dev/null @@ -1,480 +0,0 @@ -// Copyright 2022 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -pub use crate::nyxd::cosmwasm_client::client::CosmWasmClient; -use crate::nyxd::error::NyxdError; -use crate::nyxd::NyxdClient; -use async_trait::async_trait; -use cosmrs::AccountId; -use nym_contracts_common::signing::Nonce; -use nym_mixnet_contract_common::delegation::{MixNodeDelegationResponse, OwnerProxySubKey}; -use nym_mixnet_contract_common::mixnode::{ - MixnodeRewardingDetailsResponse, PagedMixnodesDetailsResponse, PagedUnbondedMixnodesResponse, - StakeSaturationResponse, UnbondedMixnodeResponse, -}; -use nym_mixnet_contract_common::reward_params::{Performance, RewardingParams}; -use nym_mixnet_contract_common::rewarding::{ - EstimatedCurrentEpochRewardResponse, PendingRewardResponse, -}; -use nym_mixnet_contract_common::{ - delegation, ContractBuildInformation, ContractState, ContractStateParams, - CurrentIntervalResponse, EpochEventId, EpochStatus, FamilyByHeadResponse, - FamilyByLabelResponse, FamilyMembersByHeadResponse, FamilyMembersByLabelResponse, - GatewayBondResponse, GatewayOwnershipResponse, IdentityKey, IntervalEventId, LayerDistribution, - MixId, MixOwnershipResponse, MixnodeDetailsByIdentityResponse, MixnodeDetailsResponse, - NumberOfPendingEventsResponse, PagedAllDelegationsResponse, PagedDelegatorDelegationsResponse, - PagedFamiliesResponse, PagedGatewayResponse, PagedMembersResponse, - PagedMixNodeDelegationsResponse, PagedMixnodeBondsResponse, PagedRewardedSetResponse, - PendingEpochEventResponse, PendingEpochEventsResponse, PendingIntervalEventResponse, - PendingIntervalEventsResponse, QueryMsg as MixnetQueryMsg, -}; -use serde::Deserialize; - -#[async_trait] -pub trait MixnetQueryClient { - async fn query_mixnet_contract(&self, query: MixnetQueryMsg) -> Result - where - for<'a> T: Deserialize<'a>; - - // state/sys-params-related - - async fn get_mixnet_contract_version(&self) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetContractVersion {}) - .await - } - - async fn get_rewarding_validator_address(&self) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetRewardingValidatorAddress {}) - .await - } - - async fn get_mixnet_contract_settings(&self) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetStateParams {}) - .await - } - - async fn get_mixnet_contract_state(&self) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetState {}) - .await - } - - async fn get_rewarding_parameters(&self) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetRewardingParams {}) - .await - } - - async fn get_current_epoch_status(&self) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetEpochStatus {}) - .await - } - - async fn get_current_interval_details(&self) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetCurrentIntervalDetails {}) - .await - } - - async fn get_rewarded_set_paged( - &self, - start_after: Option, - limit: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetRewardedSet { limit, start_after }) - .await - } - - async fn get_all_node_families_paged( - &self, - start_after: Option, - limit: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetAllFamiliesPaged { limit, start_after }) - .await - } - - async fn get_all_family_members_paged( - &self, - start_after: Option, - limit: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetAllMembersPaged { limit, start_after }) - .await - } - - async fn get_family_members_by_head + Send>( - &self, - head: S, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetFamilyMembersByHead { head: head.into() }) - .await - } - - async fn get_family_members_by_label + Send>( - &self, - label: S, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetFamilyMembersByLabel { - label: label.into(), - }) - .await - } - - // mixnode-related: - - async fn get_mixnode_bonds_paged( - &self, - limit: Option, - start_after: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetMixNodeBonds { limit, start_after }) - .await - } - - async fn get_mixnodes_detailed_paged( - &self, - limit: Option, - start_after: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetMixNodesDetailed { limit, start_after }) - .await - } - - async fn get_unbonded_paged( - &self, - limit: Option, - start_after: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetUnbondedMixNodes { limit, start_after }) - .await - } - - async fn get_unbonded_by_owner_paged( - &self, - owner: &AccountId, - limit: Option, - start_after: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetUnbondedMixNodesByOwner { - owner: owner.to_string(), - limit, - start_after, - }) - .await - } - - async fn get_unbonded_by_identity_paged( - &self, - identity_key: String, - limit: Option, - start_after: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetUnbondedMixNodesByIdentityKey { - identity_key, - limit, - start_after, - }) - .await - } - - async fn get_owned_mixnode( - &self, - address: &AccountId, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetOwnedMixnode { - address: address.to_string(), - }) - .await - } - - async fn get_mixnode_details( - &self, - mix_id: MixId, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetMixnodeDetails { mix_id }) - .await - } - - async fn get_mixnode_details_by_identity( - &self, - mix_identity: IdentityKey, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetBondedMixnodeDetailsByIdentity { - mix_identity, - }) - .await - } - - async fn get_mixnode_rewarding_details( - &self, - mix_id: MixId, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetMixnodeRewardingDetails { mix_id }) - .await - } - - async fn get_mixnode_stake_saturation( - &self, - mix_id: MixId, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetStakeSaturation { mix_id }) - .await - } - - async fn get_unbonded_mixnode_information( - &self, - mix_id: MixId, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetUnbondedMixNodeInformation { mix_id }) - .await - } - - async fn get_layer_distribution(&self) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetLayerDistribution {}) - .await - } - - // gateway-related: - - async fn get_gateways_paged( - &self, - start_after: Option, - limit: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetGateways { start_after, limit }) - .await - } - - /// Checks whether there is a bonded gateway associated with the provided identity key - async fn get_gateway_bond( - &self, - identity: IdentityKey, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetGatewayBond { identity }) - .await - } - - /// Checks whether there is a bonded gateway associated with the provided client's address - async fn get_owned_gateway( - &self, - address: &AccountId, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetOwnedGateway { - address: address.to_string(), - }) - .await - } - - // delegation-related: - - /// Gets list of all delegations towards particular mixnode on particular page. - async fn get_mixnode_delegations_paged( - &self, - mix_id: MixId, - start_after: Option, - limit: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetMixnodeDelegations { - mix_id, - start_after, - limit, - }) - .await - } - - /// Gets list of all the mixnodes to which a particular address delegated. - async fn get_delegator_delegations_paged( - &self, - delegator: String, - start_after: Option<(MixId, OwnerProxySubKey)>, - limit: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetDelegatorDelegations { - delegator, - start_after, - limit, - }) - .await - } - - /// Checks value of delegation of given client towards particular mixnode. - async fn get_delegation_details( - &self, - mix_id: MixId, - delegator: &AccountId, - proxy: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetDelegationDetails { - mix_id, - delegator: delegator.to_string(), - proxy, - }) - .await - } - - /// Gets all the delegations on the entire network - async fn get_all_network_delegations_paged( - &self, - start_after: Option, - limit: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetAllDelegations { start_after, limit }) - .await - } - - // rewards related - async fn get_pending_operator_reward( - &self, - operator: &AccountId, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetPendingOperatorReward { - address: operator.to_string(), - }) - .await - } - - async fn get_pending_mixnode_operator_reward( - &self, - mix_id: MixId, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetPendingMixNodeOperatorReward { mix_id }) - .await - } - - async fn get_pending_delegator_reward( - &self, - delegator: &AccountId, - mix_id: MixId, - proxy: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetPendingDelegatorReward { - address: delegator.to_string(), - mix_id, - proxy, - }) - .await - } - - // given the provided performance, estimate the reward at the end of the current epoch - async fn get_estimated_current_epoch_operator_reward( - &self, - mix_id: MixId, - estimated_performance: Performance, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetEstimatedCurrentEpochOperatorReward { - mix_id, - estimated_performance, - }) - .await - } - - // given the provided performance, estimate the reward at the end of the current epoch - async fn get_estimated_current_epoch_delegator_reward( - &self, - delegator: &AccountId, - mix_id: MixId, - proxy: Option, - estimated_performance: Performance, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetEstimatedCurrentEpochDelegatorReward { - address: delegator.to_string(), - mix_id, - proxy, - estimated_performance, - }) - .await - } - - // interval-related - - async fn get_pending_epoch_events_paged( - &self, - start_after: Option, - limit: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetPendingEpochEvents { start_after, limit }) - .await - } - - async fn get_pending_interval_events_paged( - &self, - start_after: Option, - limit: Option, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetPendingIntervalEvents { start_after, limit }) - .await - } - - async fn get_pending_epoch_event( - &self, - event_id: EpochEventId, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetPendingEpochEvent { event_id }) - .await - } - - async fn get_pending_interval_event( - &self, - event_id: IntervalEventId, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetPendingIntervalEvent { event_id }) - .await - } - - async fn get_number_of_pending_events( - &self, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetNumberOfPendingEvents {}) - .await - } - - async fn get_signing_nonce(&self, address: &AccountId) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetSigningNonce { - address: address.to_string(), - }) - .await - } - - async fn get_node_family_by_label( - &self, - label: &str, - ) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetFamilyByLabel { - label: label.to_string(), - }) - .await - } - - async fn get_node_family_by_head(&self, head: &str) -> Result { - self.query_mixnet_contract(MixnetQueryMsg::GetFamilyByHead { - head: head.to_string(), - }) - .await - } -} - -#[async_trait] -impl MixnetQueryClient for NyxdClient -where - C: CosmWasmClient + Sync + Send, -{ - async fn query_mixnet_contract(&self, query: MixnetQueryMsg) -> Result - where - for<'a> T: Deserialize<'a>, - { - self.client - .query_contract_smart(self.mixnet_contract_address(), &query) - .await - } -} - -#[async_trait] -impl MixnetQueryClient for crate::Client -where - C: CosmWasmClient + Sync + Send, -{ - async fn query_mixnet_contract(&self, query: MixnetQueryMsg) -> Result - where - for<'a> T: Deserialize<'a>, - { - self.nyxd.query_mixnet_contract(query).await - } -} diff --git a/common/client-libs/validator-client/src/nyxd/traits/mod.rs b/common/client-libs/validator-client/src/nyxd/traits/mod.rs deleted file mode 100644 index 9f6dac5354..0000000000 --- a/common/client-libs/validator-client/src/nyxd/traits/mod.rs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2021-2023 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -// TODO: expose query-related capabilities to wasm client... - -mod coconut_bandwidth_query_client; -mod dkg_query_client; -mod group_query_client; -mod mixnet_query_client; -mod multisig_query_client; -mod name_service_query_client; -mod sp_directory_query_client; -mod vesting_query_client; - -#[cfg(feature = "signing")] -mod coconut_bandwidth_signing_client; -#[cfg(feature = "signing")] -mod dkg_signing_client; -#[cfg(feature = "signing")] -mod mixnet_signing_client; -#[cfg(feature = "signing")] -mod multisig_signing_client; -#[cfg(feature = "signing")] -mod name_service_signing_client; -#[cfg(feature = "signing")] -mod sp_directory_signing_client; -#[cfg(feature = "signing")] -mod vesting_signing_client; - -pub use coconut_bandwidth_query_client::CoconutBandwidthQueryClient; -pub use dkg_query_client::DkgQueryClient; -pub use group_query_client::GroupQueryClient; -pub use mixnet_query_client::MixnetQueryClient; -pub use multisig_query_client::MultisigQueryClient; -pub use name_service_query_client::NameServiceQueryClient; -pub use sp_directory_query_client::SpDirectoryQueryClient; -pub use vesting_query_client::VestingQueryClient; - -#[cfg(feature = "signing")] -pub use coconut_bandwidth_signing_client::CoconutBandwidthSigningClient; -#[cfg(feature = "signing")] -pub use dkg_signing_client::DkgSigningClient; -#[cfg(feature = "signing")] -pub use mixnet_signing_client::MixnetSigningClient; -#[cfg(feature = "signing")] -pub use multisig_signing_client::MultisigSigningClient; -#[cfg(feature = "signing")] -pub use name_service_signing_client::NameServiceSigningClient; -#[cfg(feature = "signing")] -pub use sp_directory_signing_client::SpDirectorySigningClient; -#[cfg(feature = "signing")] -pub use vesting_signing_client::VestingSigningClient; diff --git a/common/client-libs/validator-client/src/nyxd/traits/multisig_query_client.rs b/common/client-libs/validator-client/src/nyxd/traits/multisig_query_client.rs deleted file mode 100644 index ea461d1080..0000000000 --- a/common/client-libs/validator-client/src/nyxd/traits/multisig_query_client.rs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use crate::nyxd::error::NyxdError; -use crate::nyxd::{CosmWasmClient, NyxdClient}; - -use cw3::{ProposalListResponse, ProposalResponse}; -use nym_multisig_contract_common::msg::QueryMsg; - -use async_trait::async_trait; - -#[async_trait] -pub trait MultisigQueryClient { - async fn get_proposal(&self, proposal_id: u64) -> Result; - - async fn list_proposals( - &self, - start_after: Option, - limit: Option, - ) -> Result; - - async fn get_all_proposals(&self) -> Result, NyxdError> { - let mut proposals = Vec::new(); - let mut start_after = None; - - loop { - let mut paged_response = self.list_proposals(start_after.take(), None).await?; - - let last_id = paged_response.proposals.last().map(|prop| prop.id); - proposals.append(&mut paged_response.proposals); - - if let Some(start_after_res) = last_id { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(proposals) - } -} - -#[async_trait] -impl MultisigQueryClient for NyxdClient { - async fn get_proposal(&self, proposal_id: u64) -> Result { - let request = QueryMsg::Proposal { proposal_id }; - self.client - .query_contract_smart(self.multisig_contract_address(), &request) - .await - } - - async fn list_proposals( - &self, - start_after: Option, - limit: Option, - ) -> Result { - let request = QueryMsg::ListProposals { start_after, limit }; - self.client - .query_contract_smart(self.multisig_contract_address(), &request) - .await - } -} diff --git a/common/client-libs/validator-client/src/nyxd/traits/multisig_signing_client.rs b/common/client-libs/validator-client/src/nyxd/traits/multisig_signing_client.rs deleted file mode 100644 index b5ad0a8e96..0000000000 --- a/common/client-libs/validator-client/src/nyxd/traits/multisig_signing_client.rs +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2022 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -pub use crate::nyxd::cosmwasm_client::signing_client::SigningCosmWasmClient; -use crate::nyxd::cosmwasm_client::types::ExecuteResult; -use crate::nyxd::error::NyxdError; -use crate::nyxd::{Fee, NyxdClient}; - -use cw3::Vote; -use nym_coconut_bandwidth_contract_common::msg::ExecuteMsg as CoconutBandwidthExecuteMsg; -use nym_multisig_contract_common::msg::ExecuteMsg; - -use async_trait::async_trait; -use cosmwasm_std::{to_binary, Coin, CosmosMsg, WasmMsg}; - -#[async_trait] -pub trait MultisigSigningClient { - async fn propose_release_funds( - &self, - title: String, - blinded_serial_number: String, - voucher_value: u128, - fee: Option, - ) -> Result; - - async fn vote_proposal( - &self, - proposal_id: u64, - yes: bool, - fee: Option, - ) -> Result; - - async fn execute_proposal( - &self, - proposal_id: u64, - fee: Option, - ) -> Result; -} - -#[async_trait] -impl MultisigSigningClient for NyxdClient { - async fn propose_release_funds( - &self, - title: String, - blinded_serial_number: String, - voucher_value: u128, - fee: Option, - ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); - let release_funds_req = CoconutBandwidthExecuteMsg::ReleaseFunds { - funds: Coin::new( - voucher_value, - self.config.chain_details.mix_denom.base.clone(), - ), - }; - let release_funds_msg = CosmosMsg::Wasm(WasmMsg::Execute { - contract_addr: self.coconut_bandwidth_contract_address().to_string(), - msg: to_binary(&release_funds_req)?, - funds: vec![], - }); - let req = ExecuteMsg::Propose { - title, - description: blinded_serial_number, - msgs: vec![release_funds_msg], - latest: None, - }; - self.client - .execute( - self.address(), - self.multisig_contract_address(), - &req, - fee, - "Multisig::Propose::Execute::ReleaseFunds", - vec![], - ) - .await - } - - async fn vote_proposal( - &self, - proposal_id: u64, - vote_yes: bool, - fee: Option, - ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); - let vote = if vote_yes { Vote::Yes } else { Vote::No }; - let req = ExecuteMsg::Vote { proposal_id, vote }; - self.client - .execute( - self.address(), - self.multisig_contract_address(), - &req, - fee, - "Multisig::Vote", - vec![], - ) - .await - } - - async fn execute_proposal( - &self, - proposal_id: u64, - fee: Option, - ) -> Result { - let fee = fee.unwrap_or(Fee::Auto(Some(self.simulated_gas_multiplier))); - let req = ExecuteMsg::Execute { proposal_id }; - self.client - .execute( - self.address(), - self.multisig_contract_address(), - &req, - fee, - "Multisig::Execute", - vec![], - ) - .await - } -} diff --git a/common/client-libs/validator-client/src/nyxd/traits/name_service_query_client.rs b/common/client-libs/validator-client/src/nyxd/traits/name_service_query_client.rs deleted file mode 100644 index 0823d97d6a..0000000000 --- a/common/client-libs/validator-client/src/nyxd/traits/name_service_query_client.rs +++ /dev/null @@ -1,109 +0,0 @@ -use async_trait::async_trait; -use cosmrs::AccountId; -use nym_contracts_common::ContractBuildInformation; -use nym_name_service_common::{ - msg::QueryMsg as NameQueryMsg, - response::{ConfigResponse, NamesListResponse, PagedNamesListResponse}, - Address, NameId, RegisteredName, -}; -use serde::Deserialize; - -use crate::nyxd::{error::NyxdError, CosmWasmClient, NyxdClient}; - -#[async_trait] -pub trait NameServiceQueryClient { - async fn query_name_service_contract(&self, query: NameQueryMsg) -> Result - where - for<'a> T: Deserialize<'a>; - - async fn get_name_service_config(&self) -> Result { - self.query_name_service_contract(NameQueryMsg::Config {}) - .await - } - - async fn get_name_entry(&self, name_id: NameId) -> Result { - self.query_name_service_contract(NameQueryMsg::NameId { name_id }) - .await - } - - async fn get_names_paged( - &self, - start_after: Option, - limit: Option, - ) -> Result { - self.query_name_service_contract(NameQueryMsg::All { limit, start_after }) - .await - } - - async fn get_names_by_owner(&self, owner: AccountId) -> Result { - self.query_name_service_contract(NameQueryMsg::ByOwner { - owner: owner.to_string(), - }) - .await - } - - async fn get_names_by_address(&self, address: Address) -> Result { - self.query_name_service_contract(NameQueryMsg::ByAddress { address }) - .await - } - - async fn get_name_service_contract_version( - &self, - ) -> Result { - self.query_name_service_contract(NameQueryMsg::GetContractVersion {}) - .await - } - - async fn get_all_names(&self) -> Result, NyxdError> { - let mut services = Vec::new(); - let mut start_after = None; - - loop { - let mut paged_response = self.get_names_paged(start_after.take(), None).await?; - - let last_id = paged_response.names.last().map(|serv| serv.id); - services.append(&mut paged_response.names); - - if let Some(start_after_res) = last_id { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(services) - } -} - -#[async_trait] -impl NameServiceQueryClient for NyxdClient -where - C: CosmWasmClient + Send + Sync, -{ - async fn query_name_service_contract(&self, query: NameQueryMsg) -> Result - where - for<'a> T: Deserialize<'a>, - { - self.client - .query_contract_smart( - self.name_service_contract_address().ok_or( - NyxdError::NoContractAddressAvailable("name service contract".to_string()), - )?, - &query, - ) - .await - } -} - -#[async_trait] -impl NameServiceQueryClient for crate::Client -where - C: CosmWasmClient + Send + Sync, -{ - async fn query_name_service_contract(&self, query: NameQueryMsg) -> Result - where - for<'a> T: Deserialize<'a>, - { - self.nyxd.query_name_service_contract(query).await - } -} diff --git a/common/client-libs/validator-client/src/nyxd/traits/sp_directory_query_client.rs b/common/client-libs/validator-client/src/nyxd/traits/sp_directory_query_client.rs deleted file mode 100644 index 0ed99d5c1c..0000000000 --- a/common/client-libs/validator-client/src/nyxd/traits/sp_directory_query_client.rs +++ /dev/null @@ -1,124 +0,0 @@ -use async_trait::async_trait; -use cosmrs::AccountId; -use nym_contracts_common::{signing::Nonce, ContractBuildInformation}; -use nym_service_provider_directory_common::{ - msg::QueryMsg as SpQueryMsg, - response::{ - ConfigResponse, PagedServicesListResponse, ServiceInfoResponse, ServicesListResponse, - }, - NymAddress, Service, ServiceId, -}; -use serde::Deserialize; - -use crate::nyxd::{error::NyxdError, CosmWasmClient, NyxdClient}; - -#[async_trait] -pub trait SpDirectoryQueryClient { - async fn query_service_provider_contract(&self, query: SpQueryMsg) -> Result - where - for<'a> T: Deserialize<'a>; - - async fn get_service_config(&self) -> Result { - self.query_service_provider_contract(SpQueryMsg::Config {}) - .await - } - - async fn get_service_info( - &self, - service_id: ServiceId, - ) -> Result { - self.query_service_provider_contract(SpQueryMsg::ServiceId { service_id }) - .await - } - - async fn get_services_paged( - &self, - start_after: Option, - limit: Option, - ) -> Result { - self.query_service_provider_contract(SpQueryMsg::All { limit, start_after }) - .await - } - - async fn get_services_by_announcer( - &self, - announcer: AccountId, - ) -> Result { - self.query_service_provider_contract(SpQueryMsg::ByAnnouncer { - announcer: announcer.to_string(), - }) - .await - } - - async fn get_services_by_nym_address( - &self, - nym_address: NymAddress, - ) -> Result { - self.query_service_provider_contract(SpQueryMsg::ByNymAddress { nym_address }) - .await - } - - async fn get_sp_contract_version(&self) -> Result { - self.query_service_provider_contract(SpQueryMsg::GetContractVersion {}) - .await - } - - async fn get_all_services(&self) -> Result, NyxdError> { - let mut services = Vec::new(); - let mut start_after = None; - loop { - let mut paged_response = self.get_services_paged(start_after.take(), None).await?; - services.append(&mut paged_response.services); - - if let Some(start_after_res) = paged_response.start_next_after { - start_after = Some(start_after_res) - } else { - break; - } - } - - Ok(services) - } - - async fn get_service_signing_nonce(&self, address: &AccountId) -> Result { - self.query_service_provider_contract(SpQueryMsg::SigningNonce { - address: address.to_string(), - }) - .await - } -} - -#[async_trait] -impl SpDirectoryQueryClient for NyxdClient -where - C: CosmWasmClient + Send + Sync, -{ - async fn query_service_provider_contract(&self, query: SpQueryMsg) -> Result - where - for<'a> T: Deserialize<'a>, - { - self.client - .query_contract_smart( - self.service_provider_contract_address().ok_or( - NyxdError::NoContractAddressAvailable( - "service provider directory contract".to_string(), - ), - )?, - &query, - ) - .await - } -} - -#[async_trait] -impl SpDirectoryQueryClient for crate::Client -where - C: CosmWasmClient + Send + Sync, -{ - async fn query_service_provider_contract(&self, query: SpQueryMsg) -> Result - where - for<'a> T: Deserialize<'a>, - { - self.nyxd.query_service_provider_contract(query).await - } -} diff --git a/common/client-libs/validator-client/src/rpc/mod.rs b/common/client-libs/validator-client/src/rpc/mod.rs new file mode 100644 index 0000000000..f483f1067c --- /dev/null +++ b/common/client-libs/validator-client/src/rpc/mod.rs @@ -0,0 +1,514 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use async_trait::async_trait; +use cosmrs::tendermint::{self, abci, block::Height, evidence::Evidence, Genesis, Hash}; +use serde::{de::DeserializeOwned, Serialize}; +use std::fmt; +use tendermint_rpc::{ + endpoint::{validators::DEFAULT_VALIDATORS_PER_PAGE, *}, + query::Query, + Error, Order, Paging, SimpleRequest, +}; + +pub mod reqwest; + +// we have to create a sealed trait since `TendermintClient` needs T: Send (due to how async trait is created) +// which we can't do in wasm +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +pub trait TendermintRpcClient { + /// `/abci_info`: get information about the ABCI application. + async fn abci_info(&self) -> Result { + Ok(self.perform(abci_info::Request).await?.response) + } + + /// `/abci_query`: query the ABCI application + async fn abci_query( + &self, + path: Option, + data: V, + height: Option, + prove: bool, + ) -> Result + where + V: Into> + Send, + { + Ok(self + .perform(abci_query::Request::new(path, data, height, prove)) + .await? + .response) + } + + /// `/block`: get block at a given height. + async fn block(&self, height: H) -> Result + where + H: Into + Send, + { + self.perform(block::Request::new(height.into())).await + } + + /// `/block_by_hash`: get block by hash. + async fn block_by_hash( + &self, + hash: tendermint::Hash, + ) -> Result { + self.perform(block_by_hash::Request::new(hash)).await + } + + /// `/block`: get the latest block. + async fn latest_block(&self) -> Result { + self.perform(block::Request::default()).await + } + + /// `/header`: get block header at a given height. + async fn header(&self, height: H) -> Result + where + H: Into + Send, + { + self.perform(header::Request::new(height.into())).await + } + + /// `/header_by_hash`: get block by hash. + async fn header_by_hash( + &self, + hash: tendermint::Hash, + ) -> Result { + self.perform(header_by_hash::Request::new(hash)).await + } + + /// `/block_results`: get ABCI results for a block at a particular height. + async fn block_results(&self, height: H) -> Result + where + H: Into + Send, + { + self.perform(block_results::Request::new(height.into())) + .await + } + + /// `/block_results`: get ABCI results for the latest block. + async fn latest_block_results(&self) -> Result { + self.perform(block_results::Request::default()).await + } + + /// `/block_search`: search for blocks by BeginBlock and EndBlock events. + async fn block_search( + &self, + query: Query, + page: u32, + per_page: u8, + order: Order, + ) -> Result { + self.perform(block_search::Request::new(query, page, per_page, order)) + .await + } + + /// `/blockchain`: get block headers for `min` <= `height` <= `max`. + /// + /// Block headers are returned in descending order (highest first). + /// + /// Returns at most 20 items. + async fn blockchain(&self, min: H, max: H) -> Result + where + H: Into + Send, + { + // TODO(tarcieri): return errors for invalid params before making request? + self.perform(blockchain::Request::new(min.into(), max.into())) + .await + } + + /// `/broadcast_tx_async`: broadcast a transaction, returning immediately. + async fn broadcast_tx_async(&self, tx: T) -> Result + where + T: Into> + Send, + { + self.perform(broadcast::tx_async::Request::new(tx)).await + } + + /// `/broadcast_tx_sync`: broadcast a transaction, returning the response + /// from `CheckTx`. + async fn broadcast_tx_sync(&self, tx: T) -> Result + where + T: Into> + Send, + { + self.perform(broadcast::tx_sync::Request::new(tx)).await + } + + /// `/broadcast_tx_commit`: broadcast a transaction, returning the response + /// from `DeliverTx`. + async fn broadcast_tx_commit(&self, tx: T) -> Result + where + T: Into> + Send, + { + self.perform(broadcast::tx_commit::Request::new(tx)).await + } + + /// `/commit`: get block commit at a given height. + async fn commit(&self, height: H) -> Result + where + H: Into + Send, + { + self.perform(commit::Request::new(height.into())).await + } + + /// `/consensus_params`: get current consensus parameters at the specified + /// height. + async fn consensus_params(&self, height: H) -> Result + where + H: Into + Send, + { + self.perform(consensus_params::Request::new(Some(height.into()))) + .await + } + + /// `/consensus_state`: get current consensus state + async fn consensus_state(&self) -> Result { + self.perform(consensus_state::Request::new()).await + } + + // TODO(thane): Simplify once validators endpoint removes pagination. + /// `/validators`: get validators a given height. + async fn validators(&self, height: H, paging: Paging) -> Result + where + H: Into + Send, + { + let height = height.into(); + match paging { + Paging::Default => { + self.perform(validators::Request::new(Some(height), None, None)) + .await + } + Paging::Specific { + page_number, + per_page, + } => { + self.perform(validators::Request::new( + Some(height), + Some(page_number), + Some(per_page), + )) + .await + } + Paging::All => { + let mut page_num = 1_usize; + let mut validators = Vec::new(); + let per_page = DEFAULT_VALIDATORS_PER_PAGE.into(); + loop { + let response = self + .perform(validators::Request::new( + Some(height), + Some(page_num.into()), + Some(per_page), + )) + .await?; + validators.extend(response.validators); + if validators.len() as i32 == response.total { + return Ok(validators::Response::new( + response.block_height, + validators, + response.total, + )); + } + page_num += 1; + } + } + } + } + + /// `/consensus_params`: get the latest consensus parameters. + async fn latest_consensus_params(&self) -> Result { + self.perform(consensus_params::Request::new(None)).await + } + + /// `/commit`: get the latest block commit + async fn latest_commit(&self) -> Result { + self.perform(commit::Request::default()).await + } + + /// `/health`: get node health. + /// + /// Returns empty result (200 OK) on success, no response in case of an error. + async fn health(&self) -> Result<(), Error> { + self.perform(health::Request).await?; + Ok(()) + } + + /// `/genesis`: get genesis file. + async fn genesis(&self) -> Result, Error> + where + AppState: fmt::Debug + Serialize + DeserializeOwned + Send, + { + Ok(self.perform(genesis::Request::default()).await?.genesis) + } + + /// `/net_info`: obtain information about P2P and other network connections. + async fn net_info(&self) -> Result { + self.perform(net_info::Request).await + } + + /// `/status`: get Tendermint status including node info, pubkey, latest + /// block hash, app hash, block height and time. + async fn status(&self) -> Result { + self.perform(status::Request).await + } + + /// `/broadcast_evidence`: broadcast an evidence. + async fn broadcast_evidence(&self, e: Evidence) -> Result { + self.perform(evidence::Request::new(e)).await + } + + /// `/tx`: find transaction by hash. + async fn tx(&self, hash: Hash, prove: bool) -> Result { + self.perform(tx::Request::new(hash, prove)).await + } + + /// `/tx_search`: search for transactions with their results. + async fn tx_search( + &self, + query: Query, + prove: bool, + page: u32, + per_page: u8, + order: Order, + ) -> Result { + self.perform(tx_search::Request::new(query, prove, page, per_page, order)) + .await + } + + #[cfg(any( + feature = "tendermint-rpc/http-client", + feature = "tendermint-rpc/websocket-client" + ))] + /// Poll the `/health` endpoint until it returns a successful result or + /// the given `timeout` has elapsed. + async fn wait_until_healthy(&self, timeout: T) -> Result<(), Error> + where + T: Into + Send, + { + let timeout = timeout.into(); + let poll_interval = core::time::Duration::from_millis(200); + let mut attempts_remaining = timeout.as_millis() / poll_interval.as_millis(); + + while self.health().await.is_err() { + if attempts_remaining == 0 { + return Err(Error::timeout(timeout)); + } + + attempts_remaining -= 1; + tokio::time::sleep(poll_interval).await; + } + + Ok(()) + } + + /// Perform a request against the RPC endpoint. + /// + /// This method is used by the default implementations of specific + /// endpoint methods. The latest protocol dialect is assumed to be invoked. + async fn perform(&self, request: R) -> Result + where + R: SimpleRequest; +} + +#[cfg(not(target_arch = "wasm32"))] +mod non_wasm { + use super::*; + use cosmrs::tendermint::abci::response::Info; + use std::fmt::Debug; + use tendermint_rpc::endpoint::abci_query::AbciQuery; + use tendermint_rpc::endpoint::block::Response; + + #[async_trait] + impl TendermintRpcClient for C + where + C: tendermint_rpc::client::Client + Sync, + { + async fn abci_info(&self) -> Result { + self.abci_info().await + } + + async fn abci_query( + &self, + path: Option, + data: V, + height: Option, + prove: bool, + ) -> Result + where + V: Into> + Send, + { + self.abci_query(path, data, height, prove).await + } + + async fn block(&self, height: H) -> Result + where + H: Into + Send, + { + self.block(height).await + } + + async fn block_by_hash(&self, hash: Hash) -> Result { + self.block_by_hash(hash).await + } + + async fn latest_block(&self) -> Result { + self.latest_block().await + } + + async fn header(&self, height: H) -> Result + where + H: Into + Send, + { + self.header(height).await + } + + async fn header_by_hash(&self, hash: Hash) -> Result { + self.header_by_hash(hash).await + } + + async fn block_results(&self, height: H) -> Result + where + H: Into + Send, + { + self.block_results(height).await + } + + async fn latest_block_results(&self) -> Result { + self.latest_block_results().await + } + + async fn block_search( + &self, + query: Query, + page: u32, + per_page: u8, + order: Order, + ) -> Result { + self.block_search(query, page, per_page, order).await + } + + async fn blockchain(&self, min: H, max: H) -> Result + where + H: Into + Send, + { + self.blockchain(min, max).await + } + + async fn broadcast_tx_async(&self, tx: T) -> Result + where + T: Into> + Send, + { + self.broadcast_tx_async(tx).await + } + + async fn broadcast_tx_sync(&self, tx: T) -> Result + where + T: Into> + Send, + { + self.broadcast_tx_sync(tx).await + } + + async fn broadcast_tx_commit( + &self, + tx: T, + ) -> Result + where + T: Into> + Send, + { + self.broadcast_tx_commit(tx).await + } + + async fn commit(&self, height: H) -> Result + where + H: Into + Send, + { + self.commit(height).await + } + + async fn consensus_params(&self, height: H) -> Result + where + H: Into + Send, + { + self.consensus_params(height).await + } + + async fn consensus_state(&self) -> Result { + self.consensus_state().await + } + + async fn validators( + &self, + height: H, + paging: Paging, + ) -> Result + where + H: Into + Send, + { + self.validators(height, paging).await + } + + async fn latest_consensus_params(&self) -> Result { + self.latest_consensus_params().await + } + + async fn latest_commit(&self) -> Result { + self.latest_commit().await + } + + async fn health(&self) -> Result<(), Error> { + self.health().await + } + + async fn genesis(&self) -> Result, Error> + where + AppState: Debug + Serialize + DeserializeOwned + Send, + { + self.genesis().await + } + + async fn net_info(&self) -> Result { + self.net_info().await + } + + async fn status(&self) -> Result { + self.status().await + } + + async fn broadcast_evidence(&self, e: Evidence) -> Result { + self.broadcast_evidence(e).await + } + + async fn tx(&self, hash: Hash, prove: bool) -> Result { + self.tx(hash, prove).await + } + + async fn tx_search( + &self, + query: Query, + prove: bool, + page: u32, + per_page: u8, + order: Order, + ) -> Result { + self.tx_search(query, prove, page, per_page, order).await + } + + #[cfg(any( + feature = "tendermint-rpc/http-client", + feature = "tendermint-rpc/websocket-client" + ))] + async fn wait_until_healthy(&self, timeout: T) -> Result<(), Error> + where + T: Into + Send, + { + self.wait_until_healthy(timeout).await + } + + async fn perform(&self, request: R) -> Result + where + R: SimpleRequest, + { + self.perform(request).await + } + } +} diff --git a/common/client-libs/validator-client/src/rpc/reqwest.rs b/common/client-libs/validator-client/src/rpc/reqwest.rs new file mode 100644 index 0000000000..9c8411d666 --- /dev/null +++ b/common/client-libs/validator-client/src/rpc/reqwest.rs @@ -0,0 +1,118 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::rpc::TendermintRpcClient; +use async_trait::async_trait; +use reqwest::header::HeaderMap; +use reqwest::{header, RequestBuilder}; +use tendermint_rpc::{Error, Response, SimpleRequest}; +use url::Url; + +pub struct ReqwestRpcClient { + inner: reqwest::Client, + url: Url, +} + +impl ReqwestRpcClient { + pub fn new(url: Url) -> Self { + ReqwestRpcClient { + inner: reqwest::Client::new(), + url, + } + } + + fn build_request(&self, request: R) -> RequestBuilder { + let mut headers = HeaderMap::new(); + headers.insert(header::CONTENT_TYPE, "application/json".parse().unwrap()); + headers.insert( + header::USER_AGENT, + format!("nym-reqwest-rpc-client/{}", env!("CARGO_PKG_VERSION")) + .parse() + .unwrap(), + ); + if let Some(auth) = extract_authorization(&self.url) { + headers.insert(header::AUTHORIZATION, auth.parse().unwrap()); + } + + self.inner + .post(self.url.clone()) + .body(request.into_json().into_bytes()) + .headers(headers) + } +} + +trait TendermintRpcErrorMap { + fn into_rpc_err(self) -> Error; +} + +impl TendermintRpcErrorMap for reqwest::Error { + fn into_rpc_err(self) -> Error { + todo!() + } +} + +#[cfg_attr(target_arch = "wasm32", async_trait(?Send))] +#[cfg_attr(not(target_arch = "wasm32"), async_trait)] +impl TendermintRpcClient for ReqwestRpcClient { + async fn perform(&self, request: R) -> Result + where + R: SimpleRequest, + { + let request = self.build_request(request); + // that's extremely unfortunate. the trait requires returning tendermint rpc error so we have to make best effort error mapping + let response = request + .send() + .await + .map_err(TendermintRpcErrorMap::into_rpc_err)?; + let bytes = response + .bytes() + .await + .map_err(TendermintRpcErrorMap::into_rpc_err)?; + R::Response::from_string(bytes).map(Into::into) + } +} + +// essentially https://github.com/informalsystems/tendermint-rs/blob/v0.32.0/rpc/src/client/transport/auth.rs#L31 +pub fn extract_authorization(url: &Url) -> Option { + if !url.has_authority() { + return None; + } + + let authority = url.authority(); + if let Some((userpass, _)) = authority.split_once('@') { + Some(base64::encode(userpass)) + } else { + None + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[cfg(test)] + mod extracting_url_authorization { + use super::*; + use std::str::FromStr; + + #[test] + fn extract_auth_absent() { + let uri = Url::from_str("http://example.com").unwrap(); + assert_eq!(extract_authorization(&uri), None); + } + + #[test] + fn extract_auth_username_only() { + let uri = Url::from_str("http://toto@example.com").unwrap(); + let base64 = "dG90bw==".to_string(); + assert_eq!(extract_authorization(&uri), Some(base64)); + } + + #[test] + fn extract_auth_username_password() { + let uri = Url::from_str("http://toto:tata@example.com").unwrap(); + let base64 = "dG90bzp0YXRh".to_string(); + assert_eq!(extract_authorization(&uri), Some(base64)); + } + } +} diff --git a/common/client-libs/validator-client/src/signing/direct_wallet.rs b/common/client-libs/validator-client/src/signing/direct_wallet.rs index 177e50a2f2..b26ac39ada 100644 --- a/common/client-libs/validator-client/src/signing/direct_wallet.rs +++ b/common/client-libs/validator-client/src/signing/direct_wallet.rs @@ -35,6 +35,7 @@ pub enum DirectSecp256k1HdWalletError { AccountDerivationError { source: eyre::Report }, } +// TODO: maybe lock this one behind feature flag? #[derive(Debug, Clone, Zeroize, ZeroizeOnDrop)] pub struct DirectSecp256k1HdWallet { /// Base secret diff --git a/common/client-libs/validator-client/src/signing/signer.rs b/common/client-libs/validator-client/src/signing/signer.rs index 074924a0cd..4b620291fe 100644 --- a/common/client-libs/validator-client/src/signing/signer.rs +++ b/common/client-libs/validator-client/src/signing/signer.rs @@ -33,6 +33,16 @@ pub enum SignerType { pub trait OfflineSigner { type Error: From; + // I really dislike existence of this function because it makes you re-derive your key **twice** for each contract transaction + fn signer_addresses(&self) -> Result, Self::Error> { + let derived_addresses = self + .get_accounts()? + .into_iter() + .map(|account| account.address) + .collect(); + Ok(derived_addresses) + } + fn get_accounts(&self) -> Result, Self::Error>; fn find_account(&self, signer_address: &AccountId) -> Result { @@ -94,3 +104,25 @@ pub trait OfflineSigner { // fn sign_amino_with_account(&self, signer: &AccountData, sign_doc: AminoSignDoc) -> Result; } + +#[derive(Debug, Default, Copy, Clone)] +pub struct NoSigner; + +// #[derive(Debug, Copy, Clone, Error)] +// #[error("no signer is available")] +// struct SignerUnavailable; +// +// // trait bound requirements +// impl From for SignerUnavailable { +// fn from(_: SigningError) -> Self { +// SignerUnavailable +// } +// } +// +// impl OfflineSigner for NoSigner { +// type Error = SignerUnavailable; +// +// fn get_accounts(&self) -> Result, Self::Error> { +// return Err(SignerUnavailable); +// } +// } diff --git a/common/client-libs/validator-client/src/signing/tx_signer.rs b/common/client-libs/validator-client/src/signing/tx_signer.rs index f14f640793..f04047c39e 100644 --- a/common/client-libs/validator-client/src/signing/tx_signer.rs +++ b/common/client-libs/validator-client/src/signing/tx_signer.rs @@ -6,53 +6,33 @@ use crate::signing::SignerData; use cosmrs::tx::{SignDoc, SignerInfo}; use cosmrs::{tx, AccountId, Any}; -#[derive(Debug)] -/// A client that has only one responsibility - sign transactions -/// and not touch chain. -pub struct TxSigner { - signer: S, -} - -impl TxSigner { - pub fn new(signer: S) -> Self { - TxSigner { signer } +// extension trait for the OfflineSigner to allow to sign transactions +pub trait TxSigner: OfflineSigner { + fn signer_public_key(&self, signer_address: &AccountId) -> Option { + let account = self.find_account(signer_address).ok()?; + Some(account.public_key().into()) } - pub fn signer(&self) -> &S { - &self.signer - } - - pub fn into_inner_signer(self) -> S { - self.signer - } - - pub fn sign_amino( + fn sign_amino( &self, _signer_address: &AccountId, _messages: Vec, _fee: tx::Fee, _memo: impl Into + Send + 'static, _signer_data: SignerData, - ) -> Result - where - S: OfflineSigner, - { + ) -> Result::Error> { unimplemented!() } - // TODO: change this sucker to use the trait better - pub fn sign_direct( + fn sign_direct( &self, signer_address: &AccountId, messages: Vec, fee: tx::Fee, memo: impl Into + Send + 'static, signer_data: SignerData, - ) -> Result - where - S: OfflineSigner, - { - let account_from_signer = self.signer.find_account(signer_address)?; + ) -> Result::Error> { + let account_from_signer = self.find_account(signer_address)?; // TODO: experiment with this field let timeout_height = 0u32; @@ -70,7 +50,8 @@ impl TxSigner { ) .map_err(|source| SigningError::SignDocFailure { source })?; - self.signer - .sign_direct_with_account(&account_from_signer, sign_doc) + self.sign_direct_with_account(&account_from_signer, sign_doc) } } + +impl TxSigner for T where T: OfflineSigner {} diff --git a/common/commands/Cargo.toml b/common/commands/Cargo.toml index 28f319b875..45c9139fe3 100644 --- a/common/commands/Cargo.toml +++ b/common/commands/Cargo.toml @@ -19,16 +19,16 @@ log = { workspace = true } rand = {version = "0.6", features = ["std"] } serde = { version = "1.0", features = ["derive"] } serde_json = { workspace = true } -thiserror = "1" +thiserror = { workspace = true } time = { version = "0.3.6", features = ["parsing", "formatting"] } toml = "0.5.6" -url = "2.2" +url = { workspace = true } tap = "1" cosmrs = { workspace = true } cosmwasm-std = { workspace = true } -nym-validator-client = { path = "../client-libs/validator-client", features = ["signing", "http-client"] } +nym-validator-client = { path = "../client-libs/validator-client" } nym-bin-common = { path = "../../common/bin-common", features = ["output_format"] } nym-crypto = { path = "../../common/crypto", features = ["asymmetric"] } nym-network-defaults = { path = "../network-defaults" } diff --git a/common/commands/src/context/mod.rs b/common/commands/src/context/mod.rs index e2d648fbf0..db20ed0ac3 100644 --- a/common/commands/src/context/mod.rs +++ b/common/commands/src/context/mod.rs @@ -8,17 +8,19 @@ use nym_network_defaults::{ NymNetworkDetails, }; pub use nym_validator_client::nym_api::Client as NymApiClient; -use nym_validator_client::nyxd::{ - self, AccountId, DirectSigningNyxdClient, NyxdClient, QueryNyxdClient, +use nym_validator_client::nyxd::{self, AccountId, NyxdClient}; +use nym_validator_client::{ + DirectSigningHttpRpcNyxdClient, DirectSigningHttpRpcValidatorClient, QueryHttpRpcNyxdClient, + QueryHttpRpcValidatorClient, }; use tap::prelude::*; pub mod errors; -pub type SigningClient = nym_validator_client::nyxd::NyxdClient; -pub type QueryClient = nym_validator_client::nyxd::NyxdClient; -pub type SigningClientWithNyxd = nym_validator_client::Client; -pub type QueryClientWithNyxd = nym_validator_client::Client; +pub type SigningClient = DirectSigningHttpRpcNyxdClient; +pub type QueryClient = QueryHttpRpcNyxdClient; +pub type SigningClientWithNyxd = DirectSigningHttpRpcValidatorClient; +pub type QueryClientWithNyxd = QueryHttpRpcValidatorClient; #[derive(Debug)] pub struct ClientArgs { @@ -79,7 +81,7 @@ pub fn create_signing_client( .nyxd_url .as_str(); - match NyxdClient::connect_with_mnemonic(client_config, nyxd_url, mnemonic, None) { + match NyxdClient::connect_with_mnemonic(client_config, nyxd_url, mnemonic) { Ok(client) => Ok(client), Err(e) => Err(ContextError::NyxdError(format!("{e}"))), } diff --git a/common/commands/src/validator/account/balance.rs b/common/commands/src/validator/account/balance.rs index 8786470bd1..4e109ad7b3 100644 --- a/common/commands/src/validator/account/balance.rs +++ b/common/commands/src/validator/account/balance.rs @@ -4,7 +4,7 @@ use clap::Parser; use log::{error, info}; -use nym_validator_client::nyxd::AccountId; +use nym_validator_client::nyxd::{AccountId, CosmWasmClient}; use crate::context::QueryClient; use crate::utils::{pretty_coin, show_error}; diff --git a/common/commands/src/validator/account/pubkey.rs b/common/commands/src/validator/account/pubkey.rs index b1ed260568..6a7c3383d6 100644 --- a/common/commands/src/validator/account/pubkey.rs +++ b/common/commands/src/validator/account/pubkey.rs @@ -3,7 +3,7 @@ use clap::Parser; use log::{error, info}; -use nym_validator_client::nyxd::AccountId; +use nym_validator_client::nyxd::{AccountId, CosmWasmClient}; use nym_validator_client::signing::direct_wallet::DirectSecp256k1HdWallet; use crate::context::QueryClient; @@ -68,7 +68,7 @@ pub fn get_pubkey_from_mnemonic(address: AccountId, prefix: &str, mnemonic: bip3 pub async fn get_pubkey_from_chain(address: AccountId, client: &QueryClient) { info!("Getting public key for address {} from chain...", address); - match client.get_account_details(&address).await { + match client.get_account(&address).await { Ok(Some(account)) => { if let Ok(base_account) = account.try_get_base_account() { if let Some(pubkey) = base_account.pubkey { diff --git a/common/commands/src/validator/mixnet/delegators/delegate_to_mixnode.rs b/common/commands/src/validator/mixnet/delegators/delegate_to_mixnode.rs index f07cd21d5f..54b2516d6e 100644 --- a/common/commands/src/validator/mixnet/delegators/delegate_to_mixnode.rs +++ b/common/commands/src/validator/mixnet/delegators/delegate_to_mixnode.rs @@ -5,7 +5,7 @@ use crate::context::SigningClient; use clap::Parser; use log::info; use nym_mixnet_contract_common::{Coin, MixId}; -use nym_validator_client::nyxd::traits::{MixnetQueryClient, MixnetSigningClient}; +use nym_validator_client::nyxd::contract_traits::{MixnetQueryClient, MixnetSigningClient}; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/delegators/query_for_delegations.rs b/common/commands/src/validator/mixnet/delegators/query_for_delegations.rs index 4e6d91926b..f29dae6db3 100644 --- a/common/commands/src/validator/mixnet/delegators/query_for_delegations.rs +++ b/common/commands/src/validator/mixnet/delegators/query_for_delegations.rs @@ -10,6 +10,7 @@ use crate::utils::{pretty_cosmwasm_coin, show_error_passthrough}; use comfy_table::Table; use cosmwasm_std::Addr; use nym_mixnet_contract_common::{Delegation, PendingEpochEvent, PendingEpochEventKind}; +use nym_validator_client::nyxd::contract_traits::PagedMixnetQueryClient; #[derive(Debug, Parser)] pub struct Args {} @@ -21,12 +22,14 @@ pub async fn execute(_args: Args, client: SigningClientWithNyxd) { ); let delegations = client - .get_all_delegator_delegations(client.nyxd.address()) + .nyxd + .get_all_delegator_delegations(&client.nyxd.address()) .await .map_err(show_error_passthrough); let mixnet_contract_events = client - .get_all_nyxd_pending_epoch_events() + .nyxd + .get_all_pending_epoch_events() .await .map_err(show_error_passthrough); diff --git a/common/commands/src/validator/mixnet/delegators/rewards/claim_delegator_reward.rs b/common/commands/src/validator/mixnet/delegators/rewards/claim_delegator_reward.rs index 61265c9ac5..327a3c0fd3 100644 --- a/common/commands/src/validator/mixnet/delegators/rewards/claim_delegator_reward.rs +++ b/common/commands/src/validator/mixnet/delegators/rewards/claim_delegator_reward.rs @@ -5,7 +5,7 @@ use crate::context::SigningClient; use clap::Parser; use log::info; use nym_mixnet_contract_common::MixId; -use nym_validator_client::nyxd::traits::{MixnetQueryClient, MixnetSigningClient}; +use nym_validator_client::nyxd::contract_traits::{MixnetQueryClient, MixnetSigningClient}; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/delegators/rewards/vesting_claim_delegator_reward.rs b/common/commands/src/validator/mixnet/delegators/rewards/vesting_claim_delegator_reward.rs index 6d9e0bcbf7..aa6b8dbe44 100644 --- a/common/commands/src/validator/mixnet/delegators/rewards/vesting_claim_delegator_reward.rs +++ b/common/commands/src/validator/mixnet/delegators/rewards/vesting_claim_delegator_reward.rs @@ -5,7 +5,7 @@ use crate::context::SigningClient; use clap::Parser; use log::info; use nym_mixnet_contract_common::MixId; -use nym_validator_client::nyxd::traits::{MixnetQueryClient, MixnetSigningClient}; +use nym_validator_client::nyxd::contract_traits::{MixnetQueryClient, MixnetSigningClient}; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/delegators/undelegate_from_mixnode.rs b/common/commands/src/validator/mixnet/delegators/undelegate_from_mixnode.rs index 790f518267..cadb6c272f 100644 --- a/common/commands/src/validator/mixnet/delegators/undelegate_from_mixnode.rs +++ b/common/commands/src/validator/mixnet/delegators/undelegate_from_mixnode.rs @@ -5,7 +5,7 @@ use crate::context::SigningClient; use clap::Parser; use log::info; use nym_mixnet_contract_common::MixId; -use nym_validator_client::nyxd::traits::{MixnetQueryClient, MixnetSigningClient}; +use nym_validator_client::nyxd::contract_traits::{MixnetQueryClient, MixnetSigningClient}; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/delegators/vesting_delegate_to_mixnode.rs b/common/commands/src/validator/mixnet/delegators/vesting_delegate_to_mixnode.rs index 41a992f0ed..45c4ffa5c3 100644 --- a/common/commands/src/validator/mixnet/delegators/vesting_delegate_to_mixnode.rs +++ b/common/commands/src/validator/mixnet/delegators/vesting_delegate_to_mixnode.rs @@ -5,8 +5,8 @@ use clap::Parser; use log::info; use nym_mixnet_contract_common::{Coin, MixId}; -use nym_validator_client::nyxd::traits::MixnetQueryClient; -use nym_validator_client::nyxd::traits::VestingSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetQueryClient; +use nym_validator_client::nyxd::contract_traits::VestingSigningClient; use crate::context::SigningClient; diff --git a/common/commands/src/validator/mixnet/delegators/vesting_undelegate_from_mixnode.rs b/common/commands/src/validator/mixnet/delegators/vesting_undelegate_from_mixnode.rs index 42493f493d..13bae0b7a0 100644 --- a/common/commands/src/validator/mixnet/delegators/vesting_undelegate_from_mixnode.rs +++ b/common/commands/src/validator/mixnet/delegators/vesting_undelegate_from_mixnode.rs @@ -4,8 +4,8 @@ use clap::Parser; use log::info; use nym_mixnet_contract_common::MixId; -use nym_validator_client::nyxd::traits::MixnetQueryClient; -use nym_validator_client::nyxd::traits::VestingSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetQueryClient; +use nym_validator_client::nyxd::contract_traits::VestingSigningClient; use crate::context::SigningClient; diff --git a/common/commands/src/validator/mixnet/operators/gateway/bond_gateway.rs b/common/commands/src/validator/mixnet/operators/gateway/bond_gateway.rs index 76b6e93fa0..28fe160070 100644 --- a/common/commands/src/validator/mixnet/operators/gateway/bond_gateway.rs +++ b/common/commands/src/validator/mixnet/operators/gateway/bond_gateway.rs @@ -7,7 +7,7 @@ use log::{info, warn}; use nym_contracts_common::signing::MessageSignature; use nym_mixnet_contract_common::Coin; use nym_network_defaults::{DEFAULT_CLIENT_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT}; -use nym_validator_client::nyxd::traits::MixnetSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetSigningClient; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/operators/gateway/gateway_bonding_sign_payload.rs b/common/commands/src/validator/mixnet/operators/gateway/gateway_bonding_sign_payload.rs index ff4f8eaf32..3845a6c7ef 100644 --- a/common/commands/src/validator/mixnet/operators/gateway/gateway_bonding_sign_payload.rs +++ b/common/commands/src/validator/mixnet/operators/gateway/gateway_bonding_sign_payload.rs @@ -8,7 +8,7 @@ use cosmwasm_std::Coin; use nym_bin_common::output_format::OutputFormat; use nym_mixnet_contract_common::construct_gateway_bonding_sign_payload; use nym_network_defaults::{DEFAULT_CLIENT_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT}; -use nym_validator_client::nyxd::traits::MixnetQueryClient; +use nym_validator_client::nyxd::contract_traits::{MixnetQueryClient, NymContractsProvider}; #[derive(Debug, Parser)] pub struct Args { @@ -62,7 +62,7 @@ pub async fn create_payload(args: Args, client: SigningClient) { let coin = Coin::new(args.amount, denom); - let nonce = match client.get_signing_nonce(client.address()).await { + let nonce = match client.get_signing_nonce(&client.address()).await { Ok(nonce) => nonce, Err(err) => { eprint!( @@ -73,9 +73,11 @@ pub async fn create_payload(args: Args, client: SigningClient) { } }; - let address = account_id_to_cw_addr(client.address()); + let address = account_id_to_cw_addr(&client.address()); let proxy = if args.with_vesting_account { - Some(account_id_to_cw_addr(client.vesting_contract_address())) + Some(account_id_to_cw_addr( + client.vesting_contract_address().unwrap(), + )) } else { None }; diff --git a/common/commands/src/validator/mixnet/operators/gateway/settings/update_config.rs b/common/commands/src/validator/mixnet/operators/gateway/settings/update_config.rs index cce3d26dfe..c0cf879147 100644 --- a/common/commands/src/validator/mixnet/operators/gateway/settings/update_config.rs +++ b/common/commands/src/validator/mixnet/operators/gateway/settings/update_config.rs @@ -5,7 +5,7 @@ use crate::context::SigningClient; use clap::Parser; use log::info; use nym_mixnet_contract_common::GatewayConfigUpdate; -use nym_validator_client::nyxd::traits::{MixnetQueryClient, MixnetSigningClient}; +use nym_validator_client::nyxd::contract_traits::{MixnetQueryClient, MixnetSigningClient}; #[derive(Debug, Parser)] pub struct Args { @@ -29,7 +29,7 @@ pub async fn update_config(args: Args, client: SigningClient) { info!("Update gateway config!"); let current_details = match client - .get_owned_gateway(client.address()) + .get_owned_gateway(&client.address()) .await .expect("failed to query the chain for gateway details") .gateway diff --git a/common/commands/src/validator/mixnet/operators/gateway/settings/vesting_update_config.rs b/common/commands/src/validator/mixnet/operators/gateway/settings/vesting_update_config.rs index e734ddc97d..346b652b2f 100644 --- a/common/commands/src/validator/mixnet/operators/gateway/settings/vesting_update_config.rs +++ b/common/commands/src/validator/mixnet/operators/gateway/settings/vesting_update_config.rs @@ -5,8 +5,8 @@ use crate::context::SigningClient; use clap::Parser; use log::info; use nym_mixnet_contract_common::GatewayConfigUpdate; -use nym_validator_client::nyxd::traits::MixnetQueryClient; -use nym_validator_client::nyxd::traits::VestingSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetQueryClient; +use nym_validator_client::nyxd::contract_traits::VestingSigningClient; #[derive(Debug, Parser)] pub struct Args { @@ -30,7 +30,7 @@ pub async fn vesting_update_config(args: Args, client: SigningClient) { info!("Update vesting gateway config!"); let current_details = match client - .get_owned_gateway(client.address()) + .get_owned_gateway(&client.address()) .await .expect("failed to query the chain for gateway details") .gateway diff --git a/common/commands/src/validator/mixnet/operators/gateway/unbond_gateway.rs b/common/commands/src/validator/mixnet/operators/gateway/unbond_gateway.rs index 7603db1a6e..af9c6c8bb4 100644 --- a/common/commands/src/validator/mixnet/operators/gateway/unbond_gateway.rs +++ b/common/commands/src/validator/mixnet/operators/gateway/unbond_gateway.rs @@ -4,7 +4,7 @@ use crate::context::SigningClient; use clap::Parser; use log::info; -use nym_validator_client::nyxd::traits::MixnetSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetSigningClient; #[derive(Debug, Parser)] pub struct Args {} diff --git a/common/commands/src/validator/mixnet/operators/gateway/vesting_bond_gateway.rs b/common/commands/src/validator/mixnet/operators/gateway/vesting_bond_gateway.rs index 21f771c0b3..91c2817be8 100644 --- a/common/commands/src/validator/mixnet/operators/gateway/vesting_bond_gateway.rs +++ b/common/commands/src/validator/mixnet/operators/gateway/vesting_bond_gateway.rs @@ -7,7 +7,7 @@ use log::{info, warn}; use nym_contracts_common::signing::MessageSignature; use nym_mixnet_contract_common::{Coin, Gateway}; use nym_network_defaults::{DEFAULT_CLIENT_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT}; -use nym_validator_client::nyxd::traits::VestingSigningClient; +use nym_validator_client::nyxd::contract_traits::VestingSigningClient; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/operators/gateway/vesting_unbond_gateway.rs b/common/commands/src/validator/mixnet/operators/gateway/vesting_unbond_gateway.rs index 8e79dd7bc7..1c4312424c 100644 --- a/common/commands/src/validator/mixnet/operators/gateway/vesting_unbond_gateway.rs +++ b/common/commands/src/validator/mixnet/operators/gateway/vesting_unbond_gateway.rs @@ -4,7 +4,7 @@ use crate::context::SigningClient; use clap::Parser; use log::info; -use nym_validator_client::nyxd::traits::MixnetSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetSigningClient; #[derive(Debug, Parser)] pub struct Args {} diff --git a/common/commands/src/validator/mixnet/operators/mixnode/bond_mixnode.rs b/common/commands/src/validator/mixnet/operators/mixnode/bond_mixnode.rs index 8fe6bb8040..862a797566 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/bond_mixnode.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/bond_mixnode.rs @@ -10,7 +10,7 @@ use nym_mixnet_contract_common::{Coin, MixNodeCostParams, Percent}; use nym_network_defaults::{ DEFAULT_HTTP_API_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT, DEFAULT_VERLOC_LISTENING_PORT, }; -use nym_validator_client::nyxd::traits::MixnetSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetSigningClient; use nym_validator_client::nyxd::CosmWasmCoin; use crate::context::SigningClient; diff --git a/common/commands/src/validator/mixnet/operators/mixnode/decrease_pledge.rs b/common/commands/src/validator/mixnet/operators/mixnode/decrease_pledge.rs index 969e40024a..556021dcf9 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/decrease_pledge.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/decrease_pledge.rs @@ -5,7 +5,7 @@ use crate::context::SigningClient; use clap::Parser; use log::info; use nym_mixnet_contract_common::Coin; -use nym_validator_client::nyxd::traits::MixnetSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetSigningClient; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/operators/mixnode/families/create_family.rs b/common/commands/src/validator/mixnet/operators/mixnode/families/create_family.rs index f5ff9e3419..6acaca80d2 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/families/create_family.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/families/create_family.rs @@ -4,8 +4,8 @@ use crate::context::SigningClient; use clap::Parser; use log::info; -use nym_validator_client::nyxd::traits::MixnetSigningClient; -use nym_validator_client::nyxd::traits::VestingSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetSigningClient; +use nym_validator_client::nyxd::contract_traits::VestingSigningClient; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/operators/mixnode/families/create_family_join_permit_sign_payload.rs b/common/commands/src/validator/mixnet/operators/mixnode/families/create_family_join_permit_sign_payload.rs index 7b02731b30..c81dc35f69 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/families/create_family_join_permit_sign_payload.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/families/create_family_join_permit_sign_payload.rs @@ -10,7 +10,7 @@ use nym_bin_common::output_format::OutputFormat; use nym_crypto::asymmetric::identity; use nym_mixnet_contract_common::construct_family_join_permit; use nym_mixnet_contract_common::families::FamilyHead; -use nym_validator_client::nyxd::traits::MixnetQueryClient; +use nym_validator_client::nyxd::contract_traits::{MixnetQueryClient, NymContractsProvider}; #[derive(Debug, Parser)] pub struct Args { @@ -47,7 +47,7 @@ pub async fn create_family_join_permit_sign_payload(args: Args, client: QueryCli // make sure this mixnode is actually a family head if client - .get_node_family_by_head(mixnode.bond_information.identity()) + .get_node_family_by_head(mixnode.bond_information.identity().to_string()) .await .unwrap() .family @@ -70,7 +70,9 @@ pub async fn create_family_join_permit_sign_payload(args: Args, client: QueryCli // let address = account_id_to_cw_addr(&args.address); let proxy = if args.with_vesting_account { - Some(account_id_to_cw_addr(client.vesting_contract_address())) + Some(account_id_to_cw_addr( + client.vesting_contract_address().unwrap(), + )) } else { None }; diff --git a/common/commands/src/validator/mixnet/operators/mixnode/families/join_family.rs b/common/commands/src/validator/mixnet/operators/mixnode/families/join_family.rs index b69dd7a4b2..411a8412b7 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/families/join_family.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/families/join_family.rs @@ -7,8 +7,8 @@ use log::info; use nym_contracts_common::signing::MessageSignature; use nym_crypto::asymmetric::identity; use nym_mixnet_contract_common::families::FamilyHead; -use nym_validator_client::nyxd::traits::MixnetSigningClient; -use nym_validator_client::nyxd::traits::VestingSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetSigningClient; +use nym_validator_client::nyxd::contract_traits::VestingSigningClient; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/operators/mixnode/families/kick_family_member.rs b/common/commands/src/validator/mixnet/operators/mixnode/families/kick_family_member.rs index 9305c56918..27b5d71d7d 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/families/kick_family_member.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/families/kick_family_member.rs @@ -5,8 +5,8 @@ use crate::context::SigningClient; use clap::Parser; use log::info; use nym_crypto::asymmetric::identity; -use nym_validator_client::nyxd::traits::MixnetSigningClient; -use nym_validator_client::nyxd::traits::VestingSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetSigningClient; +use nym_validator_client::nyxd::contract_traits::VestingSigningClient; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/operators/mixnode/families/leave_family.rs b/common/commands/src/validator/mixnet/operators/mixnode/families/leave_family.rs index 193c003ab4..0673be508a 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/families/leave_family.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/families/leave_family.rs @@ -6,8 +6,8 @@ use clap::Parser; use log::info; use nym_crypto::asymmetric::identity; use nym_mixnet_contract_common::families::FamilyHead; -use nym_validator_client::nyxd::traits::MixnetSigningClient; -use nym_validator_client::nyxd::traits::VestingSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetSigningClient; +use nym_validator_client::nyxd::contract_traits::VestingSigningClient; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/operators/mixnode/mixnode_bonding_sign_payload.rs b/common/commands/src/validator/mixnet/operators/mixnode/mixnode_bonding_sign_payload.rs index b44d159398..332de7614e 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/mixnode_bonding_sign_payload.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/mixnode_bonding_sign_payload.rs @@ -11,7 +11,7 @@ use nym_mixnet_contract_common::{construct_mixnode_bonding_sign_payload, MixNode use nym_network_defaults::{ DEFAULT_HTTP_API_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT, DEFAULT_VERLOC_LISTENING_PORT, }; -use nym_validator_client::nyxd::traits::MixnetQueryClient; +use nym_validator_client::nyxd::contract_traits::{MixnetQueryClient, NymContractsProvider}; use nym_validator_client::nyxd::CosmWasmCoin; #[derive(Debug, Parser)] @@ -88,7 +88,7 @@ pub async fn create_payload(args: Args, client: SigningClient) { }, }; - let nonce = match client.get_signing_nonce(client.address()).await { + let nonce = match client.get_signing_nonce(&client.address()).await { Ok(nonce) => nonce, Err(err) => { eprint!( @@ -99,9 +99,11 @@ pub async fn create_payload(args: Args, client: SigningClient) { } }; - let address = account_id_to_cw_addr(client.address()); + let address = account_id_to_cw_addr(&client.address()); let proxy = if args.with_vesting_account { - Some(account_id_to_cw_addr(client.vesting_contract_address())) + Some(account_id_to_cw_addr( + client.vesting_contract_address().unwrap(), + )) } else { None }; diff --git a/common/commands/src/validator/mixnet/operators/mixnode/pledge_more.rs b/common/commands/src/validator/mixnet/operators/mixnode/pledge_more.rs index 1fbf38eb0c..1989725907 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/pledge_more.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/pledge_more.rs @@ -5,7 +5,7 @@ use crate::context::SigningClient; use clap::Parser; use log::info; use nym_mixnet_contract_common::Coin; -use nym_validator_client::nyxd::traits::MixnetSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetSigningClient; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/operators/mixnode/rewards/claim_operator_reward.rs b/common/commands/src/validator/mixnet/operators/mixnode/rewards/claim_operator_reward.rs index 729a5e8c03..a5f8d65236 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/rewards/claim_operator_reward.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/rewards/claim_operator_reward.rs @@ -4,7 +4,7 @@ use crate::context::SigningClient; use clap::Parser; use log::info; -use nym_validator_client::nyxd::traits::MixnetSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetSigningClient; #[derive(Debug, Parser)] pub struct Args {} diff --git a/common/commands/src/validator/mixnet/operators/mixnode/rewards/vesting_claim_operator_reward.rs b/common/commands/src/validator/mixnet/operators/mixnode/rewards/vesting_claim_operator_reward.rs index 8c1d43e091..3b88c6cf5c 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/rewards/vesting_claim_operator_reward.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/rewards/vesting_claim_operator_reward.rs @@ -4,7 +4,7 @@ use crate::context::SigningClient; use clap::Parser; use log::info; -use nym_validator_client::nyxd::traits::MixnetSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetSigningClient; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/operators/mixnode/settings/update_config.rs b/common/commands/src/validator/mixnet/operators/mixnode/settings/update_config.rs index 69fd8531be..733dea04a1 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/settings/update_config.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/settings/update_config.rs @@ -5,7 +5,7 @@ use crate::context::SigningClient; use clap::Parser; use log::info; use nym_mixnet_contract_common::MixNodeConfigUpdate; -use nym_validator_client::nyxd::traits::{MixnetQueryClient, MixnetSigningClient}; +use nym_validator_client::nyxd::contract_traits::{MixnetQueryClient, MixnetSigningClient}; #[derive(Debug, Parser)] pub struct Args { @@ -29,7 +29,7 @@ pub async fn update_config(args: Args, client: SigningClient) { info!("Update mix node config!"); let current_details = match client - .get_owned_mixnode(client.address()) + .get_owned_mixnode(&client.address()) .await .expect("failed to query the chain for mixnode details") .mixnode_details diff --git a/common/commands/src/validator/mixnet/operators/mixnode/settings/vesting_update_config.rs b/common/commands/src/validator/mixnet/operators/mixnode/settings/vesting_update_config.rs index 5b956b929f..a495c8f4b5 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/settings/vesting_update_config.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/settings/vesting_update_config.rs @@ -5,8 +5,8 @@ use crate::context::SigningClient; use clap::Parser; use log::info; use nym_mixnet_contract_common::MixNodeConfigUpdate; -use nym_validator_client::nyxd::traits::MixnetQueryClient; -use nym_validator_client::nyxd::traits::VestingSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetQueryClient; +use nym_validator_client::nyxd::contract_traits::VestingSigningClient; #[derive(Debug, Parser)] pub struct Args { @@ -30,7 +30,7 @@ pub async fn vesting_update_config(client: SigningClient, args: Args) { info!("Update vesting mix node config!"); let current_details = match client - .get_owned_mixnode(client.address()) + .get_owned_mixnode(&client.address()) .await .expect("failed to query the chain for mixnode details") .mixnode_details diff --git a/common/commands/src/validator/mixnet/operators/mixnode/unbond_mixnode.rs b/common/commands/src/validator/mixnet/operators/mixnode/unbond_mixnode.rs index ecfc3652e1..fe6f3df223 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/unbond_mixnode.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/unbond_mixnode.rs @@ -3,7 +3,7 @@ use clap::Parser; use log::info; -use nym_validator_client::nyxd::traits::MixnetSigningClient; +use nym_validator_client::nyxd::contract_traits::MixnetSigningClient; use crate::context::SigningClient; diff --git a/common/commands/src/validator/mixnet/operators/mixnode/vesting_bond_mixnode.rs b/common/commands/src/validator/mixnet/operators/mixnode/vesting_bond_mixnode.rs index 9928dec18f..415f9fe2b3 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/vesting_bond_mixnode.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/vesting_bond_mixnode.rs @@ -11,7 +11,7 @@ use nym_mixnet_contract_common::{MixNode, Percent}; use nym_network_defaults::{ DEFAULT_HTTP_API_LISTENING_PORT, DEFAULT_MIX_LISTENING_PORT, DEFAULT_VERLOC_LISTENING_PORT, }; -use nym_validator_client::nyxd::{traits::VestingSigningClient, CosmWasmCoin}; +use nym_validator_client::nyxd::{contract_traits::VestingSigningClient, CosmWasmCoin}; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/operators/mixnode/vesting_decrease_pledge.rs b/common/commands/src/validator/mixnet/operators/mixnode/vesting_decrease_pledge.rs index d38d7f61dc..bb83e1ffaa 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/vesting_decrease_pledge.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/vesting_decrease_pledge.rs @@ -5,7 +5,7 @@ use crate::context::SigningClient; use clap::Parser; use log::info; use nym_mixnet_contract_common::Coin; -use nym_validator_client::nyxd::traits::VestingSigningClient; +use nym_validator_client::nyxd::contract_traits::VestingSigningClient; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/operators/mixnode/vesting_pledge_more.rs b/common/commands/src/validator/mixnet/operators/mixnode/vesting_pledge_more.rs index 0774fd89d6..9917e02860 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/vesting_pledge_more.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/vesting_pledge_more.rs @@ -4,7 +4,7 @@ use clap::Parser; use log::info; use nym_mixnet_contract_common::Coin; -use nym_validator_client::nyxd::traits::VestingSigningClient; +use nym_validator_client::nyxd::contract_traits::VestingSigningClient; use crate::context::SigningClient; diff --git a/common/commands/src/validator/mixnet/operators/mixnode/vesting_unbond_mixnode.rs b/common/commands/src/validator/mixnet/operators/mixnode/vesting_unbond_mixnode.rs index 49f717a5af..3e63846430 100644 --- a/common/commands/src/validator/mixnet/operators/mixnode/vesting_unbond_mixnode.rs +++ b/common/commands/src/validator/mixnet/operators/mixnode/vesting_unbond_mixnode.rs @@ -4,7 +4,7 @@ use crate::context::SigningClient; use clap::Parser; use log::info; -use nym_validator_client::nyxd::traits::VestingSigningClient; +use nym_validator_client::nyxd::contract_traits::VestingSigningClient; #[derive(Debug, Parser)] pub struct Args { diff --git a/common/commands/src/validator/mixnet/operators/name/delete.rs b/common/commands/src/validator/mixnet/operators/name/delete.rs index 558dbf190c..d93b432108 100644 --- a/common/commands/src/validator/mixnet/operators/name/delete.rs +++ b/common/commands/src/validator/mixnet/operators/name/delete.rs @@ -1,7 +1,7 @@ use clap::Parser; use log::{error, info}; use nym_name_service_common::NameId; -use nym_validator_client::nyxd::{error::NyxdError, traits::NameServiceSigningClient}; +use nym_validator_client::nyxd::{contract_traits::NameServiceSigningClient, error::NyxdError}; use tap::TapFallible; use crate::context::SigningClient; diff --git a/common/commands/src/validator/mixnet/operators/name/mod.rs b/common/commands/src/validator/mixnet/operators/name/mod.rs index a1e2733ac5..c4adb3301d 100644 --- a/common/commands/src/validator/mixnet/operators/name/mod.rs +++ b/common/commands/src/validator/mixnet/operators/name/mod.rs @@ -2,6 +2,7 @@ use clap::{Args, Subcommand}; pub mod delete; pub mod register; +pub mod register_sign_payload; #[derive(Debug, Args)] #[clap(args_conflicts_with_subcommands = true, subcommand_required = true)] @@ -16,4 +17,6 @@ pub enum MixnetOperatorsNameCommands { Register(register::Args), /// Delete name alias for a nym address Delete(delete::Args), + /// Create base58-encoded payload required for producing valiid register signature. + CreateNameRegisterPayload(register_sign_payload::Args), } diff --git a/common/commands/src/validator/mixnet/operators/name/register.rs b/common/commands/src/validator/mixnet/operators/name/register.rs index e246e4241a..54a4b1a20d 100644 --- a/common/commands/src/validator/mixnet/operators/name/register.rs +++ b/common/commands/src/validator/mixnet/operators/name/register.rs @@ -2,7 +2,8 @@ use clap::Parser; use log::{error, info}; use nym_contracts_common::signing::MessageSignature; use nym_name_service_common::{Address, Coin, NameDetails, NymName}; -use nym_validator_client::nyxd::{error::NyxdError, traits::NameServiceSigningClient}; +use nym_sphinx::addressing::clients::Recipient; +use nym_validator_client::nyxd::{contract_traits::NameServiceSigningClient, error::NyxdError}; use tap::TapFallible; use crate::context::SigningClient; @@ -11,11 +12,11 @@ use crate::context::SigningClient; pub struct Args { /// Name alias #[clap(long)] - pub name: String, + pub name: NymName, /// Nym address that the alias is pointing to #[clap(long)] - pub nym_address: String, + pub nym_address: Recipient, #[clap(long)] pub signature: MessageSignature, @@ -23,9 +24,6 @@ pub struct Args { /// Deposit to be made to the service provider directory, in curent DENOMINATION (e.g. 'unym') #[clap(long)] pub deposit: u128, - - #[clap(long)] - pub identity_key: String, } pub async fn register(args: Args, client: SigningClient) -> Result<(), NyxdError> { @@ -34,12 +32,12 @@ pub async fn register(args: Args, client: SigningClient) -> Result<(), NyxdError args.name, args.nym_address ); - let name = NymName::new(&args.name).expect("invalid name"); - let address = Address::new(&args.nym_address); + let address = Address::new(&args.nym_address.to_string()).expect("invalid address"); + let identity_key = address.client_id().to_string(); let name = NameDetails { - name, + name: args.name, address, - identity_key: args.identity_key, + identity_key, }; let denom = client.current_chain_details().mix_denom.base.as_str(); diff --git a/common/commands/src/validator/mixnet/operators/name/register_sign_payload.rs b/common/commands/src/validator/mixnet/operators/name/register_sign_payload.rs new file mode 100644 index 0000000000..e293f23c2e --- /dev/null +++ b/common/commands/src/validator/mixnet/operators/name/register_sign_payload.rs @@ -0,0 +1,65 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::{ + context::SigningClient, + utils::{account_id_to_cw_addr, DataWrapper}, +}; + +use clap::Parser; +use cosmwasm_std::Coin; + +use nym_bin_common::output_format::OutputFormat; +use nym_name_service_common::{ + signing_types::construct_name_register_sign_payload, Address, NymName, +}; +use nym_sphinx::addressing::clients::Recipient; +use nym_validator_client::nyxd::{contract_traits::NameServiceQueryClient, error::NyxdError}; + +#[derive(Debug, Parser)] +pub struct Args { + // The name to register. + #[arg(long)] + pub name: NymName, + + /// The nym address the name should point to. + #[arg(long)] + pub nym_address: Recipient, + + #[arg(long)] + pub amount: u128, + + #[arg(short, long, default_value_t = OutputFormat::default())] + output: OutputFormat, +} + +pub async fn create_payload(args: Args, client: SigningClient) -> Result<(), NyxdError> { + let address = Address::new(&args.nym_address.to_string()).expect("invalid address"); + let identity_key = address.client_id().to_string(); + let name = nym_name_service_common::NameDetails { + name: args.name, + address, + identity_key, + }; + + let denom = client.current_chain_details().mix_denom.base.as_str(); + let deposit = Coin::new(args.amount, denom); + + let nonce = match client.get_name_signing_nonce(&client.address()).await { + Ok(nonce) => nonce, + Err(err) => { + eprint!( + "failed to query for the signing nonce of {}: {err}", + client.address() + ); + return Err(err); + } + }; + + let address = account_id_to_cw_addr(&client.address()); + let payload = construct_name_register_sign_payload(nonce, address, deposit, name); + let wrapper = DataWrapper::new(payload.to_base58_string().unwrap()); + println!("{}", args.output.format(&wrapper)); + + Ok(()) +} diff --git a/common/commands/src/validator/mixnet/operators/service/announce.rs b/common/commands/src/validator/mixnet/operators/service/announce.rs index a3e86bc674..b61652254e 100644 --- a/common/commands/src/validator/mixnet/operators/service/announce.rs +++ b/common/commands/src/validator/mixnet/operators/service/announce.rs @@ -2,7 +2,7 @@ use clap::Parser; use log::info; use nym_contracts_common::signing::MessageSignature; use nym_service_provider_directory_common::{Coin, NymAddress, ServiceDetails, ServiceType}; -use nym_validator_client::nyxd::traits::SpDirectorySigningClient; +use nym_validator_client::nyxd::contract_traits::SpDirectorySigningClient; use crate::context::SigningClient; diff --git a/common/commands/src/validator/mixnet/operators/service/announce_sign_payload.rs b/common/commands/src/validator/mixnet/operators/service/announce_sign_payload.rs index f8ac587f9b..f3dc4e5e66 100644 --- a/common/commands/src/validator/mixnet/operators/service/announce_sign_payload.rs +++ b/common/commands/src/validator/mixnet/operators/service/announce_sign_payload.rs @@ -15,7 +15,7 @@ use nym_service_provider_directory_common::{ ServiceType::NetworkRequester, }; use nym_sphinx::addressing::clients::Recipient; -use nym_validator_client::nyxd::traits::SpDirectoryQueryClient; +use nym_validator_client::nyxd::contract_traits::SpDirectoryQueryClient; #[derive(Debug, Parser)] pub struct Args { @@ -42,7 +42,7 @@ pub async fn create_payload(args: Args, client: SigningClient) { let denom = client.current_chain_details().mix_denom.base.as_str(); let deposit = Coin::new(args.amount, denom); - let nonce = match client.get_service_signing_nonce(client.address()).await { + let nonce = match client.get_service_signing_nonce(&client.address()).await { Ok(nonce) => nonce, Err(err) => { eprint!( @@ -53,7 +53,7 @@ pub async fn create_payload(args: Args, client: SigningClient) { } }; - let address = account_id_to_cw_addr(client.address()); + let address = account_id_to_cw_addr(&client.address()); let payload = construct_service_provider_announce_sign_payload(nonce, address, deposit, service); let wrapper = DataWrapper::new(payload.to_base58_string().unwrap()); diff --git a/common/commands/src/validator/mixnet/operators/service/delete.rs b/common/commands/src/validator/mixnet/operators/service/delete.rs index eb86f4028f..3d0ca4a676 100644 --- a/common/commands/src/validator/mixnet/operators/service/delete.rs +++ b/common/commands/src/validator/mixnet/operators/service/delete.rs @@ -1,7 +1,7 @@ use clap::Parser; use log::info; use nym_service_provider_directory_common::ServiceId; -use nym_validator_client::nyxd::traits::SpDirectorySigningClient; +use nym_validator_client::nyxd::contract_traits::SpDirectorySigningClient; use crate::context::SigningClient; diff --git a/common/commands/src/validator/transactions/get_transaction.rs b/common/commands/src/validator/transactions/get_transaction.rs index 6ad1bbbd2f..62d829d52b 100644 --- a/common/commands/src/validator/transactions/get_transaction.rs +++ b/common/commands/src/validator/transactions/get_transaction.rs @@ -7,6 +7,7 @@ use std::str::FromStr; use crate::context::QueryClient; use crate::utils::show_error; use cosmrs::tendermint::Hash; +use nym_validator_client::nyxd::CosmWasmClient; use serde_json::json; #[derive(Debug, Parser)] diff --git a/common/commands/src/validator/transactions/query_transactions.rs b/common/commands/src/validator/transactions/query_transactions.rs index b8b341ec57..f109d9a07a 100644 --- a/common/commands/src/validator/transactions/query_transactions.rs +++ b/common/commands/src/validator/transactions/query_transactions.rs @@ -5,6 +5,7 @@ use std::str::FromStr; use clap::Parser; use cosmrs::rpc::query::Query; +use nym_validator_client::nyxd::CosmWasmClient; use serde_json::json; use crate::context::QueryClient; diff --git a/common/commands/src/validator/vesting/balance.rs b/common/commands/src/validator/vesting/balance.rs index d5f5af20fe..ff8e2ee28c 100644 --- a/common/commands/src/validator/vesting/balance.rs +++ b/common/commands/src/validator/vesting/balance.rs @@ -5,7 +5,7 @@ use clap::Parser; use cosmrs::AccountId; use log::{error, info}; -use nym_validator_client::nyxd::{traits::VestingQueryClient, Coin}; +use nym_validator_client::nyxd::{contract_traits::VestingQueryClient, Coin, CosmWasmClient}; use crate::context::QueryClient; use crate::utils::show_error; diff --git a/common/commands/src/validator/vesting/create_vesting_schedule.rs b/common/commands/src/validator/vesting/create_vesting_schedule.rs index f7397bf14c..151350bf2c 100644 --- a/common/commands/src/validator/vesting/create_vesting_schedule.rs +++ b/common/commands/src/validator/vesting/create_vesting_schedule.rs @@ -8,7 +8,7 @@ use log::info; use nym_mixnet_contract_common::Coin; use nym_network_defaults::NymNetworkDetails; -use nym_validator_client::nyxd::traits::VestingSigningClient; +use nym_validator_client::nyxd::contract_traits::VestingSigningClient; use nym_validator_client::nyxd::AccountId; use nym_validator_client::nyxd::{CosmosCoin, Denom}; use nym_vesting_contract_common::types::VestingSpecification; diff --git a/common/commands/src/validator/vesting/query_vesting_schedule.rs b/common/commands/src/validator/vesting/query_vesting_schedule.rs index 9c8facfb70..0baca858f1 100644 --- a/common/commands/src/validator/vesting/query_vesting_schedule.rs +++ b/common/commands/src/validator/vesting/query_vesting_schedule.rs @@ -6,7 +6,7 @@ use cosmrs::AccountId; use cosmwasm_std::Coin as CosmWasmCoin; use log::{error, info}; -use nym_validator_client::nyxd::{traits::VestingQueryClient, Coin}; +use nym_validator_client::nyxd::{contract_traits::VestingQueryClient, Coin, CosmWasmClient}; use crate::context::QueryClient; use crate::utils::show_error; diff --git a/common/commands/src/validator/vesting/withdraw_vested.rs b/common/commands/src/validator/vesting/withdraw_vested.rs index a85e960a1a..2c2bf254b9 100644 --- a/common/commands/src/validator/vesting/withdraw_vested.rs +++ b/common/commands/src/validator/vesting/withdraw_vested.rs @@ -5,8 +5,8 @@ use clap::Parser; use log::info; use nym_validator_client::nyxd::{ - traits::{VestingQueryClient, VestingSigningClient}, - Coin, + contract_traits::{VestingQueryClient, VestingSigningClient}, + Coin, CosmWasmClient, }; use crate::context::SigningClient; @@ -39,7 +39,7 @@ pub async fn execute(args: Args, client: SigningClient) { .await .unwrap_or_else(|_| Coin::new(0u128, denom)); let liquid_account_balance = client - .get_balance(account_id, denom.to_string()) + .get_balance(&account_id, denom.to_string()) .await .unwrap_or(None) .unwrap_or_else(|| Coin::new(0u128, denom)); @@ -97,7 +97,7 @@ pub async fn execute(args: Args, client: SigningClient) { .unwrap_or_else(|_| Coin::new(0u128, denom)); let liquid_account_balance = client - .get_balance(account_id, denom.to_string()) + .get_balance(&account_id, denom.to_string()) .await .unwrap_or(None) .unwrap_or_else(|| Coin::new(0u128, denom)); diff --git a/common/config/Cargo.toml b/common/config/Cargo.toml index ed894e808b..d7ca649e60 100644 --- a/common/config/Cargo.toml +++ b/common/config/Cargo.toml @@ -12,7 +12,7 @@ handlebars = "3.5.5" log = { workspace = true } serde = { workspace = true, features = ["derive"] } toml = "0.7.4" -url = "2.2" +url = { workspace = true } nym-network-defaults = { path = "../network-defaults" } diff --git a/common/cosmwasm-smart-contracts/coconut-bandwidth-contract/src/spend_credential.rs b/common/cosmwasm-smart-contracts/coconut-bandwidth-contract/src/spend_credential.rs index d8fc108d14..835d6175de 100644 --- a/common/cosmwasm-smart-contracts/coconut-bandwidth-contract/src/spend_credential.rs +++ b/common/cosmwasm-smart-contracts/coconut-bandwidth-contract/src/spend_credential.rs @@ -39,7 +39,9 @@ impl SpendCredentialData { #[cw_serde] #[derive(Copy)] pub enum SpendCredentialStatus { + #[serde(alias = "InProgress")] InProgress, + #[serde(alias = "Spent")] Spent, } diff --git a/common/cosmwasm-smart-contracts/coconut-dkg/src/msg.rs b/common/cosmwasm-smart-contracts/coconut-dkg/src/msg.rs index 076f84291c..b986b77f41 100644 --- a/common/cosmwasm-smart-contracts/coconut-dkg/src/msg.rs +++ b/common/cosmwasm-smart-contracts/coconut-dkg/src/msg.rs @@ -42,6 +42,7 @@ pub enum ExecuteMsg { }, VerifyVerificationKeyShare { + // TODO: this should be using a String... owner: Addr, resharing: bool, }, diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/src/interval.rs b/common/cosmwasm-smart-contracts/mixnet-contract/src/interval.rs index cee4cf02be..6352c138c6 100644 --- a/common/cosmwasm-smart-contracts/mixnet-contract/src/interval.rs +++ b/common/cosmwasm-smart-contracts/mixnet-contract/src/interval.rs @@ -159,10 +159,12 @@ impl EpochStatus { pub enum EpochState { /// Represents the state of an epoch that's in progress (well, duh.) /// All actions are allowed to be issued. + #[serde(alias = "InProgress")] InProgress, /// Represents the state of an epoch when the rewarding entity has been decided on, /// and the mixnodes are in the process of being rewarded for their work in this epoch. + #[serde(alias = "Rewarding")] Rewarding { /// The id of the last node that has already received its rewards. last_rewarded: MixId, @@ -174,10 +176,12 @@ pub enum EpochState { /// Represents the state of an epoch when all mixnodes have already been rewarded for their work in this epoch /// and all issued actions should now get resolved before being allowed to advance into the next epoch. + #[serde(alias = "ReconcilingEvents")] ReconcilingEvents, /// Represents the state of an epoch when all mixnodes have already been rewarded for their work in this epoch, /// all issued actions got resolved and the epoch should now be advanced whilst assigning new rewarded set. + #[serde(alias = "AdvancingEpoch")] AdvancingEpoch, } diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/src/mixnode.rs b/common/cosmwasm-smart-contracts/mixnet-contract/src/mixnode.rs index 676098fce6..a09d21dd2d 100644 --- a/common/cosmwasm-smart-contracts/mixnet-contract/src/mixnode.rs +++ b/common/cosmwasm-smart-contracts/mixnet-contract/src/mixnode.rs @@ -26,9 +26,11 @@ use serde_repr::{Deserialize_repr, Serialize_repr}; #[derive(Copy)] pub enum RewardedSetNodeStatus { /// Node that is currently active, i.e. is expected to be used by clients for mixing packets. + #[serde(alias = "Active")] Active, /// Node that is currently in standby, i.e. it's present in the rewarded set but is not active. + #[serde(alias = "Standby")] Standby, } diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/src/pending_events.rs b/common/cosmwasm-smart-contracts/mixnet-contract/src/pending_events.rs index 595839c99f..fd681cbed4 100644 --- a/common/cosmwasm-smart-contracts/mixnet-contract/src/pending_events.rs +++ b/common/cosmwasm-smart-contracts/mixnet-contract/src/pending_events.rs @@ -37,6 +37,7 @@ pub enum PendingEpochEventKind { // `cumulative_reward_ratio` ahead of time /// Request to create a delegation towards particular mixnode. /// Note that if such delegation already exists, it will get updated with the provided token amount. + #[serde(alias = "Delegate")] Delegate { /// The address of the owner of the delegation. owner: Addr, @@ -53,6 +54,7 @@ pub enum PendingEpochEventKind { }, /// Request to remove delegation from particular mixnode. + #[serde(alias = "Undelegate")] Undelegate { /// The address of the owner of the delegation. owner: Addr, @@ -66,6 +68,7 @@ pub enum PendingEpochEventKind { }, /// Request to pledge more tokens (by the node operator) towards its node. + #[serde(alias = "PledgeMore")] PledgeMore { /// The id of the mixnode that will have its pledge updated. mix_id: MixId, @@ -75,6 +78,7 @@ pub enum PendingEpochEventKind { }, /// Request to decrease amount of pledged tokens (by the node operator) from its node. + #[serde(alias = "DecreasePledge")] DecreasePledge { /// The id of the mixnode that will have its pledge updated. mix_id: MixId, @@ -84,12 +88,14 @@ pub enum PendingEpochEventKind { }, /// Request to unbond a mixnode and completely remove it from the network. + #[serde(alias = "UnbondMixnode")] UnbondMixnode { /// The id of the mixnode that will get unbonded. mix_id: MixId, }, /// Request to update the current size of the active set. + #[serde(alias = "UpdateActiveSetSize")] UpdateActiveSetSize { /// The new desired size of the active set. new_size: u32, @@ -138,6 +144,7 @@ pub struct PendingIntervalEventData { #[cw_serde] pub enum PendingIntervalEventKind { /// Request to update cost parameters of given mixnode. + #[serde(alias = "PendingIntervalEventKind")] ChangeMixCostParams { /// The id of the mixnode that will have its cost parameters updated. mix_id: MixId, @@ -147,12 +154,14 @@ pub enum PendingIntervalEventKind { }, /// Request to update the underlying rewarding parameters used by the system + #[serde(alias = "UpdateRewardingParams")] UpdateRewardingParams { /// The detailed specification of the update. update: IntervalRewardingParamsUpdate, }, /// Request to change the next interval configuration. + #[serde(alias = "UpdateIntervalConfig")] UpdateIntervalConfig { /// The new number of epochs in intervals. epochs_in_interval: u32, diff --git a/common/cosmwasm-smart-contracts/name-service/src/error.rs b/common/cosmwasm-smart-contracts/name-service/src/error.rs index 8c31308b66..24d62c23cf 100644 --- a/common/cosmwasm-smart-contracts/name-service/src/error.rs +++ b/common/cosmwasm-smart-contracts/name-service/src/error.rs @@ -49,13 +49,13 @@ pub enum NameServiceError { error_message: String, }, - #[error("Failed to recover ed25519 public key from its base58 representation - {0}")] + #[error("failed to recover ed25519 public key from its base58 representation: {0}")] MalformedEd25519IdentityKey(String), - #[error("Failed to recover ed25519 signature from its base58 representation - {0}")] + #[error("failed to recover ed25519 signature from its base58 representation: {0}")] MalformedEd25519Signature(String), - #[error("Provided ed25519 signature did not verify correctly")] + #[error("provided ed25519 signature did not verify correctly")] InvalidEd25519Signature, #[error("failed to verify message signature: {source}")] @@ -69,6 +69,15 @@ pub enum NameServiceError { #[error("name already registered: {name}")] NameAlreadyRegistered { name: NymName }, + + #[error("invalid nym address format: {0}")] + InvalidNymAddress(String), + + #[error("client identity in nym address does not match the provided identity key")] + IdentityKeyMismatch { + address: Address, + identity_key: String, + }, } pub type Result = std::result::Result; diff --git a/common/cosmwasm-smart-contracts/name-service/src/types.rs b/common/cosmwasm-smart-contracts/name-service/src/types.rs index c595e82452..58746576a6 100644 --- a/common/cosmwasm-smart-contracts/name-service/src/types.rs +++ b/common/cosmwasm-smart-contracts/name-service/src/types.rs @@ -4,7 +4,13 @@ use cosmwasm_schema::cw_serde; use cosmwasm_std::{Addr, Coin}; use nym_contracts_common::IdentityKey; -use std::fmt::{Display, Formatter}; +use std::{ + fmt::{Display, Formatter}, + str::FromStr, +}; +use thiserror::Error; + +use crate::error::{NameServiceError, Result}; /// The directory of names are indexed by [`NameId`]. pub type NameId = u32; @@ -51,20 +57,52 @@ pub struct NameDetails { /// NOTE: entirely unvalidated. #[cw_serde] pub enum Address { - NymAddress(String), + NymAddress(NymAddressInner), // Possible extension: //Gateway(String) } +#[cw_serde] +pub struct NymAddressInner { + client_id: String, + client_enc: String, + gateway_id: String, +} + +// ADDRESS . ENCRYPTION @ GATEWAY_ID +impl std::fmt::Display for NymAddressInner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}.{}@{}", + self.client_id, self.client_enc, self.gateway_id + ) + } +} + impl Address { /// Create a new nym address. - pub fn new(address: &str) -> Self { - Self::NymAddress(address.to_string()) + pub fn new(address: &str) -> Result { + parse_nym_address(address) + .map(Self::NymAddress) + .ok_or_else(|| NameServiceError::InvalidNymAddress(address.to_string())) } - pub fn as_str(&self) -> &str { + pub fn client_id(&self) -> &str { match self { - Address::NymAddress(address) => address, + Address::NymAddress(address) => &address.client_id, + } + } + + pub fn client_enc(&self) -> &str { + match self { + Address::NymAddress(address) => &address.client_enc, + } + } + + pub fn gateway_id(&self) -> &str { + match self { + Address::NymAddress(address) => &address.gateway_id, } } @@ -78,16 +116,47 @@ impl Address { impl Display for Address { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", self.as_str()) + match self { + Address::NymAddress(address) => write!(f, "{}", address), + } } } +// A valid nym address is of the form client_id.client_enc@gateway_id +fn parse_nym_address(address: &str) -> Option { + let parts: Vec<&str> = address.split('@').collect(); + if parts.len() != 2 { + return None; + } + + let client_part = parts[0]; + let gateway_part = parts[1]; + + // The client part consists of two parts separated by a dot + let client_parts: Vec<&str> = client_part.split('.').collect(); + if client_parts.len() != 2 { + return None; + } + + // Check that the gateway part does not contain any dots + if gateway_part.contains('.') { + return None; + } + + Some(NymAddressInner { + client_id: client_parts[0].to_string(), + client_enc: client_parts[1].to_string(), + gateway_id: gateway_part.to_string(), + }) +} + /// Name stored and pointing a to a nym-address #[cw_serde] pub struct NymName(String); -#[derive(Debug)] +#[derive(Debug, Error)] pub enum NymNameError { + #[error("invalid name")] InvalidName, } @@ -116,6 +185,14 @@ impl NymName { } } +impl FromStr for NymName { + type Err = NymNameError; + + fn from_str(s: &str) -> Result { + Self::new(s) + } +} + impl Display for NymName { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { write!(f, "{}", self.0) diff --git a/common/cosmwasm-smart-contracts/vesting-contract/src/types.rs b/common/cosmwasm-smart-contracts/vesting-contract/src/types.rs index 60fd3c0aea..e4c1644a94 100644 --- a/common/cosmwasm-smart-contracts/vesting-contract/src/types.rs +++ b/common/cosmwasm-smart-contracts/vesting-contract/src/types.rs @@ -16,12 +16,15 @@ use std::str::FromStr; /// The vesting period. pub enum Period { /// Defines a pre-vesting period. + #[serde(alias = "Before")] Before, /// Defines currently active vesting period. + #[serde(alias = "In")] In(usize), /// Defines a post-vesting period. + #[serde(alias = "After")] After, } @@ -53,9 +56,11 @@ impl PledgeData { #[cw_serde] pub enum PledgeCap { /// Specifies a percent-based pledge cap, i.e. only given % of tokens could be pledged/staked. + #[serde(alias = "Percent")] Percent(Percent), /// Specifies an absolute pledge cap, i.e. an explicit value that could be pledged/staked. + #[serde(alias = "Absolute")] Absolute(Uint128), // This has to be in unym } diff --git a/common/credentials/Cargo.toml b/common/credentials/Cargo.toml index 6bb10d5cb6..1f4c444b31 100644 --- a/common/credentials/Cargo.toml +++ b/common/credentials/Cargo.toml @@ -14,7 +14,7 @@ thiserror = "1.0" nym-coconut-interface = { path = "../coconut-interface" } nym-crypto = { path = "../crypto", features = ["rand", "asymmetric", "symmetric", "hashing"] } nym-api-requests = { path = "../../nym-api/nym-api-requests" } -nym-validator-client = { path = "../client-libs/validator-client" } +nym-validator-client = { path = "../client-libs/validator-client", default-features = false } [dev-dependencies] rand = "0.7.3" diff --git a/common/mixnode-common/Cargo.toml b/common/mixnode-common/Cargo.toml index 62fec9422a..b2fcf6e2a3 100644 --- a/common/mixnode-common/Cargo.toml +++ b/common/mixnode-common/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" [dependencies] bytes = "1.0" -futures = "0.3" +futures = { workspace = true } humantime-serde = "1.0" log = { workspace = true } rand = "0.8" @@ -21,8 +21,8 @@ tokio = { version = "1.24.1", features = [ "io-util", ] } tokio-util = { version = "0.7.4", features = ["codec"] } -url = "2.2" -thiserror = "1.0.37" +url = { workspace = true } +thiserror = { workspace = true } ## tracing tracing = { version = "0.1.37", optional = true } diff --git a/common/network-defaults/Cargo.toml b/common/network-defaults/Cargo.toml index f2878ad16a..bc5bddb497 100644 --- a/common/network-defaults/Cargo.toml +++ b/common/network-defaults/Cargo.toml @@ -12,6 +12,7 @@ cfg-if = { workspace = true } dotenvy = { workspace = true } hex-literal = "0.3.3" once_cell = { workspace = true } +schemars = { version = "0.8", features = ["preserve_order"] } serde = { workspace = true, features = ["derive"]} thiserror = { workspace = true } url = { workspace = true } diff --git a/common/network-defaults/src/lib.rs b/common/network-defaults/src/lib.rs index 019c894f96..33373dcc52 100644 --- a/common/network-defaults/src/lib.rs +++ b/common/network-defaults/src/lib.rs @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::var_names::{DEPRECATED_API_VALIDATOR, DEPRECATED_NYMD_VALIDATOR, NYM_API, NYXD}; +use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::{ env::{var, VarError}, @@ -14,14 +15,14 @@ use url::Url; pub mod mainnet; pub mod var_names; -#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] +#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize, JsonSchema)] pub struct ChainDetails { pub bech32_account_prefix: String, pub mix_denom: DenomDetailsOwned, pub stake_denom: DenomDetailsOwned, } -#[derive(Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize)] +#[derive(Clone, Debug, Default, Deserialize, Eq, Hash, PartialEq, Serialize, JsonSchema)] pub struct NymContracts { pub mixnet_contract_address: Option, pub vesting_contract_address: Option, @@ -35,8 +36,9 @@ pub struct NymContracts { // I wanted to use the simpler `NetworkDetails` name, but there's a clash // with `NetworkDetails` defined in all.rs... -#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] +#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize, JsonSchema)] pub struct NymNetworkDetails { + pub network_name: String, pub chain_details: ChainDetails, pub endpoints: Vec, pub contracts: NymContracts, @@ -52,6 +54,7 @@ impl Default for NymNetworkDetails { impl NymNetworkDetails { pub fn new_empty() -> Self { NymNetworkDetails { + network_name: Default::default(), chain_details: ChainDetails { bech32_account_prefix: Default::default(), mix_denom: DenomDetailsOwned { @@ -80,6 +83,7 @@ impl NymNetworkDetails { } NymNetworkDetails::new_empty() + .with_network_name(var(var_names::NETWORK_NAME).expect("network name not set")) .with_bech32_account_prefix( var(var_names::BECH32_PREFIX).expect("bech32 prefix not set"), ) @@ -101,7 +105,7 @@ impl NymNetworkDetails { .parse() .expect("denomination exponent is not u32"), }) - .with_validator_endpoint(ValidatorDetails::new( + .with_additional_validator_endpoint(ValidatorDetails::new( var(var_names::NYXD).expect("nyxd validator not set"), Some(var(var_names::NYM_API).expect("nym api not set")), )) @@ -137,6 +141,7 @@ impl NymNetworkDetails { // Consider caching this process (lazy static) NymNetworkDetails { + network_name: mainnet::NETWORK_NAME.into(), chain_details: ChainDetails { bech32_account_prefix: mainnet::BECH32_PREFIX.into(), mix_denom: mainnet::MIX_DENOM.into(), @@ -160,6 +165,16 @@ impl NymNetworkDetails { } } + pub fn default_gas_price_amount(&self) -> f64 { + GAS_PRICE_AMOUNT + } + + #[must_use] + pub fn with_network_name(mut self, network_name: String) -> Self { + self.network_name = network_name; + self + } + #[must_use] pub fn with_bech32_account_prefix>(mut self, prefix: S) -> Self { self.chain_details.bech32_account_prefix = prefix.into(); @@ -191,11 +206,17 @@ impl NymNetworkDetails { } #[must_use] - pub fn with_validator_endpoint(mut self, endpoint: ValidatorDetails) -> Self { + pub fn with_additional_validator_endpoint(mut self, endpoint: ValidatorDetails) -> Self { self.endpoints.push(endpoint); self } + #[must_use] + pub fn with_validator_endpoint(mut self, endpoint: ValidatorDetails) -> Self { + self.endpoints = vec![endpoint]; + self + } + #[must_use] pub fn with_mixnet_contract>(mut self, contract: Option) -> Self { self.contracts.mixnet_contract_address = contract.map(Into::into); @@ -266,7 +287,7 @@ impl DenomDetails { } } -#[derive(Debug, Serialize, Deserialize, Hash, Clone, PartialEq, Eq)] +#[derive(Debug, Serialize, Deserialize, Hash, Clone, PartialEq, Eq, JsonSchema)] pub struct DenomDetailsOwned { pub base: String, pub display: String, @@ -294,7 +315,7 @@ impl DenomDetailsOwned { } } -#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] +#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize, JsonSchema)] pub struct ValidatorDetails { // it is assumed those values are always valid since they're being provided in our defaults file pub nyxd_url: String, diff --git a/common/network-defaults/src/mainnet.rs b/common/network-defaults/src/mainnet.rs index 453f6695ec..f2ec070533 100644 --- a/common/network-defaults/src/mainnet.rs +++ b/common/network-defaults/src/mainnet.rs @@ -4,6 +4,8 @@ use crate::var_names; use crate::{DenomDetails, ValidatorDetails}; +pub(crate) const NETWORK_NAME: &str = "mainnet"; + pub(crate) const BECH32_PREFIX: &str = "n"; pub const MIX_DENOM: DenomDetails = DenomDetails::new("unym", "nym", 6); @@ -54,6 +56,7 @@ pub fn read_var_if_not_default(var: &str) -> Option { pub fn export_to_env() { set_var_to_default(var_names::CONFIGURED, "true"); + set_var_to_default(var_names::NETWORK_NAME, NETWORK_NAME); set_var_to_default(var_names::BECH32_PREFIX, BECH32_PREFIX); set_var_to_default(var_names::MIX_DENOM, MIX_DENOM.base); set_var_to_default(var_names::MIX_DENOM_DISPLAY, MIX_DENOM.display); @@ -95,6 +98,7 @@ pub fn export_to_env() { pub fn export_to_env_if_not_set() { set_var_conditionally_to_default(var_names::CONFIGURED, "true"); + set_var_conditionally_to_default(var_names::NETWORK_NAME, NETWORK_NAME); set_var_conditionally_to_default(var_names::BECH32_PREFIX, BECH32_PREFIX); set_var_conditionally_to_default(var_names::MIX_DENOM, MIX_DENOM.base); set_var_conditionally_to_default(var_names::MIX_DENOM_DISPLAY, MIX_DENOM.display); diff --git a/common/network-defaults/src/var_names.rs b/common/network-defaults/src/var_names.rs index c7ff9bb680..7639efa8e4 100644 --- a/common/network-defaults/src/var_names.rs +++ b/common/network-defaults/src/var_names.rs @@ -4,6 +4,8 @@ // Environment variable that, if set, shows the environment is currently configured pub const CONFIGURED: &str = "CONFIGURED"; +pub const NETWORK_NAME: &str = "NETWORK_NAME"; + pub const BECH32_PREFIX: &str = "BECH32_PREFIX"; pub const MIX_DENOM: &str = "MIX_DENOM"; pub const MIX_DENOM_DISPLAY: &str = "MIX_DENOM_DISPLAY"; diff --git a/common/node-tester-utils/Cargo.toml b/common/node-tester-utils/Cargo.toml index 39a93d4a9f..32ec845723 100644 --- a/common/node-tester-utils/Cargo.toml +++ b/common/node-tester-utils/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -futures = "0.3.28" +futures = { workspace = true } rand = "0.7.3" serde = { workspace = true } diff --git a/common/socks5-client-core/Cargo.toml b/common/socks5-client-core/Cargo.toml index 2e1aa52b32..6a5221bba0 100644 --- a/common/socks5-client-core/Cargo.toml +++ b/common/socks5-client-core/Cargo.toml @@ -7,17 +7,17 @@ edition = "2021" [dependencies] dirs = "4.0" -futures = "0.3" +futures = { workspace = true } log = { workspace = true } pin-project = "1.0" rand = { version = "0.7.3", features = ["wasm-bindgen"] } -reqwest = "0.11.4" +reqwest = { workspace = true } schemars = { version = "0.8", features = ["preserve_order"] } serde = { workspace = true, features = ["derive"] } # for config serialization/deserialization tap = "1.0.1" thiserror = "1.0.34" tokio = { version = "1.24.1", features = ["rt-multi-thread", "net", "signal"] } -url = "2.2" +url = { workspace = true } nym-bandwidth-controller = { path = "../../common/bandwidth-controller" } nym-client-core = { path = "../client-core", features = ["fs-surb-storage"] } diff --git a/common/socks5/proxy-helpers/Cargo.toml b/common/socks5/proxy-helpers/Cargo.toml index 88157a22c4..6ebaaa03c9 100644 --- a/common/socks5/proxy-helpers/Cargo.toml +++ b/common/socks5/proxy-helpers/Cargo.toml @@ -12,7 +12,7 @@ tokio = { version = "1.24.1", features = [ "net", "io-util", "sync", "macros", " tokio-util = { version = "0.7.4", features = [ "io" ] } # reason for getting this guy is to to able to port to tokio 1.X more quickly by being able to use # their `read_buf` [from the util crate] replacement rather than having to rethink/reimplement `AvailableReader` with the new AsyncRead trait definition. # In the long run, the dependency should probably get removed in favour of pure-tokio implementation, but for time being it's fine. -futures = "0.3" +futures = { workspace = true } log = { workspace = true } # internal diff --git a/common/statistics/Cargo.toml b/common/statistics/Cargo.toml index 29573f1e06..1e762b88f1 100644 --- a/common/statistics/Cargo.toml +++ b/common/statistics/Cargo.toml @@ -11,7 +11,7 @@ edition = "2021" [dependencies] async-trait = { workspace = true } log = { workspace = true } -reqwest = { version = "0.11", features = ["json"] } +reqwest = { workspace = true, features = ["json"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1" sqlx = { version = "0.5", features = ["runtime-tokio-rustls", "chrono"]} diff --git a/common/task/Cargo.toml b/common/task/Cargo.toml index 7e94b5442b..500cdb2a53 100644 --- a/common/task/Cargo.toml +++ b/common/task/Cargo.toml @@ -8,10 +8,10 @@ license.workspace = true repository.workspace = true [dependencies] -futures = "0.3" +futures = { workspace = true } log = { workspace = true } -thiserror = "1.0.37" -tokio = { version = "1.24.1", features = ["macros", "sync"] } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["macros", "sync"] } [target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio] version = "1.24.1" diff --git a/common/types/Cargo.toml b/common/types/Cargo.toml index cbf12b4364..5515ba5248 100644 --- a/common/types/Cargo.toml +++ b/common/types/Cargo.toml @@ -10,13 +10,13 @@ rust-version = "1.58" eyre = "0.6.5" log = { workspace = true } itertools = "0.10" -reqwest = "0.11.9" +reqwest = { workspace = true } schemars = "0.8" serde = { version = "1.0", features = ["derive"] } serde_json = { workspace = true } strum = { version = "0.23", features = ["derive"] } -thiserror = "1.0" -url = "2.2" +thiserror = { workspace = true } +url = { workspace = true } ts-rs = "6.1.2" cosmwasm-std = { workspace = true } diff --git a/common/types/src/error.rs b/common/types/src/error.rs index 15b938da9a..4546731ff4 100644 --- a/common/types/src/error.rs +++ b/common/types/src/error.rs @@ -1,3 +1,4 @@ +use nym_validator_client::error::TendermintRpcError; use nym_validator_client::nym_api::error::NymAPIError; use nym_validator_client::{nyxd::error::NyxdError, ValidatorClientError}; use serde::{Serialize, Serializer}; @@ -18,6 +19,11 @@ pub enum TypesError { source: cosmwasm_std::StdError, }, #[error("{source}")] + TendermintRpcError { + #[from] + source: TendermintRpcError, + }, + #[error("{source}")] ErrorReport { #[from] source: eyre::Report, @@ -92,6 +98,7 @@ impl From for TypesError { ValidatorClientError::MalformedUrlProvided(e) => e.into(), ValidatorClientError::NyxdError(e) => e.into(), ValidatorClientError::NoAPIUrlAvailable => TypesError::NoNymApiUrlConfigured, + ValidatorClientError::TendermintErrorRpc(err) => err.into(), } } } diff --git a/common/wasm-utils/Cargo.toml b/common/wasm-utils/Cargo.toml index 2964e32110..fb4b25c5d8 100644 --- a/common/wasm-utils/Cargo.toml +++ b/common/wasm-utils/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -futures = "0.3" +futures = { workspace = true } js-sys = "^0.3.51" wasm-bindgen = "=0.2.83" wasm-bindgen-futures = "0.4" diff --git a/contracts/CHANGELOG.md b/contracts/CHANGELOG.md index ffa2dba525..dbad30e829 100644 --- a/contracts/CHANGELOG.md +++ b/contracts/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog -## Unreleased +## [Unreleased] + +## [v1.5.0] (2023-08-16) +- Generate json schema for all used contracts #3693 ([#3693]) + +[#3233]: https://github.com/nymtech/nym/pull/3693 + ## [v1.4.0] (2023-04-25) - Allow mixnode operators to decrease their bond amount without having to rebond (will require a lot of testing EXACT reward values to make sure the "unit delegation" isn't broken afterwards) ([#3233]) diff --git a/contracts/Cargo.lock b/contracts/Cargo.lock index c87480ad1b..1895d7c925 100644 --- a/contracts/Cargo.lock +++ b/contracts/Cargo.lock @@ -92,7 +92,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -101,7 +101,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 0.14.7", ] [[package]] @@ -171,7 +171,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -296,7 +296,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", "subtle 2.4.1", "zeroize", @@ -308,7 +308,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "typenum", ] @@ -328,7 +328,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle 2.4.1", ] @@ -577,7 +577,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -664,7 +664,7 @@ dependencies = [ "der", "digest 0.10.7", "ff", - "generic-array 0.14.6", + "generic-array 0.14.7", "group", "pkcs8", "rand_core 0.6.4", @@ -860,9 +860,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1272,7 +1272,7 @@ dependencies = [ [[package]] name = "nym-mixnet-contract" -version = "1.4.0" +version = "1.5.0" dependencies = [ "bs58", "cosmwasm-derive", @@ -1343,6 +1343,7 @@ dependencies = [ "nym-contracts-common", "nym-crypto", "nym-name-service-common", + "nym-sphinx-addressing", "rand 0.8.5", "rand_chacha 0.2.2", "rstest", @@ -1410,6 +1411,16 @@ dependencies = [ "thiserror", ] +[[package]] +name = "nym-sphinx-addressing" +version = "0.1.0" +dependencies = [ + "nym-crypto", + "nym-sphinx-types", + "serde", + "thiserror", +] + [[package]] name = "nym-sphinx-types" version = "0.2.0" @@ -1420,7 +1431,7 @@ dependencies = [ [[package]] name = "nym-vesting-contract" -version = "1.4.0" +version = "1.4.1" dependencies = [ "base64 0.21.0", "cosmwasm-crypto", @@ -1815,7 +1826,7 @@ checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ "base16ct", "der", - "generic-array 0.14.6", + "generic-array 0.14.7", "pkcs8", "subtle 2.4.1", "zeroize", diff --git a/contracts/mixnet/Cargo.toml b/contracts/mixnet/Cargo.toml index 999ef93c8b..a50d9c789a 100644 --- a/contracts/mixnet/Cargo.toml +++ b/contracts/mixnet/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-mixnet-contract" -version = "1.4.0" +version = "1.5.0" description = "Nym mixnet contract" edition = { workspace = true } authors = { workspace = true } diff --git a/contracts/mixnet/schema/nym-mixnet-contract.json b/contracts/mixnet/schema/nym-mixnet-contract.json index 22cf2a118d..37cbc9ba65 100644 --- a/contracts/mixnet/schema/nym-mixnet-contract.json +++ b/contracts/mixnet/schema/nym-mixnet-contract.json @@ -1,6 +1,6 @@ { "contract_name": "nym-mixnet-contract", - "contract_version": "1.4.0", + "contract_version": "1.5.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/name-service/Cargo.toml b/contracts/name-service/Cargo.toml index 7bbacf8ba1..f680b41c35 100644 --- a/contracts/name-service/Cargo.toml +++ b/contracts/name-service/Cargo.toml @@ -31,6 +31,7 @@ vergen = { version = "=7.4.3", default-features = false, features = ["build", "g anyhow = "1.0.40" cw-multi-test = { workspace = true } nym-crypto = { path = "../../common/crypto", features = ["asymmetric", "rand"] } +nym-sphinx-addressing = { path = "../../common/nymsphinx/addressing" } rand = "0.8.5" rand_chacha = "0.2" rstest = "0.17.0" diff --git a/contracts/name-service/schema/nym-name-service.json b/contracts/name-service/schema/nym-name-service.json index f9da4f3cf8..049c130fbb 100644 --- a/contracts/name-service/schema/nym-name-service.json +++ b/contracts/name-service/schema/nym-name-service.json @@ -147,7 +147,7 @@ ], "properties": { "nym_address": { - "type": "string" + "$ref": "#/definitions/NymAddressInner" } }, "additionalProperties": false @@ -208,6 +208,26 @@ }, "additionalProperties": false }, + "NymAddressInner": { + "type": "object", + "required": [ + "client_enc", + "client_id", + "gateway_id" + ], + "properties": { + "client_enc": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + } + }, + "additionalProperties": false + }, "NymName": { "description": "Name stored and pointing a to a nym-address", "type": "string" @@ -415,13 +435,33 @@ ], "properties": { "nym_address": { - "type": "string" + "$ref": "#/definitions/NymAddressInner" } }, "additionalProperties": false } ] }, + "NymAddressInner": { + "type": "object", + "required": [ + "client_enc", + "client_id", + "gateway_id" + ], + "properties": { + "client_enc": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + } + }, + "additionalProperties": false + }, "NymName": { "description": "Name stored and pointing a to a nym-address", "type": "string" @@ -482,7 +522,7 @@ ], "properties": { "nym_address": { - "type": "string" + "$ref": "#/definitions/NymAddressInner" } }, "additionalProperties": false @@ -535,6 +575,26 @@ }, "additionalProperties": false }, + "NymAddressInner": { + "type": "object", + "required": [ + "client_enc", + "client_id", + "gateway_id" + ], + "properties": { + "client_enc": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + } + }, + "additionalProperties": false + }, "NymName": { "description": "Name stored and pointing a to a nym-address", "type": "string" @@ -625,7 +685,7 @@ ], "properties": { "nym_address": { - "type": "string" + "$ref": "#/definitions/NymAddressInner" } }, "additionalProperties": false @@ -678,6 +738,26 @@ }, "additionalProperties": false }, + "NymAddressInner": { + "type": "object", + "required": [ + "client_enc", + "client_id", + "gateway_id" + ], + "properties": { + "client_enc": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + } + }, + "additionalProperties": false + }, "NymName": { "description": "Name stored and pointing a to a nym-address", "type": "string" @@ -802,7 +882,7 @@ ], "properties": { "nym_address": { - "type": "string" + "$ref": "#/definitions/NymAddressInner" } }, "additionalProperties": false @@ -855,6 +935,26 @@ }, "additionalProperties": false }, + "NymAddressInner": { + "type": "object", + "required": [ + "client_enc", + "client_id", + "gateway_id" + ], + "properties": { + "client_enc": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + } + }, + "additionalProperties": false + }, "NymName": { "description": "Name stored and pointing a to a nym-address", "type": "string" @@ -896,7 +996,7 @@ ], "properties": { "nym_address": { - "type": "string" + "$ref": "#/definitions/NymAddressInner" } }, "additionalProperties": false @@ -949,6 +1049,26 @@ }, "additionalProperties": false }, + "NymAddressInner": { + "type": "object", + "required": [ + "client_enc", + "client_id", + "gateway_id" + ], + "properties": { + "client_enc": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + } + }, + "additionalProperties": false + }, "NymName": { "description": "Name stored and pointing a to a nym-address", "type": "string" @@ -1168,7 +1288,7 @@ ], "properties": { "nym_address": { - "type": "string" + "$ref": "#/definitions/NymAddressInner" } }, "additionalProperties": false @@ -1221,6 +1341,26 @@ }, "additionalProperties": false }, + "NymAddressInner": { + "type": "object", + "required": [ + "client_enc", + "client_id", + "gateway_id" + ], + "properties": { + "client_enc": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + } + }, + "additionalProperties": false + }, "NymName": { "description": "Name stored and pointing a to a nym-address", "type": "string" diff --git a/contracts/name-service/schema/raw/execute.json b/contracts/name-service/schema/raw/execute.json index c902157b43..22eadf827b 100644 --- a/contracts/name-service/schema/raw/execute.json +++ b/contracts/name-service/schema/raw/execute.json @@ -108,7 +108,7 @@ ], "properties": { "nym_address": { - "type": "string" + "$ref": "#/definitions/NymAddressInner" } }, "additionalProperties": false @@ -169,6 +169,26 @@ }, "additionalProperties": false }, + "NymAddressInner": { + "type": "object", + "required": [ + "client_enc", + "client_id", + "gateway_id" + ], + "properties": { + "client_enc": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + } + }, + "additionalProperties": false + }, "NymName": { "description": "Name stored and pointing a to a nym-address", "type": "string" diff --git a/contracts/name-service/schema/raw/query.json b/contracts/name-service/schema/raw/query.json index 1c4efca8df..38f26f8914 100644 --- a/contracts/name-service/schema/raw/query.json +++ b/contracts/name-service/schema/raw/query.json @@ -195,13 +195,33 @@ ], "properties": { "nym_address": { - "type": "string" + "$ref": "#/definitions/NymAddressInner" } }, "additionalProperties": false } ] }, + "NymAddressInner": { + "type": "object", + "required": [ + "client_enc", + "client_id", + "gateway_id" + ], + "properties": { + "client_enc": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + } + }, + "additionalProperties": false + }, "NymName": { "description": "Name stored and pointing a to a nym-address", "type": "string" diff --git a/contracts/name-service/schema/raw/response_to_all.json b/contracts/name-service/schema/raw/response_to_all.json index 5d4ab85d35..24cd05dc11 100644 --- a/contracts/name-service/schema/raw/response_to_all.json +++ b/contracts/name-service/schema/raw/response_to_all.json @@ -44,7 +44,7 @@ ], "properties": { "nym_address": { - "type": "string" + "$ref": "#/definitions/NymAddressInner" } }, "additionalProperties": false @@ -97,6 +97,26 @@ }, "additionalProperties": false }, + "NymAddressInner": { + "type": "object", + "required": [ + "client_enc", + "client_id", + "gateway_id" + ], + "properties": { + "client_enc": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + } + }, + "additionalProperties": false + }, "NymName": { "description": "Name stored and pointing a to a nym-address", "type": "string" diff --git a/contracts/name-service/schema/raw/response_to_by_address.json b/contracts/name-service/schema/raw/response_to_by_address.json index 0e44754b87..ad54c03055 100644 --- a/contracts/name-service/schema/raw/response_to_by_address.json +++ b/contracts/name-service/schema/raw/response_to_by_address.json @@ -29,7 +29,7 @@ ], "properties": { "nym_address": { - "type": "string" + "$ref": "#/definitions/NymAddressInner" } }, "additionalProperties": false @@ -82,6 +82,26 @@ }, "additionalProperties": false }, + "NymAddressInner": { + "type": "object", + "required": [ + "client_enc", + "client_id", + "gateway_id" + ], + "properties": { + "client_enc": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + } + }, + "additionalProperties": false + }, "NymName": { "description": "Name stored and pointing a to a nym-address", "type": "string" diff --git a/contracts/name-service/schema/raw/response_to_by_name.json b/contracts/name-service/schema/raw/response_to_by_name.json index 4dfc8752ee..fb7d77259e 100644 --- a/contracts/name-service/schema/raw/response_to_by_name.json +++ b/contracts/name-service/schema/raw/response_to_by_name.json @@ -63,7 +63,7 @@ ], "properties": { "nym_address": { - "type": "string" + "$ref": "#/definitions/NymAddressInner" } }, "additionalProperties": false @@ -116,6 +116,26 @@ }, "additionalProperties": false }, + "NymAddressInner": { + "type": "object", + "required": [ + "client_enc", + "client_id", + "gateway_id" + ], + "properties": { + "client_enc": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + } + }, + "additionalProperties": false + }, "NymName": { "description": "Name stored and pointing a to a nym-address", "type": "string" diff --git a/contracts/name-service/schema/raw/response_to_by_owner.json b/contracts/name-service/schema/raw/response_to_by_owner.json index 0e44754b87..ad54c03055 100644 --- a/contracts/name-service/schema/raw/response_to_by_owner.json +++ b/contracts/name-service/schema/raw/response_to_by_owner.json @@ -29,7 +29,7 @@ ], "properties": { "nym_address": { - "type": "string" + "$ref": "#/definitions/NymAddressInner" } }, "additionalProperties": false @@ -82,6 +82,26 @@ }, "additionalProperties": false }, + "NymAddressInner": { + "type": "object", + "required": [ + "client_enc", + "client_id", + "gateway_id" + ], + "properties": { + "client_enc": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + } + }, + "additionalProperties": false + }, "NymName": { "description": "Name stored and pointing a to a nym-address", "type": "string" diff --git a/contracts/name-service/schema/raw/response_to_name_id.json b/contracts/name-service/schema/raw/response_to_name_id.json index 4dfc8752ee..fb7d77259e 100644 --- a/contracts/name-service/schema/raw/response_to_name_id.json +++ b/contracts/name-service/schema/raw/response_to_name_id.json @@ -63,7 +63,7 @@ ], "properties": { "nym_address": { - "type": "string" + "$ref": "#/definitions/NymAddressInner" } }, "additionalProperties": false @@ -116,6 +116,26 @@ }, "additionalProperties": false }, + "NymAddressInner": { + "type": "object", + "required": [ + "client_enc", + "client_id", + "gateway_id" + ], + "properties": { + "client_enc": { + "type": "string" + }, + "client_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + } + }, + "additionalProperties": false + }, "NymName": { "description": "Name stored and pointing a to a nym-address", "type": "string" diff --git a/contracts/name-service/src/contract.rs b/contracts/name-service/src/contract.rs index f3347c4d6a..2001341212 100644 --- a/contracts/name-service/src/contract.rs +++ b/contracts/name-service/src/contract.rs @@ -155,7 +155,7 @@ mod tests { let deposit = nyms(99); let owner = "steve"; let (name, owner_signature) = - new_name_details_with_sign(deps.as_mut(), &mut rng, "foo", "address", owner, deposit); + new_name_details_with_sign(deps.as_mut(), &mut rng, "foo", owner, deposit); let msg = ExecuteMsg::Register { name, owner_signature, @@ -200,7 +200,7 @@ mod tests { let deposit = nyms(101); let owner = "steve"; let (name, owner_signature) = - new_name_details_with_sign(deps.as_mut(), &mut rng, "foo", "address", owner, deposit); + new_name_details_with_sign(deps.as_mut(), &mut rng, "foo", owner, deposit); let msg = ExecuteMsg::Register { name, owner_signature, @@ -245,14 +245,8 @@ mod tests { // Setup let deposit = nyms(100); let owner = "steve"; - let (name, owner_signature) = new_name_details_with_sign( - deps.as_mut(), - &mut rng, - "my-name", - "my-address", - owner, - deposit, - ); + let (name, owner_signature) = + new_name_details_with_sign(deps.as_mut(), &mut rng, "my-name", owner, deposit); // Register let msg = ExecuteMsg::Register { @@ -290,14 +284,9 @@ mod tests { // Setup let deposit = nyms(100); let owner = "steve"; - let (name, owner_signature) = new_name_details_with_sign( - deps.as_mut(), - &mut rng, - "my-name", - "my-address", - owner, - deposit.clone(), - ); + let (name, owner_signature) = + new_name_details_with_sign(deps.as_mut(), &mut rng, "my-name", owner, deposit.clone()); + dbg!(&name); // Register let msg = ExecuteMsg::Register { @@ -315,10 +304,6 @@ mod tests { get_attribute(&res, "register", "name"), "my-name".to_string() ); - assert_eq!( - get_attribute(&res, "register", "nym_address"), - "my-address".to_string() - ); // Check that the nonce has been incremented, but only for the owner assert_current_nonce(deps.as_ref(), &Addr::unchecked("steve"), 1); @@ -348,14 +333,8 @@ mod tests { // Register let deposit = nyms(100); let steve = "steve"; - let (name, owner_signature) = new_name_details_with_sign( - deps.as_mut(), - &mut rng, - "my-name", - "my-address", - steve, - deposit.clone(), - ); + let (name, owner_signature) = + new_name_details_with_sign(deps.as_mut(), &mut rng, "my-name", steve, deposit.clone()); let msg = ExecuteMsg::Register { name: name.clone(), owner_signature, diff --git a/contracts/name-service/src/contract/execute.rs b/contracts/name-service/src/contract/execute.rs index e41e57d7f4..38084e0f57 100644 --- a/contracts/name-service/src/contract/execute.rs +++ b/contracts/name-service/src/contract/execute.rs @@ -66,13 +66,23 @@ fn ensure_name_exists(deps: Deps, name_id: NameId) -> Result<()> { fn ensure_name_not_exists(deps: Deps, name: &NymName) -> Result<()> { if state::names::has_name(deps.storage, name) { - println!("name already exists"); Err(NameServiceError::NameAlreadyRegistered { name: name.clone() }) } else { Ok(()) } } +fn ensure_identity_key_is_part_of_nym_address(address: &Address, identity_key: &str) -> Result<()> { + if address.client_id() == identity_key { + Ok(()) + } else { + Err(NameServiceError::IdentityKeyMismatch { + address: address.clone(), + identity_key: identity_key.to_string(), + }) + } +} + fn ensure_sender_authorized(info: MessageInfo, names: &RegisteredName) -> Result<()> { if info.sender == names.owner { Ok(()) @@ -135,6 +145,7 @@ pub fn register( name: NameDetails, owner_signature: MessageSignature, ) -> Result { + ensure_identity_key_is_part_of_nym_address(&name.address, &name.identity_key)?; ensure_name_not_exists(deps.as_ref(), &name.name)?; ensure_max_names_per_owner(deps.as_ref(), info.sender.clone())?; ensure_max_names_per_address(deps.as_ref(), name.address.clone())?; diff --git a/contracts/name-service/src/integration_tests/delete.rs b/contracts/name-service/src/integration_tests/delete.rs index feede51739..b26b444ceb 100644 --- a/contracts/name-service/src/integration_tests/delete.rs +++ b/contracts/name-service/src/integration_tests/delete.rs @@ -1,5 +1,5 @@ use cosmwasm_std::Addr; -use nym_name_service_common::{response::PagedNamesListResponse, Address, NymName}; +use nym_name_service_common::{response::PagedNamesListResponse, NymName}; use rstest::rstest; use crate::{ @@ -19,7 +19,6 @@ fn setup() -> TestSetup { fn delete_name(mut setup: TestSetup) { setup.sign_and_register( &NymName::new("my_name").unwrap(), - &Address::new("address"), &Addr::unchecked("owner"), &nyms(100), ); @@ -39,7 +38,6 @@ fn only_owner_can_delete_name(mut setup: TestSetup) { assert_eq!(setup.contract_balance(), nyms(0)); setup.sign_and_register( &NymName::new("name").unwrap(), - &Address::new("nymAddress"), &Addr::unchecked("owner"), &nyms(100), ); @@ -63,7 +61,6 @@ fn only_owner_can_delete_name(mut setup: TestSetup) { fn cant_delete_name_that_does_not_exist(mut setup: TestSetup) { setup.sign_and_register( &NymName::new("foo").unwrap(), - &Address::new("nymAddress"), &Addr::unchecked("owner"), &nyms(100), ); @@ -94,8 +91,6 @@ fn cant_delete_name_that_does_not_exist(mut setup: TestSetup) { fn register_multiple_names_and_deleting_by_name(mut setup: TestSetup) { let owner1 = Addr::unchecked("wealthy_owner_1"); let owner2 = Addr::unchecked("wealthy_owner_2"); - let address1 = Address::new("address1"); - let address2 = Address::new("address2"); let name1 = NymName::new("name1").unwrap(); let name2 = NymName::new("name2").unwrap(); let name3 = NymName::new("name3").unwrap(); @@ -105,11 +100,11 @@ fn register_multiple_names_and_deleting_by_name(mut setup: TestSetup) { // We register the same address three times, but with different owners assert_eq!(setup.contract_balance(), nyms(0)); assert_eq!(setup.balance(&owner1), nyms(1000)); - let s1 = setup.sign_and_register(&name1, &address1, &owner1, &nyms(100)); - let s2 = setup.sign_and_register(&name2, &address1, &owner1, &nyms(100)); - let s3 = setup.sign_and_register(&name3, &address2, &owner1, &nyms(100)); - let s4 = setup.sign_and_register(&name4, &address1, &owner2, &nyms(100)); - let s5 = setup.sign_and_register(&name5, &address2, &owner2, &nyms(100)); + let s1 = setup.sign_and_register(&name1, &owner1, &nyms(100)); + let s2 = setup.sign_and_register(&name2, &owner1, &nyms(100)); + let s3 = setup.sign_and_register(&name3, &owner1, &nyms(100)); + let s4 = setup.sign_and_register(&name4, &owner2, &nyms(100)); + let s5 = setup.sign_and_register(&name5, &owner2, &nyms(100)); assert_eq!(setup.contract_balance(), nyms(500)); assert_eq!(setup.balance(&owner1), nyms(700)); @@ -117,11 +112,11 @@ fn register_multiple_names_and_deleting_by_name(mut setup: TestSetup) { setup.query_all(), PagedNamesListResponse { names: vec![ - new_name(1, &name1, &address1, &owner1, s1.identity_key()), - new_name(2, &name2, &address1, &owner1, s2.identity_key()), - new_name(3, &name3, &address2, &owner1, s3.identity_key()), - new_name(4, &name4, &address1, &owner2, s4.identity_key()), - new_name(5, &name5, &address2, &owner2, s5.identity_key()), + new_name(1, &name1, s1.address(), &owner1, s1.identity_key()), + new_name(2, &name2, s2.address(), &owner1, s2.identity_key()), + new_name(3, &name3, s3.address(), &owner1, s3.identity_key()), + new_name(4, &name4, s4.address(), &owner2, s4.identity_key()), + new_name(5, &name5, s5.address(), &owner2, s5.identity_key()), ], per_page: NAME_DEFAULT_RETRIEVAL_LIMIT as usize, start_next_after: Some(5), @@ -136,10 +131,10 @@ fn register_multiple_names_and_deleting_by_name(mut setup: TestSetup) { setup.query_all(), PagedNamesListResponse { names: vec![ - new_name(2, &name2, &address1, &owner1, s2.identity_key()), - new_name(3, &name3, &address2, &owner1, s3.identity_key()), - new_name(4, &name4, &address1, &owner2, s4.identity_key()), - new_name(5, &name5, &address2, &owner2, s5.identity_key()), + new_name(2, &name2, s2.address(), &owner1, s2.identity_key()), + new_name(3, &name3, s3.address(), &owner1, s3.identity_key()), + new_name(4, &name4, s4.address(), &owner2, s4.identity_key()), + new_name(5, &name5, s5.address(), &owner2, s5.identity_key()), ], per_page: NAME_DEFAULT_RETRIEVAL_LIMIT as usize, start_next_after: Some(5), diff --git a/contracts/name-service/src/integration_tests/name_id.rs b/contracts/name-service/src/integration_tests/name_id.rs index 39f5a993cf..9751a4c248 100644 --- a/contracts/name-service/src/integration_tests/name_id.rs +++ b/contracts/name-service/src/integration_tests/name_id.rs @@ -1,5 +1,5 @@ use cosmwasm_std::Addr; -use nym_name_service_common::{Address, NymName}; +use nym_name_service_common::NymName; use crate::test_helpers::{fixture::new_name, helpers::nyms}; @@ -10,19 +10,16 @@ fn name_id_is_not_resused_when_deleting_and_then_adding_a_new_names() { let mut setup = TestSetup::new(); setup.sign_and_register( &NymName::new("myname1").unwrap(), - &Address::new("nymAddress1"), &Addr::unchecked("owner1"), &nyms(100), ); let s2 = setup.sign_and_register( &NymName::new("myname2").unwrap(), - &Address::new("nymAddress2"), &Addr::unchecked("owner2"), &nyms(100), ); setup.sign_and_register( &NymName::new("myname3").unwrap(), - &Address::new("nymAddress3"), &Addr::unchecked("owner3"), &nyms(100), ); @@ -35,7 +32,7 @@ fn name_id_is_not_resused_when_deleting_and_then_adding_a_new_names() { vec![new_name( 2, &NymName::new("myname2").unwrap(), - &Address::new("nymAddress2"), + s2.address(), &Addr::unchecked("owner2"), s2.identity_key(), )] @@ -43,7 +40,6 @@ fn name_id_is_not_resused_when_deleting_and_then_adding_a_new_names() { let s4 = setup.sign_and_register( &NymName::new("myname4").unwrap(), - &Address::new("nymAddress4"), &Addr::unchecked("owner4"), &nyms(100), ); @@ -54,14 +50,14 @@ fn name_id_is_not_resused_when_deleting_and_then_adding_a_new_names() { new_name( 2, &NymName::new("myname2").unwrap(), - &Address::new("nymAddress2"), + s2.address(), &Addr::unchecked("owner2"), s2.identity_key(), ), new_name( 4, &NymName::new("myname4").unwrap(), - &Address::new("nymAddress4"), + s4.address(), &Addr::unchecked("owner4"), s4.identity_key(), ) diff --git a/contracts/name-service/src/integration_tests/query.rs b/contracts/name-service/src/integration_tests/query.rs index 67069a0a1d..2dc47b98ae 100644 --- a/contracts/name-service/src/integration_tests/query.rs +++ b/contracts/name-service/src/integration_tests/query.rs @@ -1,7 +1,7 @@ use cosmwasm_std::Addr; use nym_name_service_common::{ response::{ConfigResponse, PagedNamesListResponse}, - Address, NymName, + NymName, }; use crate::{ @@ -26,8 +26,6 @@ fn check_paging() { let mut setup = TestSetup::new(); let owner1 = Addr::unchecked("wealthy_owner_1"); let owner2 = Addr::unchecked("wealthy_owner_2"); - let address1 = Address::new("nymAddress1"); - let address2 = Address::new("nymAddress2"); let name1 = NymName::new("name1").unwrap(); let name2 = NymName::new("name2").unwrap(); let name3 = NymName::new("name3").unwrap(); @@ -37,23 +35,22 @@ fn check_paging() { // We register the same address three times, but with different owners assert_eq!(setup.contract_balance(), nyms(0)); assert_eq!(setup.balance(&owner1), nyms(1000)); - let s1 = setup.sign_and_register(&name1, &address1, &owner1, &nyms(100)); - let s2 = setup.sign_and_register(&name2, &address1, &owner1, &nyms(100)); - let s3 = setup.sign_and_register(&name3, &address2, &owner1, &nyms(100)); - let s4 = setup.sign_and_register(&name4, &address1, &owner2, &nyms(100)); - let s5 = setup.sign_and_register(&name5, &address2, &owner2, &nyms(100)); - + let s1 = setup.sign_and_register(&name1, &owner1, &nyms(100)); + let s2 = setup.sign_and_register(&name2, &owner1, &nyms(100)); + let s3 = setup.sign_and_register(&name3, &owner1, &nyms(100)); + let s4 = setup.sign_and_register(&name4, &owner2, &nyms(100)); + let s5 = setup.sign_and_register(&name5, &owner2, &nyms(100)); assert_eq!(setup.contract_balance(), nyms(500)); assert_eq!(setup.balance(&owner1), nyms(700)); assert_eq!( setup.query_all(), PagedNamesListResponse { names: vec![ - new_name(1, &name1, &address1, &owner1, s1.identity_key()), - new_name(2, &name2, &address1, &owner1, s2.identity_key()), - new_name(3, &name3, &address2, &owner1, s3.identity_key()), - new_name(4, &name4, &address1, &owner2, s4.identity_key()), - new_name(5, &name5, &address2, &owner2, s5.identity_key()), + new_name(1, &name1, s1.address(), &owner1, s1.identity_key()), + new_name(2, &name2, s2.address(), &owner1, s2.identity_key()), + new_name(3, &name3, s3.address(), &owner1, s3.identity_key()), + new_name(4, &name4, s4.address(), &owner2, s4.identity_key()), + new_name(5, &name5, s5.address(), &owner2, s5.identity_key()), ], per_page: NAME_DEFAULT_RETRIEVAL_LIMIT as usize, start_next_after: Some(5), @@ -66,8 +63,8 @@ fn check_paging() { setup.query_all_with_limit(Some(2), None), PagedNamesListResponse { names: vec![ - new_name(2, &name2, &address1, &owner1, s2.identity_key()), - new_name(3, &name3, &address2, &owner1, s3.identity_key()), + new_name(2, &name2, s2.address(), &owner1, s2.identity_key()), + new_name(3, &name3, s3.address(), &owner1, s3.identity_key()), ], per_page: 2, start_next_after: Some(3), @@ -78,8 +75,8 @@ fn check_paging() { setup.query_all_with_limit(Some(2), Some(2)), PagedNamesListResponse { names: vec![ - new_name(3, &name3, &address2, &owner1, s3.identity_key()), - new_name(4, &name4, &address1, &owner2, s4.identity_key()), + new_name(3, &name3, s3.address(), &owner1, s3.identity_key()), + new_name(4, &name4, s4.address(), &owner2, s4.identity_key()), ], per_page: 2, start_next_after: Some(4), diff --git a/contracts/name-service/src/integration_tests/register.rs b/contracts/name-service/src/integration_tests/register.rs index 9d6d339dbc..aeed4add3d 100644 --- a/contracts/name-service/src/integration_tests/register.rs +++ b/contracts/name-service/src/integration_tests/register.rs @@ -1,7 +1,7 @@ use cosmwasm_std::Addr; +use nym_crypto::asymmetric::identity; use nym_name_service_common::{ - error::NameServiceError, response::PagedNamesListResponse, Address, NameDetails, NymName, - RegisteredName, + error::NameServiceError, response::PagedNamesListResponse, NameDetails, NymName, RegisteredName, }; use rstest::rstest; @@ -31,16 +31,21 @@ fn basic_register(mut setup: TestSetup) { // Register a first name let owner = Addr::unchecked("owner"); let name = NymName::new("steves-server").unwrap(); - let nym_address = Address::new("nym-address"); + let (nym_address, id_keypair) = setup.new_nym_address(); assert_eq!(setup.contract_balance(), nyms(0)); assert_eq!(setup.balance(&owner), nyms(250)); assert_eq!(setup.query_signing_nonce(owner.to_string()), 0); - let reg_name = setup.new_name(&name, &nym_address); + let reg_name = setup.new_name_from_address(&name, &nym_address, id_keypair); let payload = setup.payload_to_sign(&owner, &nyms(100), ®_name.name); let reg_name = reg_name.sign(payload); setup.register(®_name, &owner); + // Confirm that the client id in the name matches the identity key. + let address_client_id = reg_name.name.address.client_id(); + let identity_key = reg_name.keys.public_key().to_base58_string(); + assert_eq!(address_client_id, &identity_key); + // Deposit is deposited to contract and deducted from owners's balance assert_eq!(setup.contract_balance(), nyms(100)); assert_eq!(setup.balance(&owner), nyms(150)); @@ -83,8 +88,8 @@ fn basic_register(mut setup: TestSetup) { // Register a second name let owner2 = Addr::unchecked("owner2"); let name2 = NymName::new("another_server").unwrap(); - let nym_address2 = Address::new("nymAddress2"); - let reg_name2 = setup.new_signed_name(&name2, &nym_address2, &owner2, &nyms(100)); + let reg_name2 = setup.new_signed_name(&name2, &owner2, &nyms(100)); + let nym_address2 = reg_name2.address().clone(); setup.register(®_name2, &owner2); assert_eq!(setup.contract_balance(), nyms(200)); @@ -105,8 +110,7 @@ fn basic_register(mut setup: TestSetup) { fn register_fails_when_owner_mismatch(mut setup: TestSetup) { let owner = Addr::unchecked("owner"); let name = NymName::new("steves-server").unwrap(); - let nym_address = Address::new("nym-address"); - let reg_name = setup.new_signed_name(&name, &nym_address, &owner, &nyms(100)); + let reg_name = setup.new_signed_name(&name, &owner, &nyms(100)); let res = setup .try_register(®_name, &Addr::unchecked("owner2")) .unwrap_err(); @@ -124,32 +128,17 @@ fn signing_nonce_is_increased_when_registering(mut setup: TestSetup) { assert_eq!(setup.query_signing_nonce(owner1.to_string()), 0); assert_eq!(setup.query_signing_nonce(owner2.to_string()), 0); - setup.sign_and_register( - &NymName::new("myname1").unwrap(), - &Address::new("address1"), - &owner1, - &nyms(100), - ); + setup.sign_and_register(&NymName::new("myname1").unwrap(), &owner1, &nyms(100)); assert_eq!(setup.query_signing_nonce(owner1.to_string()), 1); assert_eq!(setup.query_signing_nonce(owner2.to_string()), 0); - setup.sign_and_register( - &NymName::new("myname2").unwrap(), - &Address::new("address2"), - &owner2, - &nyms(100), - ); + setup.sign_and_register(&NymName::new("myname2").unwrap(), &owner2, &nyms(100)); assert_eq!(setup.query_signing_nonce(owner1.to_string()), 1); assert_eq!(setup.query_signing_nonce(owner2.to_string()), 1); - setup.sign_and_register( - &NymName::new("myname3").unwrap(), - &Address::new("address3"), - &owner2, - &nyms(100), - ); + setup.sign_and_register(&NymName::new("myname3").unwrap(), &owner2, &nyms(100)); assert_eq!(setup.query_signing_nonce(owner1.to_string()), 1); assert_eq!(setup.query_signing_nonce(owner2.to_string()), 2); @@ -160,14 +149,12 @@ fn creating_two_names_in_a_row_without_announcing_fails(mut setup: TestSetup) { let owner = Addr::unchecked("wealthy_owner_1"); let name1 = NymName::new("steves-server1").unwrap(); let name2 = NymName::new("steves-server2").unwrap(); - let address1 = Address::new("nymAddress1"); - let address2 = Address::new("nymAddress2"); let deposit = nyms(100); - let s1 = setup.new_signed_name(&name1, &address1, &owner, &deposit); + let s1 = setup.new_signed_name(&name1, &owner, &deposit); // This second name will be signed with the same nonce - let s2 = setup.new_signed_name(&name2, &address2, &owner, &deposit); + let s2 = setup.new_signed_name(&name2, &owner, &deposit); // Announce the first service works, and this increments the nonce setup.register(&s1, &owner); @@ -187,7 +174,6 @@ fn cant_register_a_name_without_funds(mut setup: TestSetup) { assert_eq!(setup.balance("owner"), nyms(250)); let name1 = setup.new_signed_name( &NymName::new("my_name").unwrap(), - &Address::new("nymAddress"), &Addr::unchecked("owner"), &nyms(100), ); @@ -197,7 +183,6 @@ fn cant_register_a_name_without_funds(mut setup: TestSetup) { let name2 = setup.new_signed_name( &NymName::new("my_name2").unwrap(), - &Address::new("nymAddress"), &Addr::unchecked("owner"), &nyms(100), ); @@ -206,7 +191,6 @@ fn cant_register_a_name_without_funds(mut setup: TestSetup) { assert_eq!(setup.balance("owner"), nyms(50)); let name3 = setup.new_signed_name( &NymName::new("my_name3").unwrap(), - &Address::new("nymAddress"), &Addr::unchecked("owner"), &nyms(100), ); @@ -229,7 +213,6 @@ fn cant_register_a_name_without_funds(mut setup: TestSetup) { fn cant_register_the_same_name_multiple_times(mut setup: TestSetup) { let name1 = setup.new_signed_name( &NymName::new("name").unwrap(), - &Address::new("nymAddress"), &Addr::unchecked("owner"), &nyms(100), ); @@ -246,18 +229,43 @@ fn cant_register_the_same_name_multiple_times(mut setup: TestSetup) { ); } +fn clone_keys(keys: &identity::KeyPair) -> identity::KeyPair { + let priv_bytes = keys.private_key().to_bytes(); + let pub_bytes = keys.public_key().to_bytes(); + identity::KeyPair::from_bytes(&priv_bytes, &pub_bytes).unwrap() +} + #[rstest] fn can_register_multiple_names_for_the_same_nym_address(mut setup: TestSetup) { let name1 = NymName::new("name1").unwrap(); let name2 = NymName::new("name2").unwrap(); - let address = Address::new("nymaddress"); + // let address = Address::new("nym.add@ress").unwrap(); + let (address, id_keys) = setup.new_nym_address(); let owner = Addr::unchecked("owner"); - let reg_name1 = setup.new_signed_name(&name1, &address, &owner, &nyms(100)); + // We duplicate the keypair here to ensure that the same keypair is used for both names. + // The private key lacks a clone method, for good reason, so we have to serialize and + // deserialize it. + let id_keys2 = clone_keys(&id_keys); + assert_eq!(id_keys.public_key(), id_keys2.public_key()); + assert_eq!( + id_keys.private_key().to_base58_string(), + id_keys2.private_key().to_base58_string() + ); + + // let reg_name1 = setup.new_signed_name(&name1, &owner, &nyms(100)); + let reg_name1 = setup.new_name_from_address(&name1, &address, id_keys); + let payload = setup.payload_to_sign(&owner, &nyms(100), ®_name1.name); + let reg_name1 = reg_name1.sign(payload); setup.register(®_name1, &owner); - let reg_name2 = setup.new_signed_name(&name2, &address, &owner, &nyms(100)); + + // let reg_name2 = setup.new_signed_name(&name2, &owner, &nyms(100)); + let reg_name2 = setup.new_name_from_address(&name2, &address, id_keys2); + let payload = setup.payload_to_sign(&owner, &nyms(100), ®_name2.name); + let reg_name2 = reg_name2.sign(payload); setup.register(®_name2, &owner); + dbg!(&setup.query_all().names); assert_eq!( setup.query_all().names, vec![ @@ -266,4 +274,3 @@ fn can_register_multiple_names_for_the_same_nym_address(mut setup: TestSetup) { ], ); } -// diff --git a/contracts/name-service/src/integration_tests/test_name.rs b/contracts/name-service/src/integration_tests/test_name.rs index f33233a0a0..5057bc8075 100644 --- a/contracts/name-service/src/integration_tests/test_name.rs +++ b/contracts/name-service/src/integration_tests/test_name.rs @@ -3,29 +3,28 @@ use nym_crypto::asymmetric::identity; use nym_name_service_common::{ signing_types::SignableNameRegisterMsg, Address, NameDetails, NymName, }; -use rand_chacha::ChaCha20Rng; use crate::test_helpers::signing::ed25519_sign_message; pub struct TestName { pub name: NameDetails, - pub keys: identity::KeyPair, - pub rng: ChaCha20Rng, + pub id_keys: identity::KeyPair, } impl TestName { - pub fn new(rng: &mut ChaCha20Rng, name: NymName, address: Address) -> Self { - let keys = identity::KeyPair::new(rng); + pub fn new(name: NymName, address: Address, id_keys: identity::KeyPair) -> Self { + let identity_key = id_keys.public_key().to_base58_string(); + assert_eq!( + identity_key, + address.client_id().to_string(), + "address and identity key must match" + ); let name = NameDetails { name, address, - identity_key: keys.public_key().to_base58_string(), + identity_key, }; - Self { - name, - keys, - rng: rng.clone(), - } + Self { name, id_keys } } pub fn identity_key(&self) -> &IdentityKey { @@ -37,10 +36,10 @@ impl TestName { } pub fn sign(self, payload: SignableNameRegisterMsg) -> SignedTestName { - let owner_signature = ed25519_sign_message(payload, self.keys.private_key()); + let owner_signature = ed25519_sign_message(payload, self.id_keys.private_key()); SignedTestName { name: self.name, - keys: self.keys, + keys: self.id_keys, owner_signature, } } @@ -66,6 +65,10 @@ impl SignedTestName { pub fn details(&self) -> &NameDetails { &self.name } + + pub fn address(&self) -> &Address { + &self.name.address + } } impl From for NameDetails { diff --git a/contracts/name-service/src/integration_tests/test_setup.rs b/contracts/name-service/src/integration_tests/test_setup.rs index 264d2d236b..fd396aec46 100644 --- a/contracts/name-service/src/integration_tests/test_setup.rs +++ b/contracts/name-service/src/integration_tests/test_setup.rs @@ -1,6 +1,7 @@ use cosmwasm_std::{coins, Addr, Coin, Uint128}; use cw_multi_test::{App, AppBuilder, AppResponse, ContractWrapper, Executor}; use nym_contracts_common::signing::Nonce; +use nym_crypto::asymmetric::identity; use nym_name_service_common::{ msg::{ExecuteMsg, InstantiateMsg, QueryMsg}, response::{ConfigResponse, PagedNamesListResponse}, @@ -103,8 +104,26 @@ impl TestSetup { self.query(&QueryMsg::SigningNonce { address }) } - pub fn new_name(&mut self, name: &NymName, address: &Address) -> TestName { - TestName::new(&mut self.rng, name.clone(), address.clone()) + // Create a new random address and a corresponding keypair. + pub fn new_nym_address(&mut self) -> (Address, identity::KeyPair) { + crate::test_helpers::fixture::new_address(&mut self.rng) + } + + // Create a new name with a given address. It's up to the caller to make sure that the keys + // match. + pub fn new_name_from_address( + &mut self, + name: &NymName, + address: &Address, + id_keys: identity::KeyPair, + ) -> TestName { + TestName::new(name.clone(), address.clone(), id_keys) + } + + // Create a new name with a random address + pub fn new_name(&mut self, name: &NymName) -> TestName { + let (address, id_keys) = self.new_nym_address(); + self.new_name_from_address(name, &address, id_keys) } pub fn payload_to_sign( @@ -120,11 +139,10 @@ impl TestSetup { pub fn new_signed_name( &mut self, name: &NymName, - address: &Address, owner: &Addr, deposit: &Coin, ) -> SignedTestName { - let name = self.new_name(name, address); + let name = self.new_name(name); let payload = self.payload_to_sign(owner, deposit, name.details()); name.sign(payload) } @@ -161,11 +179,10 @@ impl TestSetup { pub fn sign_and_register( &mut self, name: &NymName, - address: &Address, owner: &Addr, deposit: &Coin, ) -> SignedTestName { - let signed_name = self.new_signed_name(name, address, owner, deposit); + let signed_name = self.new_signed_name(name, owner, deposit); self.register(&signed_name, owner); signed_name } diff --git a/contracts/name-service/src/state/name_id_counter.rs b/contracts/name-service/src/state/name_id_counter.rs index c45e5169e6..3c5e2a56f9 100644 --- a/contracts/name-service/src/state/name_id_counter.rs +++ b/contracts/name-service/src/state/name_id_counter.rs @@ -30,18 +30,15 @@ mod tests { let mut deps = instantiate_test_contract(); let mut rng = test_rng(); - let (id1, name1) = register_name(deps.as_mut(), &mut rng, "foo", "addr1", "steve"); - let (id2, name2) = register_name(deps.as_mut(), &mut rng, "bar", "addr2", "steve"); - let (id3, name3) = register_name(deps.as_mut(), &mut rng, "baz", "addr3", "steve"); + let (id1, name1) = register_name(deps.as_mut(), &mut rng, "foo", "steve"); + let (id2, name2) = register_name(deps.as_mut(), &mut rng, "bar", "steve"); + let (id3, name3) = register_name(deps.as_mut(), &mut rng, "baz", "steve"); assert_eq!(id1, 1); assert_eq!(id2, 2); assert_eq!(id3, 3); assert_eq!(name1.name.as_str(), "foo"); - assert_eq!(name1.address.as_str(), "addr1"); assert_eq!(name2.name.as_str(), "bar"); - assert_eq!(name2.address.as_str(), "addr2"); assert_eq!(name3.name.as_str(), "baz"); - assert_eq!(name3.address.as_str(), "addr3"); assert_names( deps.as_ref(), &[ @@ -76,8 +73,8 @@ mod tests { let mut rng = test_rng(); // Register two names - let (_, name1) = register_name(deps.as_mut(), &mut rng, "one", "sdfjkhsdfhr", "steve"); - register_name(deps.as_mut(), &mut rng, "two", "suereljer", "steve"); + let (_, name1) = register_name(deps.as_mut(), &mut rng, "one", "steve"); + register_name(deps.as_mut(), &mut rng, "two", "steve"); // Delete the last entry delete_name_id(deps.as_mut(), 2, "steve"); @@ -94,7 +91,7 @@ mod tests { // Create a third entry. The index should not reuse the previous entry that we just // deleted. - let (id3, _) = register_name(deps.as_mut(), &mut rng, "three", "ufd", "steve"); + let (id3, _) = register_name(deps.as_mut(), &mut rng, "three", "steve"); assert_eq!(id3, 3); } } diff --git a/contracts/name-service/src/state/names.rs b/contracts/name-service/src/state/names.rs index 41c68bf714..813a2fe85e 100644 --- a/contracts/name-service/src/state/names.rs +++ b/contracts/name-service/src/state/names.rs @@ -179,27 +179,27 @@ mod tests { #[rstest::fixture] fn uniq_names() -> Vec { vec![ - name_fixture_full(1, "one", "address_one", "owner_one"), - name_fixture_full(2, "two", "address_two", "owner_two"), - name_fixture_full(3, "three", "address_three", "owner_three"), + name_fixture_full(1, "one", "address.one@a", "owner_one"), + name_fixture_full(2, "two", "address.two@b", "owner_two"), + name_fixture_full(3, "three", "address.three@c", "owner_three"), ] } #[rstest::fixture] fn overlapping_addresses() -> Vec { vec![ - name_fixture_full(1, "one", "address_one", "owner_one"), - name_fixture_full(2, "two", "address_two", "owner_two"), - name_fixture_full(3, "three", "address_two", "owner_three"), + name_fixture_full(1, "one", "address.one@a", "owner_one"), + name_fixture_full(2, "two", "address.two@b", "owner_two"), + name_fixture_full(3, "three", "address.two@b", "owner_three"), ] } #[rstest::fixture] fn overlapping_owners() -> Vec { vec![ - name_fixture_full(1, "one", "address_one", "owner_one"), - name_fixture_full(2, "two", "address_two", "owner_two"), - name_fixture_full(3, "three", "address_three", "owner_two"), + name_fixture_full(1, "one", "address.one@a", "owner_one"), + name_fixture_full(2, "two", "address.two@b", "owner_two"), + name_fixture_full(3, "three", "address.three@c", "owner_two"), ] } @@ -395,8 +395,8 @@ mod tests { load_all_paged(deps.as_ref().storage, None, None).unwrap(), PagedLoad { names: vec![ - name_fixture_full(1, "one", "address_one", "owner_one"), - name_fixture_full(3, "three", "address_three", "owner_three"), + name_fixture_full(1, "one", "address.one@a", "owner_one"), + name_fixture_full(3, "three", "address.three@c", "owner_three"), ], limit: NAME_DEFAULT_RETRIEVAL_LIMIT as usize, start_next_after: Some(3), @@ -415,8 +415,8 @@ mod tests { load_all_paged(deps.as_ref().storage, None, None).unwrap(), PagedLoad { names: vec![ - name_fixture_full(1, "one", "address_one", "owner_one"), - name_fixture_full(3, "three", "address_three", "owner_three"), + name_fixture_full(1, "one", "address.one@a", "owner_one"), + name_fixture_full(3, "three", "address.three@c", "owner_three"), ], limit: NAME_DEFAULT_RETRIEVAL_LIMIT as usize, start_next_after: Some(3), @@ -444,19 +444,23 @@ mod tests { load_all_paged(deps.as_ref().storage, None, None).unwrap(), PagedLoad { names: vec![ - name_fixture_full(1, "one", "address_one", "owner_one"), - name_fixture_full(2, "two", "address_two", "owner_two"), - name_fixture_full(3, "three", "address_two", "owner_three"), + name_fixture_full(1, "one", "address.one@a", "owner_one"), + name_fixture_full(2, "two", "address.two@b", "owner_two"), + name_fixture_full(3, "three", "address.two@b", "owner_three"), ], limit: NAME_DEFAULT_RETRIEVAL_LIMIT as usize, start_next_after: Some(3), } ); assert_eq!( - load_address(deps.as_ref().storage, &Address::new("address_two")).unwrap(), + load_address( + deps.as_ref().storage, + &Address::new("address.two@b").unwrap() + ) + .unwrap(), vec![ - name_fixture_full(2, "two", "address_two", "owner_two"), - name_fixture_full(3, "three", "address_two", "owner_three"), + name_fixture_full(2, "two", "address.two@b", "owner_two"), + name_fixture_full(3, "three", "address.two@b", "owner_three"), ] ); } @@ -472,8 +476,8 @@ mod tests { load_all_paged(deps.as_ref().storage, None, None).unwrap(), PagedLoad { names: vec![ - name_fixture_full(1, "one", "address_one", "owner_one"), - name_fixture_full(3, "three", "address_two", "owner_three"), + name_fixture_full(1, "one", "address.one@a", "owner_one"), + name_fixture_full(3, "three", "address.two@b", "owner_three"), ], limit: NAME_DEFAULT_RETRIEVAL_LIMIT as usize, start_next_after: Some(3), @@ -496,8 +500,8 @@ mod tests { load_all_paged(deps.as_ref().storage, None, None).unwrap(), PagedLoad { names: vec![ - name_fixture_full(1, "one", "address_one", "owner_one"), - name_fixture_full(3, "three", "address_two", "owner_three"), + name_fixture_full(1, "one", "address.one@a", "owner_one"), + name_fixture_full(3, "three", "address.two@b", "owner_three"), ], limit: NAME_DEFAULT_RETRIEVAL_LIMIT as usize, start_next_after: Some(3), @@ -525,9 +529,9 @@ mod tests { load_all_paged(deps.as_ref().storage, None, None).unwrap(), PagedLoad { names: vec![ - name_fixture_full(1, "one", "address_one", "owner_one"), - name_fixture_full(2, "two", "address_two", "owner_two"), - name_fixture_full(3, "three", "address_three", "owner_two"), + name_fixture_full(1, "one", "address.one@a", "owner_one"), + name_fixture_full(2, "two", "address.two@b", "owner_two"), + name_fixture_full(3, "three", "address.three@c", "owner_two"), ], limit: NAME_DEFAULT_RETRIEVAL_LIMIT as usize, start_next_after: Some(3), @@ -536,8 +540,8 @@ mod tests { assert_eq!( load_owner(deps.as_ref().storage, Addr::unchecked("owner_two")).unwrap(), vec![ - name_fixture_full(2, "two", "address_two", "owner_two"), - name_fixture_full(3, "three", "address_three", "owner_two"), + name_fixture_full(2, "two", "address.two@b", "owner_two"), + name_fixture_full(3, "three", "address.three@c", "owner_two"), ] ); } @@ -555,8 +559,8 @@ mod tests { load_all_paged(deps.as_ref().storage, None, None).unwrap(), PagedLoad { names: vec![ - name_fixture_full(1, "one", "address_one", "owner_one"), - name_fixture_full(3, "three", "address_three", "owner_two"), + name_fixture_full(1, "one", "address.one@a", "owner_one"), + name_fixture_full(3, "three", "address.three@c", "owner_two"), ], limit: NAME_DEFAULT_RETRIEVAL_LIMIT as usize, start_next_after: Some(3), @@ -577,8 +581,8 @@ mod tests { load_all_paged(deps.as_ref().storage, None, None).unwrap(), PagedLoad { names: vec![ - name_fixture_full(1, "one", "address_one", "owner_one"), - name_fixture_full(3, "three", "address_three", "owner_two"), + name_fixture_full(1, "one", "address.one@a", "owner_one"), + name_fixture_full(3, "three", "address.three@c", "owner_two"), ], limit: NAME_DEFAULT_RETRIEVAL_LIMIT as usize, start_next_after: Some(3), @@ -593,8 +597,8 @@ mod tests { load_all_paged(&deps.storage, Some(2), None).unwrap(), PagedLoad { names: vec![ - name_fixture_full(1, "one", "address_one", "owner_one"), - name_fixture_full(2, "two", "address_two", "owner_two"), + name_fixture_full(1, "one", "address.one@a", "owner_one"), + name_fixture_full(2, "two", "address.two@b", "owner_two"), ], limit: 2, start_next_after: Some(2), @@ -606,7 +610,7 @@ mod tests { names: vec![name_fixture_full( 3, "three", - "address_three", + "address.three@c", "owner_three" )], limit: 1, @@ -619,7 +623,7 @@ mod tests { names: vec![name_fixture_full( 3, "three", - "address_three", + "address.three@c", "owner_three" )], limit: 2, diff --git a/contracts/name-service/src/test_helpers/fixture.rs b/contracts/name-service/src/test_helpers/fixture.rs index 5c24ece5d8..8a71681486 100644 --- a/contracts/name-service/src/test_helpers/fixture.rs +++ b/contracts/name-service/src/test_helpers/fixture.rs @@ -1,7 +1,8 @@ use cosmwasm_std::{Addr, Coin, DepsMut}; use nym_contracts_common::{signing::MessageSignature, IdentityKeyRef}; -use nym_crypto::asymmetric::identity; +use nym_crypto::asymmetric::{encryption, identity}; use nym_name_service_common::{Address, NameDetails, NameId, NymName, RegisteredName}; +use nym_sphinx_addressing::clients::Recipient; use rand_chacha::rand_core::{CryptoRng, RngCore}; use super::{ @@ -33,18 +34,7 @@ pub fn name_fixture(id: NameId) -> RegisteredName { new_name( id, &NymName::new("my-service").unwrap(), - &Address::new("client_id.client_key@gateway_id"), - &Addr::unchecked("steve"), - "identity", - ) -} - -#[allow(unused)] -pub fn name_fixture_with_name(id: NameId, name: &str, address: &str) -> RegisteredName { - new_name( - id, - &NymName::new(name).unwrap(), - &Address::new(address), + &Address::new("client_id.client_key@gateway_id").unwrap(), &Addr::unchecked("steve"), "identity", ) @@ -54,50 +44,98 @@ pub fn name_fixture_full(id: NameId, name: &str, address: &str, owner: &str) -> new_name( id, &NymName::new(name).unwrap(), - &Address::new(address), + &Address::new(address).unwrap(), &Addr::unchecked(owner), "identity", ) } -// Create a new name, using a correctly generted identity key -pub fn new_name_details( - rng: &mut R, - name: &str, - nym_address: &str, -) -> (NameDetails, identity::KeyPair) +fn new_recipient(rng: &mut R) -> (Recipient, identity::KeyPair) where R: RngCore + CryptoRng, { - let keypair = identity::KeyPair::new(rng); + let client_id_keys = identity::KeyPair::new(rng); + let client_enc_keys = encryption::KeyPair::new(rng); + let gateway_id_keys = identity::KeyPair::new(rng); + ( - NameDetails { - name: NymName::new(name).unwrap(), - address: Address::new(nym_address), - identity_key: keypair.public_key().to_base58_string(), - }, - keypair, + Recipient::new( + *client_id_keys.public_key(), + *client_enc_keys.public_key(), + *gateway_id_keys.public_key(), + ), + client_id_keys, ) } -// Create a new service, with a correctly generated identity key, and sign it +pub fn new_address(rng: &mut R) -> (Address, identity::KeyPair) +where + R: RngCore + CryptoRng, +{ + let (recipient, client_id_keys) = new_recipient(rng); + let address = Address::new(&recipient.to_string()).unwrap(); + (address, client_id_keys) +} + +// Create a new name with a correctly generated nym address and matching identity key +pub fn new_name_details(rng: &mut R, name: &str) -> (NameDetails, identity::KeyPair) +where + R: RngCore + CryptoRng, +{ + let (address, client_id_keys) = new_address(rng); + let identity_key = client_id_keys.public_key().to_base58_string(); + + ( + NameDetails { + name: NymName::new(name).unwrap(), + address, + identity_key, + }, + client_id_keys, + ) +} + +// Create a new name, with a correctly generated nym adress and identity key, and sign it pub fn new_name_details_with_sign( deps: DepsMut<'_>, rng: &mut R, name: &str, - nym_address: &str, owner: &str, deposit: Coin, ) -> (NameDetails, MessageSignature) where R: RngCore + CryptoRng, { - // Service - let (name, keypair) = new_name_details(rng, name, nym_address); + // Name + let (name, client_id_keys) = new_name_details(rng, name); // Sign let sign_msg = name_register_sign_payload(deps.as_ref(), owner, name.clone(), deposit); - let owner_signature = ed25519_sign_message(sign_msg, keypair.private_key()); + let owner_signature = ed25519_sign_message(sign_msg, client_id_keys.private_key()); (name, owner_signature) } + +#[cfg(test)] +mod test { + use crate::test_helpers::helpers; + + use super::*; + + #[test] + fn new_recipient_creates_matching_identity_and_client_id_public_key() { + let mut test_rng = helpers::test_rng(); + let (recipient, client_id_keys) = new_recipient(&mut test_rng); + assert_eq!(recipient.identity(), client_id_keys.public_key()); + + // A test not for our code, but that we actually confirm our understanding of Recipient. + // One might view it as unnecessary, but it's a good sanity check for such a core assumption. + let recipient_str = format!( + "{}.{}@{}", + recipient.identity().to_base58_string(), + recipient.encryption_key().to_base58_string(), + recipient.gateway().to_base58_string() + ); + assert_eq!(recipient.to_string(), recipient_str); + } +} diff --git a/contracts/name-service/src/test_helpers/transactions.rs b/contracts/name-service/src/test_helpers/transactions.rs index 6458ad5b3e..9b90515597 100644 --- a/contracts/name-service/src/test_helpers/transactions.rs +++ b/contracts/name-service/src/test_helpers/transactions.rs @@ -28,7 +28,6 @@ pub fn register_name( mut deps: DepsMut<'_>, rng: &mut R, name: &str, - nym_address: &str, owner: &str, ) -> (NameId, NameDetails) where @@ -39,7 +38,6 @@ where deps.branch(), rng, name, - nym_address, owner, deposit.clone(), ); diff --git a/contracts/service-provider-directory/src/integration_tests/test_service.rs b/contracts/service-provider-directory/src/integration_tests/test_service.rs index d0652dee75..6d54648713 100644 --- a/contracts/service-provider-directory/src/integration_tests/test_service.rs +++ b/contracts/service-provider-directory/src/integration_tests/test_service.rs @@ -10,7 +10,6 @@ use crate::test_helpers::signing::ed25519_sign_message; pub struct TestService { pub service: ServiceDetails, pub keys: identity::KeyPair, - pub rng: ChaCha20Rng, } impl TestService { @@ -21,11 +20,7 @@ impl TestService { service_type: ServiceType::NetworkRequester, identity_key: keys.public_key().to_base58_string(), }; - Self { - service, - keys, - rng: rng.clone(), - } + Self { service, keys } } pub fn identity_key(&self) -> &IdentityKey { diff --git a/contracts/vesting/Cargo.toml b/contracts/vesting/Cargo.toml index 5998e5d773..053aeedd15 100644 --- a/contracts/vesting/Cargo.toml +++ b/contracts/vesting/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-vesting-contract" -version = "1.4.0" +version = "1.4.1" description = "Nym vesting contract" edition = { workspace = true } authors = { workspace = true } diff --git a/contracts/vesting/schema/nym-vesting-contract.json b/contracts/vesting/schema/nym-vesting-contract.json index 87967fb410..6dd3678fd3 100644 --- a/contracts/vesting/schema/nym-vesting-contract.json +++ b/contracts/vesting/schema/nym-vesting-contract.json @@ -1,6 +1,6 @@ { "contract_name": "nym-vesting-contract", - "contract_version": "1.4.0", + "contract_version": "1.4.1", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/documentation/docs/src/bandwidth-credentials.md b/documentation/docs/src/bandwidth-credentials.md index 6423dcf035..f267cb045d 100644 --- a/documentation/docs/src/bandwidth-credentials.md +++ b/documentation/docs/src/bandwidth-credentials.md @@ -7,6 +7,8 @@ Create a `sandbox.env` file with the following details: ``` CONFIGURED=true +NETWORK_NAME=sandbox + RUST_LOG=info RUST_BACKTRACE=1 diff --git a/envs/local.env b/envs/local.env index 7c450b8aec..7efbad719e 100644 --- a/envs/local.env +++ b/envs/local.env @@ -1,5 +1,7 @@ CONFIGURED=true +NETWORK_NAME=local + RUST_LOG=info RUST_BACKTRACE=1 diff --git a/envs/mainnet.env b/envs/mainnet.env index 3ace54478b..4092b50ef8 100644 --- a/envs/mainnet.env +++ b/envs/mainnet.env @@ -1,5 +1,7 @@ CONFIGURED=true +NETWORK_NAME=mainnet + RUST_LOG=info RUST_BACKTRACE=1 diff --git a/envs/qa-qwerty.env b/envs/qa-qwerty.env index aba57bb0ed..219d9c7a6c 100644 --- a/envs/qa-qwerty.env +++ b/envs/qa-qwerty.env @@ -1,5 +1,7 @@ CONFIGURED=true +NETWORK_NAME=qa-qwerty + RUST_LOG=info RUST_BACKTRACE=1 @@ -20,6 +22,6 @@ SERVICE_PROVIDER_DIRECTORY_CONTRACT_ADDRESS=n1qsn2655eflc0nx2uwqtwyv5kad5dwm4c0g NAME_SERVICE_CONTRACT_ADDRESS=n1cm2u5vfjd3zalfw0p65xyh4tcrw3hjlm0960gzhewga449h4mgas77mjkl STATISTICS_SERVICE_DOMAIN_ADDRESS="https://mainnet-stats.nymte.ch:8090" NYXD="https://qwerty-validator.qa.nymte.ch/" -NYM_API="https://qwerty-validator-api.qa.nymte.ch/api" +NYM_API="https://qwerty-validator-api.qa.nymte.ch/api/" DKG_TIME_CONFIGURATION="600,300,300,60,60,1209600" diff --git a/envs/qa.env b/envs/qa.env index f09ee6baf1..fbaa9fd556 100644 --- a/envs/qa.env +++ b/envs/qa.env @@ -1,5 +1,7 @@ CONFIGURED=true +NETWORK_NAME=qa + RUST_LOG=info RUST_BACKTRACE=1 @@ -18,6 +20,6 @@ COCONUT_DKG_CONTRACT_ADDRESS=n17p9rzwnnfxcjp32un9ug7yhhzgtkhvl988qccs REWARDING_VALIDATOR_ADDRESS=n1tfzd4qz3a45u8p4mr5zmzv66457uwjgcl05jdq STATISTICS_SERVICE_DOMAIN_ADDRESS="http://0.0.0.0" NYXD="https://qa-validator.nymtech.net" -NYM_API="https://qa-validator-api.nymtech.net/api" +NYM_API="https://qa-validator-api.nymtech.net/api/" DKG_TIME_CONFIGURATION="600,300,300,60,60,1209600" \ No newline at end of file diff --git a/envs/sandbox.env b/envs/sandbox.env index 70aa96ff42..921bc5e215 100644 --- a/envs/sandbox.env +++ b/envs/sandbox.env @@ -1,5 +1,7 @@ CONFIGURED=true +NETWORK_NAME=sandbox + RUST_LOG=info RUST_BACKTRACE=1 @@ -20,4 +22,4 @@ COCONUT_DKG_CONTRACT_ADDRESS=n1ahg0erc2fs6xx3j5m8sfx3ryuzdjh6kf6qm9plsf865flteky STATISTICS_SERVICE_DOMAIN_ADDRESS="http://0.0.0.0" NYXD="https://sandbox-validator1.nymtech.net" -NYM_API="https://sandbox-nym-api1.nymtech.net/api" \ No newline at end of file +NYM_API="https://sandbox-nym-api1.nymtech.net/api/" \ No newline at end of file diff --git a/explorer-api/Cargo.toml b/explorer-api/Cargo.toml index 04e7255d01..72724ce6eb 100644 --- a/explorer-api/Cargo.toml +++ b/explorer-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "explorer-api" -version = "1.1.24" +version = "1.1.25" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -20,7 +20,7 @@ pretty_env_logger = "0.4.0" rand = "0.8.5" rand_pcg = "0.3.1" rand_seeder = "0.2.3" -reqwest = "0.11.4" +reqwest = { workspace = true } rocket = { version = "0.5.0-rc.2", features = ["json"] } rocket_cors = { git="https://github.com/lawliet89/rocket_cors", rev="dfd3662c49e2f6fc37df35091cb94d82f7fb5915" } rocket_okapi = { version = "0.8.0-rc.2", features = ["swagger"] } diff --git a/explorer-api/explorer-api-requests/Cargo.toml b/explorer-api/explorer-api-requests/Cargo.toml index 93c8faaada..7d8dc2f803 100644 --- a/explorer-api/explorer-api-requests/Cargo.toml +++ b/explorer-api/explorer-api-requests/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] nym-contracts-common = { path = "../../common/cosmwasm-smart-contracts/contracts-common" } nym-mixnet-contract-common = { path = "../../common/cosmwasm-smart-contracts/mixnet-contract" } -nym-validator-client = { path = "../../common/client-libs/validator-client" } +nym-api-requests = { path = "../../nym-api/nym-api-requests" } schemars = { version = "0.8", features = ["preserve_order"] } serde = { version = "1.0", features = ["derive"] } ts-rs = { version = "6.1.2", optional = true } diff --git a/explorer-api/explorer-api-requests/src/lib.rs b/explorer-api/explorer-api-requests/src/lib.rs index bfcafa2860..6180d65f11 100644 --- a/explorer-api/explorer-api-requests/src/lib.rs +++ b/explorer-api/explorer-api-requests/src/lib.rs @@ -1,6 +1,6 @@ +use nym_api_requests::models::NodePerformance; use nym_contracts_common::Percent; use nym_mixnet_contract_common::{Addr, Coin, Layer, MixId, MixNode}; -use nym_validator_client::models::NodePerformance; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; diff --git a/explorer-api/src/client.rs b/explorer-api/src/client.rs index 9b345e4cf6..1b565fcd60 100644 --- a/explorer-api/src/client.rs +++ b/explorer-api/src/client.rs @@ -2,7 +2,7 @@ use nym_network_defaults::{ var_names::{NYM_API, NYXD}, NymNetworkDetails, }; -use nym_validator_client::nyxd::QueryNyxdClient; +use nym_validator_client::QueryHttpRpcValidatorClient; use reqwest::Url; use std::{str::FromStr, sync::Arc}; @@ -11,9 +11,7 @@ use std::{str::FromStr, sync::Arc}; // when that becomes a requirement, we would simply put an extra RwLock (or Mutex) in here #[derive(Clone)] -pub(crate) struct ThreadsafeValidatorClient( - pub(crate) Arc>, -); +pub(crate) struct ThreadsafeValidatorClient(pub(crate) Arc); impl ThreadsafeValidatorClient { pub(crate) fn new() -> Self { diff --git a/explorer-api/src/mix_node/delegations.rs b/explorer-api/src/mix_node/delegations.rs index d9c151214d..feaefcf5c0 100644 --- a/explorer-api/src/mix_node/delegations.rs +++ b/explorer-api/src/mix_node/delegations.rs @@ -5,6 +5,7 @@ use super::models::SummedDelegations; use crate::client::ThreadsafeValidatorClient; use itertools::Itertools; use nym_mixnet_contract_common::{Delegation, MixId}; +use nym_validator_client::nyxd::contract_traits::PagedMixnetQueryClient; pub(crate) async fn get_single_mixnode_delegations( client: &ThreadsafeValidatorClient, @@ -12,7 +13,8 @@ pub(crate) async fn get_single_mixnode_delegations( ) -> Vec { match client .0 - .get_all_nyxd_single_mixnode_delegations(mix_id) + .nyxd + .get_all_single_mixnode_delegations(mix_id) .await { Ok(result) => result, diff --git a/explorer-api/src/tasks.rs b/explorer-api/src/tasks.rs index 548d1f1a0a..b0b9a9701b 100644 --- a/explorer-api/src/tasks.rs +++ b/explorer-api/src/tasks.rs @@ -1,14 +1,13 @@ // Copyright 2022 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 -use std::future::Future; - use nym_mixnet_contract_common::GatewayBond; use nym_task::TaskClient; use nym_validator_client::models::MixNodeBondAnnotated; use nym_validator_client::nyxd::error::NyxdError; -use nym_validator_client::nyxd::{Paging, QueryNyxdClient, ValidatorResponse}; -use nym_validator_client::ValidatorClientError; +use nym_validator_client::nyxd::{Paging, TendermintRpcClient, ValidatorResponse}; +use nym_validator_client::{QueryHttpRpcValidatorClient, ValidatorClientError}; +use std::future::Future; use crate::mix_nodes::CACHE_REFRESH_RATE; use crate::state::ExplorerApiStateContext; @@ -26,7 +25,7 @@ impl ExplorerApiTasks { // a helper to remove duplicate code when grabbing active/rewarded/all mixnodes async fn retrieve_mixnodes<'a, F, Fut>(&'a self, f: F) -> Vec where - F: FnOnce(&'a nym_validator_client::Client) -> Fut, + F: FnOnce(&'a QueryHttpRpcValidatorClient) -> Fut, Fut: Future, ValidatorClientError>>, { let bonds = match f(&self.state.inner.validator_client.0).await { @@ -75,7 +74,7 @@ impl ExplorerApiTasks { .validator_client .0 .nyxd - .get_validators(height.value(), Paging::All) + .validators(height, Paging::All) .await?; info!("Fetched {} validators", response.validators.len()); Ok(response) diff --git a/gateway/Cargo.toml b/gateway/Cargo.toml index 007fcca40d..25e2b62375 100644 --- a/gateway/Cargo.toml +++ b/gateway/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "nym-gateway" -version = "1.1.24" +version = "1.1.25" authors = [ "Dave Hrycyszyn ", "JÄ™drzej StuczyÅ„ski ", @@ -25,7 +25,7 @@ colored = "2.0" dashmap = "4.0" dirs = "4.0" dotenvy = { workspace = true } -futures = "0.3" +futures = { workspace = true } humantime-serde = "1.0.1" lazy_static = "1.4.0" log = { workspace = true } diff --git a/gateway/gateway-requests/Cargo.toml b/gateway/gateway-requests/Cargo.toml index 92b2a7c8e4..dcd8ad3743 100644 --- a/gateway/gateway-requests/Cargo.toml +++ b/gateway/gateway-requests/Cargo.toml @@ -11,7 +11,7 @@ edition = "2021" [dependencies] bs58 = "0.4.0" -futures = "0.3.15" +futures = { workspace = true } generic-array = { workspace = true, features = ["serde"] } log = { workspace = true } rand = { version = "0.7.3", features = ["wasm-bindgen"] } diff --git a/gateway/src/node/client_handling/websocket/connection_handler/authenticated.rs b/gateway/src/node/client_handling/websocket/connection_handler/authenticated.rs index 1a41937c4b..0fe930a96d 100644 --- a/gateway/src/node/client_handling/websocket/connection_handler/authenticated.rs +++ b/gateway/src/node/client_handling/websocket/connection_handler/authenticated.rs @@ -22,6 +22,7 @@ use crate::node::client_handling::bandwidth::Bandwidth; use crate::node::client_handling::FREE_TESTNET_BANDWIDTH_VALUE; use nym_gateway_requests::iv::IV; use nym_task::TaskClient; +use nym_validator_client::coconut::CoconutApiError; #[derive(Debug, Error)] pub(crate) enum RequestHandlingError { @@ -64,6 +65,9 @@ pub(crate) enum RequestHandlingError { #[error("Coconut interface error - {0}")] CoconutInterfaceError(#[from] nym_coconut_interface::error::CoconutInterfaceError), + #[error("coconut api query failure: {0}")] + CoconutApiError(#[from] CoconutApiError), + #[error("Credential error - {0}")] CredentialError(#[from] nym_credentials::error::Error), } diff --git a/gateway/src/node/client_handling/websocket/connection_handler/coconut.rs b/gateway/src/node/client_handling/websocket/connection_handler/coconut.rs index cc8c552b07..356a884161 100644 --- a/gateway/src/node/client_handling/websocket/connection_handler/coconut.rs +++ b/gateway/src/node/client_handling/websocket/connection_handler/coconut.rs @@ -4,14 +4,17 @@ use super::authenticated::RequestHandlingError; use log::*; use nym_coconut_interface::Credential; -use nym_validator_client::nyxd::traits::DkgQueryClient; +use nym_validator_client::coconut::all_coconut_api_clients; use nym_validator_client::{ nyxd::{ + contract_traits::{ + CoconutBandwidthSigningClient, DkgQueryClient, MultisigQueryClient, + MultisigSigningClient, + }, cosmwasm_client::logs::{find_attribute, BANDWIDTH_PROPOSAL_ID}, - traits::{CoconutBandwidthSigningClient, MultisigQueryClient, MultisigSigningClient}, - Coin, DirectSigningNyxdClient, Fee, + Coin, Fee, }, - Client, CoconutApiClient, + CoconutApiClient, DirectSigningHttpRpcNyxdClient, }; use std::time::{Duration, SystemTime}; @@ -19,18 +22,13 @@ const ONE_HOUR_SEC: u64 = 3600; const MAX_FEEGRANT_UNYM: u128 = 10000; pub(crate) struct CoconutVerifier { - nyxd_client: Client, + nyxd_client: DirectSigningHttpRpcNyxdClient, mix_denom_base: String, } impl CoconutVerifier { - pub fn new(nyxd_client: Client) -> Self { - let mix_denom_base = nyxd_client - .nyxd - .current_chain_details() - .mix_denom - .base - .clone(); + pub fn new(nyxd_client: DirectSigningHttpRpcNyxdClient) -> Self { + let mix_denom_base = nyxd_client.current_chain_details().mix_denom.base.clone(); CoconutVerifier { nyxd_client, @@ -41,7 +39,7 @@ impl CoconutVerifier { pub async fn all_current_coconut_api_clients( &self, ) -> Result, RequestHandlingError> { - let epoch_id = self.nyxd_client.nyxd.get_current_epoch().await?.epoch_id; + let epoch_id = self.nyxd_client.get_current_epoch().await?.epoch_id; self.all_coconut_api_clients(epoch_id).await } @@ -49,7 +47,7 @@ impl CoconutVerifier { &self, epoch_id: u64, ) -> Result, RequestHandlingError> { - Ok(CoconutApiClient::all_coconut_api_clients(&self.nyxd_client, epoch_id).await?) + Ok(all_coconut_api_clients(&self.nyxd_client, epoch_id).await?) } pub async fn release_funds( @@ -63,14 +61,13 @@ impl CoconutVerifier { let res = self .nyxd_client - .nyxd .spend_credential( Coin::new( credential.voucher_value().into(), self.mix_denom_base.clone(), ), credential.blinded_serial_number(), - self.nyxd_client.nyxd.address().to_string(), + self.nyxd_client.address().to_string(), None, ) .await?; @@ -84,7 +81,7 @@ impl CoconutVerifier { reason: String::from("proposal id could not be parsed to u64"), })?; - let proposal = self.nyxd_client.nyxd.get_proposal(proposal_id).await?; + let proposal = self.nyxd_client.query_proposal(proposal_id).await?; if !credential.has_blinded_serial_number(&proposal.description)? { return Err(RequestHandlingError::ProposalIdError { reason: String::from("proposal has different serial number"), @@ -94,11 +91,10 @@ impl CoconutVerifier { let req = nym_api_requests::coconut::VerifyCredentialBody::new( credential.clone(), proposal_id, - self.nyxd_client.nyxd.address().clone(), + self.nyxd_client.address().clone(), ); for client in api_clients { self.nyxd_client - .nyxd .grant_allowance( &client.cosmos_address, vec![Coin::new(MAX_FEEGRANT_UNYM, self.mix_denom_base.clone())], @@ -111,22 +107,25 @@ impl CoconutVerifier { .await?; let ret = client.api_client.verify_bandwidth_credential(&req).await; self.nyxd_client - .nyxd .revoke_allowance( &client.cosmos_address, "Cleanup the previous allowance for releasing funds".to_string(), revoke_fee.clone(), ) .await?; - if !ret?.verification_result { - debug!("Validator {} didn't accept the credential. It will probably vote No on the spending proposal", client.api_client.nym_api_client.current_url()); + match ret { + Ok(res) => { + if !res.verification_result { + debug!("Validator {} didn't accept the credential. It will probably vote No on the spending proposal", client.api_client.nym_api.current_url()); + } + } + Err(e) => { + warn!("Validator {} could not be reached. There might be a problem with the coconut endpoint - {:?}", client.api_client.nym_api.current_url(), e); + } } } - self.nyxd_client - .nyxd - .execute_proposal(proposal_id, None) - .await?; + self.nyxd_client.execute_proposal(proposal_id, None).await?; Ok(()) } diff --git a/gateway/src/node/mod.rs b/gateway/src/node/mod.rs index 8487e6c99f..93bce3a6fd 100644 --- a/gateway/src/node/mod.rs +++ b/gateway/src/node/mod.rs @@ -17,7 +17,7 @@ use nym_mixnet_client::forwarder::{MixForwardingSender, PacketForwarder}; use nym_network_defaults::NymNetworkDetails; use nym_statistics_common::collector::StatisticsSender; use nym_task::{TaskClient, TaskManager}; -use nym_validator_client::Client; +use nym_validator_client::{nyxd, DirectSigningHttpRpcNyxdClient}; use rand::seq::SliceRandom; use rand::thread_rng; use std::error::Error; @@ -212,26 +212,22 @@ impl Gateway { nym_validator_client::NymApiClient::new(nym_api.clone()) } - fn random_nyxd_client( - &self, - ) -> nym_validator_client::Client { + fn random_nyxd_client(&self) -> DirectSigningHttpRpcNyxdClient { let endpoints = self.config.get_nyxd_urls(); let validator_nyxd = endpoints .choose(&mut thread_rng()) .expect("The list of validators is empty"); let network_details = NymNetworkDetails::new_from_env(); - let client_config = nym_validator_client::Config::try_from_nym_network_details( - &network_details, - ) - .expect("failed to construct valid validator client config with the provided network"); + let client_config = nyxd::Config::try_from_nym_network_details(&network_details) + .expect("failed to construct valid validator client config with the provided network"); - let mut client = Client::new_signing(client_config, self.config.get_cosmos_mnemonic()) - .expect("Could not connect with mnemonic"); - client - .change_nyxd(validator_nyxd.clone()) - .expect("Could not use the random nyxd URL"); - client + DirectSigningHttpRpcNyxdClient::connect_with_mnemonic( + client_config, + validator_nyxd.as_ref(), + self.config.get_cosmos_mnemonic(), + ) + .expect("Could not connect with mnemonic") } async fn check_if_bonded(&self) -> Result { diff --git a/mixnode/Cargo.toml b/mixnode/Cargo.toml index 8421bebb3a..101ac4d513 100644 --- a/mixnode/Cargo.toml +++ b/mixnode/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "nym-mixnode" -version = "1.1.25" +version = "1.1.26" authors = [ "Dave Hrycyszyn ", "JÄ™drzej StuczyÅ„ski ", @@ -22,7 +22,7 @@ clap = { version = "4.0", features = ["cargo", "derive"] } colored = "2.0" cupid = "0.6.1" dirs = "4.0" -futures = "0.3.0" +futures = { workspace = true } humantime-serde = "1.0" lazy_static = "1.4.0" log = { workspace = true } diff --git a/nym-api/Cargo.toml b/nym-api/Cargo.toml index 50568b440a..5e7a9488d1 100644 --- a/nym-api/Cargo.toml +++ b/nym-api/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "nym-api" -version = "1.1.25" +version = "1.1.26" authors = [ "Dave Hrycyszyn ", "JÄ™drzej StuczyÅ„ski ", @@ -22,7 +22,7 @@ cfg-if = "1.0" clap = { version = "4.0", features = ["cargo", "derive"] } console-subscriber = { version = "0.1.1", optional = true } # validator-api needs to be built with RUSTFLAGS="--cfg tokio_unstable" dirs = "4.0" -futures = "0.3.24" +futures = { workspace = true } humantime-serde = "1.0" lazy_static = "1.4.0" log = { workspace = true } @@ -30,13 +30,13 @@ pin-project = "1.0" pretty_env_logger = "0.4.0" rand = "0.8.5" rand-07 = { package = "rand", version = "0.7.3" } # required for compatibility -reqwest = { version = "0.11.11", features = ["json"] } +reqwest = { workspace = true, features = ["json"] } rocket = { version = "0.5.0-rc.2", features = ["json"] } rocket_cors = { git = "https://github.com/lawliet89/rocket_cors", rev = "dfd3662c49e2f6fc37df35091cb94d82f7fb5915" } -serde = "1.0" +serde = { workspace = true } serde_json = { workspace = true } tap = "1.0" -thiserror = "1.0" +thiserror = { workspace = true } time = { version = "0.3.14", features = ["serde-human-readable", "parsing"] } tokio = { version = "1.24.1", features = [ "rt-multi-thread", @@ -45,7 +45,7 @@ tokio = { version = "1.24.1", features = [ "time", ] } tokio-stream = "0.1.11" -url = "2.2" +url = { workspace = true } ts-rs = {version = "6.1", optional = true} @@ -74,6 +74,7 @@ cosmwasm-std = { workspace = true } nym-credential-storage = { path = "../common/credential-storage" } nym-credentials = { path = "../common/credentials" } nym-crypto = { path = "../common/crypto" } +cw2 = { workspace = true } cw3 = { workspace = true } cw4 = { workspace = true } nym-dkg = { path = "../common/dkg", features = ["cw-types"] } @@ -91,9 +92,7 @@ nym-pemstore = { path = "../common/pemstore" } nym-task = { path = "../common/task" } nym-topology = { path = "../common/topology" } nym-api-requests = { path = "nym-api-requests" } -nym-validator-client = { path = "../common/client-libs/validator-client", features = [ - "http-client", "signing" -] } +nym-validator-client = { path = "../common/client-libs/validator-client" } nym-bin-common = { path = "../common/bin-common" } nym-node-tester-utils = { path = "../common/node-tester-utils" } diff --git a/nym-api/src/circulating_supply_api/cache/mod.rs b/nym-api/src/circulating_supply_api/cache/mod.rs index 003d25feb4..70794bc72e 100644 --- a/nym-api/src/circulating_supply_api/cache/mod.rs +++ b/nym-api/src/circulating_supply_api/cache/mod.rs @@ -4,8 +4,8 @@ use self::data::CirculatingSupplyCacheData; use cosmwasm_std::Addr; use nym_api_requests::models::CirculatingSupplyResponse; +use nym_validator_client::nyxd::error::NyxdError; use nym_validator_client::nyxd::Coin; -use nym_validator_client::ValidatorClientError; use rocket::fairing::AdHoc; use std::ops::Deref; use std::{ @@ -34,7 +34,7 @@ enum CirculatingSupplyCacheError { #[error(transparent)] ClientError { #[from] - source: ValidatorClientError, + source: NyxdError, }, } diff --git a/nym-api/src/coconut/comm.rs b/nym-api/src/coconut/comm.rs index 04e53c2c02..cf671defa1 100644 --- a/nym-api/src/coconut/comm.rs +++ b/nym-api/src/coconut/comm.rs @@ -6,7 +6,8 @@ use crate::nyxd; use nym_coconut_dkg_common::types::EpochId; use nym_coconut_interface::VerificationKey; use nym_credentials::coconut::utils::obtain_aggregate_verification_key; -use nym_validator_client::CoconutApiClient; +use nym_validator_client::coconut::all_coconut_api_clients; +use std::ops::Deref; #[async_trait] pub trait APICommunicationChannel { @@ -27,8 +28,7 @@ impl QueryCommunicationChannel { impl APICommunicationChannel for QueryCommunicationChannel { async fn aggregated_verification_key(&self, epoch_id: EpochId) -> Result { let client = self.nyxd_client.0.read().await; - let coconut_api_clients = - CoconutApiClient::all_coconut_api_clients(&client.nyxd, epoch_id).await?; + let coconut_api_clients = all_coconut_api_clients(client.deref(), epoch_id).await?; let vk = obtain_aggregate_verification_key(&coconut_api_clients).await?; Ok(vk) } diff --git a/nym-api/src/coconut/error.rs b/nym-api/src/coconut/error.rs index c540bc62d1..e038e74723 100644 --- a/nym-api/src/coconut/error.rs +++ b/nym-api/src/coconut/error.rs @@ -12,6 +12,7 @@ use nym_crypto::asymmetric::{ identity::{Ed25519RecoveryError, SignatureError}, }; use nym_dkg::error::DkgError; +use nym_validator_client::coconut::CoconutApiError; use nym_validator_client::nyxd::error::NyxdError; use crate::node_status_api::models::NymApiStorageError; @@ -23,6 +24,9 @@ pub enum CoconutError { #[error(transparent)] IOError(#[from] std::io::Error), + #[error("coconut api query failure: {0}")] + CoconutApiError(#[from] CoconutApiError), + #[error(transparent)] SerdeJsonError(#[from] serde_json::Error), diff --git a/nym-api/src/main.rs b/nym-api/src/main.rs index 39719ba0fe..5784247e7f 100644 --- a/nym-api/src/main.rs +++ b/nym-api/src/main.rs @@ -5,6 +5,7 @@ extern crate rocket; use crate::epoch_operations::RewardedSetUpdater; +use crate::network::models::NetworkDetails; use crate::node_status_api::uptime_updater::HistoricalUptimeUpdater; use crate::support::cli; use crate::support::cli::CliArgs; @@ -29,6 +30,7 @@ use support::{http, nyxd}; mod circulating_supply_api; mod coconut; mod epoch_operations; +pub(crate) mod network; mod network_monitor; pub(crate) mod node_status_api; pub(crate) mod nym_contract_cache; @@ -58,14 +60,16 @@ async fn start_nym_api_tasks( config: Config, ) -> Result> { let nyxd_client = nyxd::Client::new(&config); - let mix_denom = nyxd_client.chain_details().await.mix_denom.base; + let connected_nyxd = config.get_nyxd_url(); + let nym_network_details = config.get_network_details(); + let network_details = NetworkDetails::new(connected_nyxd.to_string(), nym_network_details); let coconut_keypair = coconut::keypair::KeyPair::new(); // let's build our rocket! let rocket = http::setup_rocket( &config, - mix_denom, + network_details, nyxd_client.clone(), coconut_keypair.clone(), ) diff --git a/nym-api/src/network/mod.rs b/nym-api/src/network/mod.rs new file mode 100644 index 0000000000..f06bc5bf16 --- /dev/null +++ b/nym-api/src/network/mod.rs @@ -0,0 +1,16 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use okapi::openapi3::OpenApi; +use rocket::Route; +use rocket_okapi::openapi_get_routes_spec; +use rocket_okapi::settings::OpenApiSettings; + +pub(crate) mod models; +mod routes; + +pub(crate) fn network_routes(settings: &OpenApiSettings) -> (Vec, OpenApi) { + openapi_get_routes_spec![ + settings: routes::network_details, routes::nym_contracts, routes::nym_contracts_detailed + ] +} diff --git a/nym-api/src/network/models.rs b/nym-api/src/network/models.rs new file mode 100644 index 0000000000..518b4352f1 --- /dev/null +++ b/nym-api/src/network/models.rs @@ -0,0 +1,28 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use nym_config::defaults::NymNetworkDetails; +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Serialize, Deserialize, JsonSchema)] +pub struct NetworkDetails { + pub(crate) connected_nyxd: String, + pub(crate) network: NymNetworkDetails, +} + +impl NetworkDetails { + pub fn new(connected_nyxd: String, network: NymNetworkDetails) -> Self { + Self { + connected_nyxd, + network, + } + } +} + +#[derive(Serialize, Deserialize, Clone, JsonSchema)] +#[serde(rename_all = "snake_case")] +pub struct ContractInformation { + pub(crate) address: Option, + pub(crate) details: Option, +} diff --git a/nym-api/src/network/routes.rs b/nym-api/src/network/routes.rs new file mode 100644 index 0000000000..77f60f0fa9 --- /dev/null +++ b/nym-api/src/network/routes.rs @@ -0,0 +1,63 @@ +// Copyright 2023 - Nym Technologies SA +// SPDX-License-Identifier: Apache-2.0 + +use crate::network::models::{ContractInformation, NetworkDetails}; +use crate::nym_contract_cache::cache::NymContractCache; +use nym_contracts_common::ContractBuildInformation; +use rocket::serde::json::Json; +use rocket::State; +use rocket_okapi::openapi; +use std::collections::HashMap; +use std::ops::Deref; + +#[openapi(tag = "network")] +#[get("/details")] +pub(crate) fn network_details(details: &State) -> Json { + Json(details.deref().clone()) +} + +// I agree, it feels weird to be pulling contract cache here, but I feel like it makes +// more sense to return this information here rather than in the generic cache route +#[openapi(tag = "network")] +#[get("/nym-contracts")] +pub(crate) async fn nym_contracts( + cache: &State, +) -> Json>> { + let info = cache.contract_details().await; + Json( + info.value + .into_iter() + .map(|(contract, info)| { + ( + contract, + ContractInformation { + address: info.address.map(|a| a.to_string()), + details: info.base, + }, + ) + }) + .collect(), + ) +} + +#[openapi(tag = "network")] +#[get("/nym-contracts-detailed")] +pub(crate) async fn nym_contracts_detailed( + cache: &State, +) -> Json>> { + let info = cache.contract_details().await; + Json( + info.value + .into_iter() + .map(|(contract, info)| { + ( + contract, + ContractInformation { + address: info.address.map(|a| a.to_string()), + details: info.detailed, + }, + ) + }) + .collect(), + ) +} diff --git a/nym-api/src/nym_contract_cache/cache/data.rs b/nym-api/src/nym_contract_cache/cache/data.rs index 27285db41a..ede4bc6838 100644 --- a/nym-api/src/nym_contract_cache/cache/data.rs +++ b/nym-api/src/nym_contract_cache/cache/data.rs @@ -2,13 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 use crate::support::caching::Cache; +use nym_contracts_common::ContractBuildInformation; use nym_mixnet_contract_common::{ families::FamilyHead, GatewayBond, IdentityKey, Interval, MixId, MixNodeDetails, RewardingParams, }; use nym_name_service_common::RegisteredName; use nym_service_provider_directory_common::Service; -use std::collections::HashSet; +use nym_validator_client::nyxd::AccountId; +use std::collections::{HashMap, HashSet}; pub(crate) struct ValidatorCacheData { pub(crate) mixnodes: Cache>, @@ -27,6 +29,8 @@ pub(crate) struct ValidatorCacheData { pub(crate) service_providers: Cache>, pub(crate) registered_names: Cache>, + + pub(crate) contracts_info: Cache, } impl ValidatorCacheData { @@ -43,6 +47,31 @@ impl ValidatorCacheData { mix_to_family: Cache::default(), service_providers: Cache::default(), registered_names: Cache::default(), + contracts_info: Cache::default(), + } + } +} + +type ContractAddress = String; +pub type CachedContractsInfo = HashMap; + +#[derive(Clone)] +pub struct CachedContractInfo { + pub(crate) address: Option, + pub(crate) base: Option, + pub(crate) detailed: Option, +} + +impl CachedContractInfo { + pub fn new( + address: Option<&AccountId>, + base: Option, + detailed: Option, + ) -> Self { + Self { + address: address.cloned(), + base, + detailed, } } } diff --git a/nym-api/src/nym_contract_cache/cache/mod.rs b/nym-api/src/nym_contract_cache/cache/mod.rs index 2eac4f0c61..ec0ce7f8e5 100644 --- a/nym-api/src/nym_contract_cache/cache/mod.rs +++ b/nym-api/src/nym_contract_cache/cache/mod.rs @@ -1,3 +1,4 @@ +use crate::nym_contract_cache::cache::data::CachedContractsInfo; use crate::support::caching::Cache; use data::ValidatorCacheData; use nym_api_requests::models::MixnodeStatus; @@ -54,6 +55,7 @@ impl NymContractCache { mix_to_family: Vec<(IdentityKey, FamilyHead)>, services: Option>, names: Option>, + nym_contracts_info: CachedContractsInfo, ) { match time::timeout(Duration::from_millis(100), self.inner.write()).await { Ok(mut cache) => { @@ -67,6 +69,7 @@ impl NymContractCache { // Just return empty lists when these are not available cache.service_providers.update(services.unwrap_or_default()); cache.registered_names.update(names.unwrap_or_default()); + cache.contracts_info.update(nym_contracts_info) } Err(err) => { error!("{err}"); @@ -267,6 +270,16 @@ impl NymContractCache { } } + pub(crate) async fn contract_details(&self) -> Cache { + match time::timeout(Duration::from_millis(100), self.inner.read()).await { + Ok(cache) => cache.contracts_info.clone(), + Err(err) => { + error!("{err}"); + Cache::default() + } + } + } + pub async fn mixnode_details(&self, mix_id: MixId) -> (Option, MixnodeStatus) { // it might not be the most optimal to possibly iterate the entire vector to find (or not) // the relevant value. However, the vectors are relatively small (< 10_000 elements, < 1000 for active set) diff --git a/nym-api/src/nym_contract_cache/cache/refresher.rs b/nym-api/src/nym_contract_cache/cache/refresher.rs index 93ddabf3a1..e1fa5cf18f 100644 --- a/nym-api/src/nym_contract_cache/cache/refresher.rs +++ b/nym-api/src/nym_contract_cache/cache/refresher.rs @@ -1,10 +1,16 @@ use super::NymContractCache; +use crate::nym_contract_cache::cache::data::{CachedContractInfo, CachedContractsInfo}; use crate::nyxd::Client; use crate::support::caching::CacheNotification; use anyhow::Result; +use futures::future::join_all; use nym_mixnet_contract_common::{MixId, MixNodeDetails, RewardedSetNodeStatus}; use nym_task::TaskClient; -use nym_validator_client::nyxd::traits::{NameServiceQueryClient, SpDirectoryQueryClient}; +use nym_validator_client::nyxd::contract_traits::{ + MixnetQueryClient, NameServiceQueryClient, NymContractsProvider, PagedNameServiceQueryClient, + PagedSpDirectoryQueryClient, SpDirectoryQueryClient, VestingQueryClient, +}; +use nym_validator_client::nyxd::CosmWasmClient; use std::{collections::HashMap, sync::atomic::Ordering, time::Duration}; use tokio::sync::watch; use tokio::time; @@ -37,6 +43,129 @@ impl NymContractCacheRefresher { self.update_notifier.subscribe() } + async fn get_nym_contracts_info(&self) -> Result { + let mut updated = HashMap::new(); + + let client_guard = self.nyxd_client.read().await; + + let mixnet = client_guard.mixnet_contract_address(); + let vesting = client_guard.vesting_contract_address(); + let name_service = client_guard.name_service_contract_address(); + let service_provider = client_guard.service_provider_contract_address(); + let coconut_bandwidth = client_guard.coconut_bandwidth_contract_address(); + let coconut_dkg = client_guard.dkg_contract_address(); + let group = client_guard.group_contract_address(); + let multisig = client_guard.multisig_contract_address(); + + // get cw2 versions + let mixnet_cw2_future = client_guard.get_mixnet_contract_cw2_version(); + let vesting_cw2_future = client_guard.get_vesting_contract_cw2_version(); + let service_provider_cw2_future = client_guard.get_name_service_contract_cw2_version(); + let name_service_cw2_future = client_guard.get_name_service_contract_cw2_version(); + + // group and multisig contract save that information in their storage but don't expose it via queries + // so a temporary workaround... + let multisig_cw2 = if let Some(multisig_contract) = multisig { + client_guard + .query_contract_raw(multisig_contract, b"contract_info".to_vec()) + .await + .map(|r| serde_json::from_slice(&r).ok()) + .ok() + .flatten() + } else { + None + }; + let group_cw2 = if let Some(group_contract) = group { + client_guard + .query_contract_raw(group_contract, b"contract_info".to_vec()) + .await + .map(|r| serde_json::from_slice(&r).ok()) + .ok() + .flatten() + } else { + None + }; + + let mut cw2_info = join_all(vec![ + mixnet_cw2_future, + vesting_cw2_future, + service_provider_cw2_future, + name_service_cw2_future, + ]) + .await; + + // get detailed build info + let mixnet_detailed_future = client_guard.get_mixnet_contract_version(); + let vesting_detailed_future = client_guard.get_vesting_contract_version(); + let service_provider_detailed_future = client_guard.get_sp_contract_version(); + let name_service_detailed_future = client_guard.get_name_service_contract_version(); + + let mut build_info = join_all(vec![ + mixnet_detailed_future, + vesting_detailed_future, + service_provider_detailed_future, + name_service_detailed_future, + ]) + .await; + + // the below unwraps are fine as we definitely have the specified number of entries + // Note to whoever updates this code in the future: `pop` removes **LAST** element, + // so make sure you call them in correct order, depending on what's specified in the `join_all` + updated.insert( + "nym-name-service-contract".to_string(), + CachedContractInfo::new( + name_service, + cw2_info.pop().unwrap().ok(), + build_info.pop().unwrap().ok(), + ), + ); + + updated.insert( + "nym-service-provider-directory-contract".to_string(), + CachedContractInfo::new( + service_provider, + cw2_info.pop().unwrap().ok(), + build_info.pop().unwrap().ok(), + ), + ); + + updated.insert( + "nym-vesting-contract".to_string(), + CachedContractInfo::new( + vesting, + cw2_info.pop().unwrap().ok(), + build_info.pop().unwrap().ok(), + ), + ); + updated.insert( + "nym-mixnet-contract".to_string(), + CachedContractInfo::new( + mixnet, + cw2_info.pop().unwrap().ok(), + build_info.pop().unwrap().ok(), + ), + ); + + updated.insert( + "nym-coconut-bandwidth-contract".to_string(), + CachedContractInfo::new(coconut_bandwidth, None, None), + ); + updated.insert( + "nym-coconut-dkg-contract".to_string(), + CachedContractInfo::new(coconut_dkg, None, None), + ); + updated.insert( + "nym-cw3-multisig-contract".to_string(), + CachedContractInfo::new(multisig, multisig_cw2, None), + ); + updated.insert( + "nym-cw4-group-contract".to_string(), + CachedContractInfo::new(group, group_cw2, None), + ); + + Ok(updated) + } + async fn refresh(&self) -> Result<()> { let rewarding_params = self.nyxd_client.get_current_rewarding_parameters().await?; let current_interval = self.nyxd_client.get_current_interval().await?.interval; @@ -54,6 +183,7 @@ impl NymContractCacheRefresher { // The service providers and names are optional let services = self.nyxd_client.get_all_services().await.ok(); let names = self.nyxd_client.get_all_names().await.ok(); + let contract_info = self.get_nym_contracts_info().await?; info!( "Updating validator cache. There are {} mixnodes and {} gateways", @@ -72,6 +202,7 @@ impl NymContractCacheRefresher { mix_to_family, services, names, + contract_info, ) .await; diff --git a/nym-api/src/support/caching/mod.rs b/nym-api/src/support/caching/mod.rs index ad2e40e80d..0d2615d327 100644 --- a/nym-api/src/support/caching/mod.rs +++ b/nym-api/src/support/caching/mod.rs @@ -2,13 +2,13 @@ use serde::Serialize; use std::ops::Deref; use time::OffsetDateTime; -#[derive(Default, Serialize, Clone)] +#[derive(Serialize, Clone)] pub struct Cache { pub value: T, as_at: i64, } -impl Cache { +impl Cache { pub fn new(value: T) -> Self { Cache { value, @@ -38,6 +38,18 @@ impl Deref for Cache { } } +impl Default for Cache +where + T: Default, +{ + fn default() -> Self { + Cache { + value: T::default(), + as_at: 0, + } + } +} + fn current_unix_timestamp() -> i64 { let now = OffsetDateTime::now_utc(); now.unix_timestamp() diff --git a/nym-api/src/support/config/mod.rs b/nym-api/src/support/config/mod.rs index 51f2c6726c..163eaa44db 100644 --- a/nym-api/src/support/config/mod.rs +++ b/nym-api/src/support/config/mod.rs @@ -5,7 +5,7 @@ use crate::support::config::persistence::{ CoconutSignerPaths, NetworkMonitorPaths, NodeStatusAPIPaths, }; use crate::support::config::template::CONFIG_TEMPLATE; -use nym_config::defaults::mainnet; +use nym_config::defaults::{mainnet, NymNetworkDetails}; 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, @@ -98,6 +98,16 @@ pub struct Config { pub coconut_signer: CoconutSigner, } +impl<'a> From<&'a Config> for NymNetworkDetails { + fn from(value: &'a Config) -> Self { + // we get the current environmental details and then overwrite whatever is appropriate with + // the values from the config + NymNetworkDetails::new_from_env() + .with_mixnet_contract(Some(value.get_mixnet_contract_address().as_ref())) + .with_vesting_contract(Some(value.get_vesting_contract_address().as_ref())) + } +} + impl NymConfigTemplate for Config { fn template() -> &'static str { CONFIG_TEMPLATE @@ -134,6 +144,10 @@ impl Config { save_formatted_config_to_file(self, config_save_location) } + pub fn get_network_details(&self) -> NymNetworkDetails { + self.into() + } + pub fn with_network_monitor_enabled(mut self, enabled: bool) -> Self { self.network_monitor.enabled = enabled; self diff --git a/nym-api/src/support/http/mod.rs b/nym-api/src/support/http/mod.rs index 572d1c281b..b21ccdb381 100644 --- a/nym-api/src/support/http/mod.rs +++ b/nym-api/src/support/http/mod.rs @@ -3,6 +3,8 @@ use crate::circulating_supply_api::cache::CirculatingSupplyCache; use crate::coconut::{self, comm::QueryCommunicationChannel, InternalSignRequest}; +use crate::network::models::NetworkDetails; +use crate::network::network_routes; use crate::node_status_api::{self, NodeStatusCache}; use crate::nym_contract_cache::cache::NymContractCache; use crate::support::config::Config; @@ -19,13 +21,15 @@ pub(crate) mod openapi; pub(crate) async fn setup_rocket( config: &Config, - mix_denom: String, + network_details: NetworkDetails, _nyxd_client: nyxd::Client, coconut_keypair: coconut::keypair::KeyPair, ) -> anyhow::Result> { let openapi_settings = rocket_okapi::settings::OpenApiSettings::default(); let mut rocket = rocket::build(); + let mix_denom = network_details.network.chain_details.mix_denom.base.clone(); + mount_endpoints_and_merged_docs! { rocket, "/v1".to_owned(), @@ -34,9 +38,11 @@ pub(crate) async fn setup_rocket( "" => circulating_supply_api::circulating_supply_routes(&openapi_settings), "" => nym_contract_cache::nym_contract_cache_routes(&openapi_settings), "/status" => node_status_api::node_status_routes(&openapi_settings, config.network_monitor.enabled), + "/network" => network_routes(&openapi_settings), } let rocket = rocket + .manage(network_details) .mount("/swagger", make_swagger_ui(&openapi::get_docs())) .attach(setup_cors()?) .attach(NymContractCache::stage()) diff --git a/nym-api/src/support/nyxd/mod.rs b/nym-api/src/support/nyxd/mod.rs index e35098ee1f..501be9e581 100644 --- a/nym-api/src/support/nyxd/mod.rs +++ b/nym-api/src/support/nyxd/mod.rs @@ -16,9 +16,9 @@ use nym_coconut_dkg_common::{ types::{EncodedBTEPublicKeyWithProof, Epoch, EpochId}, verification_key::{ContractVKShare, VerificationKeyShare}, }; -use nym_config::defaults::{ChainDetails, NymNetworkDetails, DEFAULT_NYM_API_PORT}; +use nym_config::defaults::ChainDetails; use nym_contracts_common::dealings::ContractSafeBytes; -use nym_mixnet_contract_common::families::{Family, FamilyHead}; +use nym_mixnet_contract_common::families::FamilyHead; use nym_mixnet_contract_common::mixnode::MixNodeDetails; use nym_mixnet_contract_common::reward_params::RewardingParams; use nym_mixnet_contract_common::{ @@ -27,31 +27,29 @@ use nym_mixnet_contract_common::{ }; use nym_name_service_common::msg::QueryMsg as NameServiceQueryMsg; use nym_service_provider_directory_common::msg::QueryMsg as SpQueryMsg; +use nym_validator_client::nyxd::contract_traits::{NameServiceQueryClient, PagedDkgQueryClient}; use nym_validator_client::nyxd::error::NyxdError; -use nym_validator_client::nyxd::traits::{ - MixnetQueryClient, MixnetSigningClient, SpDirectoryQueryClient, -}; use nym_validator_client::nyxd::{ - cosmwasm_client::types::ExecuteResult, - traits::{ + contract_traits::{ CoconutBandwidthQueryClient, DkgQueryClient, DkgSigningClient, GroupQueryClient, - MultisigQueryClient, MultisigSigningClient, NameServiceQueryClient, VestingQueryClient, + MixnetQueryClient, MixnetSigningClient, MultisigQueryClient, MultisigSigningClient, + NymContractsProvider, PagedMixnetQueryClient, PagedMultisigQueryClient, + PagedVestingQueryClient, SpDirectoryQueryClient, }, - Fee, + cosmwasm_client::types::ExecuteResult, + CosmWasmClient, Fee, }; use nym_validator_client::nyxd::{ hash::{Hash, SHA256_HASH_SIZE}, - AccountId, Coin, DirectSigningNyxdClient, TendermintTime, + AccountId, Coin, TendermintTime, }; -use nym_validator_client::ValidatorClientError; +use nym_validator_client::{nyxd, DirectSigningHttpRpcNyxdClient}; use nym_vesting_contract_common::AccountVestingCoins; use serde::Deserialize; use std::sync::Arc; -use tokio::sync::RwLock; +use tokio::sync::{RwLock, RwLockReadGuard}; -pub(crate) struct Client( - pub(crate) Arc>>, -); +pub(crate) struct Client(pub(crate) Arc>); impl Clone for Client { fn clone(&self) -> Self { @@ -61,45 +59,41 @@ impl Clone for Client { impl Client { pub(crate) fn new(config: &Config) -> Self { - // the api address is irrelevant here as **WE ARE THE API** - // and we won't be talking on the socket here. - let api_url = format!("http://localhost:{}", DEFAULT_NYM_API_PORT) - .parse() - .unwrap(); + let details = config.get_network_details(); let nyxd_url = config.get_nyxd_url(); - let details = NymNetworkDetails::new_from_env() - .with_mixnet_contract(Some(config.get_mixnet_contract_address().as_ref())) - .with_vesting_contract(Some(config.get_vesting_contract_address().as_ref())); - - let client_config = nym_validator_client::Config::try_from_nym_network_details(&details) - .expect("failed to construct valid validator client config with the provided network") - .with_urls(nyxd_url, api_url); + let client_config = nyxd::Config::try_from_nym_network_details(&details) + .expect("failed to construct valid validator client config with the provided network"); let mnemonic = config.get_mnemonic(); - let inner = nym_validator_client::Client::new_signing(client_config, mnemonic) - .expect("Failed to connect to nyxd!"); + let inner = DirectSigningHttpRpcNyxdClient::connect_with_mnemonic( + client_config, + nyxd_url.as_str(), + mnemonic, + ) + .expect("Failed to connect to nyxd!"); Client(Arc::new(RwLock::new(inner))) } + pub(crate) async fn read(&self) -> RwLockReadGuard<'_, DirectSigningHttpRpcNyxdClient> { + self.0.read().await + } + pub(crate) async fn client_address(&self) -> AccountId { - self.0.read().await.nyxd.address().clone() + self.0.read().await.address() } pub(crate) async fn chain_details(&self) -> ChainDetails { - self.0.read().await.nyxd.current_chain_details().clone() + self.0.read().await.current_chain_details().clone() } - pub(crate) async fn get_rewarding_validator_address( - &self, - ) -> Result { + pub(crate) async fn get_rewarding_validator_address(&self) -> Result { let cosmwasm_addr = self .0 .read() .await - .nyxd .get_mixnet_contract_state() .await? .rewarding_validator_address @@ -113,21 +107,13 @@ impl Client { cosmwasm_addr .clone() .parse() - .map_err(|_| NyxdError::MalformedAccountAddress(cosmwasm_addr).into()) + .map_err(|_| NyxdError::MalformedAccountAddress(cosmwasm_addr)) } // a helper function for the future to obtain the current block timestamp #[allow(dead_code)] - pub(crate) async fn current_block_timestamp( - &self, - ) -> Result { - let time = self - .0 - .read() - .await - .nyxd - .get_current_block_timestamp() - .await?; + pub(crate) async fn current_block_timestamp(&self) -> Result { + let time = self.0.read().await.get_current_block_timestamp().await?; Ok(time) } @@ -142,8 +128,8 @@ impl Client { pub(crate) async fn get_block_hash( &self, height: u32, - ) -> Result, ValidatorClientError> { - let hash = match self.0.read().await.nyxd.get_block_hash(height).await? { + ) -> Result, NyxdError> { + let hash = match self.0.read().await.get_block_hash(height).await? { Hash::Sha256(hash) => Some(hash), Hash::None => None, }; @@ -151,101 +137,78 @@ impl Client { Ok(hash) } - pub(crate) async fn get_mixnodes(&self) -> Result, ValidatorClientError> { - self.0.read().await.get_all_nyxd_mixnodes_detailed().await + pub(crate) async fn get_mixnodes(&self) -> Result, NyxdError> { + self.0.read().await.get_all_mixnodes_detailed().await } - pub(crate) async fn get_gateways(&self) -> Result, ValidatorClientError> { - self.0.read().await.get_all_nyxd_gateways().await + pub(crate) async fn get_gateways(&self) -> Result, NyxdError> { + self.0.read().await.get_all_gateways().await } - pub(crate) async fn get_current_interval( - &self, - ) -> Result { - Ok(self.0.read().await.get_current_interval_details().await?) + pub(crate) async fn get_current_interval(&self) -> Result { + self.0.read().await.get_current_interval_details().await } - pub(crate) async fn get_current_epoch_status( - &self, - ) -> Result { - Ok(self.0.read().await.nyxd.get_current_epoch_status().await?) + pub(crate) async fn get_current_epoch_status(&self) -> Result { + self.0.read().await.get_current_epoch_status().await } pub(crate) async fn get_current_rewarding_parameters( &self, - ) -> Result { - Ok(self.0.read().await.get_rewarding_parameters().await?) + ) -> Result { + self.0.read().await.get_rewarding_parameters().await } pub(crate) async fn get_rewarded_set_mixnodes( &self, - ) -> Result, ValidatorClientError> { - self.0 - .read() - .await - .get_all_nyxd_rewarded_set_mixnodes() - .await + ) -> Result, NyxdError> { + self.0.read().await.get_all_rewarded_set_mixnodes().await } - pub(crate) async fn get_current_vesting_account_storage_key( - &self, - ) -> Result { + pub(crate) async fn get_current_vesting_account_storage_key(&self) -> Result { let guard = self.0.read().await; - let vesting_contract = guard.nyxd.vesting_contract_address(); + + // the expect is fine as we always construct the client with the vesting contract explicitly set + let vesting_contract = guard + .vesting_contract_address() + .expect("vesting contract address is not available"); // TODO: I don't like the usage of the hardcoded value here let res = guard - .nyxd .query_contract_raw(vesting_contract, b"key".to_vec()) .await?; if res.is_empty() { return Ok(0); } - Ok(serde_json::from_slice(&res).map_err(NyxdError::from)?) + serde_json::from_slice(&res).map_err(NyxdError::from) } pub(crate) async fn get_all_vesting_coins( &self, - ) -> Result, ValidatorClientError> { - Ok(self - .0 - .read() - .await - .nyxd - .get_all_accounts_vesting_coins() - .await?) - } - - #[allow(dead_code)] - pub(crate) async fn get_all_node_families(&self) -> Result, ValidatorClientError> { - self.0.read().await.get_all_node_families().await + ) -> Result, NyxdError> { + self.0.read().await.get_all_accounts_vesting_coins().await } pub(crate) async fn get_all_family_members( &self, - ) -> Result, ValidatorClientError> { + ) -> Result, NyxdError> { self.0.read().await.get_all_family_members().await } - pub(crate) async fn get_pending_events_count(&self) -> Result { + pub(crate) async fn get_pending_events_count(&self) -> Result { let pending = self.0.read().await.get_number_of_pending_events().await?; Ok(pending.epoch_events + pending.interval_events) } - pub(crate) async fn begin_epoch_transition(&self) -> Result<(), ValidatorClientError> { - self.0 - .write() - .await - .nyxd - .begin_epoch_transition(None) - .await?; + pub(crate) async fn begin_epoch_transition(&self) -> Result<(), NyxdError> { + self.0.write().await.begin_epoch_transition(None).await?; Ok(()) } pub(crate) async fn send_rewarding_messages( &self, nodes: &[MixnodeWithPerformance], - ) -> Result<(), ValidatorClientError> { + ) -> Result<(), NyxdError> { // for some reason, compiler complains if this is explicitly inline in code ¯\_(ツ)_/¯ #[inline] #[allow(unused_variables)] @@ -265,16 +228,21 @@ impl Client { } } - let contract = self.0.read().await.get_mixnet_contract_address(); + // "technically" we don't need a write access to the client, + // but we REALLY don't want to accidentally send any transactions while we're sending rewarding messages + // as that would have messed up sequence numbers + let guard = self.0.write().await; + + // the expect is fine as we always construct the client with the mixnet contract explicitly set + let mixnet_contract = guard + .mixnet_contract_address() + .expect("mixnet contract address is not available"); let msgs = generate_reward_messages(nodes); - self.0 - .write() - .await - .nyxd + guard .execute_multiple( - &contract, + mixnet_contract, msgs, Default::default(), format!("rewarding {} mixnodes", nodes.len()), @@ -287,24 +255,19 @@ impl Client { &self, new_rewarded_set: Vec, expected_active_set_size: u32, - ) -> Result<(), ValidatorClientError> { + ) -> Result<(), NyxdError> { self.0 .write() .await - .nyxd .advance_current_epoch(new_rewarded_set, expected_active_set_size, None) .await?; Ok(()) } - pub(crate) async fn reconcile_epoch_events( - &self, - limit: Option, - ) -> Result<(), ValidatorClientError> { + pub(crate) async fn reconcile_epoch_events(&self, limit: Option) -> Result<(), NyxdError> { self.0 .write() .await - .nyxd .reconcile_epoch_events(limit, None) .await?; Ok(()) @@ -317,25 +280,22 @@ impl crate::coconut::client::Client for Client { self.client_address().await } - async fn get_tx( - &self, - tx_hash: &str, - ) -> crate::coconut::error::Result { + async fn get_tx(&self, tx_hash: &str) -> crate::coconut::error::Result { let tx_hash: Hash = tx_hash .parse() .map_err(|_| CoconutError::TxHashParseError)?; - Ok(self.0.read().await.nyxd.get_tx(tx_hash).await?) + Ok(self.0.read().await.get_tx(tx_hash).await?) } async fn get_proposal( &self, proposal_id: u64, ) -> crate::coconut::error::Result { - Ok(self.0.read().await.nyxd.get_proposal(proposal_id).await?) + Ok(self.0.read().await.query_proposal(proposal_id).await?) } async fn list_proposals(&self) -> crate::coconut::error::Result> { - Ok(self.0.read().await.nyxd.get_all_proposals().await?) + Ok(self.0.read().await.get_all_proposals().await?) } async fn get_spent_credential( @@ -346,48 +306,35 @@ impl crate::coconut::client::Client for Client { .0 .read() .await - .nyxd .get_spent_credential(blinded_serial_number) .await?) } async fn get_current_epoch(&self) -> crate::coconut::error::Result { - Ok(self.0.read().await.nyxd.get_current_epoch().await?) + Ok(self.0.read().await.get_current_epoch().await?) } async fn group_member(&self, addr: String) -> crate::coconut::error::Result { - Ok(self.0.read().await.nyxd.member(addr).await?) + Ok(self.0.read().await.member(addr, None).await?) } async fn get_current_epoch_threshold( &self, ) -> crate::coconut::error::Result> { - Ok(self - .0 - .read() - .await - .nyxd - .get_current_epoch_threshold() - .await?) + Ok(self.0.read().await.get_current_epoch_threshold().await?) } async fn get_initial_dealers( &self, ) -> crate::coconut::error::Result> { - Ok(self.0.read().await.nyxd.get_initial_dealers().await?) + Ok(self.0.read().await.get_initial_dealers().await?) } async fn get_self_registered_dealer_details( &self, ) -> crate::coconut::error::Result { let self_address = &self.address().await; - Ok(self - .0 - .read() - .await - .nyxd - .get_dealer_details(self_address) - .await?) + Ok(self.0.read().await.get_dealer_details(self_address).await?) } async fn get_current_dealers(&self) -> crate::coconut::error::Result> { @@ -398,7 +345,12 @@ impl crate::coconut::client::Client for Client { &self, idx: usize, ) -> crate::coconut::error::Result> { - Ok(self.0.read().await.get_all_epoch_dealings(idx).await?) + Ok(self + .0 + .read() + .await + .get_all_epoch_dealings(idx as u64) + .await?) } async fn get_verification_key_shares( @@ -422,7 +374,6 @@ impl crate::coconut::client::Client for Client { self.0 .read() .await - .nyxd .vote_proposal(proposal_id, vote_yes, fee) .await?; Ok(()) @@ -432,19 +383,13 @@ impl crate::coconut::client::Client for Client { self.0 .read() .await - .nyxd .execute_proposal(proposal_id, None) .await?; Ok(()) } async fn advance_epoch_state(&self) -> crate::coconut::error::Result<()> { - self.0 - .write() - .await - .nyxd - .advance_dkg_epoch_state(None) - .await?; + self.0.write().await.advance_dkg_epoch_state(None).await?; Ok(()) } @@ -458,7 +403,6 @@ impl crate::coconut::client::Client for Client { .0 .write() .await - .nyxd .register_dealer(bte_key, announce_address, resharing, None) .await?) } @@ -472,7 +416,6 @@ impl crate::coconut::client::Client for Client { .0 .write() .await - .nyxd .submit_dealing_bytes(dealing_bytes, resharing, None) .await?) } @@ -486,7 +429,6 @@ impl crate::coconut::client::Client for Client { .0 .write() .await - .nyxd .submit_verification_key_share(share, resharing, None) .await?) } @@ -498,7 +440,7 @@ impl DkgQueryClient for Client { where for<'a> T: Deserialize<'a>, { - self.0.read().await.nyxd.query_dkg_contract(query).await + self.0.read().await.query_dkg_contract(query).await } } @@ -514,7 +456,6 @@ impl SpDirectoryQueryClient for Client { self.0 .read() .await - .nyxd .query_service_provider_contract(query) .await } @@ -529,11 +470,6 @@ impl NameServiceQueryClient for Client { where for<'a> T: Deserialize<'a>, { - self.0 - .read() - .await - .nyxd - .query_name_service_contract(query) - .await + self.0.read().await.query_name_service_contract(query).await } } diff --git a/nym-api/tests/package-lock.json b/nym-api/tests/package-lock.json index 020a0426be..32e34a1256 100644 --- a/nym-api/tests/package-lock.json +++ b/nym-api/tests/package-lock.json @@ -103,9 +103,9 @@ } }, "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -158,9 +158,9 @@ } }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -2883,9 +2883,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -3653,9 +3653,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -4273,9 +4273,9 @@ "dev": true }, "node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -4758,9 +4758,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "engines": { "node": ">=0.10.0" } @@ -4918,9 +4918,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -4962,9 +4962,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -6970,9 +6970,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -7559,9 +7559,9 @@ }, "dependencies": { "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -7984,9 +7984,9 @@ "dev": true }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -8318,9 +8318,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==" }, "wrap-ansi": { "version": "7.0.0", diff --git a/nym-api/tests/yarn.lock b/nym-api/tests/yarn.lock index 9e5476cf80..2bcd113e3c 100644 --- a/nym-api/tests/yarn.lock +++ b/nym-api/tests/yarn.lock @@ -2566,16 +2566,16 @@ safe-buffer@~5.1.1: integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== semver@7.x, semver@^7.3.5, semver@^7.3.7: - version "7.3.7" - resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" semver@^6.0.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== shebang-command@^2.0.0: version "2.0.0" @@ -2866,9 +2866,9 @@ which@^2.0.1: isexe "^2.0.0" word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + version "1.2.5" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== wrap-ansi@^7.0.0: version "7.0.0" diff --git a/nym-connect/desktop/CHANGELOG.md b/nym-connect/desktop/CHANGELOG.md index 8a0b86151a..13f449269e 100644 --- a/nym-connect/desktop/CHANGELOG.md +++ b/nym-connect/desktop/CHANGELOG.md @@ -2,6 +2,14 @@ ## [Unreleased] +## [1.1.27] (2023-08-16) + +- Add a "Send us your feedback" section in NC (on the main screen) to collect user feedback using Sentry ([#3619]) +- NC native android - deploy on FDroid ([#3483]) + +[#3619]: https://github.com/nymtech/nym/issues/3619 +[#3483]: https://github.com/nymtech/nym/issues/3483 + ## [v1.1.16] (2023-08-08) - Uncouple network-requester <-> gateway in nym-connect and harbourmaster ([#3472]) diff --git a/nym-connect/desktop/Cargo.lock b/nym-connect/desktop/Cargo.lock index 6ef76b497a..51641a7a86 100644 --- a/nym-connect/desktop/Cargo.lock +++ b/nym-connect/desktop/Cargo.lock @@ -25,9 +25,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aead" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c192eb8f11fc081b0fe4259ba5af04217d4e0faddd02417310a927911abd7c8" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ "crypto-common", "generic-array 0.14.7", @@ -48,9 +48,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", "cipher 0.4.4", @@ -69,10 +69,21 @@ dependencies = [ ] [[package]] -name = "aho-corasick" -version = "0.7.20" +name = "ahash" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8f9420f797f2d9e935edf629310eb938a0d839f984e25327f3c7eed22300c" dependencies = [ "memchr", ] @@ -93,10 +104,80 @@ dependencies = [ ] [[package]] -name = "anyhow" -version = "1.0.70" +name = "allocator-api2" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" + +[[package]] +name = "anstyle-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +dependencies = [ + "anstyle", + "windows-sys 0.48.0", +] + +[[package]] +name = "anyhow" +version = "1.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" dependencies = [ "backtrace", ] @@ -115,19 +196,130 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] -name = "async-trait" -version = "0.1.67" +name = "async-broadcast" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ea188f25f0255d8f92797797c97ebf5631fa88178beb1a46fdf5622c9a00e4" +checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +dependencies = [ + "event-listener", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-executor" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +dependencies = [ + "async-lock", + "async-task", + "concurrent-queue", + "fastrand 1.9.0", + "futures-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock", + "autocfg", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-io" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +dependencies = [ + "async-lock", + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-lite", + "log", + "parking", + "polling", + "rustix 0.37.23", + "slab", + "socket2 0.4.9", + "waker-fn", +] + +[[package]] +name = "async-lock" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-process" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" +dependencies = [ + "async-io", + "async-lock", + "autocfg", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix 0.37.23", + "signal-hook", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-recursion" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.5", + "syn 2.0.28", +] + +[[package]] +name = "async-task" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" + +[[package]] +name = "async-trait" +version = "0.1.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.28", ] [[package]] @@ -151,7 +343,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] @@ -173,20 +365,10 @@ dependencies = [ ] [[package]] -name = "attohttpc" -version = "0.22.0" +name = "atomic-waker" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcf00bc6d5abb29b5f97e3c61a90b6d3caa12f3faf897d4a3e3607c050a35a7" -dependencies = [ - "flate2", - "http", - "log", - "native-tls", - "serde", - "serde_json", - "serde_urlencoded", - "url", -] +checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" [[package]] name = "atty" @@ -215,7 +397,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide 0.7.1", + "miniz_oxide", "object", "rustc-demangle", ] @@ -272,7 +454,7 @@ dependencies = [ "pbkdf2", "rand_core 0.6.4", "ripemd", - "sha2 0.10.6", + "sha2 0.10.7", "subtle 2.4.1", "zeroize", ] @@ -305,9 +487,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.0.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487f1e0fcbe47deb8b0574e646def1c903389d95241dd1bbcc6ce4a715dfc0c1" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "bitvec" @@ -335,12 +517,12 @@ dependencies = [ [[package]] name = "blake3" -version = "1.3.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" +checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" dependencies = [ "arrayref", - "arrayvec 0.7.2", + "arrayvec 0.7.4", "cc", "cfg-if", "constant_time_eq", @@ -371,6 +553,21 @@ dependencies = [ "generic-array 0.14.7", ] +[[package]] +name = "blocking" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +dependencies = [ + "async-channel", + "async-lock", + "async-task", + "atomic-waker", + "fastrand 1.9.0", + "futures-lite", + "log", +] + [[package]] name = "bls12_381" version = "0.5.0" @@ -438,14 +635,14 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" dependencies = [ - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] name = "bstr" -version = "1.4.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", "serde", @@ -453,9 +650,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "byte-tools" @@ -505,26 +702,27 @@ checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8" dependencies = [ "glib-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] name = "cargo_toml" -version = "0.13.3" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497049e9477329f8f6a559972ee42e117487d01d1e8c2cc9f836ea6fa23a9e1a" +checksum = "599aa35200ffff8f04c1925aa1acc92fa2e08874379ef42e210a80e527e60838" dependencies = [ "serde", - "toml 0.5.11", + "toml 0.7.6", ] [[package]] name = "cc" -version = "1.0.79" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -535,12 +733,13 @@ checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfb" -version = "0.6.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f89d248799e3f15f91b70917f65381062a01bb8e222700ea0e5a7ff9785f9c" +checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" dependencies = [ "byteorder", - "uuid 0.8.2", + "fnv", + "uuid 1.4.1", ] [[package]] @@ -554,11 +753,12 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.11.0" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0357a6402b295ca3a86bc148e84df46c02e41f41fef186bda662557ef6328aa" +checksum = "b40ccee03b5175c18cde8f37e7d2a33bcef6f8ec8f7cc0d81090d1bb380949c9" dependencies = [ "smallvec", + "target-lexicon", ] [[package]] @@ -579,9 +779,9 @@ dependencies = [ [[package]] name = "chacha20" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fc89c7c5b9e7a02dfe45cd2367bae382f9ed31c61ca8debe5f827c420a2f08" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", "cipher 0.4.4", @@ -601,6 +801,19 @@ dependencies = [ "zeroize", ] +[[package]] +name = "chrono" +version = "0.4.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "winapi", +] + [[package]] name = "cipher" version = "0.3.0" @@ -623,33 +836,41 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.11" +version = "4.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42dfd32784433290c51d92c438bb72ea5063797fc3cc9a21a8c4346bebbb2098" +checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd" dependencies = [ - "bitflags 2.0.2", + "clap_builder", "clap_derive", - "clap_lex", - "is-terminal", "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", "strsim", - "termcolor", ] [[package]] name = "clap_complete" -version = "4.1.5" +version = "4.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37686beaba5ac9f3ab01ee3172f792fc6ffdd685bfb9e63cfef02c0571a4e8e1" +checksum = "5fc443334c81a804575546c5a8a79b4913b50e28d69232903604cada1de817ce" dependencies = [ "clap", ] [[package]] name = "clap_complete_fig" -version = "4.1.2" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2171bc6242ad7a1801422bff039574449b5bd832b715222e500714ce10f91a54" +checksum = "99fee1d30a51305a6c2ed3fc5709be3c8af626c9c958e04dd9ae94e27bcbce9f" dependencies = [ "clap", "clap_complete", @@ -657,25 +878,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.1.9" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fddf67631444a3a3e3e5ac51c36a5e01335302de677bd78759eaa90ab1f46644" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ "heck 0.4.1", - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] name = "clap_lex" -version = "0.3.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033f6b7a4acb1f358c742aaca805c939ee73b4c6209ae4318ec7aca81c42e646" -dependencies = [ - "os_str_bytes", -] +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" [[package]] name = "cocoa" @@ -715,25 +932,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] -name = "colored" -version = "1.9.3" +name = "colorchoice" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "colored" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f741c91823341bebf717d4c71bda820630ce065443b58bd1b7451af008355" dependencies = [ - "atty", + "is-terminal", "lazy_static", "winapi", ] [[package]] name = "colored" -version = "2.0.0" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ - "atty", + "is-terminal", "lazy_static", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -747,16 +970,25 @@ dependencies = [ ] [[package]] -name = "const-oid" -version = "0.9.2" +name = "concurrent-queue" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-oid" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "constant_time_eq" -version = "0.2.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "convert_case" @@ -776,9 +1008,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "core-graphics" @@ -795,13 +1027,12 @@ dependencies = [ [[package]] name = "core-graphics-types" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" +checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" dependencies = [ "bitflags 1.3.2", "core-foundation", - "foreign-types", "libc", ] @@ -839,9 +1070,9 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d076a08ec01ed23c4396aca98ec73a38fa1fee5f310465add52b4108181c7a8" +checksum = "7e272708a9745dad8b591ef8a718571512130f2b39b33e3d7a27c558e3069394" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -852,9 +1083,9 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec361f3c09d7b41221948fc17be9b3c96cb58e55a02f82da36f888a651f2584" +checksum = "296db6a3caca5283425ae0cf347f4e46999ba3f6620dbea8939a0e00347831ce" dependencies = [ "syn 1.0.109", ] @@ -899,15 +1130,15 @@ dependencies = [ "schemars", "serde", "serde-json-wasm", - "sha2 0.10.6", + "sha2 0.10.7", "thiserror", ] [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -953,9 +1184,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ "cfg-if", "crossbeam-utils", @@ -974,14 +1205,14 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset", + "memoffset 0.9.0", "scopeguard", ] @@ -997,9 +1228,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -1078,12 +1309,12 @@ dependencies = [ [[package]] name = "cssparser-macros" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] @@ -1185,7 +1416,7 @@ dependencies = [ "cosmwasm-std", "cw2", "schemars", - "semver 1.0.17", + "semver 1.0.18", "serde", "thiserror", ] @@ -1247,9 +1478,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.13.4" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ "darling_core", "darling_macro", @@ -1257,51 +1488,40 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.13.4" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] name = "darling_macro" -version = "0.13.4" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] name = "dashmap" -version = "5.4.0" +version = "5.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" +checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" dependencies = [ "cfg-if", - "hashbrown 0.12.3", + "hashbrown 0.14.0", "lock_api", "once_cell", - "parking_lot_core 0.9.7", -] - -[[package]] -name = "dbus" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b" -dependencies = [ - "libc", - "libdbus-sys", - "winapi", + "parking_lot_core 0.9.8", ] [[package]] @@ -1311,7 +1531,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ "serde", - "uuid 1.3.0", + "uuid 1.4.1", ] [[package]] @@ -1326,14 +1546,23 @@ dependencies = [ [[package]] name = "der" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", ] +[[package]] +name = "deranged" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" +dependencies = [ + "serde", +] + [[package]] name = "derivative" version = "2.2.0" @@ -1470,30 +1699,30 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dtoa" -version = "0.4.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dtoa-short" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03329ae10e79ede66c9ce4dc930aa8599043b0743008548680f25b91502d6" +checksum = "dbaceec3c6e4211c79e7b1800fb9680527106beb2f9c51904a3210c03a448c74" dependencies = [ "dtoa", ] [[package]] name = "dunce" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" [[package]] name = "ecdsa" @@ -1513,7 +1742,7 @@ version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "der 0.7.7", + "der 0.7.8", "digest 0.10.7", "elliptic-curve 0.13.5", "rfc6979 0.4.0", @@ -1532,9 +1761,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb04eee5d9d907f29e80ee6b0e78f7e2c82342c63e3580d8c4f69d9d5aad963" +checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ "pkcs8 0.10.2", "signature 2.1.0", @@ -1584,9 +1813,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" @@ -1627,6 +1856,19 @@ dependencies = [ "zeroize", ] +[[package]] +name = "embed-resource" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7f1e82a60222fc67bfd50d752a9c89da5cce4c39ed39decc84a443b07bbd69a" +dependencies = [ + "cc", + "rustc_version", + "toml 0.7.6", + "vswhom", + "winreg 0.11.0", +] + [[package]] name = "embed_plist" version = "1.2.2" @@ -1653,13 +1895,34 @@ dependencies = [ [[package]] name = "enum-iterator-derive" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355f93763ef7b0ae1c43c4d8eccc9d5848d84ad1a1d8ce61c421d1ac85a19d05" +checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", +] + +[[package]] +name = "enumflags2" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.28", ] [[package]] @@ -1677,19 +1940,19 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.2.8" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" dependencies = [ "errno-dragonfly", "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -1728,12 +1991,27 @@ dependencies = [ ] [[package]] -name = "fern" -version = "0.6.1" +name = "fastrand" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd7b0849075e79ee9a1836df22c717d1eba30451796fdc631b04565dd11e2a" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + +[[package]] +name = "fdeflate" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" dependencies = [ - "colored 1.9.3", + "simd-adler32", +] + +[[package]] +name = "fern" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f0c14694cbd524c8720dd69b0e3179344f04ebb5f90f2e4a440c6ea3b2f1ee" +dependencies = [ + "colored 1.9.4", "log", ] @@ -1779,24 +2057,24 @@ dependencies = [ [[package]] name = "field-offset" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3cf3a800ff6e860c863ca6d4b16fd999db8b752819c1606884047b73e468535" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" dependencies = [ - "memoffset", + "memoffset 0.9.0", "rustc_version", ] [[package]] name = "filetime" -version = "0.2.20" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys 0.45.0", + "redox_syscall 0.3.5", + "windows-sys 0.48.0", ] [[package]] @@ -1822,12 +2100,12 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", - "miniz_oxide 0.6.2", + "miniz_oxide", ] [[package]] @@ -1849,7 +2127,7 @@ dependencies = [ "futures-core", "futures-sink", "pin-project", - "spin 0.9.6", + "spin 0.9.8", ] [[package]] @@ -1875,9 +2153,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -1906,9 +2184,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -1921,9 +2199,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -1931,15 +2209,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -1959,38 +2237,53 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + +[[package]] +name = "futures-lite" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +dependencies = [ + "fastrand 1.9.0", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] [[package]] name = "futures-macro" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] name = "futures-sink" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -2052,7 +2345,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] @@ -2069,7 +2362,21 @@ dependencies = [ "libc", "pango-sys", "pkg-config", - "system-deps 6.0.3", + "system-deps 6.1.1", +] + +[[package]] +name = "gdkwayland-sys" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cca49a59ad8cfdf36ef7330fe7bdfbe1d34323220cc16a0de2679ee773aee2c2" +dependencies = [ + "gdk-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps 6.1.1", ] [[package]] @@ -2081,21 +2388,21 @@ dependencies = [ "gdk-sys", "glib-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", "x11", ] [[package]] name = "generator" -version = "0.7.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a20a288a94683f5f4da0adecdbe095c94a77c295e514cc6484e9394dd8376e" +checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" dependencies = [ "cc", "libc", "log", "rustversion", - "windows 0.44.0", + "windows 0.48.0", ] [[package]] @@ -2189,7 +2496,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", "winapi", ] @@ -2228,9 +2535,9 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.15.11" +version = "0.15.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a68131a662b04931e71891fb14aaf65ee4b44d08e8abc10f49e77418c86c64" +checksum = "10c6ae9f6fa26f4fb2ac16b528d138d971ead56141de489f8111e259b9df3c4a" dependencies = [ "anyhow", "heck 0.4.1", @@ -2248,7 +2555,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4" dependencies = [ "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] @@ -2259,9 +2566,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ "aho-corasick", "bstr", @@ -2290,7 +2597,7 @@ checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a" dependencies = [ "glib-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] @@ -2377,14 +2684,14 @@ dependencies = [ "gobject-sys", "libc", "pango-sys", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] name = "gtk3-macros" -version = "0.15.4" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f518afe90c23fba585b2d7697856f9e6a7bbc62f65588035e66f6afb01a2e9" +checksum = "684c0456c086e8e7e9af73ec5b84e35938df394712054550e81558d21c44ab0d" dependencies = [ "anyhow", "proc-macro-crate", @@ -2396,9 +2703,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.16" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -2406,7 +2713,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.2", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -2433,7 +2740,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash", + "ahash 0.7.6", ] [[package]] @@ -2442,7 +2749,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.6", ] [[package]] @@ -2450,6 +2757,10 @@ name = "hashbrown" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +dependencies = [ + "ahash 0.8.3", + "allocator-api2", +] [[package]] name = "hashlink" @@ -2462,11 +2773,11 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69fe1fcf8b4278d860ad0548329f892a3631fb63f82574df68275f34cdbe0ffa" +checksum = "312f66718a2d7789ffef4f4b7b213138ed9f1eb3aa1d0d82fc99f88fb3ffd26f" dependencies = [ - "hashbrown 0.12.3", + "hashbrown 0.14.0", ] [[package]] @@ -2523,18 +2834,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -2619,7 +2921,7 @@ checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", - "itoa 1.0.6", + "itoa 1.0.9", ] [[package]] @@ -2647,9 +2949,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -2678,9 +2980,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.25" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -2691,9 +2993,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.6", + "itoa 1.0.9", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -2751,10 +3053,33 @@ dependencies = [ ] [[package]] -name = "ico" -version = "0.2.0" +name = "iana-time-zone" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031530fe562d8c8d71c0635013d6d155bbfe8ba0aa4b4d2d24ce8af6b71047bd" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows 0.48.0", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ico" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3804960be0bb5e4edb1e1ad67afd321a9ecfd875c3e65c099468fd2717d7cae" dependencies = [ "byteorder", "png", @@ -2768,9 +3093,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2778,11 +3103,10 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.18" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" +checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" dependencies = [ - "crossbeam-utils", "globset", "lazy_static", "log", @@ -2796,9 +3120,9 @@ dependencies = [ [[package]] name = "image" -version = "0.24.5" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b7ea949b537b0fd0af141fff8c77690f2ce96f4f41f042ccb6c69c6c965945" +checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" dependencies = [ "bytemuck", "byteorder", @@ -2815,9 +3139,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -2832,13 +3156,14 @@ checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ "equivalent", "hashbrown 0.14.0", + "serde", ] [[package]] name = "infer" -version = "0.7.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20b2b533137b9cad970793453d4f921c2e91312a6d88b1085c07bc15fc51bb3b" +checksum = "a898e4b7951673fce96614ce5751d13c40fc5674bc2d759288e46c3ab62598b3" dependencies = [ "cfb", ] @@ -2872,31 +3197,30 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.2", "libc", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "ipnet" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.5" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8687c819457e979cc940d09cb16e42a1bf70aa6b60a549de6d3a62a0ee90c69e" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", - "windows-sys 0.45.0", + "hermit-abi 0.3.2", + "rustix 0.38.8", + "windows-sys 0.48.0", ] [[package]] @@ -2916,9 +3240,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "javascriptcore-rs" @@ -2983,12 +3307,13 @@ dependencies = [ [[package]] name = "json-patch" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3fa5a61630976fc4c353c70297f2e93f1930e3ccee574d59d618ccbd5154ce" +checksum = "1f54898088ccb91df1b492cc80029a6fdf1c48ca0db7c6822a8babad69c94658" dependencies = [ "serde", "serde_json", + "thiserror", "treediff", ] @@ -3001,7 +3326,7 @@ dependencies = [ "cfg-if", "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] @@ -3014,7 +3339,7 @@ dependencies = [ "ecdsa 0.16.8", "elliptic-curve 0.13.5", "once_cell", - "sha2 0.10.6", + "sha2 0.10.7", "signature 2.1.0", ] @@ -3068,18 +3393,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.146" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" - -[[package]] -name = "libdbus-sys" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f8d7ae751e1cb825c840ae5e682f59b098cdfd213c350ac268b61449a5f58a0" -dependencies = [ - "pkg-config", -] +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libgit2-sys" @@ -3105,9 +3421,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" +checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "libsqlite3-sys" @@ -3122,9 +3438,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.8" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ "cc", "libc", @@ -3149,9 +3465,15 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "linux-raw-sys" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" [[package]] name = "lioness" @@ -3167,9 +3489,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -3177,11 +3499,10 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ - "cfg-if", "serde", ] @@ -3208,9 +3529,9 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] name = "mac-notification-sys" -version = "0.5.6" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e72d50edb17756489e79d52eb146927bec8eba9dd48faadf9ef08bca3791ad5" +checksum = "9402858e87f85f88bf518bd2e68450640df1c99b1ddb3ea28c4d5d823bb54cdd" dependencies = [ "cc", "dirs-next", @@ -3254,7 +3575,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] @@ -3271,9 +3592,18 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" -version = "0.8.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -3296,15 +3626,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -3312,18 +3633,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", + "simd-adler32", ] [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -3378,6 +3699,19 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +[[package]] +name = "nix" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.7.1", + "static_assertions", +] + [[package]] name = "nodrop" version = "0.1.14" @@ -3400,10 +3734,11 @@ version = "4.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bfa211d18e360f08e36c364308f394b5eb23a6629150690e109a916dc6f610e" dependencies = [ - "dbus", "log", "mac-notification-sys", + "serde", "tauri-winrt-notification", + "zbus", ] [[package]] @@ -3450,9 +3785,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", "libm", @@ -3460,11 +3795,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] @@ -3573,7 +3908,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.7", "sqlx 0.6.3", "tap", "thiserror", @@ -3650,13 +3985,13 @@ dependencies = [ "log", "nym-network-defaults", "serde", - "toml 0.7.4", + "toml 0.7.6", "url", ] [[package]] name = "nym-connect" -version = "1.1.16" +version = "1.1.17" dependencies = [ "anyhow", "bip39", @@ -3678,6 +4013,7 @@ dependencies = [ "nym-socks5-client-core", "nym-sphinx", "nym-task", + "nym-validator-client", "pretty_env_logger", "rand 0.8.5", "reqwest", @@ -3696,7 +4032,7 @@ dependencies = [ "thiserror", "time", "tokio", - "toml 0.7.4", + "toml 0.7.6", "ts-rs", "url", "yaml-rust", @@ -3720,7 +4056,7 @@ version = "0.1.0" dependencies = [ "async-trait", "log", - "sqlx 0.5.13", + "sqlx 0.5.11", "thiserror", "tokio", ] @@ -3742,7 +4078,7 @@ dependencies = [ name = "nym-crypto" version = "0.4.0" dependencies = [ - "aes 0.8.2", + "aes 0.8.3", "blake3", "bs58 0.4.0", "cipher 0.4.4", @@ -3786,9 +4122,9 @@ dependencies = [ name = "nym-explorer-api-requests" version = "0.1.0" dependencies = [ + "nym-api-requests", "nym-contracts-common", "nym-mixnet-contract-common", - "nym-validator-client", "schemars", "serde", ] @@ -3910,6 +4246,7 @@ dependencies = [ "dotenvy", "hex-literal", "once_cell", + "schemars", "serde", "thiserror", "url", @@ -4222,9 +4559,12 @@ dependencies = [ "async-trait", "base64 0.13.1", "bip39", - "colored 2.0.0", + "colored 2.0.4", "cosmrs", "cosmwasm-std", + "cw-controllers", + "cw-utils", + "cw2", "cw3", "cw4", "eyre", @@ -4255,6 +4595,7 @@ dependencies = [ "thiserror", "tokio", "url", + "wasmtimer", "zeroize", ] @@ -4320,9 +4661,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -4348,9 +4689,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.47" +version = "0.10.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b277f87dacc05a6b709965d1cbafac4649d6ce9f3ce9ceb88508b5666dfec9" +checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" dependencies = [ "bitflags 1.3.2", "cfg-if", @@ -4363,13 +4704,13 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] @@ -4380,20 +4721,19 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.26.0+1.1.1u" +version = "111.27.0+1.1.1v" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efc62c9f12b22b8f5208c23a7200a442b2e5999f8bdf80233852122b5a4f6f37" +checksum = "06e8f197c82d7511c5b014030c9b1efeda40d7d5f99d23b4ceed3524a5e63f02" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.82" +version = "0.9.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a95792af3c4e0153c3914df2261bedd30a98476f94dc892b67dfe1d89d433a04" +checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" dependencies = [ - "autocfg", "cc", "libc", "openssl-src", @@ -4407,6 +4747,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + [[package]] name = "os_info" version = "3.7.0" @@ -4418,12 +4768,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "os_str_bytes" -version = "6.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" - [[package]] name = "overload" version = "0.1.1" @@ -4470,9 +4814,15 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", ] +[[package]] +name = "parking" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" + [[package]] name = "parking_lot" version = "0.11.2" @@ -4491,7 +4841,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.7", + "parking_lot_core 0.9.8", ] [[package]] @@ -4503,29 +4853,29 @@ dependencies = [ "cfg-if", "instant", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "winapi", ] [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.3.5", "smallvec", - "windows-sys 0.45.0", + "windows-targets", ] [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pathdiff" @@ -4583,15 +4933,15 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.5.6" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cbd939b234e95d72bc393d51788aec68aeeb5d51e748ca08ff3aad58cb722f7" +checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" dependencies = [ "thiserror", "ucd-trie", @@ -4599,9 +4949,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.5.6" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a81186863f3d0a27340815be8f2078dd8050b14cd71913db9fbda795e5f707d7" +checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853" dependencies = [ "pest", "pest_generator", @@ -4609,26 +4959,26 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.5.6" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a1ef20bf3193c15ac345acb32e26b3dc3223aff4d77ae4fc5359567683796b" +checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] name = "pest_meta" -version = "2.5.6" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e3b284b1f13a20dc5ebc90aff59a51b8d7137c221131b52a7260c08cbc1cc80" +checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" dependencies = [ "once_cell", "pest", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] @@ -4731,29 +5081,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" [[package]] name = "pin-utils" @@ -4777,40 +5127,57 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.7", + "der 0.7.8", "spki 0.7.2", ] [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plist" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590" +checksum = "bdc0001cfea3db57a2e24bc0d818e9e20e554b5f97fabb9bc231dc240269ae06" dependencies = [ "base64 0.21.2", - "indexmap 1.9.2", + "indexmap 1.9.3", "line-wrap", - "quick-xml 0.28.1", + "quick-xml 0.29.0", "serde", "time", ] [[package]] name = "png" -version = "0.17.7" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" +checksum = "59871cc5b6cce7eaccca5a802b4173377a1c2ba90654246789a8fa2334426d11" dependencies = [ "bitflags 1.3.2", "crc32fast", + "fdeflate", "flate2", - "miniz_oxide 0.6.2", + "miniz_oxide", +] + +[[package]] +name = "polling" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +dependencies = [ + "autocfg", + "bitflags 1.3.2", + "cfg-if", + "concurrent-queue", + "libc", + "log", + "pin-project-lite", + "windows-sys 0.48.0", ] [[package]] @@ -4888,9 +5255,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.53" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -4950,18 +5317,18 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c1a97b1bc42b1d550bfb48d4262153fe400a12bab1511821736f7eac76d7e2" +checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.26" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] @@ -5065,9 +5432,9 @@ dependencies = [ [[package]] name = "raw-window-handle" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f851a03551ceefd30132e447f07f96cb7011d6b658374f3aed847333adb5559" +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "rayon" @@ -5100,6 +5467,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -5107,19 +5483,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom 0.2.10", - "redox_syscall", + "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.7.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce168fea28d3e05f158bda4576cf0c844d5045bc2cc3620fa0292ed5bb5814c" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-automata 0.3.6", + "regex-syntax 0.7.4", ] [[package]] @@ -5128,7 +5505,18 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "regex-syntax", + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.7.4", ] [[package]] @@ -5137,6 +5525,12 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +[[package]] +name = "regex-syntax" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" + [[package]] name = "reqwest" version = "0.11.18" @@ -5167,12 +5561,14 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-socks", + "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", - "winreg", + "winreg 0.10.1", ] [[package]] @@ -5246,9 +5642,9 @@ dependencies = [ [[package]] name = "rust-embed" -version = "6.6.0" +version = "6.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb133b9a38b5543fad3807fb2028ea47c5f2b566f4f5e28a11902f1a358348b6" +checksum = "a36224c3276f8c4ebc8c20f158eca7ca4359c8db89991c4925132aaaf6702661" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -5257,25 +5653,25 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "6.5.0" +version = "6.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4e0f0ced47ded9a68374ac145edd65a6c1fa13a96447b873660b2a568a0fd7" +checksum = "49b94b81e5b2c284684141a2fb9e2a31be90638caf040bf9afbc5a0416afe1ac" dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 1.0.109", + "syn 2.0.28", "walkdir", ] [[package]] name = "rust-embed-utils" -version = "7.5.0" +version = "7.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512b0ab6853f7e14e3c8754acb43d6f748bb9ced66aa5915a6553ac8213f7731" +checksum = "9d38ff6bf570dc3bb7100fce9f7b60c33fa71d80e88da3f2580df4ff2bdded74" dependencies = [ "globset", - "sha2 0.10.6", + "sha2 0.10.7", "walkdir", ] @@ -5291,21 +5687,34 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver 1.0.18", ] [[package]] name = "rustix" -version = "0.36.11" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", - "windows-sys 0.45.0", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +dependencies = [ + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys 0.4.5", + "windows-sys 0.48.0", ] [[package]] @@ -5347,24 +5756,24 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ "base64 0.21.2", ] [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safemem" @@ -5383,11 +5792,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -5397,7 +5806,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" dependencies = [ "dyn-clone", - "indexmap 1.9.2", + "indexmap 1.9.3", "schemars_derive", "serde", "serde_json", @@ -5423,9 +5832,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -5468,7 +5877,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct 0.2.0", - "der 0.7.7", + "der 0.7.8", "generic-array 0.14.7", "pkcs8 0.10.2", "subtle 2.4.1", @@ -5477,9 +5886,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.8.2" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -5490,9 +5899,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.8.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -5529,9 +5938,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" dependencies = [ "serde", ] @@ -5672,14 +6081,14 @@ dependencies = [ "thiserror", "time", "url", - "uuid 1.3.0", + "uuid 1.4.1", ] [[package]] name = "serde" -version = "1.0.158" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" +checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" dependencies = [ "serde_derive", ] @@ -5695,22 +6104,22 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.158" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" +checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" dependencies = [ "proc-macro2", "quote", - "syn 2.0.5", + "syn 2.0.28", ] [[package]] @@ -5726,24 +6135,24 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.94" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" dependencies = [ - "itoa 1.0.6", + "itoa 1.0.9", "ryu", "serde", ] [[package]] name = "serde_repr" -version = "0.1.12" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.5", + "syn 2.0.28", ] [[package]] @@ -5762,31 +6171,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.6", + "itoa 1.0.9", "ryu", "serde", ] [[package]] name = "serde_with" -version = "1.14.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" +checksum = "1402f54f9a3b9e2efe71c1cea24e648acce55887983553eeb858cf3115acfd49" dependencies = [ + "base64 0.21.2", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.0.0", "serde", + "serde_json", "serde_with_macros", + "time", ] [[package]] name = "serde_with_macros" -version = "1.5.2" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" +checksum = "9197f1ad0e3c173a0222d3c4404fb04c3afe87e962bcb327af73e8301fa203c7" dependencies = [ "darling", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] @@ -5860,9 +6276,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", @@ -5878,6 +6294,16 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -5907,6 +6333,12 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "siphasher" version = "0.3.10" @@ -5924,9 +6356,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "socket2" @@ -5938,6 +6370,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "soup2" version = "0.2.1" @@ -5998,9 +6440,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.6" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5d6e0250b93c8427a177b849d144a96d5acc57006149479403d7861ab721e34" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" dependencies = [ "lock_api", ] @@ -6022,7 +6464,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.7", + "der 0.7.8", ] [[package]] @@ -6049,9 +6491,9 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.5.13" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551873805652ba0d912fec5bbb0f8b4cdd96baf8e2ebf5970e5671092966019b" +checksum = "fc15591eb44ffb5816a4a70a7efd5dd87bfd3aa84c4c200401c4396140525826" dependencies = [ "sqlx-core 0.5.13", "sqlx-macros 0.5.13", @@ -6073,7 +6515,7 @@ version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48c61941ccf5ddcada342cd59e3e5173b007c509e1e8e990dafc830294d9dc5" dependencies = [ - "ahash", + "ahash 0.7.6", "atoi 0.4.0", "bitflags 1.3.2", "byteorder", @@ -6090,8 +6532,8 @@ dependencies = [ "futures-util", "hashlink 0.7.0", "hex", - "indexmap 1.9.2", - "itoa 1.0.6", + "indexmap 1.9.3", + "itoa 1.0.9", "libc", "libsqlite3-sys", "log", @@ -6100,7 +6542,7 @@ dependencies = [ "paste", "percent-encoding", "rustls 0.19.1", - "sha2 0.10.6", + "sha2 0.10.7", "smallvec", "sqlformat 0.1.8", "sqlx-rt 0.5.13", @@ -6118,7 +6560,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029" dependencies = [ - "ahash", + "ahash 0.7.6", "atoi 1.0.0", "bitflags 1.3.2", "byteorder", @@ -6134,10 +6576,10 @@ dependencies = [ "futures-executor", "futures-intrusive", "futures-util", - "hashlink 0.8.1", + "hashlink 0.8.3", "hex", - "indexmap 1.9.2", - "itoa 1.0.6", + "indexmap 1.9.3", + "itoa 1.0.9", "libc", "libsqlite3-sys", "log", @@ -6147,7 +6589,7 @@ dependencies = [ "percent-encoding", "rustls 0.20.8", "rustls-pemfile", - "sha2 0.10.6", + "sha2 0.10.7", "smallvec", "sqlformat 0.2.1", "sqlx-rt 0.6.3", @@ -6170,7 +6612,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "sha2 0.10.6", + "sha2 0.10.7", "sqlx-core 0.5.13", "sqlx-rt 0.5.13", "syn 1.0.109", @@ -6189,7 +6631,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "sha2 0.10.6", + "sha2 0.10.7", "sqlx-core 0.6.3", "sqlx-rt 0.6.3", "syn 1.0.109", @@ -6233,6 +6675,12 @@ dependencies = [ "loom", ] +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "string_cache" version = "0.8.7" @@ -6261,9 +6709,9 @@ dependencies = [ [[package]] name = "stringprep" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" +checksum = "db3737bde7edce97102e0e2b15365bf7a20bfdb5f60f4f9e8d7004258a51a8da" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -6284,27 +6732,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "strum" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb" -dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "subtle" version = "1.0.0" @@ -6345,27 +6772,15 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.5" +version = "2.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89c2d1c76a26822187a1fbb5964e3fff108bc208f02e820ab9dac1234f6b388a" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] - [[package]] name = "system-deps" version = "5.0.0" @@ -6381,22 +6796,22 @@ dependencies = [ [[package]] name = "system-deps" -version = "6.0.3" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2955b1fe31e1fa2fbd1976b71cc69a606d7d4da16f6de3333d0c92d51419aeff" +checksum = "30c2de8a4d8f4b823d634affc9cd2a74ec98c53a756f317e529a48046cbf71f3" dependencies = [ - "cfg-expr 0.11.0", + "cfg-expr 0.15.4", "heck 0.4.1", "pkg-config", - "toml 0.5.11", + "toml 0.7.6", "version-compare 0.1.1", ] [[package]] name = "tao" -version = "0.15.8" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac8e6399427c8494f9849b58694754d7cc741293348a6836b6c8d2c5aa82d8e6" +checksum = "6a6d198e01085564cea63e976ad1566c1ba2c2e4cc79578e35d9f05521505e31" dependencies = [ "bitflags 1.3.2", "cairo-rs", @@ -6410,6 +6825,7 @@ dependencies = [ "gdk", "gdk-pixbuf", "gdk-sys", + "gdkwayland-sys", "gdkx11-sys", "gio", "glib", @@ -6428,18 +6844,29 @@ dependencies = [ "objc", "once_cell", "parking_lot 0.12.1", - "paste", "png", "raw-window-handle", "scopeguard", "serde", + "tao-macros", "unicode-segmentation", - "uuid 1.3.0", + "uuid 1.4.1", "windows 0.39.0", "windows-implement", "x11-dl", ] +[[package]] +name = "tao-macros" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec114582505d158b669b136e6851f85840c109819d77c42bb7c0709f727d18c2" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "tap" version = "1.0.1" @@ -6448,9 +6875,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" dependencies = [ "filetime", "libc", @@ -6458,14 +6885,20 @@ dependencies = [ ] [[package]] -name = "tauri" -version = "1.2.4" +name = "target-lexicon" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7e0f1d535e7cbbbab43c82be4fc992b84f9156c16c160955617e0260ebc449" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" + +[[package]] +name = "tauri" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fbe522898e35407a8e60dc3870f7579fea2fc262a6a6072eccdd37ae1e1d91e" dependencies = [ "anyhow", - "attohttpc", - "base64 0.13.1", + "base64 0.21.2", + "bytes", "cocoa", "dirs-next", "embed_plist", @@ -6487,8 +6920,9 @@ dependencies = [ "rand 0.8.5", "raw-window-handle", "regex", + "reqwest", "rfd", - "semver 1.0.17", + "semver 1.0.18", "serde", "serde_json", "serde_repr", @@ -6504,7 +6938,7 @@ dependencies = [ "time", "tokio", "url", - "uuid 1.3.0", + "uuid 1.4.1", "webkit2gtk", "webview2-com", "windows 0.39.0", @@ -6513,27 +6947,28 @@ dependencies = [ [[package]] name = "tauri-build" -version = "1.2.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8807c85d656b2b93927c19fe5a5f1f1f348f96c2de8b90763b3c2d561511f9b4" +checksum = "7d2edd6a259b5591c8efdeb9d5702cb53515b82a6affebd55c7fd6d3a27b7d1b" dependencies = [ "anyhow", "cargo_toml", "heck 0.4.1", "json-patch", - "semver 1.0.17", + "semver 1.0.18", + "serde", "serde_json", "tauri-utils", - "winres", + "tauri-winres", ] [[package]] name = "tauri-codegen" -version = "1.2.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14388d484b6b1b5dc0f6a7d6cc6433b3b230bec85eaa576adcdf3f9fafa49251" +checksum = "54ad2d49fdeab4a08717f5b49a163bdc72efc3b1950b6758245fcde79b645e1a" dependencies = [ - "base64 0.13.1", + "base64 0.21.2", "brotli", "ico", "json-patch", @@ -6542,22 +6977,22 @@ dependencies = [ "proc-macro2", "quote", "regex", - "semver 1.0.17", + "semver 1.0.18", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.7", "tauri-utils", "thiserror", "time", - "uuid 1.3.0", + "uuid 1.4.1", "walkdir", ] [[package]] name = "tauri-macros" -version = "1.2.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069319e5ecbe653a799b94b0690d9f9bf5d00f7b1d3989aa331c524d4e354075" +checksum = "8eb12a2454e747896929338d93b0642144bb51e0dddbb36e579035731f0d76b7" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -6569,9 +7004,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "0.12.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c507d954d08ac8705d235bc70ec6975b9054fb95ff7823af72dbb04186596f3b" +checksum = "108683199cb18f96d2d4134187bb789964143c845d2d154848dda209191fd769" dependencies = [ "gtk", "http", @@ -6582,16 +7017,17 @@ dependencies = [ "serde_json", "tauri-utils", "thiserror", - "uuid 1.3.0", + "url", + "uuid 1.4.1", "webview2-com", "windows 0.39.0", ] [[package]] name = "tauri-runtime-wry" -version = "0.12.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36b1c5764a41a13176a4599b5b7bd0881bea7d94dfe45e1e755f789b98317e30" +checksum = "0b7aa256a1407a3a091b5d843eccc1a5042289baf0a43d1179d9f0fcfea37c1b" dependencies = [ "cocoa", "gtk", @@ -6600,7 +7036,7 @@ dependencies = [ "raw-window-handle", "tauri-runtime", "tauri-utils", - "uuid 1.3.0", + "uuid 1.4.1", "webkit2gtk", "webview2-com", "windows 0.39.0", @@ -6609,12 +7045,13 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "1.2.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5abbc109a6eb45127956ffcc26ef0e875d160150ac16cfa45d26a6b2871686f1" +checksum = "03fc02bb6072bb397e1d473c6f76c953cda48b4a2d0cce605df284aa74a12e84" dependencies = [ "brotli", "ctor", + "dunce", "glob", "heck 0.4.1", "html5ever", @@ -6625,7 +7062,7 @@ dependencies = [ "phf 0.10.1", "proc-macro2", "quote", - "semver 1.0.17", + "semver 1.0.18", "serde", "serde_json", "serde_with", @@ -6636,27 +7073,36 @@ dependencies = [ ] [[package]] -name = "tauri-winrt-notification" -version = "0.1.0" +name = "tauri-winres" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58de036c4d2e20717024de2a3c4bf56c301f07b21bc8ef9b57189fce06f1f3b" +checksum = "5993dc129e544393574288923d1ec447c857f3f644187f4fbf7d9a875fbfc4fb" +dependencies = [ + "embed-resource", + "toml 0.7.6", +] + +[[package]] +name = "tauri-winrt-notification" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f5bff1d532fead7c43324a0fa33643b8621a47ce2944a633be4cb6c0240898f" dependencies = [ "quick-xml 0.23.1", - "strum", "windows 0.39.0", ] [[package]] name = "tempfile" -version = "3.4.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" dependencies = [ "cfg-if", - "fastrand", - "redox_syscall", - "rustix", - "windows-sys 0.42.0", + "fastrand 2.0.0", + "redox_syscall 0.3.5", + "rustix 0.38.8", + "windows-sys 0.48.0", ] [[package]] @@ -6667,7 +7113,7 @@ checksum = "3f0a7d05cf78524782337f8edd55cbc578d159a16ad4affe2135c92f7dbac7f0" dependencies = [ "bytes", "digest 0.10.7", - "ed25519 2.2.1", + "ed25519 2.2.2", "ed25519-consensus", "flex-error", "futures", @@ -6681,7 +7127,7 @@ dependencies = [ "serde_bytes", "serde_json", "serde_repr", - "sha2 0.10.6", + "sha2 0.10.7", "signature 2.1.0", "subtle 2.4.1", "subtle-encoding", @@ -6739,7 +7185,7 @@ dependencies = [ "hyper-rustls", "peg", "pin-project", - "semver 1.0.17", + "semver 1.0.18", "serde", "serde_bytes", "serde_json", @@ -6785,22 +7231,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn 2.0.5", + "syn 2.0.28", ] [[package]] @@ -6815,11 +7261,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.20" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" dependencies = [ - "itoa 1.0.6", + "deranged", + "itoa 1.0.9", "js-sys", "libc", "num_threads", @@ -6830,15 +7277,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" dependencies = [ "time-core", ] @@ -6860,32 +7307,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.26.0" +version = "1.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +checksum = "40de3a2ba249dcb097e01be5e67a5ff53cf250397715a071a81543e8a832a920" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.3", "tokio-macros", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] @@ -6934,9 +7380,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -6959,9 +7405,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -6983,9 +7429,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" dependencies = [ "serde", "serde_spanned", @@ -7004,9 +7450,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.12" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ "indexmap 2.0.0", "serde", @@ -7035,20 +7481,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", "valuable", @@ -7067,9 +7513,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ "matchers", "nu-ansi-term", @@ -7085,9 +7531,9 @@ dependencies = [ [[package]] name = "treediff" -version = "3.0.2" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "761e8d5ad7ce14bb82b7e61ccc0ca961005a275a060b9644a2431aa11553c2ff" +checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303" dependencies = [ "serde_json", ] @@ -7149,9 +7595,19 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + +[[package]] +name = "uds_windows" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce65604324d3cce9b966701489fbd0cf318cb1f7bd9dd07ac9a4ee6fb791930d" +dependencies = [ + "tempfile", + "winapi", +] [[package]] name = "uname" @@ -7170,9 +7626,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -7189,12 +7645,6 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - [[package]] name = "unicode_categories" version = "0.1.1" @@ -7203,9 +7653,9 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] name = "universal-hash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3160b73c9a19f7e2939a2fdad446c57c1bbbbf4d919d3213ff1267a580d8b5" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", "subtle 2.4.1", @@ -7232,9 +7682,9 @@ dependencies = [ [[package]] name = "url" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna", @@ -7262,9 +7712,9 @@ checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" [[package]] name = "uuid" -version = "1.3.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ "getrandom 0.2.10", "serde", @@ -7317,6 +7767,26 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "vswhom" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" +dependencies = [ + "libc", + "vswhom-sys", +] + +[[package]] +name = "vswhom-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3b17ae1f6c8a2b28506cd96d412eebf83b4a0ff2cbefeeb952f2f9dfa44ba18" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "vte" version = "0.10.1" @@ -7338,6 +7808,12 @@ dependencies = [ "quote", ] +[[package]] +name = "waker-fn" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" + [[package]] name = "walkdir" version = "2.3.3" @@ -7350,11 +7826,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -7436,6 +7911,19 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +[[package]] +name = "wasm-streams" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wasm-utils" version = "0.1.0" @@ -7517,7 +8005,7 @@ dependencies = [ "pango-sys", "pkg-config", "soup2-sys", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] @@ -7656,11 +8144,11 @@ dependencies = [ [[package]] name = "windows" -version = "0.44.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.42.2", + "windows-targets", ] [[package]] @@ -7704,44 +8192,20 @@ dependencies = [ "windows_x86_64_msvc 0.42.2", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.42.2" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-targets" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm 0.48.0", "windows_aarch64_msvc 0.48.0", @@ -7904,9 +8368,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "5504cc7644f4b593cbc05c4a55bf9bd4e94b867c3c0bd440934174d50482427d" dependencies = [ "memchr", ] @@ -7921,19 +8385,20 @@ dependencies = [ ] [[package]] -name = "winres" -version = "0.1.12" +name = "winreg" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c" +checksum = "76a1a57ff50e9b408431e8f97d5456f2807f8eb2a2cd79b06068fc87f8ecf189" dependencies = [ - "toml 0.5.11", + "cfg-if", + "winapi", ] [[package]] name = "wry" -version = "0.23.4" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c1ad8e2424f554cc5bdebe8aa374ef5b433feff817aebabca0389961fc7ef98" +checksum = "33748f35413c8a98d45f7a08832d848c0c5915501803d1faade5a4ebcd258cea" dependencies = [ "base64 0.13.1", "block", @@ -7955,7 +8420,7 @@ dependencies = [ "once_cell", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.7", "soup2", "tao", "thiserror", @@ -8010,13 +8475,23 @@ dependencies = [ [[package]] name = "xattr" -version = "0.2.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", ] +[[package]] +name = "xdg-home" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" +dependencies = [ + "nix", + "winapi", +] + [[package]] name = "yaml-rust" version = "0.4.5" @@ -8026,6 +8501,72 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "zbus" +version = "3.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948" +dependencies = [ + "async-broadcast", + "async-executor", + "async-fs", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "byteorder", + "derivative", + "enumflags2", + "event-listener", + "futures-core", + "futures-sink", + "futures-util", + "hex", + "nix", + "once_cell", + "ordered-stream", + "rand 0.8.5", + "serde", + "serde_repr", + "sha1", + "static_assertions", + "tracing", + "uds_windows", + "winapi", + "xdg-home", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "3.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d1794a946878c0e807f55a397187c11fc7a038ba5d868e7db4f3bd7760bc9d" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" +dependencies = [ + "serde", + "static_assertions", + "zvariant", +] + [[package]] name = "zeroize" version = "1.6.0" @@ -8037,23 +8578,60 @@ dependencies = [ [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure", + "syn 2.0.28", ] [[package]] name = "zip" -version = "0.6.4" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0445d0fbc924bb93539b4316c11afb121ea39296f99a3c4c9edad09e3658cdef" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ "byteorder", "crc32fast", "crossbeam-utils", ] + +[[package]] +name = "zvariant" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" +dependencies = [ + "byteorder", + "enumflags2", + "libc", + "serde", + "static_assertions", + "zvariant_derive", +] + +[[package]] +name = "zvariant_derive" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] diff --git a/nym-connect/desktop/package.json b/nym-connect/desktop/package.json index 96d9e83438..30612c08fe 100644 --- a/nym-connect/desktop/package.json +++ b/nym-connect/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@nym/nym-connect", - "version": "1.1.16", + "version": "1.1.17", "main": "index.js", "license": "MIT", "scripts": { @@ -47,7 +47,7 @@ "react-markdown": "^8.0.4", "react-router-dom": "^6.7.0", "semver": "^6.3.0", - "yup": "^0.32.9" + "yup": "^1.2.0" }, "devDependencies": { "@babel/core": "^7.15.0", diff --git a/nym-connect/desktop/src-tauri/Cargo.toml b/nym-connect/desktop/src-tauri/Cargo.toml index 0d1089132d..192b1bb391 100644 --- a/nym-connect/desktop/src-tauri/Cargo.toml +++ b/nym-connect/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-connect" -version = "1.1.16" +version = "1.1.17" description = "nym-connect" authors = ["Nym Technologies SA"] license = "" @@ -30,7 +30,7 @@ itertools = "0.10.5" log = { version = "0.4", features = ["serde"] } pretty_env_logger = "0.4.0" rand = "0.8" -reqwest = { version = "0.11", features = ["json", "socks"] } +reqwest = { version = "0.11.18", features = ["json", "socks"] } rust-embed = { version = "6.4.2", features = ["include-exclude"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" @@ -41,7 +41,7 @@ tauri = { version = "^1.2.2", features = ["clipboard-write-text", "macos-private thiserror = "1.0" time = { version = "0.3.17", features = ["local-offset"] } tokio = { version = "1.24.1", features = ["sync", "time"] } -url = "2.2" +url = "2.4" yaml-rust = "0.4" toml = "0.7" sentry = { version = "0.31.5", features = [ "anyhow" ] } @@ -58,6 +58,7 @@ nym-bin-common = { path = "../../../common/bin-common"} nym-socks5-client-core = { path = "../../../common/socks5-client-core" } nym-sphinx = { path = "../../../common/nymsphinx" } nym-task = { path = "../../../common/task" } +nym-validator-client = { path = "../../../common/client-libs/validator-client" } [dev-dependencies] ts-rs = "6.1.2" diff --git a/nym-connect/desktop/src-tauri/src/config/mod.rs b/nym-connect/desktop/src-tauri/src/config/mod.rs index f2cbff0d46..b65abc70d1 100644 --- a/nym-connect/desktop/src-tauri/src/config/mod.rs +++ b/nym-connect/desktop/src-tauri/src/config/mod.rs @@ -183,13 +183,14 @@ pub async fn init_socks5_config(provider_address: String, chosen_gateway_id: Str let details_store = OnDiskGatewayDetails::new(&config.storage_paths.common_paths.gateway_details); let init_details = nym_client_core::init::setup_gateway( - &gateway_setup, + gateway_setup, &key_store, &details_store, register_gateway, Some(&config.core.base.client.nym_api_urls), ) - .await?; + .await? + .details; config.save_to_default_location().tap_err(|_| { log::error!("Failed to save the config file"); diff --git a/nym-connect/desktop/src-tauri/src/error.rs b/nym-connect/desktop/src-tauri/src/error.rs index 651e741aea..1f3b38864b 100644 --- a/nym-connect/desktop/src-tauri/src/error.rs +++ b/nym-connect/desktop/src-tauri/src/error.rs @@ -45,6 +45,21 @@ pub enum BackendError { #[from] source: crate::operations::growth::api_client::ApiClientError, }, + #[error("{source}")] + EnvError { + #[from] + source: std::env::VarError, + }, + #[error("{source}")] + UrlError { + #[from] + source: url::ParseError, + }, + #[error("{source}")] + APIError { + #[from] + source: nym_validator_client::nym_api::error::NymAPIError, + }, #[error("could not send disconnect signal to the SOCKS5 client")] CoundNotSendDisconnectSignal, diff --git a/nym-connect/desktop/src-tauri/src/main.rs b/nym-connect/desktop/src-tauri/src/main.rs index 12c7ad06ac..32a6758239 100644 --- a/nym-connect/desktop/src-tauri/src/main.rs +++ b/nym-connect/desktop/src-tauri/src/main.rs @@ -4,6 +4,7 @@ )] use std::env; +use std::path::PathBuf; use std::sync::Arc; use nym_config::defaults::setup_env; @@ -30,7 +31,8 @@ mod window; fn main() { dotenvy::dotenv().ok(); - setup_env(None); + + setup_env(env::args().nth(1).map(PathBuf::from).as_ref()); println!("Starting up..."); // As per breaking change description here diff --git a/nym-connect/desktop/src-tauri/src/operations/connection/health_check.rs b/nym-connect/desktop/src-tauri/src/operations/connection/health_check.rs index 52b47057b1..8344b5805b 100644 --- a/nym-connect/desktop/src-tauri/src/operations/connection/health_check.rs +++ b/nym-connect/desktop/src-tauri/src/operations/connection/health_check.rs @@ -1,6 +1,8 @@ +use crate::operations::directory::WELLKNOWN_DIR; +use nym_config::defaults::var_names::NETWORK_NAME; use serde::{Deserialize, Serialize}; -static HEALTH_CHECK_URL: &str = "https://nymtech.net/.wellknown/connect/healthcheck.json"; +static HEALTH_CHECK_URL: &str = "connect/healthcheck.json"; #[derive(Serialize, Deserialize, Debug)] struct ConnectionSuccess { @@ -9,7 +11,9 @@ struct ConnectionSuccess { pub async fn run_health_check() -> bool { log::info!("Running network health check"); - match crate::operations::http::socks5_get::<_, ConnectionSuccess>(HEALTH_CHECK_URL).await { + let network_name = std::env::var(NETWORK_NAME).expect("network name not set"); + let url = format!("{}/{}/{}", WELLKNOWN_DIR, network_name, HEALTH_CHECK_URL); + match crate::operations::http::socks5_get::<_, ConnectionSuccess>(url).await { Ok(res) if res.status == "ok" => { log::info!("✅✅✅ Healthcheck success!"); true diff --git a/nym-connect/desktop/src-tauri/src/operations/directory/mod.rs b/nym-connect/desktop/src-tauri/src/operations/directory/mod.rs index a4f8bf53a9..dc001dac2e 100644 --- a/nym-connect/desktop/src-tauri/src/operations/directory/mod.rs +++ b/nym-connect/desktop/src-tauri/src/operations/directory/mod.rs @@ -8,16 +8,20 @@ use crate::{ }; use itertools::Itertools; use nym_api_requests::models::GatewayBondAnnotated; +use nym_config::defaults::var_names::{NETWORK_NAME, NYM_API}; use nym_contracts_common::types::Percent; +use nym_validator_client::nym_api::Client as ApiClient; +use std::str::FromStr; use std::sync::Arc; use tokio::sync::RwLock; +use url::Url; -static SERVICE_PROVIDER_WELLKNOWN_URL: &str = - "https://nymtech.net/.wellknown/connect/service-providers.json"; +pub(crate) static WELLKNOWN_DIR: &str = "https://nymtech.net/.wellknown"; + +static SERVICE_PROVIDER_URL_PATH: &str = "connect/service-providers.json"; // List of network-requesters running with medium toggle enabled, for testing -static SERVICE_PROVIDER_WELLKNOWN_URL_MEDIUM: &str = - "https://nymtech.net/.wellknown/connect/service-providers-medium.json"; +static SERVICE_PROVIDER_MEDIUM_URL_PATH: &str = "connect/service-providers-medium.json"; // Harbour master is used to periodically keep track of which network-requesters are online static HARBOUR_MASTER_URL: &str = "https://harbourmaster.nymtech.net/v1/services/?size=100"; @@ -25,9 +29,6 @@ static HARBOUR_MASTER_URL: &str = "https://harbourmaster.nymtech.net/v1/services // We only consider network requesters with a routing score above this threshold const SERVICE_ROUTING_SCORE_THRESHOLD: f32 = 0.9; -static GATEWAYS_DETAILED_URL: &str = - "https://validator.nymtech.net/api/v1/status/gateways/detailed"; - // Only use gateways with a performnnce score above this const GATEWAY_PERFORMANCE_SCORE_THRESHOLD: u64 = 90; @@ -80,11 +81,13 @@ pub async fn get_services( async fn fetch_services(privacy_level: &PrivacyLevel) -> Result> { let services_url = match privacy_level { - PrivacyLevel::Medium => SERVICE_PROVIDER_WELLKNOWN_URL_MEDIUM, - _ => SERVICE_PROVIDER_WELLKNOWN_URL, + PrivacyLevel::Medium => SERVICE_PROVIDER_MEDIUM_URL_PATH, + _ => SERVICE_PROVIDER_URL_PATH, }; - let services_res = reqwest::get(services_url) + let network_name = std::env::var(NETWORK_NAME)?; + let url = format!("{}/{}/{}", WELLKNOWN_DIR, network_name, services_url); + let services_res = reqwest::get(url) .await? .json::>() .await?; @@ -116,10 +119,8 @@ fn filter_out_inactive_services( } async fn fetch_gateways() -> Result> { - Ok(reqwest::get(GATEWAYS_DETAILED_URL) - .await? - .json::>() - .await?) + let api_client = ApiClient::new(Url::from_str(&std::env::var(NYM_API)?)?); + Ok(api_client.get_gateways_detailed().await?) } #[tauri::command] diff --git a/nym-connect/desktop/src-tauri/tauri.conf.json b/nym-connect/desktop/src-tauri/tauri.conf.json index 5f5e86bec0..49311b295d 100644 --- a/nym-connect/desktop/src-tauri/tauri.conf.json +++ b/nym-connect/desktop/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "package": { "productName": "nym-connect", - "version": "1.1.16" + "version": "1.1.17" }, "build": { "distDir": "../dist", @@ -51,7 +51,7 @@ "updater": { "active": true, "endpoints": [ - "https://nymtech.net/.wellknown/connect/updater.json" + "https://nymtech.net/.wellknown/mainnet/connect/updater.json" ], "dialog": true, "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IENCNzQ2M0E5N0VFODE2NApSV1JrZ2U2WE9rYTNETTg1OTBKdE5uWUEra0hML2syOVUvQ2lxZmFZRzZ1T3NWbGM0eVRzUTVhVwo=" diff --git a/nym-connect/desktop/src/context/main.tsx b/nym-connect/desktop/src/context/main.tsx index 46d3312fac..ba6377e90b 100644 --- a/nym-connect/desktop/src/context/main.tsx +++ b/nym-connect/desktop/src/context/main.tsx @@ -33,6 +33,7 @@ export type TClientContext = { userDefinedSPAddress: UserDefinedSPAddress; serviceProviders?: ServiceProvider[]; gateways?: Gateway[]; + showFeedbackNote: boolean; setMode: (mode: ModeType) => void; clearError: () => void; setConnectionStatus: (connectionStatus: ConnectionStatusKind) => void; @@ -47,6 +48,7 @@ export type TClientContext = { setUserDefinedSPAddress: React.Dispatch>; setMonitoring: (value: boolean) => Promise; setPrivacyLevel: (value: PrivacyLevel) => Promise; + setShowFeedbackNote: (value: boolean) => void; }; function getRandomFromList(items: T[]): T { @@ -77,6 +79,7 @@ export const ClientContextProvider: FCWithChildren = ({ children }) => { address: undefined, }); const [userData, setUserData] = useState(); + const [showFeedbackNote, setShowFeedbackNote] = useState(true); const getAppVersion = async () => { const version = await getVersion(); @@ -161,9 +164,15 @@ export const ClientContextProvider: FCWithChildren = ({ children }) => { } }, []); + const afterDisconnection = useCallback(async () => { + setGatewayPerformance('Good'); + setConnectedSince(undefined); + }, []); + const startDisconnecting = useCallback(async () => { try { await invoke('start_disconnecting'); + afterDisconnection(); } catch (e) { console.log(e); Sentry.captureException(e); @@ -240,6 +249,7 @@ export const ClientContextProvider: FCWithChildren = ({ children }) => { serviceProviders, connectedSince, userData, + showFeedbackNote, setConnectedSince, setServiceProvider, setGateway, @@ -253,6 +263,7 @@ export const ClientContextProvider: FCWithChildren = ({ children }) => { setUserDefinedSPAddress, setMonitoring, setPrivacyLevel, + setShowFeedbackNote, }), [ mode, @@ -270,6 +281,7 @@ export const ClientContextProvider: FCWithChildren = ({ children }) => { userDefinedGateway, userDefinedSPAddress, userData, + showFeedbackNote, ], ); diff --git a/nym-connect/desktop/src/context/mocks/main.tsx b/nym-connect/desktop/src/context/mocks/main.tsx index 46a5f50298..0b6db34aaf 100644 --- a/nym-connect/desktop/src/context/mocks/main.tsx +++ b/nym-connect/desktop/src/context/mocks/main.tsx @@ -12,6 +12,7 @@ const mockValues: TClientContext = { userDefinedGateway: { isActive: false, gateway: '' }, userDefinedSPAddress: { isActive: false, address: '' }, userData: { monitoring: false, privacy_level: 'High' }, + showFeedbackNote: false, setShowInfoModal: () => {}, setMode: () => {}, clearError: () => {}, @@ -26,6 +27,7 @@ const mockValues: TClientContext = { setUserDefinedSPAddress: () => {}, setMonitoring: async () => {}, setPrivacyLevel: async () => {}, + setShowFeedbackNote: () => {}, }; export const MockProvider: FCWithChildren<{ diff --git a/nym-connect/desktop/src/pages/connection/Disconnected.tsx b/nym-connect/desktop/src/pages/connection/Disconnected.tsx index 127a245d4e..00e51b9221 100644 --- a/nym-connect/desktop/src/pages/connection/Disconnected.tsx +++ b/nym-connect/desktop/src/pages/connection/Disconnected.tsx @@ -1,5 +1,6 @@ import React from 'react'; -import { Stack, Typography } from '@mui/material'; +import { Alert, Link, Stack, Typography } from '@mui/material'; +import { Link as RouterLink } from 'react-router-dom'; import { ConnectionStatus } from 'src/components/ConnectionStatus'; import { ConnectionTimer } from 'src/components/ConntectionTimer'; import { InfoModal } from 'src/components/InfoModal'; @@ -10,6 +11,7 @@ import { ConnectionStatusKind } from 'src/types'; import { PowerButton } from 'src/components/PowerButton/PowerButton'; import { Box } from '@mui/system'; import { ConnectionLayout } from 'src/layouts/ConnectionLayout'; +import { useClientContext } from '../../context/main'; export const Disconnected: FCWithChildren<{ error?: Error; @@ -20,32 +22,53 @@ export const Disconnected: FCWithChildren<{ serviceProvider?: ServiceProvider; clearError: () => void; onConnectClick: (status: ConnectionStatusKind) => void; -}> = ({ status, error, onConnectClick, clearError }) => ( - <> - {error && } - - - - - } - ConnectButton={} - BottomContent={ - - - You are not protected - - - - } - /> - -); +}> = ({ status, error, onConnectClick, clearError }) => { + const { showFeedbackNote, setShowFeedbackNote } = useClientContext(); + + return ( + <> + {error && } + + + + + } + ConnectButton={} + BottomContent={ + + + You are not protected + + + {showFeedbackNote ? ( + setShowFeedbackNote(false)}> + Help improve NymConnect +
+ setShowFeedbackNote(false)} + component={RouterLink} + color="secondary" + underline="hover" + > + Send feedback + +
+ ) : ( + + )} +
+ } + /> + + ); +}; diff --git a/nym-connect/desktop/src/pages/menu/settings/PrivacyLevelSettings.tsx b/nym-connect/desktop/src/pages/menu/PrivacyLevelSettings.tsx similarity index 96% rename from nym-connect/desktop/src/pages/menu/settings/PrivacyLevelSettings.tsx rename to nym-connect/desktop/src/pages/menu/PrivacyLevelSettings.tsx index a97e7fdfdf..9935ef8f4c 100644 --- a/nym-connect/desktop/src/pages/menu/settings/PrivacyLevelSettings.tsx +++ b/nym-connect/desktop/src/pages/menu/PrivacyLevelSettings.tsx @@ -1,7 +1,7 @@ import React, { ChangeEvent, useState } from 'react'; import * as Sentry from '@sentry/react'; import { Box, FormControl, FormControlLabel, FormHelperText, Stack, Switch, Typography } from '@mui/material'; -import { useClientContext } from 'src/context/main'; +import { useClientContext } from '../../context/main'; export const PrivacyLevelSettings = () => { const { userData, setPrivacyLevel } = useClientContext(); diff --git a/nym-connect/desktop/src/pages/menu/index.tsx b/nym-connect/desktop/src/pages/menu/index.tsx index 67576dc88c..285d368061 100644 --- a/nym-connect/desktop/src/pages/menu/index.tsx +++ b/nym-connect/desktop/src/pages/menu/index.tsx @@ -8,8 +8,8 @@ const menuSchema = [ { title: 'Supported apps', icon: Apps, path: 'apps' }, { title: 'How to connect guide', icon: HelpOutline, path: 'guide' }, { title: 'Privacy level', icon: PrivacyTip, path: 'privacy-level' }, - { title: 'Please help us improve the app', icon: BugReport, path: 'monitoring' }, { title: 'Settings', icon: Settings, path: 'settings' }, + { title: 'Help improve the app', icon: BugReport, path: 'reporting' }, ]; export const Menu = () => ( diff --git a/nym-connect/desktop/src/pages/menu/settings/MonitoringSettings.tsx b/nym-connect/desktop/src/pages/menu/reporting/ErrorReporting.tsx similarity index 62% rename from nym-connect/desktop/src/pages/menu/settings/MonitoringSettings.tsx rename to nym-connect/desktop/src/pages/menu/reporting/ErrorReporting.tsx index 8b899cbe72..baf465944c 100644 --- a/nym-connect/desktop/src/pages/menu/settings/MonitoringSettings.tsx +++ b/nym-connect/desktop/src/pages/menu/reporting/ErrorReporting.tsx @@ -1,9 +1,8 @@ import React, { ChangeEvent, useState } from 'react'; -import { Warning as WarningIcon } from '@mui/icons-material'; import { Box, FormControl, FormControlLabel, FormHelperText, Stack, Switch, Typography } from '@mui/material'; -import { useClientContext } from 'src/context/main'; +import { useClientContext } from '../../../context/main'; -export const MonitoringSettings = () => { +export const ErrorReporting = () => { const { userData, setMonitoring } = useClientContext(); const [enabled, setEnabled] = useState(userData?.monitoring || false); const [loading, setLoading] = useState(false); @@ -20,7 +19,7 @@ export const MonitoringSettings = () => { - Error reporting and performance monitoring + Turn on error reporting and performance monitoring { sx={{ ml: 1, mr: 1 }} /> } - label="Enable" + label={enabled ? 'On' : 'Off'} /> - Help Nym developers to fix errors, crashes and improve the application by enabling this option. If errors - occur or if the app crashes, it will automatically send a report. Also it tracks various performance - metrics. We use sentry.io service to handle this. + Help Nym developers fix errors, crashes and improve the application by enabling this option. If errors + occur or if the app crashes, it will automatically send a report. It also tracks various performance + metrics. We use Sentry.io service to handle this. - - - - You must restart the application for the change to take effect. - - + + You must restart the application for the change to take effect. + diff --git a/nym-connect/desktop/src/pages/menu/reporting/UserFeedback.tsx b/nym-connect/desktop/src/pages/menu/reporting/UserFeedback.tsx new file mode 100644 index 0000000000..67b37fcc5f --- /dev/null +++ b/nym-connect/desktop/src/pages/menu/reporting/UserFeedback.tsx @@ -0,0 +1,124 @@ +import React, { useState } from 'react'; +import { Link as RouterLink } from 'react-router-dom'; +import { Alert, Box, Button, FormControl, Link, Snackbar, Stack, TextField, Typography } from '@mui/material'; +import * as Sentry from '@sentry/react'; +import { Controller, SubmitHandler, useForm } from 'react-hook-form'; +import { object, string } from 'yup'; +import { yupResolver } from '@hookform/resolvers/yup'; +import { useClientContext } from '../../../context/main'; + +type FormValues = { + email?: string; + feedback: string; +}; + +const schema = object({ + email: string().email(), + feedback: string().required().min(20).max(512), +}).required(); + +export const UserFeedback = () => { + const [isBusy, setIsBusy] = useState(false); + const { userData } = useClientContext(); + + const { + handleSubmit, + control, + formState: { errors }, + reset, + } = useForm({ + defaultValues: { + email: '', + feedback: '', + }, + // inferred type is fucked, so use `any` to make TS happy + resolver: yupResolver(schema as any), + }); + + const onSubmit: SubmitHandler = (data) => { + const eventId = Sentry.captureMessage('user feedback'); + Sentry.captureUserFeedback({ + event_id: eventId, + name: 'nym', + email: data.email, + comments: data.feedback, + }); + setIsBusy(true); + reset(); + }; + + const handleClose = () => { + setIsBusy(false); + }; + + if (!userData?.monitoring) { + return ( + + + The error reporting option must be enabled in order to report feedback. Turn it on{' '} + + here + + . + + + ); + } + + return ( + + + + Feedback sent successfuly + + + + + + Send us your feedback about the app + +
+ + ( + + )} + name="email" + control={control} + /> + + + ( + + )} + name="feedback" + control={control} + /> + + + + +
+
+
+
+ ); +}; diff --git a/nym-connect/mobile/src/pages/menu/settings/index.tsx b/nym-connect/desktop/src/pages/menu/reporting/index.tsx similarity index 77% rename from nym-connect/mobile/src/pages/menu/settings/index.tsx rename to nym-connect/desktop/src/pages/menu/reporting/index.tsx index b8d03d1374..ccc2c0bd1f 100644 --- a/nym-connect/mobile/src/pages/menu/settings/index.tsx +++ b/nym-connect/desktop/src/pages/menu/reporting/index.tsx @@ -4,13 +4,13 @@ import { Link, List, ListItem, ListItemButton, ListItemText, Stack } from '@mui/ import { AppVersion } from 'src/components/AppVersion'; const menuSchema = [ - { title: 'Select your gateway', path: 'gateway' }, - { title: 'Select a service provider', path: 'service-provider' }, + { title: 'Turn on error reporting', path: 'error-reporting' }, + { title: 'Send us your feedback', path: 'user-feedback' }, ]; -export const SettingsMenu = () => ( +export const ReportingMenu = () => ( - + {menuSchema.map((item) => ( diff --git a/nym-connect/desktop/src/routes/index.tsx b/nym-connect/desktop/src/routes/index.tsx index f1e4b1da67..67bd471460 100644 --- a/nym-connect/desktop/src/routes/index.tsx +++ b/nym-connect/desktop/src/routes/index.tsx @@ -8,9 +8,11 @@ import { HelpGuide } from 'src/pages/menu/Guide'; import { SettingsMenu } from 'src/pages/menu/settings'; import { GatewaySettings } from 'src/pages/menu/settings/GatewaySettings'; import { ServiceProviderSettings } from 'src/pages/menu/settings/ServiceProviderSettings'; -import { MonitoringSettings } from '../pages/menu/settings/MonitoringSettings'; -import { PrivacyLevelSettings } from '../pages/menu/settings/PrivacyLevelSettings'; +import { ErrorReporting } from '../pages/menu/reporting/ErrorReporting'; +import { PrivacyLevelSettings } from '../pages/menu/PrivacyLevelSettings'; import { useClientContext } from '../context/main'; +import { ReportingMenu } from '../pages/menu/reporting'; +import { UserFeedback } from '../pages/menu/reporting/UserFeedback'; const SentryRoutes = Sentry.withSentryReactRouterV6Routing(Routes); @@ -27,12 +29,16 @@ export const AppRoutes = () => { } /> } /> } /> - } /> } /> } /> } /> + + } /> + } /> + } /> + ); diff --git a/nym-connect/mobile/.babelrc b/nym-connect/mobile/.babelrc deleted file mode 100644 index 7a840ad24e..0000000000 --- a/nym-connect/mobile/.babelrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "presets": [ - [ - "@babel/preset-env", - { - "targets": { - "esmodules": true - } - } - ], - "@babel/preset-react", - "@babel/preset-typescript" - ], - "plugins": ["@babel/plugin-transform-async-to-generator"] -} diff --git a/nym-connect/mobile/.env.sample b/nym-connect/mobile/.env.sample deleted file mode 100644 index cc3febee19..0000000000 --- a/nym-connect/mobile/.env.sample +++ /dev/null @@ -1 +0,0 @@ -ADMIN_ADDRESS= \ No newline at end of file diff --git a/nym-connect/mobile/.eslintrc b/nym-connect/mobile/.eslintrc deleted file mode 100644 index 3ea1281af1..0000000000 --- a/nym-connect/mobile/.eslintrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": [ - "@nymproject/eslint-config-react-typescript" - ], - "parserOptions": { - "project": "./tsconfig.eslint.json" - } -} diff --git a/nym-connect/mobile/.nvmrc b/nym-connect/mobile/.nvmrc deleted file mode 100644 index 25bf17fc5a..0000000000 --- a/nym-connect/mobile/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -18 \ No newline at end of file diff --git a/nym-connect/mobile/.prettierrc b/nym-connect/mobile/.prettierrc deleted file mode 100644 index 1bc34d0c3f..0000000000 --- a/nym-connect/mobile/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "trailingComma": "all", - "singleQuote": true, - "printWidth": 120, - "tabWidth": 2, - "semi": true -} diff --git a/nym-connect/mobile/.storybook/main.js b/nym-connect/mobile/.storybook/main.js deleted file mode 100644 index 344c27778e..0000000000 --- a/nym-connect/mobile/.storybook/main.js +++ /dev/null @@ -1,73 +0,0 @@ -/* eslint-disable no-param-reassign */ -const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); -const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); - -module.exports = { - stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], - addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions'], - framework: '@storybook/react', - core: { - builder: 'webpack5', - }, - typescript: { reactDocgen: false }, - // webpackFinal: async (config, { configType }) => { - // // `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION' - // // You can change the configuration based on that. - // // 'PRODUCTION' is used when building the static version of storybook. - webpackFinal: async (config) => { - config.module.rules.forEach((rule) => { - // look for SVG import rule and replace - // NOTE: the rule before modification is /\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/ - if (rule.test?.toString().includes('svg')) { - rule.test = /\.(ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/; - } - }); - - // handle asset loading with this - config.module.rules.unshift({ - test: /\.svg(\?.*)?$/i, - issuer: /\.[jt]sx?$/, - use: ['@svgr/webpack'], - }); - - config.module.rules.unshift({ - test: /\.ya?ml$/, - type: 'json', - use: [ - { - loader: 'yaml-loader', - options: { - asJSON: true, - }, - }, - ], - }); - - config.resolve.extensions = ['.tsx', '.ts', '.js']; - config.resolve.plugins = [new TsconfigPathsPlugin()]; - - config.plugins.push( - new ForkTsCheckerWebpackPlugin({ - typescript: { - mode: 'write-references', - diagnosticOptions: { - semantic: true, - syntactic: true, - }, - }, - }), - ); - - if (!config.resolve.alias) { - config.resolve.alias = {}; - } - - config.resolve.alias['@tauri-apps/api'] = `${__dirname}/mocks/tauri`; - - // Return the altered config - return config; - }, - features: { - emotionAlias: false, - }, -}; diff --git a/nym-connect/mobile/.storybook/mocks/tauri/app.js b/nym-connect/mobile/.storybook/mocks/tauri/app.js deleted file mode 100644 index 83d80d7037..0000000000 --- a/nym-connect/mobile/.storybook/mocks/tauri/app.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * This is a mock for Tauri's API package (@tauri-apps/api/app), to prevent stories from being excluded, because they either use - * or import dependencies that use Tauri. - */ - -module.exports = { - getVersion: () => undefined, -}; diff --git a/nym-connect/mobile/.storybook/mocks/tauri/clipboard.js b/nym-connect/mobile/.storybook/mocks/tauri/clipboard.js deleted file mode 100644 index a34847db86..0000000000 --- a/nym-connect/mobile/.storybook/mocks/tauri/clipboard.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * This is a mock for Tauri's API package (@tauri-apps/api/clipboard), to prevent stories from being excluded, because they either use - * or import dependencies that use Tauri. - */ - -module.exports = { - writeText: async () => undefined, -} diff --git a/nym-connect/mobile/.storybook/mocks/tauri/event.js b/nym-connect/mobile/.storybook/mocks/tauri/event.js deleted file mode 100644 index a100d30337..0000000000 --- a/nym-connect/mobile/.storybook/mocks/tauri/event.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * This is a mock for Tauri's API package (@tauri-apps/api/clipboard), to prevent stories from being excluded, because they either use - * or import dependencies that use Tauri. - */ - -module.exports = { - listen: async () => undefined, -} diff --git a/nym-connect/mobile/.storybook/mocks/tauri/index.js b/nym-connect/mobile/.storybook/mocks/tauri/index.js deleted file mode 100644 index c411c3bf18..0000000000 --- a/nym-connect/mobile/.storybook/mocks/tauri/index.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * This is a mock for Tauri's API package (@tauri-apps/api), to prevent stories from being excluded, because they either use - * or import dependencies that use Tauri. - */ -module.exports = { - invoke: (operation, args) => { - console.error( - `Tauri cannot be used in Storybook. The operation requested was "${operation}". You can add mock responses to "nym_connect/.storybook/mocks/tauri.js" if you need. The default response is "void".`, - ); - return new Promise((resolve, reject) => { - reject(new Error(`Tauri operation ${operation} not available in storybook.`)); - }); - }, -}; diff --git a/nym-connect/mobile/.storybook/mocks/tauri/notification.js b/nym-connect/mobile/.storybook/mocks/tauri/notification.js deleted file mode 100644 index dcbe18e574..0000000000 --- a/nym-connect/mobile/.storybook/mocks/tauri/notification.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This is a mock for Tauri's API package (@tauri-apps/api/notification), to prevent stories from being excluded, because they either use - * or import dependencies that use Tauri. - */ - -module.exports = { - isPermissionGranted: () => undefined, - requestPermission: () => undefined, - sendNotification: () => undefined, -}; \ No newline at end of file diff --git a/nym-connect/mobile/.storybook/mocks/tauri/window.js b/nym-connect/mobile/.storybook/mocks/tauri/window.js deleted file mode 100644 index 9f0afeeebd..0000000000 --- a/nym-connect/mobile/.storybook/mocks/tauri/window.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This is a mock for Tauri's API package (@tauri-apps/api/window), to prevent stories from being excluded, because they either use - * or import dependencies that use Tauri. - */ - -module.exports = { - appWindow: { - maximize: () => undefined, - } -} diff --git a/nym-connect/mobile/.storybook/preview-fonts.js b/nym-connect/mobile/.storybook/preview-fonts.js deleted file mode 100644 index a7989fca9a..0000000000 --- a/nym-connect/mobile/.storybook/preview-fonts.js +++ /dev/null @@ -1,3 +0,0 @@ -import '../src/fonts/fonts.css'; - -export const Fonts = ({ children }) => <>{children}; \ No newline at end of file diff --git a/nym-connect/mobile/.storybook/preview.js b/nym-connect/mobile/.storybook/preview.js deleted file mode 100644 index 9c14c3ec99..0000000000 --- a/nym-connect/mobile/.storybook/preview.js +++ /dev/null @@ -1,26 +0,0 @@ -import { NymMixnetTheme } from '../src/theme'; -import { Fonts } from './preview-fonts'; -import { MockProvider } from '../src/context/mocks/main'; -const withThemeProvider = (Story, context) => { - return ( - - - - - - - - ); -}; - -export const decorators = [withThemeProvider]; - -export const parameters = { - actions: { argTypesRegex: '^on[A-Z].*' }, - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/, - }, - }, -}; diff --git a/nym-connect/mobile/CHANGELOG.md b/nym-connect/mobile/CHANGELOG.md deleted file mode 100644 index cddba036e0..0000000000 --- a/nym-connect/mobile/CHANGELOG.md +++ /dev/null @@ -1,98 +0,0 @@ -# Changelog - -## UNRELEASED - -## [nym-connect-v1.1.7](https://github.com/nymtech/nym/tree/nym-connect-v1.1.7) (2023-01-24) - -- Remove test and earn ([#2865]) - -[#2865]: https://github.com/nymtech/nym/issue/2865 - -## [nym-connect-v1.1.6](https://github.com/nymtech/nym/tree/nym-connect-v1.1.6) (2023-01-17) - -- part (1) show gateway status on the UI if the gateway is not live, is overloaded or is slow ([#2824]) - -[#2824]: https://github.com/nymtech/nym/pull/2824 - -## [nym-connect-v1.1.5](https://github.com/nymtech/nym/tree/nym-connect-v1.1.5) (2023-01-10) - -- get version number from tauri and display by @fmtabbara in https://github.com/nymtech/nym/pull/2684 -- Feature/nym connect experimental software text by @fmtabbara in https://github.com/nymtech/nym/pull/2692 -- NymConnect - Display service info in tooltip **1.1.5 Release** by @fmtabbara in https://github.com/nymtech/nym/pull/2704 - -## [nym-connect-v1.1.4](https://github.com/nymtech/nym/tree/nym-connect-v1.1.4) (2022-12-20) - -This release contains the new opt-in Test & Earn program, and it uses a stress-tested directory of network requesters to improve reliability. It also has some bugfixes, performance improvements, and better error handling. - -- nym-connect: send status messages from socks5 task to tauri backend by @octol in https://github.com/nymtech/nym/pull/1882 -- socks5: rework waiting in inbound.rs by @octol in https://github.com/nymtech/nym/pull/1880 -- Test&Earn by @mmsinclair in https://github.com/nymtech/nym/pull/2729 - -## [nym-connect-v1.1.3](https://github.com/nymtech/nym/tree/nym-connect-v1.1.3) (2022-12-13) - -- socks5-client: added support for socks4a. - -## [nym-connect-v1.1.2](https://github.com/nymtech/nym/tree/nym-connect-v1.1.2) (2022-12-06) - -- socks5-client: fix error with client failing and disconnecting unnecessarily. - -## [nym-connect-v1.1.1](https://github.com/nymtech/nym/tree/nym-connect-v1.1.1) (2022-11-29) - -- socks5-client: fix multiplex concurrent connections ([#1720], [#1777]) -- socks5-client: fix wait closing inbound connection until data is sent, and throttle incoming data in general ([#1772], [#1783],[#1789]) -- socks5-client: fix shutting down all background workers if anyone of them panics or errors out. This fixes an issue where the nym-connect UI was showing connected even though the socks5 tunnel was non-functional. ([#1805]) -- gateway-libs: fix decryping messages stored on the gateway between reconnects ([#1786]) - -- nymconnect: updated UI -- nymconnect: new help area -- nymconnect: listen for service errors and display on frontend - -[#1720]: https://github.com/nymtech/nym/pull/1720 -[#1772]: https://github.com/nymtech/nym/pull/1772 -[#1777]: https://github.com/nymtech/nym/pull/1777 -[#1783]: https://github.com/nymtech/nym/pull/1783 -[#1786]: https://github.com/nymtech/nym/pull/1786 -[#1789]: https://github.com/nymtech/nym/pull/1789 -[#1805]: https://github.com/nymtech/nym/pull/1805 - -## [nym-connect-v1.1.0](https://github.com/nymtech/nym/tree/nym-connect-v1.1.0) (2022-11-09) - -- nym-connect: rework of rewarding changes the directory data structures that describe the mixnet topology ([#1472]) -- clients: add testing-only support for two more extended packet sizes (8kb and 16kb). -- native-client/socks5-client: `disable_loop_cover_traffic_stream` Debug config option to disable the separate loop cover traffic stream ([#1666]) -- native-client/socks5-client: `disable_main_poisson_packet_distribution` Debug config option to make the client ignore poisson distribution in the main packet stream and ONLY send real message (and as fast as they come) ([#1664]) -- native-client/socks5-client: `use_extended_packet_size` Debug config option to make the client use 'ExtendedPacketSize' for its traffic (32kB as opposed to 2kB in 1.0.2) ([#1671]) -- network-requester: added additional Blockstream Green wallet endpoint to `example.allowed.list` ([#1611]) -- validator-client: added `query_contract_smart` and `query_contract_raw` on `NyxdClient` ([#1558]) - -[#1472]: https://github.com/nymtech/nym/pull/1472 -[#1558]: https://github.com/nymtech/nym/pull/1558 -[#1611]: https://github.com/nymtech/nym/pull/1611 -[#1664]: https://github.com/nymtech/nym/pull/1664 -[#1666]: https://github.com/nymtech/nym/pull/1666 -[#1671]: https://github.com/nymtech/nym/pull/1671 - -## [nym-connect-v1.0.2](https://github.com/nymtech/nym/tree/nym-connect-v1.0.2) (2022-08-18) - -### Changed - -- nym-connect: "load balance" the service providers by picking a random Service Provider for each Service and storing in local storage so it remains sticky for the user ([#1540]) -- nym-connect: the ServiceProviderSelector only displays the available Services, and picks a random Service Provider for Services the user has never used before ([#1540]) -- nym-connect: add `local-forage` for storing user settings ([#1540]) - -[#1540]: https://github.com/nymtech/nym/pull/1540 - -## [nym-connect-v1.0.1](https://github.com/nymtech/nym/tree/nym-connect-v1.0.1) (2022-07-22) - -### Added - -- nym-connect: initial proof-of-concept of a UI around the socks5 client was added -- nym-connect: add ability to select network requester and gateway ([#1427]) -- nym-connect: add ability to export gateway keys as JSON -- nym-connect: add auto updater - -### Changed - -- nym-connect: reuse config id instead of creating a new id on each connection - -[#1427]: https://github.com/nymtech/nym/pull/1427 diff --git a/nym-connect/mobile/README.md b/nym-connect/mobile/README.md deleted file mode 100644 index efb522dd81..0000000000 --- a/nym-connect/mobile/README.md +++ /dev/null @@ -1,71 +0,0 @@ - - -# Nym Connect - Mobile - -[Nym Connect](https://github.com/nymtech/nym/tree/develop/nym-connect) application for Mobile. - -Nym Connects sets up a SOCKS5 proxy for local applications to use. - -**NOTE**: Currently we only focus on Android, -the remaining docs apply for Android development only. - -## Installation prerequisites - Linux / Mac - -- `Yarn` -- `NodeJS >= v16` -- `Rust & cargo` -- Android development environment (JDK, SDK/NDK, AVD etc...) - -For setting up an Android development environment see -https://next--tauri.netlify.app/next/guides/getting-started/prerequisites/linux#android - -## Installation - -Inside the `mobile/nym-connect` directory, run the following commands: - -``` -yarn install -yarn prewebpack:dev -``` - -## Development - -Assuming there is a running android [emulator](https://developer.android.com/studio/run/emulator) -or a real [device](https://developer.android.com/studio/run/device) connected. -Inside the `mobile/nym-connect/src-tauri` directory, run the following command: - -``` -yarn dev:android -``` - -#### Debugging - -https://next--tauri.netlify.app/next/guides/debugging/application#mobile - -## Production - -To build the APK, run the build commands. - -``` -yarn webpack:prod -WRY_ANDROID_PACKAGE=net.nymtech.nym_connect WRY_ANDROID_LIBRARY=nym_connect cargo tauri android build --debug --apk -``` - -**NOTE**: Production build without the `--debug` flag requires a signed build. - -# Storybook - -Run storybook with: - -``` -yarn storybook -``` - -And build storybook static site with: - -``` -yarn storybook:build -``` diff --git a/nym-connect/mobile/dist/.gitkeep b/nym-connect/mobile/dist/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/nym-connect/mobile/package.json.bak b/nym-connect/mobile/package.json.bak deleted file mode 100644 index 20c4aceb65..0000000000 --- a/nym-connect/mobile/package.json.bak +++ /dev/null @@ -1,119 +0,0 @@ -{ - "name": "@nym/nym-connect-mobile", - "version": "1.1.7", - "main": "index.js", - "license": "MIT", - "scripts": { - "prewebpack:dev": "yarn --cwd ../.. build", - "webpack:dev": "yarn webpack serve --config webpack.dev.js", - "webpack:dev:onlyThis": "yarn webpack serve --config webpack.dev.js", - "webpack:prod": "yarn webpack --progress --config webpack.prod.js", - "tauri": "tauri", - "tauri:dev:android": "WRY_ANDROID_PACKAGE=net.nymtech.nym_connect WRY_ANDROID_LIBRARY=nym_connect cargo tauri android dev", - "tauri:build:android": "WRY_ANDROID_PACKAGE=net.nymtech.nym_connect WRY_ANDROID_LIBRARY=nym_connect cargo tauri android build", - "dev:android": "run-p webpack:dev:onlyThis tauri:dev:android", - "prebuild": "yarn --cwd ../.. build", - "build:android": "run-s webpack:prod tauri:build:android", - "storybook": "start-storybook -p 6006", - "prestorybook:build": "yarn --cwd ../.. build", - "storybook:build": "build-storybook", - "tsc": "tsc --noEmit true", - "tsc:watch": "tsc --noEmit true --watch", - "lint": "eslint src", - "lint:fix": "eslint src --fix", - "test": "jest", - "test:watch": "jest --watch", - "clean:dist": "rm -rf dist", - "clean:node": "rm -rf node_modules", - "clean:rust": "cargo clean --manifest-path src-tauri/Cargo.toml", - "clean:android": "cd src-tauri/gen/android/nym_connect/ && gradlew clean", - "clean:": "run-p clean:node clean:rust clean:android" - }, - "dependencies": { - "@emotion/react": "^11.7.0", - "@emotion/styled": "^11.6.0", - "@hookform/resolvers": "^2.8.0", - "@mui/icons-material": "^5.2.0", - "@mui/material": "^5.2.2", - "@mui/styles": "^5.2.2", - "@mui/system": ">= 5", - "@mui/lab": "^5.0.0-alpha.72", - "@nymproject/react": "^1.0.0", - "@tauri-apps/api": "^2.0.0-alpha.0", - "@tauri-apps/tauri-forage": "^1.0.0-beta.2", - "clsx": "^1.1.1", - "luxon": "^2.3.0", - "pretty-bytes": "^6.0.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-error-boundary": "^3.1.3", - "react-hook-form": "^7.14.2", - "react-markdown": "^8.0.4", - "react-router-dom": "^6.7.0", - "semver": "^6.3.0", - "yup": "^0.32.9" - }, - "devDependencies": { - "@babel/core": "^7.15.0", - "@babel/plugin-transform-async-to-generator": "^7.14.5", - "@babel/preset-env": "^7.15.0", - "@babel/preset-react": "^7.14.5", - "@babel/preset-typescript": "^7.15.0", - "@mdx-js/loader": "^2.1.5", - "@nymproject/eslint-config-react-typescript": "^1.0.0", - "@pmmmwh/react-refresh-webpack-plugin": "^0.5.4", - "@storybook/react": "^6.5.15", - "@svgr/webpack": "^6.1.1", - "@tauri-apps/cli": "^2.0.0-alpha.2", - "@testing-library/jest-dom": "^5.14.1", - "@testing-library/react": "^12.0.0", - "@types/jest": "^27.0.1", - "@types/luxon": "^2.3.2", - "@types/node": "^16.7.13", - "@types/react": "^18.0.26", - "@types/react-dom": "^18.0.10", - "@types/semver": "^7.3.8", - "@types/uuid": "^8.3.4", - "@typescript-eslint/eslint-plugin": "^5.13.0", - "@typescript-eslint/parser": "^5.13.0", - "babel-loader": "^8.3.0", - "babel-plugin-root-import": "^6.6.0", - "clean-webpack-plugin": "^4.0.0", - "css-loader": "^6.7.3", - "css-minimizer-webpack-plugin": "^3.0.2", - "dotenv-webpack": "^7.0.3", - "eslint": "^8.10.0", - "eslint-config-airbnb": "^19.0.4", - "eslint-config-airbnb-typescript": "^16.1.0", - "eslint-config-prettier": "^8.5.0", - "eslint-import-resolver-root-import": "^1.0.4", - "eslint-plugin-import": "^2.25.4", - "eslint-plugin-jest": "^26.1.1", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-react": "^7.29.2", - "eslint-plugin-react-hooks": "^4.3.0", - "eslint-plugin-storybook": "^0.5.12", - "file-loader": "^6.2.0", - "fork-ts-checker-webpack-plugin": "^7.2.1", - "html-webpack-plugin": "^5.3.2", - "jest": "^27.1.0", - "mini-css-extract-plugin": "^2.2.2", - "npm-run-all": "^4.1.5", - "prettier": "^2.8.7", - "react-refresh": "^0.10.0", - "react-refresh-typescript": "^2.0.2", - "style-loader": "^3.3.1", - "thread-loader": "^3.0.4", - "ts-jest": "^27.0.5", - "ts-loader": "^9.4.2", - "tsconfig-paths-webpack-plugin": "^3.5.2", - "typescript": "^4.6.2", - "url-loader": "^4.1.1", - "webpack": "^5.75.0", - "webpack-cli": "^4.8.0", - "webpack-dev-server": "^4.5.0", - "webpack-merge": "^5.8.0", - "yaml-loader": "^0.8.0" - } -} diff --git a/nym-connect/mobile/public/favicon.ico b/nym-connect/mobile/public/favicon.ico deleted file mode 100644 index bc951a1c6f..0000000000 Binary files a/nym-connect/mobile/public/favicon.ico and /dev/null differ diff --git a/nym-connect/mobile/public/favicon.png b/nym-connect/mobile/public/favicon.png deleted file mode 100644 index fcf1e747d0..0000000000 Binary files a/nym-connect/mobile/public/favicon.png and /dev/null differ diff --git a/nym-connect/mobile/public/index.html b/nym-connect/mobile/public/index.html deleted file mode 100644 index 2ba643a663..0000000000 --- a/nym-connect/mobile/public/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - Nym Connect - - -
- - diff --git a/nym-connect/mobile/src-tauri/.gitignore b/nym-connect/mobile/src-tauri/.gitignore deleted file mode 100644 index 296ceb2535..0000000000 --- a/nym-connect/mobile/src-tauri/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Generated by Cargo -# will have compiled files and executables -/target/ -WixTools -/.cargo/ diff --git a/nym-connect/mobile/src-tauri/Cargo.lock b/nym-connect/mobile/src-tauri/Cargo.lock deleted file mode 100644 index 82622e8759..0000000000 --- a/nym-connect/mobile/src-tauri/Cargo.lock +++ /dev/null @@ -1,7349 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aead" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c192eb8f11fc081b0fe4259ba5af04217d4e0faddd02417310a927911abd7c8" -dependencies = [ - "crypto-common", - "generic-array 0.14.6", -] - -[[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", -] - -[[package]] -name = "aes" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" -dependencies = [ - "cfg-if", - "cipher 0.4.4", - "cpufeatures", -] - -[[package]] -name = "ahash" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" -dependencies = [ - "getrandom 0.2.8", - "once_cell", - "version_check", -] - -[[package]] -name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - -[[package]] -name = "anyhow" -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 = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - -[[package]] -name = "arrayvec" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" - -[[package]] -name = "async-trait" -version = "0.1.67" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ea188f25f0255d8f92797797c97ebf5631fa88178beb1a46fdf5622c9a00e4" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.5", -] - -[[package]] -name = "atk" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39991bc421ddf72f70159011b323ff49b0f783cc676a7287c59453da2e2531cf" -dependencies = [ - "atk-sys", - "bitflags 1.3.2", - "glib", - "libc", -] - -[[package]] -name = "atk-sys" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ad703eb64dc058024f0e57ccfa069e15a413b98dbd50a1a950e743b7f11148" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "atoi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616896e05fc0e2649463a93a15183c6a16bf03413a7af88ef1285ddedfa9cda5" -dependencies = [ - "num-traits", -] - -[[package]] -name = "atoi" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e" -dependencies = [ - "num-traits", -] - -[[package]] -name = "attohttpc" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" -dependencies = [ - "flate2", - "http", - "log", - "native-tls", - "serde", - "serde_json", - "serde_urlencoded", - "url", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bip32" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "873faa4363bfc54c36a48321da034c92a0645a363eed34d948683ffc1706e37f" -dependencies = [ - "bs58", - "hmac 0.11.0", - "k256", - "once_cell", - "pbkdf2", - "rand_core 0.6.4", - "ripemd160", - "sha2 0.9.9", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "bip39" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" -dependencies = [ - "bitcoin_hashes", - "rand 0.8.5", - "rand_core 0.6.4", - "serde", - "unicode-normalization", - "zeroize", -] - -[[package]] -name = "bitcoin_hashes" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487f1e0fcbe47deb8b0574e646def1c903389d95241dd1bbcc6ce4a715dfc0c1" - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "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 = "blake3" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" -dependencies = [ - "arrayref", - "arrayvec 0.7.2", - "cc", - "cfg-if", - "constant_time_eq", - "digest 0.10.6", -] - -[[package]] -name = "block" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "block-padding", - "generic-array 0.14.6", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array 0.14.6", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "bls12_381" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54757888b09a69be70b5ec303e382a74227392086ba808cb01eeca29233a2397" -dependencies = [ - "digest 0.9.0", - "ff 0.10.1", - "group 0.10.0", - "pairing 0.20.0", - "rand_core 0.6.4", - "subtle 2.4.1", -] - -[[package]] -name = "bls12_381" -version = "0.6.0" -source = "git+https://github.com/jstuczyn/bls12_381?branch=gt-serialisation#10fb6f700bfda17c8475af3bfd31e3fec15f2278" -dependencies = [ - "digest 0.9.0", - "ff 0.11.1", - "group 0.11.0", - "pairing 0.21.0", - "rand_core 0.6.4", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "brotli" -version = "3.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - -[[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" -dependencies = [ - "sha2 0.9.9", -] - -[[package]] -name = "bstr" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "bumpalo" -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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" - -[[package]] -name = "cairo-rs" -version = "0.16.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3125b15ec28b84c238f6f476c6034016a5f6cc0221cb514ca46c532139fc97d" -dependencies = [ - "bitflags 1.3.2", - "cairo-sys-rs", - "glib", - "libc", - "once_cell", - "thiserror", -] - -[[package]] -name = "cairo-sys-rs" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48f4af05fabdcfa9658178e1326efa061853f040ce7d72e33af6885196f421" -dependencies = [ - "glib-sys", - "libc", - "system-deps", -] - -[[package]] -name = "cargo_toml" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bfbc36312494041e2cdd5f06697b7e89d4b76f42773a0b5556ac290ff22acc2" -dependencies = [ - "serde", - "toml", -] - -[[package]] -name = "cc" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" -dependencies = [ - "jobserver", -] - -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - -[[package]] -name = "cfb" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" -dependencies = [ - "byteorder", - "fnv", - "uuid 1.3.0", -] - -[[package]] -name = "cfg-expr" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0357a6402b295ca3a86bc148e84df46c02e41f41fef186bda662557ef6328aa" -dependencies = [ - "smallvec", -] - -[[package]] -name = "cfg-if" -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 = "chacha20" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fc89c7c5b9e7a02dfe45cd2367bae382f9ed31c61ca8debe5f827c420a2f08" -dependencies = [ - "cfg-if", - "cipher 0.4.4", - "cpufeatures", -] - -[[package]] -name = "chacha20poly1305" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" -dependencies = [ - "aead", - "chacha20", - "cipher 0.4.4", - "poly1305", - "zeroize", -] - -[[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 = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", - "zeroize", -] - -[[package]] -name = "clap" -version = "4.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42dfd32784433290c51d92c438bb72ea5063797fc3cc9a21a8c4346bebbb2098" -dependencies = [ - "bitflags 2.0.2", - "clap_derive", - "clap_lex", - "is-terminal", - "once_cell", - "strsim", - "termcolor", -] - -[[package]] -name = "clap_complete" -version = "4.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37686beaba5ac9f3ab01ee3172f792fc6ffdd685bfb9e63cfef02c0571a4e8e1" -dependencies = [ - "clap", -] - -[[package]] -name = "clap_complete_fig" -version = "4.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2171bc6242ad7a1801422bff039574449b5bd832b715222e500714ce10f91a54" -dependencies = [ - "clap", - "clap_complete", -] - -[[package]] -name = "clap_derive" -version = "4.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fddf67631444a3a3e3e5ac51c36a5e01335302de677bd78759eaa90ab1f46644" -dependencies = [ - "heck 0.4.1", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "clap_lex" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033f6b7a4acb1f358c742aaca805c939ee73b4c6209ae4318ec7aca81c42e646" -dependencies = [ - "os_str_bytes", -] - -[[package]] -name = "client-core" -version = "1.1.13" -dependencies = [ - "async-trait", - "dashmap", - "dirs", - "futures", - "gateway-client", - "gateway-requests", - "gloo-timers", - "humantime-serde", - "log", - "nym-bandwidth-controller", - "nym-config", - "nym-credential-storage", - "nym-crypto", - "nym-nonexhaustive-delayqueue", - "nym-pemstore", - "nym-sphinx", - "nym-task", - "nym-topology", - "rand 0.7.3", - "serde", - "serde_json", - "sqlx 0.6.3", - "tap", - "thiserror", - "time", - "tokio", - "tokio-stream", - "tokio-tungstenite", - "tungstenite", - "url", - "validator-client", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-timer", - "wasm-utils", -] - -[[package]] -name = "cocoa" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation", - "core-graphics", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" -dependencies = [ - "bitflags 1.3.2", - "block", - "core-foundation", - "core-graphics-types", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - -[[package]] -name = "colored" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59" -dependencies = [ - "atty", - "lazy_static", - "winapi", -] - -[[package]] -name = "colored" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" -dependencies = [ - "atty", - "lazy_static", - "winapi", -] - -[[package]] -name = "combine" -version = "4.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" -dependencies = [ - "bytes", - "memchr", -] - -[[package]] -name = "const-oid" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" - -[[package]] -name = "constant_time_eq" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "core-foundation" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" - -[[package]] -name = "core-graphics" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-graphics-types", - "foreign-types", - "libc", -] - -[[package]] -name = "core-graphics-types" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "foreign-types", - "libc", -] - -[[package]] -name = "cosmos-sdk-proto" -version = "0.12.3" -source = "git+https://github.com/neacsu/cosmos-rust?branch=neacsu/feegrant_support#f63ded63ec13e753ebe8bdafe9dc503df265d67d" -dependencies = [ - "prost", - "prost-types", - "tendermint-proto", -] - -[[package]] -name = "cosmrs" -version = "0.7.1" -source = "git+https://github.com/neacsu/cosmos-rust?branch=neacsu/feegrant_support#f63ded63ec13e753ebe8bdafe9dc503df265d67d" -dependencies = [ - "bip32", - "cosmos-sdk-proto", - "ecdsa", - "eyre", - "getrandom 0.2.8", - "k256", - "prost", - "prost-types", - "rand_core 0.6.4", - "serde", - "serde_json", - "subtle-encoding", - "tendermint", - "tendermint-rpc", - "thiserror", -] - -[[package]] -name = "cosmwasm-crypto" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eb0afef2325df81aadbf9be1233f522ed8f6e91df870c764bc44cca2b1415bd" -dependencies = [ - "digest 0.9.0", - "ed25519-zebra", - "k256", - "rand_core 0.6.4", - "thiserror", -] - -[[package]] -name = "cosmwasm-derive" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b36e527620a2a3e00e46b6e731ab6c9b68d11069c986f7d7be8eba79ef081a4" -dependencies = [ - "syn 1.0.109", -] - -[[package]] -name = "cosmwasm-std" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875994993c2082a6fcd406937bf0fca21c349e4a624f3810253a14fa83a3a195" -dependencies = [ - "base64 0.13.1", - "cosmwasm-crypto", - "cosmwasm-derive", - "forward_ref", - "schemars", - "serde", - "serde-json-wasm", - "thiserror", - "uint", -] - -[[package]] -name = "cpufeatures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" -dependencies = [ - "libc", -] - -[[package]] -name = "crc" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" -dependencies = [ - "crc-catalog 1.1.1", -] - -[[package]] -name = "crc" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" -dependencies = [ - "crc-catalog 2.2.0", -] - -[[package]] -name = "crc-catalog" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" - -[[package]] -name = "crc-catalog" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" -dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-queue" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-bigint" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" -dependencies = [ - "generic-array 0.14.6", - "rand_core 0.6.4", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array 0.14.6", - "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.6", - "subtle 2.4.1", -] - -[[package]] -name = "cssparser" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a" -dependencies = [ - "cssparser-macros", - "dtoa-short", - "itoa 0.4.8", - "matches", - "phf 0.8.0", - "proc-macro2", - "quote", - "smallvec", - "syn 1.0.109", -] - -[[package]] -name = "cssparser-macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ct-logs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" -dependencies = [ - "sct 0.6.1", -] - -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[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", -] - -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "cw-storage-plus" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "648b1507290bbc03a8d88463d7cd9b04b1fa0155e5eef366c4fa052b9caaac7a" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", -] - -[[package]] -name = "cw-utils" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbaecb78c8e8abfd6b4258c7f4fbeb5c49a5e45ee4d910d3240ee8e1d714e1b" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "cw2" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cf4639517490dd36b333bbd6c4fbd92e325fd0acf4683b41753bc5eb63bfc1" -dependencies = [ - "cosmwasm-std", - "cw-storage-plus", - "schemars", - "serde", -] - -[[package]] -name = "cw3" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe19462a7f644ba60c19d3443cb90d00c50d9b6b3b0a3a7fca93df8261af979b" -dependencies = [ - "cosmwasm-std", - "cw-utils", - "schemars", - "serde", -] - -[[package]] -name = "cw3-fixed-multisig" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df54aa54c13f405ec4ab36b6217538bc957d439eee58f89312db05a79caf6706" -dependencies = [ - "cosmwasm-std", - "cw-storage-plus", - "cw-utils", - "cw2", - "cw3", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "cw4" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0acc3549d5ce11c6901b3a676f2e2628684722197054d97cd0101ea174ed5cbd" -dependencies = [ - "cosmwasm-std", - "cw-storage-plus", - "schemars", - "serde", -] - -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "dashmap" -version = "5.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" -dependencies = [ - "cfg-if", - "hashbrown 0.12.3", - "lock_api", - "once_cell", - "parking_lot_core 0.9.7", -] - -[[package]] -name = "dbus" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b" -dependencies = [ - "libc", - "libdbus-sys", - "winapi", -] - -[[package]] -name = "der" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" -dependencies = [ - "const-oid", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "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", -] - -[[package]] -name = "digest" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" -dependencies = [ - "block-buffer 0.10.4", - "crypto-common", - "subtle 2.4.1", -] - -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "dispatch" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" - -[[package]] -name = "dotenv" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" - -[[package]] -name = "dotenvy" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d8c417d7a8cb362e0c37e5d815f5eb7c37f79ff93707329d5a194e42e54ca0" - -[[package]] -name = "dtoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" - -[[package]] -name = "dtoa-short" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03329ae10e79ede66c9ce4dc930aa8599043b0743008548680f25b91502d6" -dependencies = [ - "dtoa", -] - -[[package]] -name = "dunce" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" - -[[package]] -name = "dyn-clone" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" - -[[package]] -name = "ecdsa" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" -dependencies = [ - "der", - "elliptic-curve", - "rfc6979", - "signature", -] - -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "ed25519-zebra" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" -dependencies = [ - "curve25519-dalek", - "hashbrown 0.12.3", - "hex", - "rand_core 0.6.4", - "serde", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "either" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" - -[[package]] -name = "elliptic-curve" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" -dependencies = [ - "base16ct", - "crypto-bigint", - "der", - "ff 0.11.1", - "generic-array 0.14.6", - "group 0.11.0", - "rand_core 0.6.4", - "sec1", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "embed_plist" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" - -[[package]] -name = "encoding_rs" -version = "0.8.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "enum-iterator" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a0ac4aeb3a18f92eaf09c6bb9b3ac30ff61ca95514fc58cbead1c9a6bf5401" -dependencies = [ - "enum-iterator-derive", -] - -[[package]] -name = "enum-iterator-derive" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355f93763ef7b0ae1c43c4d8eccc9d5848d84ad1a1d8ce61c421d1ac85a19d05" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "env_logger" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -dependencies = [ - "atty", - "humantime 1.3.0", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "eyre" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" -dependencies = [ - "indenter", - "once_cell", -] - -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - -[[package]] -name = "fern" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd7b0849075e79ee9a1836df22c717d1eba30451796fdc631b04565dd11e2a" -dependencies = [ - "colored 1.9.3", - "log", -] - -[[package]] -name = "ff" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f40b2dcd8bc322217a5f6559ae5f9e9d1de202a2ecee2e9eafcbece7562a4f" -dependencies = [ - "rand_core 0.6.4", - "subtle 2.4.1", -] - -[[package]] -name = "ff" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" -dependencies = [ - "rand_core 0.6.4", - "subtle 2.4.1", -] - -[[package]] -name = "field-offset" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3cf3a800ff6e860c863ca6d4b16fd999db8b752819c1606884047b73e468535" -dependencies = [ - "memoffset", - "rustc_version", -] - -[[package]] -name = "filetime" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "windows-sys 0.45.0", -] - -[[package]] -name = "fix-path-env" -version = "0.1.0" -source = "git+https://github.com/tauri-apps/fix-path-env-rs?branch=release#b7905421de7e4f589baf6d34a6dd0c3cb83197c3" -dependencies = [ - "strip-ansi-escapes", - "thiserror", -] - -[[package]] -name = "flate2" -version = "1.0.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "flex-error" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" -dependencies = [ - "eyre", - "paste", -] - -[[package]] -name = "flume" -version = "0.10.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" -dependencies = [ - "futures-core", - "futures-sink", - "pin-project", - "spin 0.9.6", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "forward_ref" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futf" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" -dependencies = [ - "mac", - "new_debug_unreachable", -] - -[[package]] -name = "futures" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" - -[[package]] -name = "futures-executor" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-intrusive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5" -dependencies = [ - "futures-core", - "lock_api", - "parking_lot 0.11.2", -] - -[[package]] -name = "futures-io" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" - -[[package]] -name = "futures-macro" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "futures-sink" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" - -[[package]] -name = "futures-task" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" - -[[package]] -name = "futures-util" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "gdk" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9cb33da481c6c040404a11f8212d193889e9b435db2c14fd86987f630d3ce1" -dependencies = [ - "bitflags 1.3.2", - "cairo-rs", - "gdk-pixbuf", - "gdk-sys", - "gio", - "glib", - "libc", - "pango", -] - -[[package]] -name = "gdk-pixbuf" -version = "0.16.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3578c60dee9d029ad86593ed88cb40f35c1b83360e12498d055022385dd9a05" -dependencies = [ - "bitflags 1.3.2", - "gdk-pixbuf-sys", - "gio", - "glib", - "libc", -] - -[[package]] -name = "gdk-pixbuf-sys" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3092cf797a5f1210479ea38070d9ae8a5b8e9f8f1be9f32f4643c529c7d70016" -dependencies = [ - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "gdk-sys" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76354f97a913e55b984759a997b693aa7dc71068c9e98bcce51aa167a0a5c5a" -dependencies = [ - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "pkg-config", - "system-deps", -] - -[[package]] -name = "gdkx11-sys" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa2bf8b5b8c414bc5d05e48b271896d0fd3ddb57464a3108438082da61de6af" -dependencies = [ - "gdk-sys", - "glib-sys", - "libc", - "system-deps", - "x11", -] - -[[package]] -name = "generator" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a20a288a94683f5f4da0adecdbe095c94a77c295e514cc6484e9394dd8376e" -dependencies = [ - "cc", - "libc", - "log", - "rustversion", - "windows 0.44.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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "getrandom" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "getset" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "gio" -version = "0.16.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a1c84b4534a290a29160ef5c6eff2a9c95833111472e824fc5cb78b513dd092" -dependencies = [ - "bitflags 1.3.2", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "gio-sys", - "glib", - "libc", - "once_cell", - "pin-project-lite", - "smallvec", - "thiserror", -] - -[[package]] -name = "gio-sys" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9b693b8e39d042a95547fc258a7b07349b1f0b48f4b2fa3108ba3c51c0b5229" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", - "winapi", -] - -[[package]] -name = "git2" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0155506aab710a86160ddb504a480d2964d7ab5b9e62419be69e0032bc5931c" -dependencies = [ - "bitflags 1.3.2", - "libc", - "libgit2-sys", - "log", - "url", -] - -[[package]] -name = "glib" -version = "0.16.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd4df61a866ed7259d6189b8bcb1464989a77f1d85d25d002279bbe9dd38b2f" -dependencies = [ - "bitflags 1.3.2", - "futures-channel", - "futures-core", - "futures-executor", - "futures-task", - "futures-util", - "gio-sys", - "glib-macros", - "glib-sys", - "gobject-sys", - "libc", - "once_cell", - "smallvec", - "thiserror", -] - -[[package]] -name = "glib-macros" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e084807350b01348b6d9dbabb724d1a0bb987f47a2c85de200e98e12e30733bf" -dependencies = [ - "anyhow", - "heck 0.4.1", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "glib-sys" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61a4f46316d06bfa33a7ac22df6f0524c8be58e3db2d9ca99ccb1f357b62a65" -dependencies = [ - "libc", - "system-deps", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "globset" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" -dependencies = [ - "aho-corasick", - "bstr", - "fnv", - "log", - "regex", -] - -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "gobject-sys" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3520bb9c07ae2a12c7f2fbb24d4efc11231c8146a86956413fb1a79bb760a0f1" -dependencies = [ - "glib-sys", - "libc", - "system-deps", -] - -[[package]] -name = "group" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c363a5301b8f153d80747126a04b3c82073b9fe3130571a9d170cacdeaf7912" -dependencies = [ - "byteorder", - "ff 0.10.1", - "rand_core 0.6.4", - "subtle 2.4.1", -] - -[[package]] -name = "group" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" -dependencies = [ - "byteorder", - "ff 0.11.1", - "rand_core 0.6.4", - "subtle 2.4.1", -] - -[[package]] -name = "gtk" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4d3507d43908c866c805f74c9dd593c0ce7ba5c38e576e41846639cdcd4bee6" -dependencies = [ - "atk", - "bitflags 1.3.2", - "cairo-rs", - "field-offset", - "futures-channel", - "gdk", - "gdk-pixbuf", - "gio", - "glib", - "gtk-sys", - "gtk3-macros", - "libc", - "once_cell", - "pango", - "pkg-config", -] - -[[package]] -name = "gtk-sys" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b5f8946685d5fe44497007786600c2f368ff6b1e61a16251c89f72a97520a3" -dependencies = [ - "atk-sys", - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gdk-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "system-deps", -] - -[[package]] -name = "gtk3-macros" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfd6557b1018b773e43c8de9d0d13581d6b36190d0501916cbec4731db5ccff" -dependencies = [ - "anyhow", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "h2" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "handlebars" -version = "3.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4498fc115fa7d34de968184e473529abb40eeb6be8bc5f7faba3d08c316cb3e3" -dependencies = [ - "log", - "pest", - "pest_derive", - "quick-error 2.0.1", - "serde", - "serde_json", -] - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashlink" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf" -dependencies = [ - "hashbrown 0.11.2", -] - -[[package]] -name = "hashlink" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69fe1fcf8b4278d860ad0548329f892a3631fb63f82574df68275f34cdbe0ffa" -dependencies = [ - "hashbrown 0.12.3", -] - -[[package]] -name = "headers" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" -dependencies = [ - "base64 0.13.1", - "bitflags 1.3.2", - "bytes", - "headers-core", - "http", - "httpdate", - "mime", - "sha1", -] - -[[package]] -name = "headers-core" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" -dependencies = [ - "http", -] - -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hex-literal" -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 = "hkdf" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" -dependencies = [ - "hmac 0.12.1", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.6", -] - -[[package]] -name = "html5ever" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c13fb08e5d4dfc151ee5e88bae63f7773d61852f3bdc73c9f4b9e1bde03148" -dependencies = [ - "log", - "mac", - "markup5ever", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "http" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" -dependencies = [ - "bytes", - "fnv", - "itoa 1.0.6", -] - -[[package]] -name = "http-body" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "http-range" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" - -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error 1.2.3", -] - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "humantime-serde" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c" -dependencies = [ - "humantime 2.1.0", - "serde", -] - -[[package]] -name = "hyper" -version = "0.14.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa 1.0.6", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-proxy" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc" -dependencies = [ - "bytes", - "futures", - "headers", - "http", - "hyper", - "hyper-rustls", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.22.0", - "tower-service", - "webpki 0.21.4", -] - -[[package]] -name = "hyper-rustls" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" -dependencies = [ - "ct-logs", - "futures-util", - "hyper", - "log", - "rustls 0.19.1", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.22.0", - "webpki 0.21.4", - "webpki-roots 0.21.1", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "ico" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031530fe562d8c8d71c0635013d6d155bbfe8ba0aa4b4d2d24ce8af6b71047bd" -dependencies = [ - "byteorder", - "png", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "ignore" -version = "0.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" -dependencies = [ - "crossbeam-utils", - "globset", - "lazy_static", - "log", - "memchr", - "regex", - "same-file", - "thread_local", - "walkdir", - "winapi-util", -] - -[[package]] -name = "image" -version = "0.24.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b7ea949b537b0fd0af141fff8c77690f2ce96f4f41f042ccb6c69c6c965945" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "num-rational", - "num-traits", -] - -[[package]] -name = "indenter" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" - -[[package]] -name = "indexmap" -version = "1.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "infer" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a898e4b7951673fce96614ce5751d13c40fc5674bc2d759288e46c3ab62598b3" -dependencies = [ - "cfb", -] - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array 0.14.6", -] - -[[package]] -name = "input_buffer" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f97967975f448f1a7ddb12b0bc41069d09ed6a1c161a92687e057325db35d413" -dependencies = [ - "bytes", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" -dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys 0.45.0", -] - -[[package]] -name = "ipnet" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" - -[[package]] -name = "is-terminal" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8687c819457e979cc940d09cb16e42a1bf70aa6b60a549de6d3a62a0ee90c69e" -dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", - "windows-sys 0.45.0", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - -[[package]] -name = "itoa" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" - -[[package]] -name = "javascriptcore-rs" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "110b9902c80c12bf113c432d0b71c7a94490b294a8234f326fd0abca2fac0b00" -dependencies = [ - "bitflags 1.3.2", - "glib", - "javascriptcore-rs-sys", -] - -[[package]] -name = "javascriptcore-rs-sys" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98a216519a52cd941a733a0ad3f1023cfdb1cd47f3955e8e863ed56f558f916c" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "jni" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c" -dependencies = [ - "cesu8", - "combine", - "jni-sys", - "log", - "thiserror", - "walkdir", -] - -[[package]] -name = "jni-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" - -[[package]] -name = "jobserver" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "json-patch" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3fa5a61630976fc4c353c70297f2e93f1930e3ccee574d59d618ccbd5154ce" -dependencies = [ - "serde", - "serde_json", - "treediff 3.0.2", -] - -[[package]] -name = "json-patch" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e712e62827c382a77b87f590532febb1f8b2fdbc3eefa1ee37fe7281687075ef" -dependencies = [ - "serde", - "serde_json", - "thiserror", - "treediff 4.0.2", -] - -[[package]] -name = "k256" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "sec1", - "sha2 0.9.9", - "sha3", -] - -[[package]] -name = "keccak" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" -dependencies = [ - "cpufeatures", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea8e9c6e031377cff82ee3001dc8026cdf431ed4e2e6b51f98ab8c73484a358" -dependencies = [ - "cssparser", - "html5ever", - "matches", - "selectors", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.140" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" - -[[package]] -name = "libdbus-sys" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f8d7ae751e1cb825c840ae5e682f59b098cdfd213c350ac268b61449a5f58a0" -dependencies = [ - "pkg-config", -] - -[[package]] -name = "libgit2-sys" -version = "0.13.5+1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e5ea06c26926f1002dd553fded6cfcdc9784c1f60feeb58368b4d9b07b6dba" -dependencies = [ - "cc", - "libc", - "libz-sys", - "pkg-config", -] - -[[package]] -name = "libm" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" - -[[package]] -name = "libsqlite3-sys" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "898745e570c7d0453cc1fbc4a701eb6c662ed54e8fec8b7d14be137ebeeb9d14" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "libz-sys" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "line-wrap" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" -dependencies = [ - "safemem", -] - -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - -[[package]] -name = "linux-raw-sys" -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", - "chacha", - "keystream", -] - -[[package]] -name = "lock_api" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", - "serde", -] - -[[package]] -name = "loom" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" -dependencies = [ - "cfg-if", - "generator", - "scoped-tls", - "serde", - "serde_json", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "mac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" - -[[package]] -name = "mac-notification-sys" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e72d50edb17756489e79d52eb146927bec8eba9dd48faadf9ef08bca3791ad5" -dependencies = [ - "cc", - "dirs-next", - "objc-foundation", - "objc_id", - "time", -] - -[[package]] -name = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", -] - -[[package]] -name = "markup5ever" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" -dependencies = [ - "log", - "phf 0.8.0", - "phf_codegen", - "string_cache", - "string_cache_codegen", - "tendril", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata", -] - -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memoffset" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" -dependencies = [ - "autocfg", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" -dependencies = [ - "libc", - "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", -] - -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "ndk" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" -dependencies = [ - "bitflags 1.3.2", - "jni-sys", - "ndk-sys", - "num_enum", - "thiserror", -] - -[[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - -[[package]] -name = "ndk-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" - -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "notify-rust" -version = "4.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bfa211d18e360f08e36c364308f394b5eb23a6629150690e109a916dc6f610e" -dependencies = [ - "dbus", - "log", - "mac-notification-sys", - "tauri-winrt-notification", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" -dependencies = [ - "hermit-abi 0.2.6", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "num_threads" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" -dependencies = [ - "libc", -] - -[[package]] -name = "nym-api-requests" -version = "0.1.0" -dependencies = [ - "bs58", - "cosmrs", - "cosmwasm-std", - "getset", - "nym-coconut-interface", - "nym-mixnet-contract-common", - "schemars", - "serde", -] - -[[package]] -name = "nym-bandwidth-controller" -version = "0.1.0" -dependencies = [ - "bip39", - "nym-coconut-interface", - "nym-credential-storage", - "nym-credentials", - "nym-crypto", - "nym-network-defaults", - "rand 0.7.3", - "thiserror", - "url", - "validator-client", -] - -[[package]] -name = "nym-bin-common" -version = "0.3.0" -dependencies = [ - "atty", - "clap", - "clap_complete", - "clap_complete_fig", - "log", - "pretty_env_logger", - "semver 0.11.0", - "serde", - "vergen", -] - -[[package]] -name = "nym-client-core" -version = "1.1.13" -dependencies = [ - "async-trait", - "dashmap", - "dirs", - "futures", - "gloo-timers", - "humantime-serde", - "log", - "nym-config", - "nym-crypto", - "nym-gateway-client", - "nym-gateway-requests", - "nym-nonexhaustive-delayqueue", - "nym-pemstore", - "nym-sphinx", - "nym-task", - "nym-topology", - "nym-validator-client", - "rand 0.7.3", - "serde", - "serde_json", - "sqlx 0.6.3", - "tap", - "thiserror", - "time", - "tokio", - "tokio-stream", - "tokio-tungstenite", - "tungstenite", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-timer", - "wasm-utils", -] - -[[package]] -name = "nym-coconut" -version = "0.5.0" -dependencies = [ - "bls12_381 0.6.0", - "bs58", - "digest 0.9.0", - "ff 0.11.1", - "getrandom 0.2.8", - "group 0.11.0", - "itertools", - "nym-dkg", - "nym-pemstore", - "rand 0.8.5", - "serde", - "serde_derive", - "sha2 0.9.9", - "thiserror", -] - -[[package]] -name = "nym-coconut-bandwidth-contract-common" -version = "0.1.0" -dependencies = [ - "cosmwasm-std", - "nym-multisig-contract-common", - "schemars", - "serde", -] - -[[package]] -name = "nym-coconut-dkg-common" -version = "0.1.0" -dependencies = [ - "cosmwasm-std", - "cw-utils", - "nym-contracts-common", - "nym-multisig-contract-common", - "schemars", - "serde", -] - -[[package]] -name = "nym-coconut-interface" -version = "0.1.0" -dependencies = [ - "bs58", - "getset", - "nym-coconut", - "serde", - "thiserror", -] - -[[package]] -name = "nym-config" -version = "0.1.0" -dependencies = [ - "cfg-if", - "handlebars", - "log", - "nym-network-defaults", - "serde", - "toml", - "url", -] - -[[package]] -name = "nym-connect" -version = "1.1.12" -dependencies = [ - "anyhow", - "bip39", - "dirs", - "eyre", - "fern", - "fix-path-env", - "futures", - "itertools", - "log", - "nym-api-requests", - "nym-bin-common", - "nym-client-core", - "nym-config", - "nym-contracts-common", - "nym-credential-storage", - "nym-crypto", - "nym-socks5-client-core", - "nym-task", - "pretty_env_logger", - "rand 0.8.5", - "reqwest", - "rust-embed", - "serde", - "serde_json", - "serde_repr", - "tap", - "tauri", - "tauri-build", - "tempfile", - "tendermint-rpc", - "thiserror", - "time", - "tokio", - "ts-rs", - "url", - "yaml-rust", -] - -[[package]] -name = "nym-contracts-common" -version = "0.3.0" -dependencies = [ - "bs58", - "cosmwasm-std", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "nym-credential-storage" -version = "0.1.0" -dependencies = [ - "async-trait", - "log", - "sqlx 0.5.13", - "thiserror", - "tokio", -] - -[[package]] -name = "nym-credentials" -version = "0.1.0" -dependencies = [ - "bls12_381 0.5.0", - "cosmrs", - "nym-api-requests", - "nym-coconut-interface", - "nym-crypto", - "nym-validator-client", - "thiserror", -] - -[[package]] -name = "nym-crypto" -version = "0.2.0" -dependencies = [ - "aes 0.8.2", - "blake3", - "bs58", - "cipher 0.4.4", - "ctr 0.9.2", - "digest 0.10.6", - "ed25519-dalek", - "generic-array 0.14.6", - "hkdf 0.12.3", - "hmac 0.12.1", - "nym-pemstore", - "nym-sphinx-types", - "rand 0.7.3", - "subtle-encoding", - "thiserror", - "x25519-dalek", -] - -[[package]] -name = "nym-dkg" -version = "0.1.0" -dependencies = [ - "bitvec", - "bls12_381 0.6.0", - "bs58", - "ff 0.11.1", - "group 0.11.0", - "lazy_static", - "nym-pemstore", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_core 0.6.4", - "serde", - "serde_derive", - "sha2 0.9.9", - "thiserror", - "zeroize", -] - -[[package]] -name = "nym-gateway-client" -version = "0.1.0" -dependencies = [ - "async-trait", - "futures", - "getrandom 0.2.8", - "log", - "nym-coconut-interface", - "nym-credential-storage", - "nym-credentials", - "nym-crypto", - "nym-gateway-requests", - "nym-mobile-storage", - "nym-network-defaults", - "nym-pemstore", - "nym-sphinx", - "nym-task", - "nym-validator-client", - "rand 0.7.3", - "serde", - "thiserror", - "tokio", - "tokio-stream", - "tokio-tungstenite", - "tungstenite", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-timer", - "wasm-utils", -] - -[[package]] -name = "nym-gateway-requests" -version = "0.1.0" -dependencies = [ - "bs58", - "futures", - "log", - "nym-coconut-interface", - "nym-credentials", - "nym-crypto", - "nym-pemstore", - "nym-sphinx", - "rand 0.7.3", - "serde", - "serde_json", - "thiserror", - "tungstenite", -] - -[[package]] -name = "nym-group-contract-common" -version = "0.1.0" -dependencies = [ - "cw4", - "schemars", - "serde", -] - -[[package]] -name = "nym-mixnet-contract-common" -version = "0.3.0" -dependencies = [ - "bs58", - "cosmwasm-std", - "humantime-serde", - "log", - "nym-contracts-common", - "schemars", - "serde", - "serde-json-wasm", - "serde_repr", - "thiserror", - "time", -] - -[[package]] -name = "nym-mobile-storage" -version = "0.1.0" -dependencies = [ - "async-trait", - "thiserror", -] - -[[package]] -name = "nym-multisig-contract-common" -version = "0.1.0" -dependencies = [ - "cosmwasm-std", - "cw-utils", - "cw3", - "cw3-fixed-multisig", - "cw4", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "nym-network-defaults" -version = "0.1.0" -dependencies = [ - "cfg-if", - "dotenvy", - "hex-literal", - "once_cell", - "serde", - "thiserror", - "url", -] - -[[package]] -name = "nym-nonexhaustive-delayqueue" -version = "0.1.0" -dependencies = [ - "futures-core", - "slab", - "tokio", - "tokio-stream", - "tokio-util", - "wasm-timer", -] - -[[package]] -name = "nym-ordered-buffer" -version = "0.1.0" -dependencies = [ - "log", - "thiserror", -] - -[[package]] -name = "nym-outfox" -version = "0.1.0" -dependencies = [ - "blake3", - "chacha20", - "chacha20poly1305", - "curve25519-dalek", - "getrandom 0.2.8", - "rayon", - "thiserror", - "zeroize", -] - -[[package]] -name = "nym-pemstore" -version = "0.2.0" -dependencies = [ - "pem", -] - -[[package]] -name = "nym-service-providers-common" -version = "0.1.0" -dependencies = [ - "async-trait", - "log", - "nym-bin-common", - "nym-sphinx-anonymous-replies", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "nym-socks5-client-core" -version = "0.1.0" -dependencies = [ - "dirs", - "futures", - "log", - "nym-bandwidth-controller", - "nym-config", - "nym-credential-storage", - "nym-network-defaults", - "nym-service-providers-common", - "nym-socks5-proxy-helpers", - "nym-socks5-requests", - "nym-sphinx", - "nym-task", - "nym-validator-client", - "pin-project", - "rand 0.7.3", - "serde", - "tap", - "thiserror", - "tokio", -] - -[[package]] -name = "nym-socks5-proxy-helpers" -version = "0.1.0" -dependencies = [ - "bytes", - "futures", - "log", - "nym-ordered-buffer", - "nym-socks5-requests", - "nym-task", - "tokio", - "tokio-util", -] - -[[package]] -name = "nym-socks5-requests" -version = "0.1.0" -dependencies = [ - "nym-service-providers-common", - "nym-sphinx-addressing", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "nym-sphinx" -version = "0.1.0" -dependencies = [ - "log", - "nym-crypto", - "nym-outfox", - "nym-sphinx-acknowledgements", - "nym-sphinx-addressing", - "nym-sphinx-anonymous-replies", - "nym-sphinx-chunking", - "nym-sphinx-cover", - "nym-sphinx-forwarding", - "nym-sphinx-framing", - "nym-sphinx-params", - "nym-sphinx-types", - "nym-topology", - "rand 0.7.3", - "rand_distr", - "thiserror", - "tokio", -] - -[[package]] -name = "nym-sphinx-acknowledgements" -version = "0.1.0" -dependencies = [ - "nym-crypto", - "nym-pemstore", - "nym-sphinx-addressing", - "nym-sphinx-params", - "nym-sphinx-types", - "nym-topology", - "rand 0.7.3", - "thiserror", -] - -[[package]] -name = "nym-sphinx-addressing" -version = "0.1.0" -dependencies = [ - "nym-crypto", - "nym-sphinx-types", - "serde", - "thiserror", -] - -[[package]] -name = "nym-sphinx-anonymous-replies" -version = "0.1.0" -dependencies = [ - "bs58", - "nym-crypto", - "nym-sphinx-addressing", - "nym-sphinx-params", - "nym-sphinx-types", - "nym-topology", - "rand 0.7.3", - "serde", - "thiserror", - "wasm-bindgen", -] - -[[package]] -name = "nym-sphinx-chunking" -version = "0.1.0" -dependencies = [ - "log", - "nym-sphinx-addressing", - "nym-sphinx-params", - "nym-sphinx-types", - "rand 0.7.3", - "thiserror", -] - -[[package]] -name = "nym-sphinx-cover" -version = "0.1.0" -dependencies = [ - "nym-crypto", - "nym-sphinx-acknowledgements", - "nym-sphinx-addressing", - "nym-sphinx-chunking", - "nym-sphinx-forwarding", - "nym-sphinx-params", - "nym-sphinx-types", - "nym-topology", - "rand 0.7.3", - "thiserror", -] - -[[package]] -name = "nym-sphinx-forwarding" -version = "0.1.0" -dependencies = [ - "nym-sphinx-addressing", - "nym-sphinx-params", - "nym-sphinx-types", -] - -[[package]] -name = "nym-sphinx-framing" -version = "0.1.0" -dependencies = [ - "bytes", - "nym-sphinx-params", - "nym-sphinx-types", - "thiserror", - "tokio-util", -] - -[[package]] -name = "nym-sphinx-params" -version = "0.1.0" -dependencies = [ - "nym-crypto", - "nym-sphinx-types", - "thiserror", -] - -[[package]] -name = "nym-sphinx-types" -version = "0.2.0" -dependencies = [ - "sphinx-packet", -] - -[[package]] -name = "nym-task" -version = "0.1.0" -dependencies = [ - "futures", - "log", - "thiserror", - "tokio", - "wasm-bindgen", - "wasm-bindgen-futures", -] - -[[package]] -name = "nym-topology" -version = "0.1.0" -dependencies = [ - "async-trait", - "bs58", - "log", - "nym-bin-common", - "nym-crypto", - "nym-mixnet-contract-common", - "nym-sphinx-addressing", - "nym-sphinx-types", - "rand 0.7.3", - "thiserror", -] - -[[package]] -name = "nym-validator-client" -version = "0.1.0" -dependencies = [ - "async-trait", - "base64 0.13.1", - "bip39", - "colored 2.0.0", - "cosmrs", - "cosmwasm-std", - "cw3", - "cw4", - "eyre", - "flate2", - "futures", - "itertools", - "log", - "nym-api-requests", - "nym-coconut-bandwidth-contract-common", - "nym-coconut-dkg-common", - "nym-coconut-interface", - "nym-config", - "nym-contracts-common", - "nym-group-contract-common", - "nym-mixnet-contract-common", - "nym-multisig-contract-common", - "nym-network-defaults", - "nym-vesting-contract", - "nym-vesting-contract-common", - "prost", - "reqwest", - "serde", - "serde_json", - "sha2 0.9.9", - "thiserror", - "tokio", - "url", - "zeroize", -] - -[[package]] -name = "nym-vesting-contract" -version = "1.2.0" -dependencies = [ - "cosmwasm-derive", - "cosmwasm-std", - "cw-storage-plus", - "cw2", - "nym-contracts-common", - "nym-mixnet-contract-common", - "nym-vesting-contract-common", - "schemars", - "semver 1.0.17", - "serde", - "thiserror", - "vergen", -] - -[[package]] -name = "nym-vesting-contract-common" -version = "0.3.0" -dependencies = [ - "cosmwasm-std", - "nym-contracts-common", - "nym-mixnet-contract-common", - "schemars", - "serde", -] - -[[package]] -name = "objc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" -dependencies = [ - "malloc_buf", - "objc_exception", -] - -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -dependencies = [ - "block", - "objc", - "objc_id", -] - -[[package]] -name = "objc_exception" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" -dependencies = [ - "cc", -] - -[[package]] -name = "objc_id" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" -dependencies = [ - "objc", -] - -[[package]] -name = "once_cell" -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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "open" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2078c0039e6a54a0c42c28faa984e115fb4c2d5bf2208f77d1961002df8576f8" -dependencies = [ - "pathdiff", - "windows-sys 0.42.0", -] - -[[package]] -name = "openssl" -version = "0.10.47" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b277f87dacc05a6b709965d1cbafac4649d6ce9f3ce9ceb88508b5666dfec9" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-src" -version = "111.25.2+1.1.1t" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320708a054ad9b3bf314688b5db87cf4d6683d64cfc835e2337924ae62bf4431" -dependencies = [ - "cc", -] - -[[package]] -name = "openssl-sys" -version = "0.9.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a95792af3c4e0153c3914df2261bedd30a98476f94dc892b67dfe1d89d433a04" -dependencies = [ - "autocfg", - "cc", - "libc", - "openssl-src", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "os_str_bytes" -version = "6.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "pairing" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de9d09263c9966e8196fe0380c9dbbc7ea114b5cf371ba29004bc1f9c6db7f3" -dependencies = [ - "group 0.10.0", -] - -[[package]] -name = "pairing" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2e415e349a3006dd7d9482cdab1c980a845bed1377777d768cb693a44540b42" -dependencies = [ - "group 0.11.0", -] - -[[package]] -name = "pango" -version = "0.16.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdff66b271861037b89d028656184059e03b0b6ccb36003820be19f7200b1e94" -dependencies = [ - "bitflags 1.3.2", - "gio", - "glib", - "libc", - "once_cell", - "pango-sys", -] - -[[package]] -name = "pango-sys" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e134909a9a293e04d2cc31928aa95679c5e4df954d0b85483159bd20d8f047f" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core 0.9.7", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-sys 0.45.0", -] - -[[package]] -name = "paste" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" - -[[package]] -name = "pathdiff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" - -[[package]] -name = "pbkdf2" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05894bce6a1ba4be299d0c5f29563e08af2bc18bb7d48313113bed71e904739" -dependencies = [ - "crypto-mac 0.11.1", -] - -[[package]] -name = "peg" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07c0b841ea54f523f7aa556956fbd293bcbe06f2e67d2eb732b7278aaf1d166a" -dependencies = [ - "peg-macros", - "peg-runtime", -] - -[[package]] -name = "peg-macros" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aa52829b8decbef693af90202711348ab001456803ba2a98eb4ec8fb70844c" -dependencies = [ - "peg-runtime", - "proc-macro2", - "quote", -] - -[[package]] -name = "peg-runtime" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c719dcf55f09a3a7e764c6649ab594c18a177e3599c467983cdf644bfc0a4088" - -[[package]] -name = "pem" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd56cbd21fea48d0c440b41cd69c589faacade08c992d9a54e471b79d0fd13eb" -dependencies = [ - "base64 0.13.1", - "once_cell", - "regex", -] - -[[package]] -name = "percent-encoding" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" - -[[package]] -name = "pest" -version = "2.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cbd939b234e95d72bc393d51788aec68aeeb5d51e748ca08ff3aad58cb722f7" -dependencies = [ - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pest_derive" -version = "2.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a81186863f3d0a27340815be8f2078dd8050b14cd71913db9fbda795e5f707d7" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a1ef20bf3193c15ac345acb32e26b3dc3223aff4d77ae4fc5359567683796b" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "pest_meta" -version = "2.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e3b284b1f13a20dc5ebc90aff59a51b8d7137c221131b52a7260c08cbc1cc80" -dependencies = [ - "once_cell", - "pest", - "sha2 0.10.6", -] - -[[package]] -name = "phf" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" -dependencies = [ - "phf_macros 0.8.0", - "phf_shared 0.8.0", - "proc-macro-hack", -] - -[[package]] -name = "phf" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" -dependencies = [ - "phf_macros 0.10.0", - "phf_shared 0.10.0", - "proc-macro-hack", -] - -[[package]] -name = "phf_codegen" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" -dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", -] - -[[package]] -name = "phf_generator" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" -dependencies = [ - "phf_shared 0.8.0", - "rand 0.7.3", -] - -[[package]] -name = "phf_generator" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" -dependencies = [ - "phf_shared 0.10.0", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c" -dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", - "proc-macro-hack", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "phf_macros" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" -dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro-hack", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "phf_shared" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" -dependencies = [ - "siphasher", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs8" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" -dependencies = [ - "der", - "spki", - "zeroize", -] - -[[package]] -name = "pkg-config" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" - -[[package]] -name = "plist" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590" -dependencies = [ - "base64 0.21.0", - "indexmap", - "line-wrap", - "quick-xml 0.28.1", - "serde", - "time", -] - -[[package]] -name = "png" -version = "0.17.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" -dependencies = [ - "bitflags 1.3.2", - "crc32fast", - "flate2", - "miniz_oxide", -] - -[[package]] -name = "poly1305" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" -dependencies = [ - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[package]] -name = "pretty_env_logger" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d" -dependencies = [ - "env_logger", - "log", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - -[[package]] -name = "proc-macro2" -version = "1.0.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "prost" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-derive" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "prost-types" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" -dependencies = [ - "bytes", - "prost", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - -[[package]] -name = "quick-xml" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bafc859c6815fbaffbbbf4229ecb767ac913fecb27f9ad4343662e9ef099ea" -dependencies = [ - "memchr", -] - -[[package]] -name = "quick-xml" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c1a97b1bc42b1d550bfb48d4262153fe400a12bab1511821736f7eac76d7e2" -dependencies = [ - "memchr", -] - -[[package]] -name = "quote" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", - "rand_pcg", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.8", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "raw-window-handle" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f851a03551ceefd30132e447f07f96cb7011d6b658374f3aed847333adb5559" - -[[package]] -name = "rayon" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "num_cpus", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom 0.2.8", - "redox_syscall", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce168fea28d3e05f158bda4576cf0c844d5045bc2cc3620fa0292ed5bb5814c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "reqwest" -version = "0.11.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ba30cc2c0cd02af1222ed216ba659cdb2f879dfe3181852fe7c50b1d0005949" -dependencies = [ - "base64 0.21.0", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-native-tls", - "tokio-socks", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - -[[package]] -name = "rfc6979" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" -dependencies = [ - "crypto-bigint", - "hmac 0.11.0", - "zeroize", -] - -[[package]] -name = "rfd" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b344b73e5688c6ad9389095d8e78a877637078f490ae17259937371113ebcb67" -dependencies = [ - "block", - "dispatch", - "glib-sys", - "gobject-sys", - "gtk-sys", - "js-sys", - "log", - "objc", - "objc-foundation", - "objc_id", - "raw-window-handle", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows 0.44.0", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted", - "web-sys", - "winapi", -] - -[[package]] -name = "ripemd160" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "rust-embed" -version = "6.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb133b9a38b5543fad3807fb2028ea47c5f2b566f4f5e28a11902f1a358348b6" -dependencies = [ - "rust-embed-impl", - "rust-embed-utils", - "walkdir", -] - -[[package]] -name = "rust-embed-impl" -version = "6.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4e0f0ced47ded9a68374ac145edd65a6c1fa13a96447b873660b2a568a0fd7" -dependencies = [ - "proc-macro2", - "quote", - "rust-embed-utils", - "syn 1.0.109", - "walkdir", -] - -[[package]] -name = "rust-embed-utils" -version = "7.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512b0ab6853f7e14e3c8754acb43d6f748bb9ced66aa5915a6553ac8213f7731" -dependencies = [ - "globset", - "sha2 0.10.6", - "walkdir", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.17", -] - -[[package]] -name = "rustix" -version = "0.36.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "windows-sys 0.45.0", -] - -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.1", - "log", - "ring", - "sct 0.6.1", - "webpki 0.21.4", -] - -[[package]] -name = "rustls" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" -dependencies = [ - "log", - "ring", - "sct 0.7.0", - "webpki 0.22.0", -] - -[[package]] -name = "rustls-native-certs" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" -dependencies = [ - "openssl-probe", - "rustls 0.19.1", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" -dependencies = [ - "base64 0.21.0", -] - -[[package]] -name = "rustversion" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" - -[[package]] -name = "ryu" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" - -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" -dependencies = [ - "windows-sys 0.42.0", -] - -[[package]] -name = "schemars" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" -dependencies = [ - "dyn-clone", - "indexmap", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 1.0.109", -] - -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "sct" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "sec1" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" -dependencies = [ - "der", - "generic-array 0.14.6", - "pkcs8", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "security-framework" -version = "2.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "selectors" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe" -dependencies = [ - "bitflags 1.3.2", - "cssparser", - "derive_more", - "fxhash", - "log", - "matches", - "phf 0.8.0", - "phf_codegen", - "precomputed-hash", - "servo_arc", - "smallvec", - "thin-slice", -] - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" -dependencies = [ - "serde", -] - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - -[[package]] -name = "serde" -version = "1.0.158" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-json-wasm" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479b4dbc401ca13ee8ce902851b834893251404c4f3c65370a49e047a6be09a5" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_bytes" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.158" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.5", -] - -[[package]] -name = "serde_derive_internals" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "serde_json" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" -dependencies = [ - "itoa 1.0.6", - "ryu", - "serde", -] - -[[package]] -name = "serde_repr" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.5", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa 1.0.6", - "ryu", - "serde", -] - -[[package]] -name = "serde_with" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" -dependencies = [ - "serde", - "serde_with_macros", -] - -[[package]] -name = "serde_with_macros" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "serialize-to-javascript" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9823f2d3b6a81d98228151fdeaf848206a7855a7a042bbf9bf870449a66cafb" -dependencies = [ - "serde", - "serde_json", - "serialize-to-javascript-impl", -] - -[[package]] -name = "serialize-to-javascript-impl" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74064874e9f6a15f04c1f3cb627902d0e6b410abbf36668afa873c61889f1763" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "servo_arc" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432" -dependencies = [ - "nodrop", - "stable_deref_trait", -] - -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sha1" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.6", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sha2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.6", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sharded-slab" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" -dependencies = [ - "digest 0.9.0", - "rand_core 0.6.4", -] - -[[package]] -name = "siphasher" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" - -[[package]] -name = "slab" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" - -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "soup3" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82bc46048125fefd69d30b32b9d263d6556c9ffe82a7a7df181a86d912da5616" -dependencies = [ - "bitflags 1.3.2", - "futures-channel", - "gio", - "glib", - "libc", - "once_cell", - "soup3-sys", -] - -[[package]] -name = "soup3-sys" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "014bbeb1c4cdb30739dc181e8d98b7908f124d9555843afa89b5570aaf4ec62b" -dependencies = [ - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[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", - "bs58", - "byteorder", - "chacha", - "curve25519-dalek", - "digest 0.9.0", - "hkdf 0.11.0", - "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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5d6e0250b93c8427a177b849d144a96d5acc57006149479403d7861ab721e34" -dependencies = [ - "lock_api", -] - -[[package]] -name = "spki" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "sqlformat" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b7922be017ee70900be125523f38bdd644f4f06a1b16e8fa5a8ee8c34bffd4" -dependencies = [ - "itertools", - "nom", - "unicode_categories", -] - -[[package]] -name = "sqlformat" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" -dependencies = [ - "itertools", - "nom", - "unicode_categories", -] - -[[package]] -name = "sqlx" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551873805652ba0d912fec5bbb0f8b4cdd96baf8e2ebf5970e5671092966019b" -dependencies = [ - "sqlx-core 0.5.13", - "sqlx-macros 0.5.13", -] - -[[package]] -name = "sqlx" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8de3b03a925878ed54a954f621e64bf55a3c1bd29652d0d1a17830405350188" -dependencies = [ - "sqlx-core 0.6.3", - "sqlx-macros 0.6.3", -] - -[[package]] -name = "sqlx-core" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48c61941ccf5ddcada342cd59e3e5173b007c509e1e8e990dafc830294d9dc5" -dependencies = [ - "ahash", - "atoi 0.4.0", - "bitflags 1.3.2", - "byteorder", - "bytes", - "crc 2.1.0", - "crossbeam-queue", - "either", - "event-listener", - "flume", - "futures-channel", - "futures-core", - "futures-executor", - "futures-intrusive", - "futures-util", - "hashlink 0.7.0", - "hex", - "indexmap", - "itoa 1.0.6", - "libc", - "libsqlite3-sys", - "log", - "memchr", - "once_cell", - "paste", - "percent-encoding", - "rustls 0.19.1", - "sha2 0.10.6", - "smallvec", - "sqlformat 0.1.8", - "sqlx-rt 0.5.13", - "stringprep", - "thiserror", - "tokio-stream", - "url", - "webpki 0.21.4", - "webpki-roots 0.21.1", -] - -[[package]] -name = "sqlx-core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029" -dependencies = [ - "ahash", - "atoi 1.0.0", - "bitflags 1.3.2", - "byteorder", - "bytes", - "crc 3.0.1", - "crossbeam-queue", - "dotenvy", - "either", - "event-listener", - "flume", - "futures-channel", - "futures-core", - "futures-executor", - "futures-intrusive", - "futures-util", - "hashlink 0.8.1", - "hex", - "indexmap", - "itoa 1.0.6", - "libc", - "libsqlite3-sys", - "log", - "memchr", - "once_cell", - "paste", - "percent-encoding", - "rustls 0.20.8", - "rustls-pemfile", - "sha2 0.10.6", - "smallvec", - "sqlformat 0.2.1", - "sqlx-rt 0.6.3", - "stringprep", - "thiserror", - "tokio-stream", - "url", - "webpki-roots 0.22.6", -] - -[[package]] -name = "sqlx-macros" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0fba2b0cae21fc00fe6046f8baa4c7fcb49e379f0f592b04696607f69ed2e1" -dependencies = [ - "dotenv", - "either", - "heck 0.4.1", - "once_cell", - "proc-macro2", - "quote", - "sha2 0.10.6", - "sqlx-core 0.5.13", - "sqlx-rt 0.5.13", - "syn 1.0.109", - "url", -] - -[[package]] -name = "sqlx-macros" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9966e64ae989e7e575b19d7265cb79d7fc3cbbdf179835cb0d716f294c2049c9" -dependencies = [ - "dotenvy", - "either", - "heck 0.4.1", - "once_cell", - "proc-macro2", - "quote", - "sha2 0.10.6", - "sqlx-core 0.6.3", - "sqlx-rt 0.6.3", - "syn 1.0.109", - "url", -] - -[[package]] -name = "sqlx-rt" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4db708cd3e459078f85f39f96a00960bd841f66ee2a669e90bf36907f5a79aae" -dependencies = [ - "once_cell", - "tokio", - "tokio-rustls 0.22.0", -] - -[[package]] -name = "sqlx-rt" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804d3f245f894e61b1e6263c84b23ca675d96753b5abfd5cc8597d86806e8024" -dependencies = [ - "once_cell", - "tokio", - "tokio-rustls 0.23.4", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "state" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe866e1e51e8260c9eed836a042a5e7f6726bb2b411dffeaa712e19c388f23b" -dependencies = [ - "loom", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "string_cache" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot 0.12.1", - "phf_shared 0.10.0", - "precomputed-hash", - "serde", -] - -[[package]] -name = "string_cache_codegen" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" -dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro2", - "quote", -] - -[[package]] -name = "stringprep" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "strip-ansi-escapes" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "011cbb39cf7c1f62871aea3cc46e5817b0937b49e9447370c93cacbe93a766d8" -dependencies = [ - "vte", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "strum" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb" -dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] -name = "subtle-encoding" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" -dependencies = [ - "zeroize", -] - -[[package]] -name = "swift-rs" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eab55f44d02ced20ffa22fd5b4bd083ab59c940c7637d37fec4426b1a01d769" -dependencies = [ - "base64 0.21.0", - "serde", - "serde_json", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89c2d1c76a26822187a1fbb5964e3fff108bc208f02e820ab9dac1234f6b388a" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] - -[[package]] -name = "system-deps" -version = "6.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2955b1fe31e1fa2fbd1976b71cc69a606d7d4da16f6de3333d0c92d51419aeff" -dependencies = [ - "cfg-expr", - "heck 0.4.1", - "pkg-config", - "toml", - "version-compare", -] - -[[package]] -name = "tao" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d021218bcb43d4bf42112b1da5f7d8454502ffb188489ba0089fe4e3e34a8f6" -dependencies = [ - "bitflags 1.3.2", - "cairo-rs", - "cc", - "cocoa", - "core-foundation", - "core-graphics", - "crossbeam-channel", - "dispatch", - "gdk", - "gdk-pixbuf", - "gdk-sys", - "gdkx11-sys", - "gio", - "glib", - "glib-sys", - "gtk", - "image", - "instant", - "jni", - "lazy_static", - "libc", - "log", - "ndk", - "ndk-context", - "ndk-sys", - "objc", - "once_cell", - "parking_lot 0.12.1", - "png", - "raw-window-handle", - "scopeguard", - "serde", - "tao-macros", - "unicode-segmentation", - "uuid 1.3.0", - "windows 0.39.0", - "windows-implement 0.39.0", - "x11-dl", -] - -[[package]] -name = "tao-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b27a4bcc5eb524658234589bdffc7e7bfb996dbae6ce9393bfd39cb4159b445" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tar" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" -dependencies = [ - "filetime", - "libc", - "xattr", -] - -[[package]] -name = "tauri" -version = "2.0.0-alpha.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3eb6015452c545d13d2eb04166376474ed0296bc647229f798937f75d3e9908" -dependencies = [ - "anyhow", - "attohttpc", - "cocoa", - "dirs-next", - "embed_plist", - "encoding_rs", - "flate2", - "futures-util", - "glib", - "glob", - "gtk", - "heck 0.4.1", - "http", - "ignore", - "libc", - "log", - "notify-rust", - "objc", - "once_cell", - "open", - "paste", - "percent-encoding", - "rand 0.8.5", - "raw-window-handle", - "regex", - "rfd", - "semver 1.0.17", - "serde", - "serde_json", - "serde_repr", - "serialize-to-javascript", - "state", - "tar", - "tauri-macros", - "tauri-runtime", - "tauri-runtime-wry", - "tauri-utils", - "tempfile", - "thiserror", - "tokio", - "url", - "uuid 1.3.0", - "webkit2gtk", - "webview2-com", - "windows 0.39.0", -] - -[[package]] -name = "tauri-build" -version = "2.0.0-alpha.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "383f94e1b46fb4e249e4eafbd0589ffbe02b241b49dadebd47640598a17e584e" -dependencies = [ - "anyhow", - "cargo_toml", - "filetime", - "heck 0.4.1", - "json-patch 0.3.0", - "semver 1.0.17", - "serde", - "serde_json", - "swift-rs", - "tauri-utils", - "tauri-winres", - "walkdir", -] - -[[package]] -name = "tauri-codegen" -version = "2.0.0-alpha.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7d3464109ac3b7fbff0d78f1bc6b309af49c3d6267ebace90c5a47fbac58cb" -dependencies = [ - "base64 0.13.1", - "brotli", - "ico", - "json-patch 0.2.7", - "plist", - "png", - "proc-macro2", - "quote", - "regex", - "semver 1.0.17", - "serde", - "serde_json", - "sha2 0.10.6", - "tauri-utils", - "thiserror", - "time", - "url", - "uuid 1.3.0", - "walkdir", -] - -[[package]] -name = "tauri-macros" -version = "2.0.0-alpha.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969f323a5c603fe2d113dd1098b6d1a965fd92b78e7bd7f74eb0bb6d7d948183" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 1.0.109", - "tauri-codegen", - "tauri-utils", -] - -[[package]] -name = "tauri-runtime" -version = "0.13.0-alpha.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7369709ff9ac16a1235906801033804d8ea33e4d023e066f06df0c5c9592a0" -dependencies = [ - "gtk", - "http", - "http-range", - "rand 0.8.5", - "raw-window-handle", - "serde", - "serde_json", - "tauri-utils", - "thiserror", - "uuid 1.3.0", - "webview2-com", - "windows 0.39.0", -] - -[[package]] -name = "tauri-runtime-wry" -version = "0.13.0-alpha.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b914d691ef830dfa98658409eea9d9116240ae0c9d3eb228eed2a9c139a60916" -dependencies = [ - "cocoa", - "gtk", - "percent-encoding", - "rand 0.8.5", - "raw-window-handle", - "tauri-runtime", - "tauri-utils", - "uuid 1.3.0", - "webkit2gtk", - "webview2-com", - "windows 0.39.0", - "wry", -] - -[[package]] -name = "tauri-utils" -version = "2.0.0-alpha.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a488bb0c60e2ce9efbe8283a11299675e01f55caf12304889f8639b3c35713c" -dependencies = [ - "brotli", - "ctor", - "glob", - "heck 0.4.1", - "html5ever", - "infer", - "json-patch 0.3.0", - "kuchiki", - "memchr", - "phf 0.10.1", - "proc-macro2", - "quote", - "semver 1.0.17", - "serde", - "serde_json", - "serde_with", - "thiserror", - "url", - "walkdir", - "windows 0.44.0", -] - -[[package]] -name = "tauri-winres" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b7a78dc04f75fb5ab815e66ac561c81e92a968a40f29e7c21afd152d694fad8" -dependencies = [ - "toml", - "version_check", -] - -[[package]] -name = "tauri-winrt-notification" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58de036c4d2e20717024de2a3c4bf56c301f07b21bc8ef9b57189fce06f1f3b" -dependencies = [ - "quick-xml 0.23.1", - "strum", - "windows 0.39.0", -] - -[[package]] -name = "tempfile" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" -dependencies = [ - "cfg-if", - "fastrand", - "redox_syscall", - "rustix", - "windows-sys 0.42.0", -] - -[[package]] -name = "tendermint" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ca881fa4dedd2b46334f13be7fbc8cc1549ba4be5a833fe4e73d1a1baaf7949" -dependencies = [ - "async-trait", - "bytes", - "ed25519", - "ed25519-dalek", - "flex-error", - "futures", - "k256", - "num-traits", - "once_cell", - "prost", - "prost-types", - "ripemd160", - "serde", - "serde_bytes", - "serde_json", - "serde_repr", - "sha2 0.9.9", - "signature", - "subtle 2.4.1", - "subtle-encoding", - "tendermint-proto", - "time", - "zeroize", -] - -[[package]] -name = "tendermint-config" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6c56ee93f4e9b7e7daba86d171f44572e91b741084384d0ae00df7991873dfd" -dependencies = [ - "flex-error", - "serde", - "serde_json", - "tendermint", - "toml", - "url", -] - -[[package]] -name = "tendermint-proto" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71f925d74903f4abbdc4af0110635a307b3cb05b175fdff4a7247c14a4d0874" -dependencies = [ - "bytes", - "flex-error", - "num-derive", - "num-traits", - "prost", - "prost-types", - "serde", - "serde_bytes", - "subtle-encoding", - "time", -] - -[[package]] -name = "tendermint-rpc" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13e63f57ee05a1e927887191c76d1b139de9fa40c180b9f8727ee44377242a6" -dependencies = [ - "async-trait", - "bytes", - "flex-error", - "futures", - "getrandom 0.2.8", - "http", - "hyper", - "hyper-proxy", - "hyper-rustls", - "peg", - "pin-project", - "serde", - "serde_bytes", - "serde_json", - "subtle-encoding", - "tendermint", - "tendermint-config", - "tendermint-proto", - "thiserror", - "time", - "tokio", - "tracing", - "url", - "uuid 0.8.2", - "walkdir", -] - -[[package]] -name = "tendril" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" -dependencies = [ - "futf", - "mac", - "utf-8", -] - -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thin-slice" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" - -[[package]] -name = "thiserror" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.5", -] - -[[package]] -name = "thread_local" -version = "1.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "time" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" -dependencies = [ - "itoa 1.0.6", - "js-sys", - "libc", - "num_threads", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" - -[[package]] -name = "time-macros" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" -dependencies = [ - "time-core", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" -dependencies = [ - "autocfg", - "bytes", - "libc", - "memchr", - "mio", - "num_cpus", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.45.0", -] - -[[package]] -name = "tokio-macros" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" -dependencies = [ - "rustls 0.19.1", - "tokio", - "webpki 0.21.4", -] - -[[package]] -name = "tokio-rustls" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls 0.20.8", - "tokio", - "webpki 0.22.0", -] - -[[package]] -name = "tokio-socks" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51165dfa029d2a65969413a6cc96f354b86b464498702f174a4efa13608fd8c0" -dependencies = [ - "either", - "futures-util", - "thiserror", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", - "tokio-util", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e96bb520beab540ab664bd5a9cfeaa1fcd846fa68c830b42e2c8963071251d2" -dependencies = [ - "futures-util", - "log", - "pin-project", - "tokio", - "tungstenite", -] - -[[package]] -name = "tokio-util" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "slab", - "tokio", - "tracing", -] - -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_datetime" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" - -[[package]] -name = "toml_edit" -version = "0.19.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc18466501acd8ac6a3f615dd29a3438f8ca6bb3b19537138b3106e575621274" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" -dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "tracing-core" -version = "0.1.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" -dependencies = [ - "lazy_static", - "log", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "treediff" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "761e8d5ad7ce14bb82b7e61ccc0ca961005a275a060b9644a2431aa11553c2ff" -dependencies = [ - "serde_json", -] - -[[package]] -name = "treediff" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303" -dependencies = [ - "serde_json", -] - -[[package]] -name = "try-lock" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" - -[[package]] -name = "ts-rs" -version = "6.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4added4070a4fdf9df03457206cd2e4b12417c8560a2954d91ffcbe60177a56a" -dependencies = [ - "thiserror", - "ts-rs-macros", -] - -[[package]] -name = "ts-rs-macros" -version = "6.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f807fdb3151fee75df7485b901a89624358cd07a67a8fb1a5831bf5a07681ff" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn 1.0.109", - "termcolor", -] - -[[package]] -name = "tungstenite" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe8dada8c1a3aeca77d6b51a4f1314e0f4b8e438b7b1b71e3ddaca8080e4093" -dependencies = [ - "base64 0.13.1", - "byteorder", - "bytes", - "http", - "httparse", - "input_buffer", - "log", - "rand 0.8.5", - "sha-1", - "thiserror", - "url", - "utf-8", -] - -[[package]] -name = "typenum" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "ucd-trie" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" - -[[package]] -name = "uint" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - -[[package]] -name = "unicode-ident" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" - -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[package]] -name = "unicode_categories" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" - -[[package]] -name = "universal-hash" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3160b73c9a19f7e2939a2fdad446c57c1bbbbf4d919d3213ff1267a580d8b5" -dependencies = [ - "crypto-common", - "subtle 2.4.1", -] - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "url" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" - -[[package]] -name = "uuid" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" -dependencies = [ - "getrandom 0.2.8", -] - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "vergen" -version = "7.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447f9238a4553957277b3ee09d80babeae0811f1b3baefb093de1c0448437a37" -dependencies = [ - "anyhow", - "cfg-if", - "enum-iterator", - "getset", - "git2", - "rustc_version", - "rustversion", - "thiserror", - "time", -] - -[[package]] -name = "version-compare" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "vte" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cbce692ab4ca2f1f3047fcf732430249c0e971bfdd2b234cf2c47ad93af5983" -dependencies = [ - "arrayvec 0.5.2", - "utf8parse", - "vte_generate_state_changes", -] - -[[package]] -name = "vte_generate_state_changes" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d257817081c7dffcdbab24b9e62d2def62e2ff7d00b1c20062551e6cccc145ff" -dependencies = [ - "proc-macro2", - "quote", -] - -[[package]] -name = "walkdir" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 1.0.109", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" - -[[package]] -name = "wasm-timer" -version = "0.2.5" -source = "git+https://github.com/mmsinclair/wasm-timer?rev=b9d1a54ad514c2f230a026afe0dde341e98cd7b6#b9d1a54ad514c2f230a026afe0dde341e98cd7b6" -dependencies = [ - "futures", - "js-sys", - "parking_lot 0.11.2", - "pin-utils", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "wasm-utils" -version = "0.1.0" -dependencies = [ - "futures", - "js-sys", - "tungstenite", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "web-sys" -version = "0.3.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webkit2gtk" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8eea819afe15eb8dcdff4f19d8bfda540bae84d874c10e6f4b8faf2d6704bd1" -dependencies = [ - "bitflags 1.3.2", - "cairo-rs", - "gdk", - "gdk-sys", - "gio", - "gio-sys", - "glib", - "glib-sys", - "gobject-sys", - "gtk", - "gtk-sys", - "javascriptcore-rs", - "libc", - "once_cell", - "soup3", - "webkit2gtk-sys", -] - -[[package]] -name = "webkit2gtk-sys" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ac7a95ddd3fdfcaf83d8e513b4b1ad101b95b413b6aa6662ed95f284fc3d5b" -dependencies = [ - "bitflags 1.3.2", - "cairo-sys-rs", - "gdk-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "gtk-sys", - "javascriptcore-rs-sys", - "libc", - "pkg-config", - "soup3-sys", - "system-deps", -] - -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" -dependencies = [ - "webpki 0.21.4", -] - -[[package]] -name = "webpki-roots" -version = "0.22.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki 0.22.0", -] - -[[package]] -name = "webview2-com" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a769c9f1a64a8734bde70caafac2b96cada12cd4aefa49196b3a386b8b4178" -dependencies = [ - "webview2-com-macros", - "webview2-com-sys", - "windows 0.39.0", - "windows-implement 0.39.0", -] - -[[package]] -name = "webview2-com-macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaebe196c01691db62e9e4ca52c5ef1e4fd837dcae27dae3ada599b5a8fd05ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "webview2-com-sys" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac48ef20ddf657755fdcda8dfed2a7b4fc7e4581acce6fe9b88c3d64f29dee7" -dependencies = [ - "regex", - "serde", - "serde_json", - "thiserror", - "windows 0.39.0", - "windows-bindgen", - "windows-metadata", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c4bd0a50ac6020f65184721f758dba47bb9fbc2133df715ec74a237b26794a" -dependencies = [ - "windows-implement 0.39.0", - "windows_aarch64_msvc 0.39.0", - "windows_i686_gnu 0.39.0", - "windows_i686_msvc 0.39.0", - "windows_x86_64_gnu 0.39.0", - "windows_x86_64_msvc 0.39.0", -] - -[[package]] -name = "windows" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" -dependencies = [ - "windows-implement 0.44.0", - "windows-interface", - "windows-targets", -] - -[[package]] -name = "windows-bindgen" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68003dbd0e38abc0fb85b939240f4bce37c43a5981d3df37ccbaaa981b47cb41" -dependencies = [ - "windows-metadata", - "windows-tokens", -] - -[[package]] -name = "windows-implement" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba01f98f509cb5dc05f4e5fc95e535f78260f15fea8fe1a8abdd08f774f1cee7" -dependencies = [ - "syn 1.0.109", - "windows-tokens", -] - -[[package]] -name = "windows-implement" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce87ca8e3417b02dc2a8a22769306658670ec92d78f1bd420d6310a67c245c6" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "windows-interface" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853f69a591ecd4f810d29f17e902d40e349fb05b0b11fff63b08b826bfe39c7f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "windows-metadata" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee5e275231f07c6e240d14f34e1b635bf1faa1c76c57cfd59a5cdb9848e4278" - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-tokens" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f838de2fe15fe6bac988e74b798f26499a8b21a9d97edec321e79b28d1d7f597" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_i686_gnu" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - -[[package]] -name = "windows_i686_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - -[[package]] -name = "winnow" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d020b441f92996c80d94ae9166e8501e59c7bb56121189dc9eab3bd8216966" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" -dependencies = [ - "winapi", -] - -[[package]] -name = "wry" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f8052d7e38efb90235f1895d43904fc152e1efd96383fe57e30ea596738fa3b" -dependencies = [ - "base64 0.13.1", - "block", - "cocoa", - "core-graphics", - "crossbeam-channel", - "dunce", - "gdk", - "gio", - "glib", - "gtk", - "html5ever", - "http", - "kuchiki", - "libc", - "log", - "objc", - "objc_id", - "once_cell", - "serde", - "serde_json", - "sha2 0.10.6", - "soup3", - "tao", - "thiserror", - "url", - "webkit2gtk", - "webkit2gtk-sys", - "webview2-com", - "windows 0.39.0", - "windows-implement 0.39.0", -] - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "x11" -version = "2.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" -dependencies = [ - "libc", - "pkg-config", -] - -[[package]] -name = "x11-dl" -version = "2.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" -dependencies = [ - "libc", - "once_cell", - "pkg-config", -] - -[[package]] -name = "x25519-dalek" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" -dependencies = [ - "curve25519-dalek", - "rand_core 0.5.1", - "zeroize", -] - -[[package]] -name = "xattr" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" -dependencies = [ - "libc", -] - -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - -[[package]] -name = "zeroize" -version = "1.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", -] - -[[patch.unused]] -name = "tauri-mobile" -version = "0.2.5" -source = "git+https://github.com/tauri-apps/tauri-mobile?branch=dev#f9791c2d908ab49bdf44907c53b394c2560f3306" diff --git a/nym-connect/mobile/src-tauri/Cargo.toml b/nym-connect/mobile/src-tauri/Cargo.toml deleted file mode 100644 index 28ea437cdc..0000000000 --- a/nym-connect/mobile/src-tauri/Cargo.toml +++ /dev/null @@ -1,79 +0,0 @@ -[package] -name = "nym-connect" -version = "1.1.12" -description = "nym-connect mobile" -authors = ["Nym Technologies SA"] -license = "" -repository = "" -default-run = "nym-connect" -edition = "2021" -build = "src/build.rs" -rust-version = "1.58" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[lib] -crate-type = ["staticlib", "cdylib", "rlib"] - -[build-dependencies] -tauri-build = { version = "2.0.0-alpha.1", features = [] } -# tauri-build = { git = "https://github.com/tauri-apps/tauri", branch = "next", features = [] } - -# TODO untill new tauri version includes https://github.com/tauri-apps/tauri-mobile/pull/111 -[patch.crates-io] -tauri-mobile = { git = "https://github.com/tauri-apps/tauri-mobile", branch = "dev" } - -[dependencies] -anyhow = "1.0" -bip39 = { version = "2.0.0", features = ["zeroize"] } -dirs = "4.0" -eyre = "0.6.5" -fix-path-env = { git = "https://github.com/tauri-apps/fix-path-env-rs", branch = "release"} -futures = "0.3" -fern = { version = "0.6.1", features = ["colored"] } -itertools = "0.10.5" -log = { version = "0.4", features = ["serde"] } -pretty_env_logger = "0.4.0" -rand = "0.8" -reqwest = { version = "0.11", features = ["json", "socks"] } -rust-embed = { version = "6.4.2", features = ["include-exclude"] } -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -serde_repr = "0.1" -tap = "1.0.1" -# tauri = { git = "https://github.com/tauri-apps/tauri", branch = "next", features = ["clipboard-write-text", "native-tls-vendored", "notification-all", "shell-open"] } -tauri = { version = "2.0.0-alpha.3", features = ["clipboard-write-text", "native-tls-vendored", "notification-all", "shell-open"] } -#tendermint-rpc = "0.23.0" -thiserror = "1.0" -time = { version = "0.3.17", features = ["local-offset"] } -tokio = { version = "1.24.1", features = ["sync", "time"] } -url = "2.2" -yaml-rust = "0.4" - -nym-client-core = { path = "../../../common/client-core", features = ["mobile"], default-features = false } -nym-api-requests = { path = "../../../nym-api/nym-api-requests" } -nym-contracts-common = { path = "../../../common/cosmwasm-smart-contracts/contracts-common"} -nym-config-common = { path = "../../../common/config", package = "nym-config" } -nym-credential-storage = { path = "../../../common/credential-storage" } -nym-crypto = { path = "../../../common/crypto" } -nym-bin-common = { path = "../../../common/bin-common"} -nym-socks5-client-core = { path = "../../../common/socks5-client-core", default-features = false } -nym-task = { path = "../../../common/task" } - -[dev-dependencies] -ts-rs = "6.1.2" -tempfile = "3.3.0" - -[features] -default = ["custom-protocol"] -custom-protocol = ["tauri/custom-protocol"] - -# [profile.dev] -# strip = true -# opt-level = "s" -# lto = true - -[profile.release] -strip = true -opt-level = "s" -lto = true diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/.editorconfig b/nym-connect/mobile/src-tauri/gen/android/nym_connect/.editorconfig deleted file mode 100644 index ebe51d3bfa..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -# EditorConfig is awesome: https://EditorConfig.org - -# top-most EditorConfig file -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = false -insert_final_newline = false \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/.gitignore b/nym-connect/mobile/src-tauri/gen/android/nym_connect/.gitignore deleted file mode 100644 index edf9888947..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/caches -/.idea/libraries -/.idea/modules.xml -/.idea/workspace.xml -/.idea/navEditor.xml -/.idea/assetWizardSettings.xml -.DS_Store -build -/captures -.externalNativeBuild -.cxx -local.properties -app/src/main/jniLibs/** diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/.gitignore b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/.gitignore deleted file mode 100644 index 1b13319aad..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/src/main/java/net/nymtech/nym_connect/generated \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/build.gradle.kts b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/build.gradle.kts deleted file mode 100644 index 3b092d967a..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/build.gradle.kts +++ /dev/null @@ -1,112 +0,0 @@ -plugins { - id("com.android.application") - id("org.jetbrains.kotlin.android") - id("rustPlugin") -} - -android { - compileSdk = 33 - defaultConfig { - manifestPlaceholders["usesCleartextTraffic"] = "false" - applicationId = "net.nymtech.nym_connect" - minSdk = 24 - targetSdk = 33 - versionCode = 1 - versionName = "1.1.9" - } - sourceSets.getByName("main") { - // Vulkan validation layers - val ndkHome = System.getenv("NDK_HOME") - jniLibs.srcDir("${ndkHome}/sources/third_party/vulkan/src/build-android/jniLibs") - } - buildTypes { - getByName("debug") { - manifestPlaceholders["usesCleartextTraffic"] = "true" - isDebuggable = true - isJniDebuggable = true - isMinifyEnabled = false - packagingOptions { - jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so") - - jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so") - - jniLibs.keepDebugSymbols.add("*/x86/*.so") - - jniLibs.keepDebugSymbols.add("*/x86_64/*.so") - } - } - getByName("release") { - isMinifyEnabled = false - proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") - } - } - flavorDimensions.add("abi") - productFlavors { - create("universal") { - val abiList = findProperty("abiList") as? String - - dimension = "abi" - ndk { - abiFilters += abiList?.split(",")?.map { it.trim() } ?: listOf( "arm64-v8a", "armeabi-v7a", "x86", "x86_64", - ) - } - } - create("arm64") { - dimension = "abi" - ndk { - abiFilters += listOf("arm64-v8a") - } - } - - create("arm") { - dimension = "abi" - ndk { - abiFilters += listOf("armeabi-v7a") - } - } - - create("x86") { - dimension = "abi" - ndk { - abiFilters += listOf("x86") - } - } - - create("x86_64") { - dimension = "abi" - ndk { - abiFilters += listOf("x86_64") - } - } - } - - assetPacks += mutableSetOf() - namespace = "net.nymtech.nym_connect" -} - -rust { - rootDirRel = "../../../../" - targets = listOf("aarch64", "armv7", "i686", "x86_64") - arches = listOf("arm64", "arm", "x86", "x86_64") -} - -dependencies { - implementation("androidx.webkit:webkit:1.5.0") - implementation("androidx.appcompat:appcompat:1.5.1") - implementation("com.google.android.material:material:1.7.0") - implementation("androidx.core:core-splashscreen:1.0.0") - testImplementation("junit:junit:4.13.2") - androidTestImplementation("androidx.test.ext:junit:1.1.4") - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0") -} - -afterEvaluate { - android.applicationVariants.all { - tasks["mergeUniversalReleaseJniLibFolders"].dependsOn(tasks["rustBuildRelease"]) - tasks["mergeUniversalDebugJniLibFolders"].dependsOn(tasks["rustBuildDebug"]) - productFlavors.filter{ it.name != "universal" }.forEach { _ -> - val archAndBuildType = name.capitalize() - tasks["merge${archAndBuildType}JniLibFolders"].dependsOn(tasks["rustBuild${archAndBuildType}"]) - } - } -} diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/proguard-rules.pro b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/proguard-rules.pro deleted file mode 100644 index 481bb43481..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/AndroidManifest.xml b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/AndroidManifest.xml deleted file mode 100644 index 1c575ab17a..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/java/net/nymtech/nym_connect/MainActivity.kt b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/java/net/nymtech/nym_connect/MainActivity.kt deleted file mode 100644 index 1162a2e43b..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/java/net/nymtech/nym_connect/MainActivity.kt +++ /dev/null @@ -1,3 +0,0 @@ -package net.nymtech.nym_connect - -class MainActivity : TauriActivity() diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/java/net/nymtech/nym_connect/generated/.gitkeep b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/java/net/nymtech/nym_connect/generated/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/drawable-v24/ic_launcher_foreground.xml deleted file mode 100644 index 2b068d1146..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/drawable/ic_launcher_background.xml b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/drawable/ic_launcher_background.xml deleted file mode 100644 index 07d5da9cbf..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/layout/activity_main.xml b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index 4fc244418b..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index 036d09bc5f..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml deleted file mode 100644 index 036d09bc5f..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-hdpi/ic_launcher.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 4974445c9a..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png deleted file mode 100644 index 483ace7edf..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 59b2f1db44..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-mdpi/ic_launcher.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 307fb6aab9..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png deleted file mode 100644 index e634763b42..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index 37a8d502c8..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 5b412e78a0..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png deleted file mode 100644 index 580c767c54..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 51a588fdee..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 65cefcb196..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png deleted file mode 100644 index 312d818bbe..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 5070e583a0..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 18252905f8..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png deleted file mode 100644 index 514ec36652..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 83e115a87d..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values-night/themes.xml b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values-night/themes.xml deleted file mode 100644 index 894b25a6c9..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values-night/themes.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values/colors.xml b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values/colors.xml deleted file mode 100644 index 0018ee4a8a..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - #1d2125 - #424242 - #4caf50 - #1b5e20 - #FF000000 - #FFFFFFFF - \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values/ic_launcher_background.xml b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values/ic_launcher_background.xml deleted file mode 100644 index a3b9258141..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values/ic_launcher_background.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #1D2125 - \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values/strings.xml b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values/strings.xml deleted file mode 100644 index 74cf5d6f34..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Nym Connect - \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values/themes.xml b/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values/themes.xml deleted file mode 100644 index 894b25a6c9..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/app/src/main/res/values/themes.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/build.gradle.kts b/nym-connect/mobile/src-tauri/gen/android/nym_connect/build.gradle.kts deleted file mode 100644 index 8c6fe5848c..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/build.gradle.kts +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath("com.android.tools.build:gradle:7.3.1") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10") - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -tasks.register("clean").configure { - delete("build") -} - diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/buildSrc/build.gradle.kts b/nym-connect/mobile/src-tauri/gen/android/nym_connect/buildSrc/build.gradle.kts deleted file mode 100644 index 45981f7511..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/buildSrc/build.gradle.kts +++ /dev/null @@ -1,23 +0,0 @@ -plugins { - `kotlin-dsl` -} - -gradlePlugin { - plugins { - create("pluginsForCoolKids") { - id = "rustPlugin" - implementationClass = "net.nymtech.RustPlugin" - } - } -} - -repositories { - google() - mavenCentral() -} - -dependencies { - compileOnly(gradleApi()) - implementation("com.android.tools.build:gradle:7.3.1") -} - diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/buildSrc/src/main/java/net/nymtech/nym_connect/kotlin/BuildTask.kt b/nym-connect/mobile/src-tauri/gen/android/nym_connect/buildSrc/src/main/java/net/nymtech/nym_connect/kotlin/BuildTask.kt deleted file mode 100644 index 5f63ba21c5..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/buildSrc/src/main/java/net/nymtech/nym_connect/kotlin/BuildTask.kt +++ /dev/null @@ -1,54 +0,0 @@ -package net.nymtech - -import java.io.File -import org.gradle.api.DefaultTask -import org.gradle.api.GradleException -import org.gradle.api.logging.LogLevel -import org.gradle.api.tasks.Input -import org.gradle.api.tasks.InputDirectory -import org.gradle.api.tasks.PathSensitive -import org.gradle.api.tasks.PathSensitivity -import org.gradle.api.tasks.TaskAction - -open class BuildTask : DefaultTask() { - @InputDirectory - @PathSensitive(PathSensitivity.RELATIVE) - var rootDirRel: File? = null - - @Input - var target: String? = null - - @Input - var release: Boolean? = null - - @TaskAction - fun build() { - val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null") - val target = target ?: throw GradleException("target cannot be null") - val release = release ?: throw GradleException("release cannot be null") - val nodeExecutable = System.getenv("NODE_TAURI_CLI") - val home = (System.getenv("HOME") ?: "") - val cargoHome = (System.getenv("CARGO_HOME") ?: "$home/.cargo") - val rustExecutable = "$cargoHome/bin/cargo-tauri" - val tauriCli = when { - !nodeExecutable.isNullOrEmpty() && File(nodeExecutable).isFile() -> nodeExecutable - File(rustExecutable).isFile() -> rustExecutable - else -> throw GradleException("couldn't find tauri-cli executable") - } - println("gradle Rust plugin, using tauri cli executable: $tauriCli") - project.exec { - workingDir(File(project.projectDir, rootDirRel.path)) - executable(tauriCli) - args(listOf("android", "android-studio-script")) - if (project.logger.isEnabled(LogLevel.DEBUG)) { - args("-vv") - } else if (project.logger.isEnabled(LogLevel.INFO)) { - args("-v") - } - if (release) { - args("--release") - } - args(listOf("--target", target)) - }.assertNormalExitValue() - } -} \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/buildSrc/src/main/java/net/nymtech/nym_connect/kotlin/RustPlugin.kt b/nym-connect/mobile/src-tauri/gen/android/nym_connect/buildSrc/src/main/java/net/nymtech/nym_connect/kotlin/RustPlugin.kt deleted file mode 100644 index 5e8dcdb3ac..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/buildSrc/src/main/java/net/nymtech/nym_connect/kotlin/RustPlugin.kt +++ /dev/null @@ -1,59 +0,0 @@ -package net.nymtech - -import org.gradle.api.DefaultTask -import org.gradle.api.GradleException -import org.gradle.api.Plugin -import org.gradle.api.Project -import java.io.File -import java.util.* - -const val TASK_GROUP = "rust" - -open class Config { - var rootDirRel: String? = null - var targets: List? = null - var arches: List? = null -} - -open class RustPlugin : Plugin { - private lateinit var config: Config - - override fun apply(project: Project) { - config = project.extensions.create("rust", Config::class.java) - project.afterEvaluate { - if (config.targets == null) { - throw GradleException("targets cannot be null") - } - if (config.arches == null) { - throw GradleException("arches cannot be null") - } - for (profile in listOf("debug", "release")) { - val profileCapitalized = profile.capitalize(Locale.ROOT) - val buildTask = project.tasks.maybeCreate( - "rustBuild$profileCapitalized", - DefaultTask::class.java - ).apply { - group = TASK_GROUP - description = "Build dynamic library in $profile mode for all targets" - } - for (targetPair in config.targets!!.withIndex()) { - val targetName = targetPair.value - val targetArch = config.arches!![targetPair.index] - val targetArchCapitalized = targetArch.capitalize(Locale.ROOT) - val targetBuildTask = project.tasks.maybeCreate( - "rustBuild$targetArchCapitalized$profileCapitalized", - BuildTask::class.java - ).apply { - group = TASK_GROUP - description = "Build dynamic library in $profile mode for $targetArch" - rootDirRel = config.rootDirRel?.let { File(it) } - target = targetName - release = profile == "release" - } - buildTask.dependsOn(targetBuildTask) - project.tasks.findByName("preBuild")?.mustRunAfter(targetBuildTask) - } - } - } - } -} diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradle.properties b/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradle.properties deleted file mode 100644 index cd0519bb2a..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradle.properties +++ /dev/null @@ -1,23 +0,0 @@ -# Project-wide Gradle settings. -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app"s APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true -# Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official -# Enables namespacing of each library's R class so that its R class includes only the -# resources declared in the library itself and none from the library's dependencies, -# thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradle/wrapper/gradle-wrapper.jar b/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index e708b1c023..0000000000 Binary files a/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradle/wrapper/gradle-wrapper.properties b/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index de8c362b62..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Tue May 10 19:22:52 CST 2022 -distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip -distributionPath=wrapper/dists -zipStorePath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradlew b/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradlew deleted file mode 100755 index 4f906e0c81..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradlew +++ /dev/null @@ -1,185 +0,0 @@ -#!/usr/bin/env sh - -# -# Copyright 2015 the original author or authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=`expr $i + 1` - done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -exec "$JAVACMD" "$@" diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradlew.bat b/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradlew.bat deleted file mode 100644 index 107acd32c4..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/gradlew.bat +++ /dev/null @@ -1,89 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/nym-connect/mobile/src-tauri/gen/android/nym_connect/settings.gradle b/nym-connect/mobile/src-tauri/gen/android/nym_connect/settings.gradle deleted file mode 100644 index e7b4def49c..0000000000 --- a/nym-connect/mobile/src-tauri/gen/android/nym_connect/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/nym-connect/mobile/src-tauri/icons/128x128.png b/nym-connect/mobile/src-tauri/icons/128x128.png deleted file mode 100644 index 12daccf30f..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/128x128.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/128x128@2x.png b/nym-connect/mobile/src-tauri/icons/128x128@2x.png deleted file mode 100644 index d98b024d26..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/128x128@2x.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/32x32.png b/nym-connect/mobile/src-tauri/icons/32x32.png deleted file mode 100644 index 5463a8ff1c..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/32x32.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/Square107x107Logo.png b/nym-connect/mobile/src-tauri/icons/Square107x107Logo.png deleted file mode 100644 index 468b6cf29b..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/Square107x107Logo.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/Square142x142Logo.png b/nym-connect/mobile/src-tauri/icons/Square142x142Logo.png deleted file mode 100644 index ce58b768ca..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/Square142x142Logo.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/Square150x150Logo.png b/nym-connect/mobile/src-tauri/icons/Square150x150Logo.png deleted file mode 100644 index b6bc59dfcf..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/Square150x150Logo.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/Square284x284Logo.png b/nym-connect/mobile/src-tauri/icons/Square284x284Logo.png deleted file mode 100644 index 26311d4604..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/Square284x284Logo.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/Square30x30Logo.png b/nym-connect/mobile/src-tauri/icons/Square30x30Logo.png deleted file mode 100644 index 8916d14e49..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/Square30x30Logo.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/Square310x310Logo.png b/nym-connect/mobile/src-tauri/icons/Square310x310Logo.png deleted file mode 100644 index 6fd3c36def..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/Square310x310Logo.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/Square44x44Logo.png b/nym-connect/mobile/src-tauri/icons/Square44x44Logo.png deleted file mode 100644 index e161bd7c4a..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/Square44x44Logo.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/Square71x71Logo.png b/nym-connect/mobile/src-tauri/icons/Square71x71Logo.png deleted file mode 100644 index 45b5126bf6..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/Square71x71Logo.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/Square89x89Logo.png b/nym-connect/mobile/src-tauri/icons/Square89x89Logo.png deleted file mode 100644 index 386c8bf119..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/Square89x89Logo.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/StoreLogo.png b/nym-connect/mobile/src-tauri/icons/StoreLogo.png deleted file mode 100644 index 692f1a03f2..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/StoreLogo.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/icon.icns b/nym-connect/mobile/src-tauri/icons/icon.icns deleted file mode 100644 index 129da9bf18..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/icon.icns and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/icon.ico b/nym-connect/mobile/src-tauri/icons/icon.ico deleted file mode 100644 index 6164f98f9c..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/icon.ico and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/icon.png b/nym-connect/mobile/src-tauri/icons/icon.png deleted file mode 100644 index fa552c309a..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/icon.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/tray_icon.ico b/nym-connect/mobile/src-tauri/icons/tray_icon.ico deleted file mode 100644 index 25785da3d9..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/tray_icon.ico and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/icons/tray_icon.png b/nym-connect/mobile/src-tauri/icons/tray_icon.png deleted file mode 100644 index afcb965219..0000000000 Binary files a/nym-connect/mobile/src-tauri/icons/tray_icon.png and /dev/null differ diff --git a/nym-connect/mobile/src-tauri/src/build.rs b/nym-connect/mobile/src-tauri/src/build.rs deleted file mode 100644 index 261851f6b6..0000000000 --- a/nym-connect/mobile/src-tauri/src/build.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - tauri_build::build(); -} diff --git a/nym-connect/mobile/src-tauri/src/config/mod.rs b/nym-connect/mobile/src-tauri/src/config/mod.rs deleted file mode 100644 index ba0d2ebf13..0000000000 --- a/nym-connect/mobile/src-tauri/src/config/mod.rs +++ /dev/null @@ -1,160 +0,0 @@ -use crate::{ - error::{BackendError, Result}, - state::State, -}; -use nym_client_core::{client::key_manager::KeyManager, config::Config as BaseClientConfig}; -use nym_config_common::NymConfig; -use nym_credential_storage::ephemeral_storage::EphemeralStorage; -use nym_crypto::asymmetric::identity; -use nym_socks5_client_core::config::{Config as Socks5Config, Socks5}; -use std::path::PathBuf; -use std::sync::Arc; -use tap::TapFallible; -use tokio::sync::RwLock; - -static SOCKS5_CONFIG_ID: &str = "nym-connect"; - -pub fn socks5_config_id_appended_with(gateway_id: &str) -> Result { - use std::fmt::Write as _; - let mut id = SOCKS5_CONFIG_ID.to_string(); - write!(id, "-{gateway_id}")?; - Ok(id) -} - -#[tauri::command] -pub async fn get_config_id(state: tauri::State<'_, Arc>>) -> Result { - state.read().await.get_config_id() -} - -#[tauri::command] -pub fn get_config_file_location() -> Result { - Err(BackendError::CouldNotGetConfigFilename) -} - -#[derive(Debug)] -pub struct Config { - pub socks5: Socks5Config, -} - -impl Config { - pub fn new>(id: S, provider_mix_address: S) -> Self { - Config { - socks5: Socks5Config::new(id, provider_mix_address), - } - } - - #[allow(unused)] - pub fn new_with_port>(id: S, provider_mix_address: S, port: u16) -> Self { - Config { - socks5: Socks5Config::new(id, provider_mix_address).with_port(port), - } - } - - pub fn get_config(&self) -> &Socks5Config { - &self.socks5 - } - - pub fn get_socks5(&self) -> &Socks5 { - self.socks5.get_socks5() - } - - #[allow(unused)] - pub fn get_socks5_mut(&mut self) -> &mut Socks5 { - self.socks5.get_socks5_mut() - } - - pub fn get_base(&self) -> &BaseClientConfig { - self.socks5.get_base() - } - - pub fn get_base_mut(&mut self) -> &mut BaseClientConfig { - self.socks5.get_base_mut() - } - - pub async fn init( - service_provider: &str, - chosen_gateway_id: &str, - ) -> Result<(Config, KeyManager)> { - log::info!("Initialising..."); - - let service_provider = service_provider.to_owned(); - let chosen_gateway_id = chosen_gateway_id.to_owned(); - - // The client initialization was originally not written for this use case, so there are - // lots of ways it can panic. Until we have proper error handling in the init code for the - // clients we'll catch any panics here by spawning a new runtime in a separate thread. - let (config, keys) = std::thread::spawn(move || { - tokio::runtime::Runtime::new() - .expect("Failed to create tokio runtime") - .block_on( - async move { init_socks5_config(service_provider, chosen_gateway_id).await }, - ) - }) - .join() - .map_err(|_| BackendError::InitializationPanic)??; - - log::info!("Configuration saved 🚀"); - Ok((config, keys)) - } -} - -pub async fn init_socks5_config( - provider_address: String, - chosen_gateway_id: String, -) -> Result<(Config, KeyManager)> { - log::trace!("Initialising client..."); - let mut config = Config::new(SOCKS5_CONFIG_ID, &provider_address); - - if let Ok(raw_validators) = std::env::var(nym_config_common::defaults::var_names::NYM_API) { - config - .get_base_mut() - .set_custom_nym_apis(nym_config_common::parse_urls(&raw_validators)); - } - - let nym_api_endpoints = config.get_base().get_nym_api_endpoints(); - - let chosen_gateway_id = identity::PublicKey::from_base58_string(chosen_gateway_id) - .map_err(|_| BackendError::UnableToParseGateway)?; - - let mut key_manager = nym_client_core::init::new_client_keys(); - - // Setup gateway and register a new key each time - let gateway = nym_client_core::init::register_with_gateway::( - &mut key_manager, - nym_api_endpoints, - Some(chosen_gateway_id), - false, - ) - .await?; - - config.get_base_mut().set_gateway_endpoint(gateway); - - print_saved_config(&config); - - let address = *key_manager.identity_keypair().public_key(); - log::info!("The address of this client is: {}", address); - - Ok((config, key_manager)) -} - -fn print_saved_config(config: &Config) { - log::info!( - "Saved configuration file to {:?}", - config.get_config().get_config_file_save_location() - ); - log::info!("Gateway id: {}", config.get_base().get_gateway_id()); - log::info!("Gateway owner: {}", config.get_base().get_gateway_owner()); - log::info!( - "Gateway listener: {}", - config.get_base().get_gateway_listener() - ); - log::info!( - "Service provider address: {}", - config.get_socks5().get_provider_mix_address() - ); - log::info!( - "Service provider port: {}", - config.get_socks5().get_listening_port() - ); - log::info!("Client configuration completed."); -} diff --git a/nym-connect/mobile/src-tauri/src/error.rs b/nym-connect/mobile/src-tauri/src/error.rs deleted file mode 100644 index 58f2252ed1..0000000000 --- a/nym-connect/mobile/src-tauri/src/error.rs +++ /dev/null @@ -1,86 +0,0 @@ -use nym_client_core::error::ClientCoreError; -use serde::{Serialize, Serializer}; -use thiserror::Error; - -#[allow(unused)] -#[derive(Error, Debug)] -pub enum BackendError { - #[error("{source}")] - ReqwestError { - #[from] - source: reqwest::Error, - }, - #[error("I/O error: {source}")] - IoError { - #[from] - source: std::io::Error, - }, - #[error("string formatting error: {source}")] - FmtError { - #[from] - source: std::fmt::Error, - }, - #[error("tauri error: {source}")] - TauriError { - #[from] - source: tauri::Error, - }, - #[error("{source}")] - TauriApiError { - #[from] - source: tauri::api::Error, - }, - #[error("{source}")] - SerdeJsonError { - #[from] - source: serde_json::Error, - }, - #[error("{source}")] - ClientCoreError { - #[from] - source: ClientCoreError, - }, - - #[error("could not send disconnect signal to the SOCKS5 client")] - CoundNotSendDisconnectSignal, - #[error("no service provider set")] - NoServiceProviderSet, - #[error("no gateway provider set")] - NoGatewaySet, - #[error("initialization failed with a panic")] - InitializationPanic, - #[error("could not get config id before gateway is set")] - CouldNotGetIdWithoutGateway, - #[error("could not initialize without gateway set")] - CouldNotInitWithoutGateway, - #[error("could not initialize without service provider set")] - CouldNotInitWithoutServiceProvider, - #[error("could not get file name")] - CouldNotGetFilename, - #[error("could not get config file location")] - CouldNotGetConfigFilename, - #[error("could not load existing gateway configuration")] - CouldNotLoadExistingGatewayConfiguration(std::io::Error), - #[error("unable to open a new window")] - NewWindowError, - #[error("unable to parse the specified gateway")] - UnableToParseGateway, - - #[error("HTTP get request failed: {status_code}")] - RequestFail { - url: reqwest::Url, - status_code: reqwest::StatusCode, - }, -} - -impl Serialize for BackendError { - fn serialize(&self, serializer: S) -> std::result::Result - where - S: Serializer, - { - serializer.collect_str(self) - } -} - -// Local crate level Result alias -pub(crate) type Result = std::result::Result; diff --git a/nym-connect/mobile/src-tauri/src/events.rs b/nym-connect/mobile/src-tauri/src/events.rs deleted file mode 100644 index fb9186913f..0000000000 --- a/nym-connect/mobile/src-tauri/src/events.rs +++ /dev/null @@ -1,71 +0,0 @@ -use std::sync::Arc; - -use nym_client_core::error::ClientCoreStatusMessage; -use nym_task::manager::TaskStatus; -use tauri::async_runtime::RwLock; - -use crate::{ - state::{GatewayConnectivity, State}, - tasks, -}; - -#[derive(Clone, serde::Serialize)] -struct Payload { - title: String, - message: String, -} - -impl Payload { - fn new(title: String, message: String) -> Self { - Self { title, message } - } -} - -pub fn emit_event(event: &str, title: &str, msg: &str, window: &tauri::Window) { - if let Err(err) = window.emit(event, Payload::new(title.into(), msg.into())) { - log::error!("Failed to emit tauri event: {err}"); - } -} - -pub fn emit_status_event(event: &str, msg: &T, window: &tauri::Window) { - if let Err(err) = window.emit(event, Payload::new("SOCKS5 update".into(), msg.to_string())) { - log::error!("Failed to emit tauri event: {err}"); - } -} - -pub async fn handle_task_status( - task_status: &TaskStatus, - state: &Arc>, - window: &tauri::Window, -) { - match task_status { - TaskStatus::Ready => { - { - let mut state_w = state.write().await; - state_w.mark_connected(window); - } - - emit_status_event("socks5-connected-event", task_status, window); - tasks::start_connection_check(state.clone(), window.clone()); - } - } -} - -pub async fn handle_client_status_message( - client_status_message: &ClientCoreStatusMessage, - state: &Arc>, - window: &tauri::Window, -) { - // TODO: use this instead once we change on the frontend too - let _event_name = match client_status_message { - ClientCoreStatusMessage::GatewayIsSlow | ClientCoreStatusMessage::GatewayIsVerySlow => { - "socks5-gateway-status" - } - }; - - if let Ok(connectivity) = GatewayConnectivity::try_from(client_status_message) { - state.write().await.set_gateway_connectivity(connectivity); - } - - emit_status_event("socks5-status-event", client_status_message, window); -} diff --git a/nym-connect/mobile/src-tauri/src/lib.rs b/nym-connect/mobile/src-tauri/src/lib.rs deleted file mode 100644 index 6be3d9950d..0000000000 --- a/nym-connect/mobile/src-tauri/src/lib.rs +++ /dev/null @@ -1,88 +0,0 @@ -// Remove me after we've tidied up -#![allow(dead_code)] -#![allow(unused_imports)] - -use nym_config_common::defaults::setup_env; -use std::sync::Arc; -use tauri::{App, Manager}; -use tokio::sync::RwLock; - -pub mod config; -mod error; -mod events; -mod logging; -mod models; -pub mod operations; -mod state; -mod tasks; - -pub use state::State; - -#[cfg(mobile)] -mod mobile; -#[cfg(mobile)] -pub use mobile::*; - -pub type SetupHook = Box Result<(), Box> + Send>; - -#[derive(Default)] -pub struct AppBuilder { - setup: Option, -} - -impl AppBuilder { - pub fn new() -> Self { - Self::default() - } - - #[must_use] - pub fn setup(mut self, setup: F) -> Self - where - F: FnOnce(&mut App) -> Result<(), Box> + Send + 'static, - { - self.setup.replace(Box::new(setup)); - self - } - - pub fn run(self) { - setup_env(None); - - println!("Starting up***"); - - // As per breaking change description here - // https://github.com/tauri-apps/tauri/blob/feac1d193c6d618e49916ad0707201f43d5cdd36/tooling/bundler/CHANGELOG.md - if let Err(error) = fix_path_env::fix() { - log::warn!("Failed to fix PATH: {error}"); - } - - let setup = self.setup; - tauri::Builder::default() - .manage(Arc::new(RwLock::new(State::default()))) - .invoke_handler(tauri::generate_handler![ - crate::config::get_config_file_location, - crate::config::get_config_id, - crate::operations::connection::connect::get_gateway, - crate::operations::connection::connect::get_service_provider, - crate::operations::connection::connect::set_gateway, - crate::operations::connection::connect::set_service_provider, - crate::operations::connection::connect::start_connecting, - crate::operations::connection::disconnect::start_disconnecting, - crate::operations::connection::status::get_connection_health_check_status, - crate::operations::connection::status::get_connection_status, - crate::operations::connection::status::get_gateway_connection_status, - crate::operations::connection::status::start_connection_health_check_task, - crate::operations::directory::get_services, - crate::operations::directory::get_gateways_detailed, - crate::operations::export::export_keys, - ]) - .setup(move |app| { - if let Some(setup) = setup { - logging::setup_logging(app.app_handle())?; - (setup)(app)?; - } - Ok(()) - }) - .run(tauri::generate_context!()) - .expect("error while running tauri application"); - } -} diff --git a/nym-connect/mobile/src-tauri/src/logging.rs b/nym-connect/mobile/src-tauri/src/logging.rs deleted file mode 100644 index 3a6ee89e62..0000000000 --- a/nym-connect/mobile/src-tauri/src/logging.rs +++ /dev/null @@ -1,147 +0,0 @@ -use fern::colors::{Color, ColoredLevelConfig}; -use serde::Serialize; -use serde_repr::{Deserialize_repr, Serialize_repr}; -use std::str::FromStr; -use tauri::Manager; -use time::{format_description, OffsetDateTime}; - -fn formatted_time() -> String { - // if we fail to obtain local time according to local offset, fallback to utc - let _now = OffsetDateTime::now_local().unwrap_or_else(|_| OffsetDateTime::now_utc()); - - // if we're running it in the unit test, use the hardcoded value - #[cfg(test)] - let _now = OffsetDateTime::from_unix_timestamp(1666666666).unwrap(); - - // the unwraps are fine as we know this description is correct - // note: the reason for this very particular format is a very simple one - // it's what we've always been using since we copied it from the example, - // so feel free to update it to whatever - let format = - format_description::parse("[[[year]-[month]-[day]][[[hour]:[minute]:[second]]").unwrap(); - _now.format(&format).unwrap() -} - -pub fn setup_logging(app_handle: tauri::AppHandle) -> Result<(), log::SetLoggerError> { - let colors = ColoredLevelConfig::new() - .trace(Color::Magenta) - .debug(Color::Blue) - .info(Color::Green) - .warn(Color::Yellow) - .error(Color::Red); - let base_config = fern::Dispatch::new() - .level(global_level()) - .filter_lowlevel_external_components() - .show_operations(); - - let stdout_config = fern::Dispatch::new() - .format(move |out, message, record| { - out.finish(format_args!( - "{} {:5} {} > {}", - formatted_time(), - colors.color(record.level()), - record.target(), - message, - )) - }) - .chain(std::io::stdout()); - - let tauri_event_config = fern::Dispatch::new() - .format(move |out, message, record| { - out.finish(format_args!( - "{}[{}] {}", - formatted_time(), - record.target(), - message, - )) - }) - .chain(fern::Output::call(move |record| { - let msg = LogMessage { - message: record.args().to_string(), - level: record.level().into(), - }; - app_handle.emit_all("log://log", msg).unwrap(); - })); - - base_config - .chain(stdout_config) - .chain(tauri_event_config) - .apply() -} - -trait FernExt { - fn show_operations(self) -> Self; - fn filter_lowlevel_external_components(self) -> Self; -} - -impl FernExt for fern::Dispatch { - fn show_operations(self) -> Self { - if ::std::env::var("RUST_TRACE_OPERATIONS").is_ok() { - self.level_for("nym_connect::operations", log::LevelFilter::Trace) - } else { - self - } - } - - fn filter_lowlevel_external_components(self) -> Self { - self.level_for("hyper", log::LevelFilter::Warn) - .level_for("tokio_reactor", log::LevelFilter::Warn) - .level_for("reqwest", log::LevelFilter::Warn) - .level_for("mio", log::LevelFilter::Warn) - .level_for("want", log::LevelFilter::Warn) - .level_for("sled", log::LevelFilter::Warn) - .level_for("tungstenite", log::LevelFilter::Warn) - .level_for("tokio_tungstenite", log::LevelFilter::Warn) - .level_for("rustls", log::LevelFilter::Warn) - .level_for("tokio_util", log::LevelFilter::Warn) - } -} - -fn global_level() -> log::LevelFilter { - if let Ok(s) = ::std::env::var("RUST_LOG") { - log::LevelFilter::from_str(&s).unwrap_or(log::LevelFilter::Info) - } else { - log::LevelFilter::Info - } -} - -#[derive(Debug, Serialize, Clone)] -struct LogMessage { - message: String, - level: LogLevel, -} - -// Serialize to u16 instead of strings. -#[derive(Debug, Clone, Deserialize_repr, Serialize_repr)] -#[repr(u16)] -enum LogLevel { - Trace = 1, - Debug, - Info, - Warn, - Error, -} - -impl From for LogLevel { - fn from(level: log::Level) -> Self { - match level { - log::Level::Trace => LogLevel::Trace, - log::Level::Debug => LogLevel::Debug, - log::Level::Info => LogLevel::Info, - log::Level::Warn => LogLevel::Warn, - log::Level::Error => LogLevel::Error, - } - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn log_formatting() { - let expected_chrono_formated = "[2022-10-25][02:57:46]".to_string(); - let new_time_based = formatted_time(); - assert_eq!(new_time_based, expected_chrono_formated) - } -} diff --git a/nym-connect/mobile/src-tauri/src/main.rs b/nym-connect/mobile/src-tauri/src/main.rs deleted file mode 100644 index 48484ea1dd..0000000000 --- a/nym-connect/mobile/src-tauri/src/main.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![cfg_attr( - all(not(debug_assertions), target_os = "windows"), - windows_subsystem = "windows" -)] - -use nym_connect::AppBuilder; - -fn main() { - AppBuilder::new().run(); -} diff --git a/nym-connect/mobile/src-tauri/src/mobile.rs b/nym-connect/mobile/src-tauri/src/mobile.rs deleted file mode 100644 index d231976e68..0000000000 --- a/nym-connect/mobile/src-tauri/src/mobile.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[tauri::mobile_entry_point] -fn main() { - super::AppBuilder::new().run(); -} diff --git a/nym-connect/mobile/src-tauri/src/models/mod.rs b/nym-connect/mobile/src-tauri/src/models/mod.rs deleted file mode 100644 index 70b408dc7b..0000000000 --- a/nym-connect/mobile/src-tauri/src/models/mod.rs +++ /dev/null @@ -1,116 +0,0 @@ -use core::fmt; - -use serde::{Deserialize, Serialize}; - -use crate::state::GatewayConnectivity; - -#[cfg_attr(test, derive(ts_rs::TS))] -#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, Debug)] -pub struct ConnectResult { - pub address: String, -} - -#[cfg_attr(test, derive(ts_rs::TS))] -#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, Debug)] -pub struct DisconnectResult { - pub success: bool, -} - -#[cfg_attr(test, derive(ts_rs::TS))] -#[cfg_attr(test, ts(rename_all = "lowercase"))] -#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, Debug, Default)] -#[serde(rename_all = "camelCase")] -pub enum ConnectionStatusKind { - #[default] - Disconnected, - Disconnecting, - Connected, - Connecting, -} - -#[cfg_attr(test, derive(ts_rs::TS))] -#[cfg_attr(test, ts(rename_all = "lowercase"))] -#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, Debug)] -#[serde(rename_all = "camelCase")] -pub enum GatewayConnectionStatusKind { - Good, - Bad, - VeryBad, -} - -impl From for GatewayConnectionStatusKind { - fn from(conn: GatewayConnectivity) -> Self { - match conn { - GatewayConnectivity::Good => GatewayConnectionStatusKind::Good, - GatewayConnectivity::Bad { .. } => GatewayConnectionStatusKind::Bad, - GatewayConnectivity::VeryBad { .. } => GatewayConnectionStatusKind::VeryBad, - } - } -} - -#[cfg_attr(test, derive(ts_rs::TS))] -#[cfg_attr(test, ts(rename_all = "lowercase"))] -#[derive(Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Debug, Default)] -pub enum ConnectivityTestResult { - #[default] - NotAvailable, - Success, - Fail, -} - -impl fmt::Display for ConnectionStatusKind { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match *self { - ConnectionStatusKind::Disconnected => write!(f, "Disconnected"), - ConnectionStatusKind::Disconnecting => write!(f, "Disconnecting"), - ConnectionStatusKind::Connected => write!(f, "Connected"), - ConnectionStatusKind::Connecting => write!(f, "Connecting"), - } - } -} - -pub const APP_EVENT_CONNECTION_STATUS_CHANGED: &str = "app:connection-status-changed"; - -#[cfg_attr(test, derive(ts_rs::TS))] -#[derive(Clone, Serialize)] -pub struct AppEventConnectionStatusChangedPayload { - pub status: ConnectionStatusKind, -} - -#[cfg_attr(test, derive(ts_rs::TS))] -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct DirectoryService { - pub id: String, - pub description: String, - pub items: Vec, -} - -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct HarbourMasterService { - pub service_provider_client_id: String, - pub gateway_identity_key: String, - pub ip_address: String, - pub last_successful_ping_utc: String, - pub last_updated_utc: String, - pub routing_score: f32, -} - -#[cfg_attr(test, derive(ts_rs::TS))] -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct DirectoryServiceProvider { - pub id: String, - pub description: String, - /// Address of the network requester in the form "." - /// e.g. DpB3cHAchJiNBQi5FrZx2csXb1mrHkpYh9Wzf8Rjsuko.ANNWrvHqMYuertHGHUrZdBntQhpzfbWekB39qez9U2Vx@2BuMSfMW3zpeAjKXyKLhmY4QW1DXurrtSPEJ6CjX3SEh - pub address: String, - /// Address of the gateway, e.g. 2BuMSfMW3zpeAjKXyKLhmY4QW1DXurrtSPEJ6CjX3SEh - pub gateway: String, -} - -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct PagedResult { - pub page: u32, - pub size: u32, - pub total: i32, - pub items: Vec, -} diff --git a/nym-connect/mobile/src-tauri/src/operations/connection/connect.rs b/nym-connect/mobile/src-tauri/src/operations/connection/connect.rs deleted file mode 100644 index 1d83748698..0000000000 --- a/nym-connect/mobile/src-tauri/src/operations/connection/connect.rs +++ /dev/null @@ -1,68 +0,0 @@ -use crate::{ - error::{BackendError, Result}, - models::ConnectResult, - tasks, State, -}; -use std::sync::Arc; -use tokio::sync::RwLock; - -#[tauri::command] -pub async fn start_connecting( - state: tauri::State<'_, Arc>>, - window: tauri::Window, -) -> Result { - log::trace!("Start connecting"); - let (msg_receiver, exit_status_receiver) = { - let mut state_w = state.write().await; - state_w.start_connecting(&window).await? - }; - - // Setup task for checking status - let state = state.inner().clone(); - tasks::start_disconnect_listener(state.clone(), window.clone(), exit_status_receiver); - tasks::start_status_listener(state, window.clone(), msg_receiver); - - Ok(ConnectResult { - address: "PLACEHOLDER".to_string(), - }) -} - -#[tauri::command] -pub async fn get_service_provider(state: tauri::State<'_, Arc>>) -> Result { - let guard = state.read().await; - guard - .get_service_provider() - .clone() - .ok_or(BackendError::NoServiceProviderSet) -} - -#[tauri::command] -pub async fn set_service_provider( - service_provider: Option, - state: tauri::State<'_, Arc>>, -) -> Result<()> { - log::trace!("Setting service_provider: {:?}", &service_provider); - let mut guard = state.write().await; - guard.set_service_provider(service_provider); - Ok(()) -} - -#[tauri::command] -pub async fn get_gateway(state: tauri::State<'_, Arc>>) -> Result { - let guard = state.read().await; - guard - .get_gateway() - .clone() - .ok_or(BackendError::NoGatewaySet) -} - -#[tauri::command] -pub async fn set_gateway( - gateway: Option, - state: tauri::State<'_, Arc>>, -) -> Result<()> { - log::trace!("Setting gateway: {:?}", &gateway); - let mut guard = state.write().await; - guard.set_gateway(gateway); - Ok(()) -} diff --git a/nym-connect/mobile/src-tauri/src/operations/connection/disconnect.rs b/nym-connect/mobile/src-tauri/src/operations/connection/disconnect.rs deleted file mode 100644 index b75bf49410..0000000000 --- a/nym-connect/mobile/src-tauri/src/operations/connection/disconnect.rs +++ /dev/null @@ -1,20 +0,0 @@ -use crate::error::Result; -use crate::models::ConnectResult; -use crate::State; -use std::sync::Arc; -use tokio::sync::RwLock; - -#[tauri::command] -pub async fn start_disconnecting( - state: tauri::State<'_, Arc>>, - window: tauri::Window, -) -> Result { - log::trace!("Start disconnecting"); - let mut guard = state.write().await; - - guard.start_disconnecting(&window).await?; - - Ok(ConnectResult { - address: "PLACEHOLDER".to_string(), - }) -} diff --git a/nym-connect/mobile/src-tauri/src/operations/connection/health_check.rs b/nym-connect/mobile/src-tauri/src/operations/connection/health_check.rs deleted file mode 100644 index 3f401933a1..0000000000 --- a/nym-connect/mobile/src-tauri/src/operations/connection/health_check.rs +++ /dev/null @@ -1,26 +0,0 @@ -use serde::{Deserialize, Serialize}; - -static HEALTH_CHECK_URL: &str = "https://nymtech.net/.wellknown/connect/healthcheck.json"; - -#[derive(Serialize, Deserialize, Debug)] -struct ConnectionSuccess { - status: String, -} - -pub async fn run_health_check() -> bool { - log::info!("Running network health check"); - match crate::operations::http::socks5_get::<_, ConnectionSuccess>(HEALTH_CHECK_URL).await { - Ok(res) if res.status == "ok" => { - log::info!("Healthcheck success!"); - true - } - Ok(res) => { - log::error!("Healthcheck failed with status: {}", res.status); - false - } - Err(err) => { - log::error!("Healthcheck failed: {err}"); - false - } - } -} diff --git a/nym-connect/mobile/src-tauri/src/operations/connection/mod.rs b/nym-connect/mobile/src-tauri/src/operations/connection/mod.rs deleted file mode 100644 index 171d07cd83..0000000000 --- a/nym-connect/mobile/src-tauri/src/operations/connection/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub mod connect; -pub mod disconnect; -pub mod health_check; -pub mod status; diff --git a/nym-connect/mobile/src-tauri/src/operations/connection/status.rs b/nym-connect/mobile/src-tauri/src/operations/connection/status.rs deleted file mode 100644 index 7710524fb5..0000000000 --- a/nym-connect/mobile/src-tauri/src/operations/connection/status.rs +++ /dev/null @@ -1,44 +0,0 @@ -use crate::error::Result; -use crate::tasks; -use std::sync::Arc; - -use tokio::sync::RwLock; - -use crate::models::{ConnectionStatusKind, ConnectivityTestResult, GatewayConnectionStatusKind}; -use crate::state::State; - -#[tauri::command] -pub async fn get_connection_status( - state: tauri::State<'_, Arc>>, -) -> Result { - let state = state.read().await; - Ok(state.get_status()) -} - -#[tauri::command] -pub async fn get_gateway_connection_status( - state: tauri::State<'_, Arc>>, -) -> Result { - let mut state_w = state.write().await; - let gateway_connectivity = state_w.get_gateway_connectivity(); - Ok(gateway_connectivity.into()) -} - -#[tauri::command] -pub async fn get_connection_health_check_status( - state: tauri::State<'_, Arc>>, -) -> Result { - let state = state.read().await; - Ok(state.get_connectivity_test_result()) -} - -// Start a connection check task. This should return with an event within one minute, and update -// the state. -// Trying to run multiple concurrent connection checks probably works but is not supported. -#[tauri::command] -pub fn start_connection_health_check_task( - state: tauri::State<'_, Arc>>, - window: tauri::Window, -) { - tasks::start_connection_check(state.inner().clone(), window); -} diff --git a/nym-connect/mobile/src-tauri/src/operations/directory/mod.rs b/nym-connect/mobile/src-tauri/src/operations/directory/mod.rs deleted file mode 100644 index 0e58035274..0000000000 --- a/nym-connect/mobile/src-tauri/src/operations/directory/mod.rs +++ /dev/null @@ -1,92 +0,0 @@ -use itertools::Itertools; - -use crate::error::Result; -use crate::models::{ - DirectoryService, DirectoryServiceProvider, HarbourMasterService, PagedResult, -}; -use nym_api_requests::models::GatewayBondAnnotated; -use nym_contracts_common::types::Percent; - -static SERVICE_PROVIDER_WELLKNOWN_URL: &str = - "https://nymtech.net/.wellknown/connect/service-providers.json"; - -static HARBOUR_MASTER_URL: &str = "https://harbourmaster.nymtech.net/v1/services/?size=100"; - -static GATEWAYS_DETAILED_URL: &str = - "https://validator.nymtech.net/api/v1/status/gateways/detailed"; - -#[tauri::command] -pub async fn get_services() -> Result> { - log::trace!("Fetching services"); - let services_res = reqwest::get(SERVICE_PROVIDER_WELLKNOWN_URL) - .await? - .json::>() - .await?; - log::trace!("Received: {:#?}", services_res); - - log::trace!("Fetching gateways"); - let gateway_res = reqwest::get(GATEWAYS_DETAILED_URL) - .await? - .json::>() - .await?; - log::trace!("Received: {:#?}", gateway_res); - - // TODO: get paged - log::trace!("Fetching active services"); - let active_services = reqwest::get(HARBOUR_MASTER_URL) - .await? - .json::>() - .await?; - log::trace!("Active: {:#?}", active_services); - - let mut filtered: Vec = vec![]; - - for service in &services_res { - let items: _ = service - .items - .clone() - .into_iter() - .filter(|sp| { - active_services - .items - .iter() - .any(|active| active.service_provider_client_id == sp.address) - }) - .collect_vec(); - log::trace!("service = {} has {} items", service.id, items.len()); - filtered.push(DirectoryService { - id: service.id.clone(), - description: service.description.clone(), - items, - }) - } - - let perf_threshold = Percent::from_percentage_value(90).unwrap(); - - // Use only services that are active AND have a performance of >= 90% - let services_with_good_performance: Vec = filtered - .iter_mut() - .fold(vec![], |mut acc, sp| { - acc.append(&mut sp.items); - acc - }) - .into_iter() - .filter(|sp| { - gateway_res.iter().any(|gateway| { - gateway.gateway_bond.gateway.identity_key == sp.gateway - && gateway.performance >= perf_threshold - }) - }) - .collect(); - - Ok(services_with_good_performance) -} - -#[tauri::command] -pub async fn get_gateways_detailed() -> Result> { - let res = reqwest::get(GATEWAYS_DETAILED_URL) - .await? - .json::>() - .await?; - Ok(res) -} diff --git a/nym-connect/mobile/src-tauri/src/operations/export.rs b/nym-connect/mobile/src-tauri/src/operations/export.rs deleted file mode 100644 index dea876fdd8..0000000000 --- a/nym-connect/mobile/src-tauri/src/operations/export.rs +++ /dev/null @@ -1,91 +0,0 @@ -use std::{ffi::OsStr, fs, sync::Arc}; -use tokio::sync::RwLock; - -use crate::{ - error::{BackendError, Result}, - state::State, -}; -use nym_client_core::client::key_manager::KeyManager; -use nym_client_core::config::persistence::keys_paths::ClientKeysPaths; -use nym_crypto::asymmetric::identity; - -pub async fn get_identity_key( - state: &tauri::State<'_, Arc>>, -) -> Result> { - let config = { - let state = state.read().await; - state.load_socks5_config()? - }; - - let paths = ClientKeysPaths::new_from_config(config.get_base()); - let key_manager = KeyManager::load_keys(&paths)?; - let identity_keypair = key_manager.identity_keypair(); - - Ok(identity_keypair) -} - -/// Export the gateway keys as a JSON string blob -#[tauri::command] -pub async fn export_keys(state: tauri::State<'_, Arc>>) -> Result { - let config = { - let state = state.read().await; - state.load_socks5_config()? - }; - - // Get key paths - let ack_key_file = config.get_base().get_ack_key_file(); - let gateway_shared_key_file = config.get_base().get_gateway_shared_key_file(); - - let pub_id_key_file = config.get_base().get_public_identity_key_file(); - let priv_id_key_file = config.get_base().get_private_identity_key_file(); - - let pub_enc_key_file = config.get_base().get_public_encryption_key_file(); - let priv_enc_key_file = config.get_base().get_private_encryption_key_file(); - - // Read file contents - let ack_key = fs::read_to_string(ack_key_file.clone())?; - let gateway_shared_key = fs::read_to_string(gateway_shared_key_file.clone())?; - - let pub_id_key = fs::read_to_string(pub_id_key_file.clone())?; - let priv_id_key = fs::read_to_string(priv_id_key_file.clone())?; - - let pub_enc_key = fs::read_to_string(pub_enc_key_file.clone())?; - let priv_enc_key = fs::read_to_string(priv_enc_key_file.clone())?; - - let ack_key_file = ack_key_file - .file_name() - .map(OsStr::to_string_lossy) - .ok_or(BackendError::CouldNotGetFilename)?; - let gateway_shared_key_file = gateway_shared_key_file - .file_name() - .map(OsStr::to_string_lossy) - .ok_or(BackendError::CouldNotGetFilename)?; - let pub_id_key_file = pub_id_key_file - .file_name() - .map(OsStr::to_string_lossy) - .ok_or(BackendError::CouldNotGetFilename)?; - let priv_id_key_file = priv_id_key_file - .file_name() - .map(OsStr::to_string_lossy) - .ok_or(BackendError::CouldNotGetFilename)?; - let pub_enc_key_file = pub_enc_key_file - .file_name() - .map(OsStr::to_string_lossy) - .ok_or(BackendError::CouldNotGetFilename)?; - let priv_enc_key_file = priv_enc_key_file - .file_name() - .map(OsStr::to_string_lossy) - .ok_or(BackendError::CouldNotGetFilename)?; - - // Format and return as json - let json = serde_json::json!({ - ack_key_file: ack_key, - gateway_shared_key_file: gateway_shared_key, - pub_id_key_file: pub_id_key, - priv_id_key_file: priv_id_key, - pub_enc_key_file: pub_enc_key, - priv_enc_key_file: priv_enc_key, - }); - - Ok(serde_json::to_string_pretty(&json)?) -} diff --git a/nym-connect/mobile/src-tauri/src/operations/help/log.rs b/nym-connect/mobile/src-tauri/src/operations/help/log.rs deleted file mode 100644 index 5b31ea023e..0000000000 --- a/nym-connect/mobile/src-tauri/src/operations/help/log.rs +++ /dev/null @@ -1,31 +0,0 @@ -use crate::error::BackendError; -use tauri::Manager; - -#[cfg(desktop)] -#[tauri::command] -pub fn help_log_toggle_window(app_handle: tauri::AppHandle) -> Result<(), BackendError> { - if let Some(current_log_window) = app_handle.windows().get("log") { - log::info!("Closing log window..."); - if let Err(e) = current_log_window.close() { - log::error!("Unable to close log window: {:?}", e); - } - return Ok(()); - } - - log::info!("Creating log window..."); - match tauri::WindowBuilder::new(&app_handle, "log", tauri::WindowUrl::App("log.html".into())) - .title("Nym Connect Logs") - .build() - { - Ok(window) => { - if let Err(e) = window.set_focus() { - log::error!("Unable to focus log window: {:?}", e); - } - Ok(()) - } - Err(e) => { - log::error!("Unable to create log window: {:?}", e); - Err(BackendError::NewWindowError) - } - } -} diff --git a/nym-connect/mobile/src-tauri/src/operations/help/mod.rs b/nym-connect/mobile/src-tauri/src/operations/help/mod.rs deleted file mode 100644 index 52dafe6d0f..0000000000 --- a/nym-connect/mobile/src-tauri/src/operations/help/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod log; -pub mod storage; diff --git a/nym-connect/mobile/src-tauri/src/operations/help/storage.rs b/nym-connect/mobile/src-tauri/src/operations/help/storage.rs deleted file mode 100644 index ab47ffa529..0000000000 --- a/nym-connect/mobile/src-tauri/src/operations/help/storage.rs +++ /dev/null @@ -1,20 +0,0 @@ -use crate::error::BackendError; -use serde::Serialize; -use tauri::Manager; - -#[derive(Debug, Serialize, Clone)] -struct ClearStorageEvent { - kind: String, -} - -#[tauri::command] -pub fn help_clear_storage(app_handle: tauri::AppHandle) -> Result<(), BackendError> { - log::info!("Sending event to clear local storage..."); - - let event = ClearStorageEvent { - kind: "local_storage".to_string(), - }; - app_handle.emit_all("help://clear-storage", event)?; - - Ok(()) -} diff --git a/nym-connect/mobile/src-tauri/src/operations/http.rs b/nym-connect/mobile/src-tauri/src/operations/http.rs deleted file mode 100644 index 5cfe3e1f53..0000000000 --- a/nym-connect/mobile/src-tauri/src/operations/http.rs +++ /dev/null @@ -1,37 +0,0 @@ -use crate::error::{BackendError, Result}; -use serde::de::DeserializeOwned; -use tap::TapFallible; - -pub async fn socks5_get(url: U) -> Result -where - U: reqwest::IntoUrl + std::fmt::Display, - T: DeserializeOwned, -{ - log::info!(">>> GET {url}"); - let proxy = reqwest::Proxy::all("socks5h://127.0.0.1:1080")?; - let client = reqwest::Client::builder() - .proxy(proxy) - .timeout(std::time::Duration::from_secs(20)) - .build()?; - - let resp = client.get(url).send().await.tap_err(|err| { - log::error!("<<< Request send error: {err}"); - })?; - - if resp.status().is_client_error() || resp.status().is_server_error() { - log::error!("<<< {}", resp.status()); - return Err(BackendError::RequestFail { - url: resp.url().clone(), - status_code: resp.status(), - }); - } - - let response_body = resp.text().await.tap_err(|err| { - log::error!("<<< Request error: {err}"); - })?; - log::info!("<<< {response_body}"); - - Ok(serde_json::from_str(&response_body).tap_err(|err| { - log::error!("<<< JSON parsing error: {err}"); - })?) -} diff --git a/nym-connect/mobile/src-tauri/src/operations/mod.rs b/nym-connect/mobile/src-tauri/src/operations/mod.rs deleted file mode 100644 index 7e8f09657b..0000000000 --- a/nym-connect/mobile/src-tauri/src/operations/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub mod connection; -pub mod directory; -pub mod export; -pub mod help; -pub mod http; diff --git a/nym-connect/mobile/src-tauri/src/state.rs b/nym-connect/mobile/src-tauri/src/state.rs deleted file mode 100644 index 36ec356779..0000000000 --- a/nym-connect/mobile/src-tauri/src/state.rs +++ /dev/null @@ -1,262 +0,0 @@ -use std::time::Duration; - -use ::nym_config_common::NymConfig; -use futures::SinkExt; -use nym_client_core::client::key_manager::KeyManager; -use nym_client_core::error::ClientCoreStatusMessage; -use tap::TapFallible; -use tauri::Manager; - -use nym_socks5_client_core::{ - config::Config as Socks5Config, Socks5ControlMessage, Socks5ControlMessageSender, -}; -use tokio::time::Instant; - -use crate::{ - config::{self, socks5_config_id_appended_with, Config}, - error::{BackendError, Result}, - models::{ - AppEventConnectionStatusChangedPayload, ConnectionStatusKind, ConnectivityTestResult, - APP_EVENT_CONNECTION_STATUS_CHANGED, - }, - tasks::{self, ExitStatusReceiver}, -}; - -// The client will emit messages if the connection to the gateway is poor (or the gateway can't -// keep up with the messages we are sendind). If no messages about this has been received for a -// certain duration then we assume it's all good. -const GATEWAY_CONNECTIVITY_TIMEOUT_SECS: u64 = 20; - -#[derive(Clone, Copy, Default)] -pub enum GatewayConnectivity { - #[default] - Good, - Bad { - when: Instant, - }, - VeryBad { - when: Instant, - }, -} - -impl TryFrom<&ClientCoreStatusMessage> for GatewayConnectivity { - type Error = BackendError; - - fn try_from(value: &ClientCoreStatusMessage) -> Result { - let conn = match value { - ClientCoreStatusMessage::GatewayIsSlow => GatewayConnectivity::Bad { - when: Instant::now(), - }, - ClientCoreStatusMessage::GatewayIsVerySlow => GatewayConnectivity::VeryBad { - when: Instant::now(), - }, - }; - Ok(conn) - } -} - -#[derive(Default)] -pub struct State { - /// The current connection status - status: ConnectionStatusKind, - - /// The service provider - service_provider: Option, - - /// The gateway used. Note that this is also used to create the configuration id - gateway: Option, - - /// Channel that is used to send command messages to the SOCKS5 client, such as to disconnect - socks5_client_sender: Option, - - /// The client will periodically report connectivity to the gateway it's connected to. Unless - /// we get a status message from the client we assume it's good. - gateway_connectivity: GatewayConnectivity, - - /// The latest end-to-end connectivity test result. The first test is initiated on connection - /// established. Additional tests can be triggered. - connectivity_test_result: ConnectivityTestResult, -} - -impl State { - pub fn new() -> Self { - State { - status: ConnectionStatusKind::Disconnected, - service_provider: None, - gateway: None, - socks5_client_sender: None, - gateway_connectivity: GatewayConnectivity::Good, - connectivity_test_result: ConnectivityTestResult::NotAvailable, - } - } - - pub fn get_gateway_connectivity(&mut self) -> GatewayConnectivity { - self.gateway_connectivity = match self.gateway_connectivity { - c @ (GatewayConnectivity::Bad { when } | GatewayConnectivity::VeryBad { when }) => { - if Instant::now() > when + Duration::from_secs(GATEWAY_CONNECTIVITY_TIMEOUT_SECS) { - GatewayConnectivity::Good - } else { - c - } - } - current => current, - }; - self.gateway_connectivity - } - - pub fn set_gateway_connectivity(&mut self, gateway_connectivity: GatewayConnectivity) { - self.gateway_connectivity = gateway_connectivity - } - - pub fn get_connectivity_test_result(&self) -> ConnectivityTestResult { - self.connectivity_test_result - } - - pub fn set_connectivity_test_result( - &mut self, - connectivity_test_result: ConnectivityTestResult, - ) { - self.connectivity_test_result = connectivity_test_result; - } - - pub fn get_status(&self) -> ConnectionStatusKind { - self.status.clone() - } - - fn set_state(&mut self, status: ConnectionStatusKind, window: &tauri::Window) { - log::info!("{status}"); - self.status = status.clone(); - window - .emit_all( - APP_EVENT_CONNECTION_STATUS_CHANGED, - AppEventConnectionStatusChangedPayload { status }, - ) - .tap_err(|err| log::warn!("{err}")) - .ok(); - } - - pub fn get_service_provider(&self) -> &Option { - &self.service_provider - } - - pub fn set_service_provider(&mut self, provider: Option) { - self.service_provider = provider; - } - - pub fn get_gateway(&self) -> &Option { - &self.gateway - } - - pub fn set_gateway(&mut self, gateway: Option) { - self.gateway = gateway; - } - - /// The effective config id is the static config id appended with the id of the gateway - pub fn get_config_id(&self) -> Result { - self.get_gateway() - .as_ref() - .ok_or(BackendError::CouldNotGetIdWithoutGateway) - .and_then(|gateway_id| socks5_config_id_appended_with(gateway_id)) - } - - pub fn load_socks5_config(&self) -> Result { - let id = self.get_config_id()?; - let config = Socks5Config::load_from_file(&id) - .tap_err(|_| log::warn!("Failed to load configuration file"))?; - Ok(config) - } - - /// Start connecting by first creating a config file, followed by starting a thread running the - /// SOCKS5 client. - pub async fn start_connecting( - &mut self, - window: &tauri::Window, - ) -> Result<(nym_task::StatusReceiver, ExitStatusReceiver)> { - self.set_state(ConnectionStatusKind::Connecting, window); - - let res = self.init_config().await; - match res { - Ok(_) => {} - Err(e) => { - log::error!("Failed to initialize: {e}"); - - // Wait a little to give the user some rudimentary feedback that the click actually - // registered. - tokio::time::sleep(Duration::from_secs(1)).await; - self.set_state(ConnectionStatusKind::Disconnected, window); - return Err(e); - } - }; - let (config, keys) = res.unwrap(); - - // Kick off the main task and get the channel for controlling it - self.start_nym_socks5_client(config, keys) - } - - /// Create a configuration file - async fn init_config(&self) -> Result<(Config, KeyManager)> { - let service_provider = self - .get_service_provider() - .as_ref() - .ok_or(BackendError::CouldNotInitWithoutServiceProvider)?; - let gateway = self - .get_gateway() - .as_ref() - .ok_or(BackendError::CouldNotInitWithoutGateway)?; - log::trace!(" service_provider: {:?}", service_provider); - log::trace!(" gateway: {:?}", gateway); - - config::Config::init(service_provider, gateway).await - } - - /// Spawn a new thread running the SOCKS5 client - fn start_nym_socks5_client( - &mut self, - config: Config, - keys: KeyManager, - ) -> Result<(nym_task::StatusReceiver, ExitStatusReceiver)> { - let id = self.get_config_id()?; - let (control_tx, msg_rx, exit_status_rx, used_gateway) = - tasks::start_nym_socks5_client(&id, config, keys)?; - self.socks5_client_sender = Some(control_tx); - self.gateway = Some(used_gateway.gateway_id); - Ok((msg_rx, exit_status_rx)) - } - - /// Once the SOCKS5 client is operational, the status listener would call this - pub fn mark_connected(&mut self, window: &tauri::Window) { - log::trace!("state::mark_connected"); - self.set_state(ConnectionStatusKind::Connected, window); - } - - /// Disconnect by sending a message to the SOCKS5 client thread. Once it has finished and is - /// disconnected, the disconnect handler will mark it as disconnected. - pub async fn start_disconnecting(&mut self, window: &tauri::Window) -> Result<()> { - log::trace!("state::start_disconnecting"); - self.set_state(ConnectionStatusKind::Disconnecting, window); - - // Send shutdown message - match self.socks5_client_sender { - Some(ref mut sender) => sender - .send(Socks5ControlMessage::Stop) - .await - .map_err(|err| { - log::warn!("Failed trying to send disconnect signal: {err}"); - BackendError::CoundNotSendDisconnectSignal - }), - None => { - log::warn!( - "Trying to disconnect without being able to talk to the SOCKS5 client, \ - is it running?" - ); - Err(BackendError::CoundNotSendDisconnectSignal) - } - } - } - - /// Once the SOCKS5 client has stopped, this should be called by the disconnect handler to mark - /// the state as disconnected. - pub fn mark_disconnected(&mut self, window: &tauri::Window) { - self.set_state(ConnectionStatusKind::Disconnected, window); - } -} diff --git a/nym-connect/mobile/src-tauri/src/tasks.rs b/nym-connect/mobile/src-tauri/src/tasks.rs deleted file mode 100644 index cb00d6f9c9..0000000000 --- a/nym-connect/mobile/src-tauri/src/tasks.rs +++ /dev/null @@ -1,205 +0,0 @@ -use futures::{channel::mpsc, StreamExt}; -use nym_client_core::{ - client::key_manager::KeyManager, - config::{ClientCoreConfigTrait, GatewayEndpointConfig}, - error::ClientCoreStatusMessage, -}; -use nym_task::manager::TaskStatus; -use std::sync::Arc; -use tap::TapFallible; -use tokio::sync::RwLock; - -use nym_config_common::NymConfig; -use nym_socks5_client_core::NymClient as Socks5NymClient; -use nym_socks5_client_core::{config::Config as Socks5Config, Socks5ControlMessageSender}; - -use crate::{ - config::Config, - error::Result, - events::{self, emit_event, emit_status_event}, - models::{ConnectionStatusKind, ConnectivityTestResult}, - operations, - state::State, -}; - -pub type ExitStatusReceiver = futures::channel::oneshot::Receiver; - -/// Status messages sent by the SOCKS5 client task to the main tauri task. -#[derive(Debug)] -pub enum Socks5ExitStatusMessage { - /// The SOCKS5 task successfully stopped - Stopped, - /// The SOCKS5 task failed to start - Failed(Box), -} - -/// The main SOCKS5 client task. It loads the configuration from file determined by the `id`. -pub fn start_nym_socks5_client( - id: &str, - config: Config, - keys: KeyManager, -) -> Result<( - Socks5ControlMessageSender, - nym_task::StatusReceiver, - ExitStatusReceiver, - GatewayEndpointConfig, -)> { - log::info!("Loading config from file: {id}"); - let used_gateway = config.get_base().get_gateway_endpoint().clone(); - - let socks5_client = Socks5NymClient::new_with_keys(config.socks5, Some(keys)); - log::info!("Starting socks5 client"); - - // Channel to send control messages to the socks5 client - let (socks5_ctrl_tx, socks5_ctrl_rx) = mpsc::unbounded(); - - // Channel to send status update messages from the background socks5 task to the frontend. - let (socks5_status_tx, socks5_status_rx) = mpsc::channel(128); - - // Channel to signal back to the main task when the socks5 client finishes, and why - let (socks5_exit_tx, socks5_exit_rx) = futures::channel::oneshot::channel(); - - // Spawn a separate runtime for the socks5 client so we can forcefully terminate. - // Once we can gracefully shutdown the socks5 client we can get rid of this. - // The status channel is used to both get the state of the task, and if it's closed, to check - // for panic. - std::thread::spawn(|| { - let result = tokio::runtime::Runtime::new() - .expect("Failed to create runtime for SOCKS5 client") - .block_on(async move { - socks5_client - .run_and_listen(socks5_ctrl_rx, socks5_status_tx) - .await - }); - - if let Err(err) = result { - log::error!("SOCKS5 proxy failed: {err}"); - socks5_exit_tx - .send(Socks5ExitStatusMessage::Failed(err)) - .expect("Failed to send status message back to main task"); - return; - } - - log::info!("SOCKS5 task finished"); - socks5_exit_tx - .send(Socks5ExitStatusMessage::Stopped) - .expect("Failed to send status message back to main task"); - }); - - Ok(( - socks5_ctrl_tx, - socks5_status_rx, - socks5_exit_rx, - used_gateway, - )) -} - -pub fn start_connection_check(state: Arc>, window: tauri::Window) { - log::debug!("Starting connection check handler"); - tokio::spawn(async move { - if state.read().await.get_status() != ConnectionStatusKind::Connected { - log::error!("SOCKS5 connection status check failed: not connected"); - return; - } - - log::info!("Running connection health check"); - if operations::connection::health_check::run_health_check().await { - state - .write() - .await - .set_connectivity_test_result(ConnectivityTestResult::Success); - emit_event( - "socks5-connection-success-event", - "SOCKS5 success", - "SOCKS5 connection health check successful", - &window, - ); - } else if state.read().await.get_status() == ConnectionStatusKind::Connected { - state - .write() - .await - .set_connectivity_test_result(ConnectivityTestResult::Fail); - log::error!("SOCKS5 connection health check failed"); - emit_event( - "socks5-connection-fail-event", - "SOCKS5 error", - "SOCKS5 connection health check failed", - &window, - ); - } else { - log::debug!("SOCKS5 connection status check cancelled: not connected"); - } - - log::debug!("Connection check handler exiting"); - }); -} - -/// The status listener listens for non-exit status messages from the background socks5 proxy task. -pub fn start_status_listener( - state: Arc>, - window: tauri::Window, - mut msg_receiver: nym_task::StatusReceiver, -) { - log::info!("Starting status listener"); - - tokio::spawn(async move { - while let Some(msg) = msg_receiver.next().await { - log::info!("SOCKS5 proxy sent status message: {}", msg); - - if let Some(task_status) = msg.downcast_ref::() { - events::handle_task_status(task_status, &state, &window).await; - } else if let Some(client_status_message) = - msg.downcast_ref::() - { - events::handle_client_status_message(client_status_message, &state, &window).await; - } else { - emit_status_event("socks5-status-event", &msg, &window); - } - } - log::info!("Status listener exiting"); - }); -} - -/// The disconnect listener listens to the channel setup between the socks5 proxy task and the main -/// tauri task. Primarily it listens for shutdown messages, and updates the state accordingly. -pub fn start_disconnect_listener( - state: Arc>, - window: tauri::Window, - exit_status_receiver: ExitStatusReceiver, -) { - log::trace!("Starting disconnect listener"); - tokio::spawn(async move { - match exit_status_receiver.await { - Ok(Socks5ExitStatusMessage::Stopped) => { - log::info!("SOCKS5 task reported it has finished"); - emit_event( - "socks5-event", - "SOCKS5 finished", - "SOCKS5 task reported it has finished", - &window, - ); - } - Ok(Socks5ExitStatusMessage::Failed(err)) => { - log::info!("SOCKS5 task reported error: {err}"); - emit_event( - "socks5-event", - "SOCKS5 error", - &format!("SOCKS5 failed: {err}"), - &window, - ); - } - Err(_) => { - log::info!("SOCKS5 task appears to have stopped abruptly"); - emit_event( - "socks5-event", - "SOCKS5 error", - "SOCKS5 stopped abruptly. Please try reconnecting.", - &window, - ); - } - } - - let mut state_w = state.write().await; - state_w.mark_disconnected(&window); - }); -} diff --git a/nym-connect/mobile/src-tauri/tauri.conf.json b/nym-connect/mobile/src-tauri/tauri.conf.json deleted file mode 100644 index c968ee8367..0000000000 --- a/nym-connect/mobile/src-tauri/tauri.conf.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "package": { - "productName": "nym-connect", - "version": "1.1.12" - }, - "build": { - "distDir": "../dist", - "devPath": "http://localhost:9000", - "beforeDevCommand": "", - "beforeBuildCommand": "" - }, - "tauri": { - "bundle": { - "active": true, - "targets": "all", - "identifier": "net.nymtech.connect", - "icon": [ - "icons/32x32.png", - "icons/128x128.png", - "icons/128x128@2x.png", - "icons/icon.icns", - "icons/icon.ico" - ], - "resources": [], - "externalBin": [], - "copyright": "Copyright © 2021-2023 Nym Technologies SA", - "category": "Business", - "shortDescription": "Browse the internet privately using the Nym Mixnet", - "longDescription": "", - "deb": { - "depends": [] - }, - "macOS": { - "frameworks": [], - "minimumSystemVersion": "", - "exceptionDomain": "", - "signingIdentity": null, - "entitlements": null - }, - "windows": { - "certificateThumbprint": null, - "digestAlgorithm": "sha256", - "timestampUrl": "" - } - }, - "updater": { - "active": false - }, - "allowlist": { - "shell": { - "open": true - }, - "clipboard": { - "writeText": true - }, - "notification": { - "all": true - } - }, - "windows": [ - { - "title": "NymConnect", - "width": 240, - "height": 635, - "resizable": false, - "decorations": false, - "transparent": true - } - ], - "security": { - "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'" - } - } -} diff --git a/nym-connect/mobile/src/assets/help-step-four.png b/nym-connect/mobile/src/assets/help-step-four.png deleted file mode 100644 index 5507962892..0000000000 Binary files a/nym-connect/mobile/src/assets/help-step-four.png and /dev/null differ diff --git a/nym-connect/mobile/src/assets/help-step-one-legacy.png b/nym-connect/mobile/src/assets/help-step-one-legacy.png deleted file mode 100644 index 5e91a29cff..0000000000 Binary files a/nym-connect/mobile/src/assets/help-step-one-legacy.png and /dev/null differ diff --git a/nym-connect/mobile/src/assets/help-step-one.png b/nym-connect/mobile/src/assets/help-step-one.png deleted file mode 100644 index 482e752286..0000000000 Binary files a/nym-connect/mobile/src/assets/help-step-one.png and /dev/null differ diff --git a/nym-connect/mobile/src/assets/help-step-three.png b/nym-connect/mobile/src/assets/help-step-three.png deleted file mode 100644 index 932b6c1171..0000000000 Binary files a/nym-connect/mobile/src/assets/help-step-three.png and /dev/null differ diff --git a/nym-connect/mobile/src/assets/help-step-two-legacy.png b/nym-connect/mobile/src/assets/help-step-two-legacy.png deleted file mode 100644 index f2910c98cf..0000000000 Binary files a/nym-connect/mobile/src/assets/help-step-two-legacy.png and /dev/null differ diff --git a/nym-connect/mobile/src/assets/help-step-two.png b/nym-connect/mobile/src/assets/help-step-two.png deleted file mode 100644 index c6f4429d74..0000000000 Binary files a/nym-connect/mobile/src/assets/help-step-two.png and /dev/null differ diff --git a/nym-connect/mobile/src/components/AppVersion.tsx b/nym-connect/mobile/src/components/AppVersion.tsx deleted file mode 100644 index 4ced230efa..0000000000 --- a/nym-connect/mobile/src/components/AppVersion.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; -import { Box } from '@mui/material'; -import { useClientContext } from 'src/context/main'; - -export const AppVersion = () => { - const { appVersion } = useClientContext(); - - return ( - - - Version {appVersion} - - - ); -}; diff --git a/nym-connect/mobile/src/components/AppWindowFrame.tsx b/nym-connect/mobile/src/components/AppWindowFrame.tsx deleted file mode 100644 index 90e01fffa7..0000000000 --- a/nym-connect/mobile/src/components/AppWindowFrame.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import React from 'react'; -import { Box } from '@mui/material'; -import { useLocation } from 'react-router-dom'; -import { useClientContext } from 'src/context/main'; -import { CustomTitleBar } from './CustomTitleBar'; - -export const AppWindowFrame: FCWithChildren = ({ children }) => { - const location = useLocation(); - const { userDefinedGateway, setUserDefinedGateway, userDefinedSPAddress, setUserDefinedSPAddress } = - useClientContext(); - - // defined functions to be used when moving away from pages - const onBack = () => { - switch (location.pathname) { - case '/menu/settings/gateway': - return () => { - // when the user moves away from the settings page and the gateway is not valid - // set isActive to false - if (!userDefinedGateway?.gateway) { - setUserDefinedGateway((current) => ({ ...current, isActive: false })); - } - }; - case '/menu/settings/service-provider': - return () => { - // when the user moves away from the settings page and the sp is not valid - // set isActive to false - if (!userDefinedSPAddress?.address) { - setUserDefinedSPAddress((current) => ({ ...current, isActive: false })); - } - }; - default: - return undefined; - } - }; - - return ( - - - {children} - - ); -}; diff --git a/nym-connect/mobile/src/components/ConnectionButton.tsx b/nym-connect/mobile/src/components/ConnectionButton.tsx deleted file mode 100644 index 1dd72f78df..0000000000 --- a/nym-connect/mobile/src/components/ConnectionButton.tsx +++ /dev/null @@ -1,168 +0,0 @@ -import React from 'react'; -import { ConnectionStatusKind } from '../types'; - -const getStatusFillColor = (status: ConnectionStatusKind, hover: boolean, isError: boolean): string => { - if (isError && hover) { - return '#21D072'; - } - if (isError) { - return '#40475C'; - } - - switch (status) { - case 'disconnected': - if (hover) { - return '#FFFF33'; - } - return '#FFE600'; - case 'connecting': - case 'disconnecting': - return '#FFE600'; - default: - // connected - if (hover) { - return '#E43E3E'; - } - return '#21D072'; - } -}; - -const getStatusText = (status: ConnectionStatusKind, hover: boolean): string => { - switch (status) { - case 'disconnected': - return 'Connect'; - case 'connecting': - return 'Connecting'; - case 'disconnecting': - return 'Connected'; - default: - // connected - if (hover) { - return 'Disconnect'; - } - return 'Connected'; - } -}; - -export const ConnectionButton: FCWithChildren<{ - status: ConnectionStatusKind; - disabled?: boolean; - busy?: boolean; - isError?: boolean; - onClick?: (status: ConnectionStatusKind) => void; -}> = ({ status, disabled, isError, onClick }) => { - const [hover, setHover] = React.useState(false); - - const handleClick = React.useCallback(() => { - if (disabled === true) { - return; - } - if (onClick) { - onClick(status); - } - }, [status, disabled]); - - const statusText = getStatusText(status, hover); - const statusTextColor = isError ? '#40475C' : '#FFF'; - const statusFillColor = getStatusFillColor(status, hover, Boolean(isError)); - - return ( - - !disabled && setHover(true)} - onMouseLeave={() => !disabled && setHover(false)} - > - - - - - - - - - - {status === 'connected' && hover ? ( - - ) : ( - - )} - - {statusText} - - - - - - - - - - - - - - - - - - - - - - - - - - ); -}; diff --git a/nym-connect/mobile/src/components/ConnectionStats.tsx b/nym-connect/mobile/src/components/ConnectionStats.tsx deleted file mode 100644 index f17833e66d..0000000000 --- a/nym-connect/mobile/src/components/ConnectionStats.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import { Box, Typography } from '@mui/material'; -import prettyBytes from 'pretty-bytes'; - -export interface ConnectionStatsItem { - label: string; - rateBytesPerSecond: number; - totalBytes: number; -} - -const FONT_SIZE = '14px'; - -export const ConnectionStats: FCWithChildren<{ - stats: ConnectionStatsItem[]; -}> = ({ stats }) => ( - -
- {stats.map((stat) => ( - - {stat.label} - - ))} -
-
- {stats.map((stat) => ( - - {formatRate(stat.rateBytesPerSecond)} - - ))} -
-
- {stats.map((stat) => ( - - {formatTotal(stat.totalBytes)} - - ))} -
-
-); - -export function formatRate(bytesPerSecond: number): string { - return `${prettyBytes(bytesPerSecond)}/s`; -} - -export function formatTotal(totalBytes: number): string { - return prettyBytes(totalBytes); -} diff --git a/nym-connect/mobile/src/components/ConnectionStatus.tsx b/nym-connect/mobile/src/components/ConnectionStatus.tsx deleted file mode 100644 index 4ee49c5e14..0000000000 --- a/nym-connect/mobile/src/components/ConnectionStatus.tsx +++ /dev/null @@ -1,134 +0,0 @@ -import React, { useState } from 'react'; -import { Box, CircularProgress, Typography } from '@mui/material'; -import { DateTime } from 'luxon'; -import { ErrorOutline, InfoOutlined } from '@mui/icons-material'; -import { ConnectionStatusKind, GatewayPerformance } from '../types'; -import { ServiceProvider } from '../types/directory'; -import { GatwayWarningInfo, ServiceProviderInfo } from './TooltipInfo'; -import { InfoModal } from './InfoModal'; - -const FONT_SIZE = '14px'; -const FONT_STYLE = 'normal'; - -const ConnectionStatusContent: FCWithChildren<{ - status: ConnectionStatusKind; - serviceProvider?: ServiceProvider; - gatewayError: boolean; -}> = ({ status, serviceProvider, gatewayError }) => { - const [showSpInfo, setShowSpInfo] = useState(false); - const [showGatewayWarn, setShowGatewayWarn] = useState(false); - - if (gatewayError) { - return ( - <> - {serviceProvider && ( - setShowGatewayWarn(false)} - > - - - )} - setShowGatewayWarn(true)} - > - - - Gateway has issues - - - - ); - } - switch (status) { - case 'connected': - return ( - <> - {serviceProvider && ( - setShowSpInfo(false)}> - - - )} - setShowSpInfo(true)} - justifyContent="center" - sx={{ cursor: 'pointer' }} - > - - - Connected to Nym Mixnet - - - - ); - case 'disconnected': - return ( - - Connect to the mixnet - - ); - case 'disconnecting': - return ( - - - - Disconnecting... - - - ); - case 'connecting': - return ( - - - - Connecting... - - - ); - - default: - return null; - } -}; - -export const ConnectionStatus: FCWithChildren<{ - status: ConnectionStatusKind; - gatewayPerformance?: GatewayPerformance; - connectedSince?: DateTime; - serviceProvider?: ServiceProvider; -}> = ({ status, serviceProvider, gatewayPerformance }) => { - const color = status === 'connected' || status === 'disconnecting' ? '#21D072' : 'white'; - - return ( - - - - ); -}; diff --git a/nym-connect/mobile/src/components/ConntectionTimer.tsx b/nym-connect/mobile/src/components/ConntectionTimer.tsx deleted file mode 100644 index c7b341ecfe..0000000000 --- a/nym-connect/mobile/src/components/ConntectionTimer.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React, { useEffect } from 'react'; -import { Stack, Typography } from '@mui/material'; -import { DateTime } from 'luxon'; - -export const ConnectionTimer = ({ connectedSince }: { connectedSince?: DateTime }) => { - const [duration, setDuration] = React.useState(); - useEffect(() => { - const intervalId = setInterval(() => { - if (connectedSince) { - setDuration(DateTime.now().diff(connectedSince).toFormat('hh:mm:ss')); - } - }, 500); - return () => { - clearInterval(intervalId); - }; - }, [connectedSince]); - - return ( - - - Connection time - - - {duration || '00:00:00'} - - - ); -}; diff --git a/nym-connect/mobile/src/components/CopyToClipboard.tsx b/nym-connect/mobile/src/components/CopyToClipboard.tsx deleted file mode 100644 index 7a48662190..0000000000 --- a/nym-connect/mobile/src/components/CopyToClipboard.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import { Button, IconButton, Tooltip } from '@mui/material'; -import { Check, ContentCopy } from '@mui/icons-material'; -import { clipboard } from '@tauri-apps/api'; - -export const CopyToClipboard = ({ - text = '', - light, - iconButton, -}: { - text?: string; - light?: boolean; - iconButton?: boolean; -}) => { - const [copied, setCopied] = useState(false); - - const handleCopy = async (textToCopy: string) => { - try { - if (clipboard) { - await clipboard.writeText(textToCopy); - } else { - await navigator.clipboard.writeText(textToCopy); - } - setCopied(true); - } catch (e) { - console.log(`failed to copy: ${e}`); - } - }; - - useEffect(() => { - let timer: NodeJS.Timeout; - if (copied) { - timer = setTimeout(() => { - setCopied(false); - }, 2000); - } - return () => clearTimeout(timer); - }, [copied]); - - if (iconButton) - return ( - - handleCopy(text)} - size="small" - sx={{ - color: (theme) => (light ? theme.palette.common.white : theme.palette.nym.background.dark), - }} - > - {!copied ? : } - - - ); - - return ( - - ); -}; diff --git a/nym-connect/mobile/src/components/CustomTitleBar.tsx b/nym-connect/mobile/src/components/CustomTitleBar.tsx deleted file mode 100644 index 9fb13c7cec..0000000000 --- a/nym-connect/mobile/src/components/CustomTitleBar.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import React from 'react'; -import { ArrowBack, Menu } from '@mui/icons-material'; -import { Box, IconButton, Typography } from '@mui/material'; -// TODO since the structure refactor for NC this import fails -// import { NymWordmark } from '@nymproject/react/logo/NymWordmark'; -import { useNavigate } from 'react-router-dom'; - -const customTitleBarStyles = { - titlebar: { - background: '#1D2125', - display: 'flex', - justifyContent: 'space-between', - alignItems: 'center', - padding: '16px', - paddingBottom: '0px', - borderTopLeftRadius: '12px', - borderTopRightRadius: '12px', - }, -}; - -const CustomButton = ({ Icon, onClick }: { Icon: React.JSXElementConstructor; onClick: () => void }) => ( - - - -); - -const MenuIcon = () => { - const navigate = useNavigate(); - return navigate('/menu')} />; -}; - -const ArrowBackIcon = ({ onBack }: { onBack?: () => void }) => { - const navigate = useNavigate(); - const handleBack = () => { - onBack?.(); - navigate(-1); - }; - return ; -}; - -const getTitle = (path: string) => { - if (path.includes('settings')) return 'Settings'; - if (path !== '/') { - const title = path.split('/').slice(-1); - return ( - - {title} - - ); - } - - // TODO return ; - return ( - - NYM - - ); -}; - -export const CustomTitleBar = ({ path = '/', onBack }: { path?: string; onBack?: () => void }) => ( - - {/* set width to keep logo centered */} - {path === '/' ? : } - {getTitle(path)} - - -); diff --git a/nym-connect/mobile/src/components/Error.tsx b/nym-connect/mobile/src/components/Error.tsx deleted file mode 100644 index f582536b6b..0000000000 --- a/nym-connect/mobile/src/components/Error.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import { FallbackProps } from 'react-error-boundary'; -import { Alert, AlertTitle, Button } from '@mui/material'; - -export const ErrorFallback = ({ error, resetErrorBoundary }: FallbackProps) => ( -
- - {error.name} - {error.message} - - - Stack trace - {error.stack} - - -
-); diff --git a/nym-connect/mobile/src/components/ErrorFallback.tsx b/nym-connect/mobile/src/components/ErrorFallback.tsx deleted file mode 100644 index f582536b6b..0000000000 --- a/nym-connect/mobile/src/components/ErrorFallback.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import { FallbackProps } from 'react-error-boundary'; -import { Alert, AlertTitle, Button } from '@mui/material'; - -export const ErrorFallback = ({ error, resetErrorBoundary }: FallbackProps) => ( -
- - {error.name} - {error.message} - - - Stack trace - {error.stack} - - -
-); diff --git a/nym-connect/mobile/src/components/ExperimentalWarning.tsx b/nym-connect/mobile/src/components/ExperimentalWarning.tsx deleted file mode 100644 index 59595d389e..0000000000 --- a/nym-connect/mobile/src/components/ExperimentalWarning.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from 'react'; -import { Box, Typography } from '@mui/material'; - -export const ExperimentalWarning = () => ( - - - This is experimental software. - - - Do not rely on it for strong anonymity (yet). - - -); diff --git a/nym-connect/mobile/src/components/Growth/content/assets/matrix.webp b/nym-connect/mobile/src/components/Growth/content/assets/matrix.webp deleted file mode 100644 index 2b1517166c..0000000000 Binary files a/nym-connect/mobile/src/components/Growth/content/assets/matrix.webp and /dev/null differ diff --git a/nym-connect/mobile/src/components/HelpPage.tsx b/nym-connect/mobile/src/components/HelpPage.tsx deleted file mode 100644 index 3ec3e3e940..0000000000 --- a/nym-connect/mobile/src/components/HelpPage.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react'; -import { Stack, Typography } from '@mui/material'; -import { HelpPageActions } from './HelpPageActions'; -import { HelpImage } from './HelpPageImage'; -import { StepIndicator } from './HelpPageStepIndicator'; - -export const HelpPage = ({ - step, - totalSteps, - description, - img, - onNext, - onPrev, -}: { - step: number; - totalSteps: number; - description: string; - img: any; - onNext?: () => void; - onPrev?: () => void; -}) => ( - - - - - How to connect guide {step}/{totalSteps} - - - {description} - - - - - -); diff --git a/nym-connect/mobile/src/components/HelpPageActions.tsx b/nym-connect/mobile/src/components/HelpPageActions.tsx deleted file mode 100644 index 13cba78fd2..0000000000 --- a/nym-connect/mobile/src/components/HelpPageActions.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { ArrowBack, ArrowForward } from '@mui/icons-material'; -import { Box, Button } from '@mui/material'; -import React from 'react'; - -export const HelpPageActions = ({ onNext, onPrev }: { onNext?: () => void; onPrev?: () => void }) => ( - - {onPrev ? ( - - ) : ( -
- )} - {onNext && ( - - )} - -); diff --git a/nym-connect/mobile/src/components/HelpPageImage.tsx b/nym-connect/mobile/src/components/HelpPageImage.tsx deleted file mode 100644 index 69fa38ca31..0000000000 --- a/nym-connect/mobile/src/components/HelpPageImage.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import React from 'react'; - -export const HelpImage = ({ img, imageDescription }: { img: string; imageDescription: string }) => ( - {imageDescription} -); diff --git a/nym-connect/mobile/src/components/HelpPageStepIndicator.tsx b/nym-connect/mobile/src/components/HelpPageStepIndicator.tsx deleted file mode 100644 index fc108425ab..0000000000 --- a/nym-connect/mobile/src/components/HelpPageStepIndicator.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import { Box, Stack } from '@mui/material'; - -const Step = ({ highlight }: { highlight: boolean }) => ( - -); - -export const StepIndicator = ({ step }: { step: number }) => ( - - - = 2} /> - = 3} /> - -); diff --git a/nym-connect/mobile/src/components/InfoModal.tsx b/nym-connect/mobile/src/components/InfoModal.tsx deleted file mode 100644 index 07f98769e5..0000000000 --- a/nym-connect/mobile/src/components/InfoModal.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import { Close, ErrorOutline } from '@mui/icons-material'; -import { Box, IconButton, Modal, Theme, Typography } from '@mui/material'; -import React from 'react'; - -const styles = { - position: 'absolute', - top: '50%', - left: '50%', - transform: 'translate(-50%, -50%)', - width: 200, - bgcolor: '#292E34', - p: 1.5, - borderRadius: 0.5, - height: 'fit-content', - border: (theme: Theme) => `1px solid ${theme.palette.grey[700]}`, -}; - -const ModalTitle = ({ title, withCloseIcon }: { title: string; withCloseIcon: boolean }) => ( - - - - {title} - - -); - -const ModalBody = ({ description, children }: { description: string; children?: React.ReactElement }) => ( - - {children} - - {description} - - -); - -export const InfoModal = ({ - title, - description, - show, - children, - Action, - onClose, -}: { - title: string; - description: string; - show: boolean; - children?: React.ReactElement; - Action?: React.ReactNode; - onClose?: () => void; -}) => ( - - - {onClose && ( - - - - - - )} - - {children} - {Action && ( - - {Action} - - )} - - -); diff --git a/nym-connect/mobile/src/components/IpAddressAndPort.tsx b/nym-connect/mobile/src/components/IpAddressAndPort.tsx deleted file mode 100644 index 4ecf356d18..0000000000 --- a/nym-connect/mobile/src/components/IpAddressAndPort.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { Box, Typography } from '@mui/material'; -import React from 'react'; -import { styled } from '@mui/system'; - -const IpAddressAndPortContainer = styled('div')({ - '.hoverAddressCopy:hover': { - cursor: 'pointer', - textDecoration: 'underline', - textDecorationColor: '#FB6E4E', - textDecorationThickness: '2px', - textUnderlineOffset: '4px', - }, -}); - -export const IpAddressAndPort: FCWithChildren<{ - label: string; - ipAddress: string; - port: number; -}> = ({ label, ipAddress, port }) => { - const [ipAddressCopied, setIpAddressCopied] = React.useState(false); - const [portCopied, setPortCopied] = React.useState(false); - - React.useEffect(() => { - if (ipAddressCopied) { - setTimeout(() => setIpAddressCopied(false), 2000); - } - }, [ipAddressCopied]); - - React.useEffect(() => { - if (portCopied) { - setTimeout(() => setPortCopied(false), 2000); - } - }, [portCopied]); - - return ( - - - - {label} - - - Port - - - - - {ipAddress} - - - {port} - - - - ); -}; diff --git a/nym-connect/mobile/src/components/IpAddressAndPortModal.tsx b/nym-connect/mobile/src/components/IpAddressAndPortModal.tsx deleted file mode 100644 index fcb0f1dfaa..0000000000 --- a/nym-connect/mobile/src/components/IpAddressAndPortModal.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import { Box, Typography } from '@mui/material'; -import { InfoModal } from './InfoModal'; -import { CopyToClipboard } from './CopyToClipboard'; - -const FONT_SIZE = '12px'; -const FONT_COLOR = 'grey.400'; - -export const IpAddressAndPortModal = ({ - show, - ipAddress, - port, - onClose, -}: { - show: boolean; - ipAddress: string; - port: number; - onClose: () => void; -}) => ( - - - - Paste below values in the proxy settings of your app - - - Socks5 address - - - {ipAddress} - - - - - Port - - - {port} - - - - -); diff --git a/nym-connect/mobile/src/components/NeedHelp.tsx b/nym-connect/mobile/src/components/NeedHelp.tsx deleted file mode 100644 index 12d9587a5f..0000000000 --- a/nym-connect/mobile/src/components/NeedHelp.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import { Box, Button, Typography } from '@mui/material'; -import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; - -const HELP_URL = 'https://docs.nymtech.net'; - -export const NeedHelp: FCWithChildren = () => ( - - - -); diff --git a/nym-connect/mobile/src/components/PowerButton/PowerButton.tsx b/nym-connect/mobile/src/components/PowerButton/PowerButton.tsx deleted file mode 100644 index bc399e70b9..0000000000 --- a/nym-connect/mobile/src/components/PowerButton/PowerButton.tsx +++ /dev/null @@ -1,149 +0,0 @@ -import React, { useCallback } from 'react'; -import { ConnectionStatusKind } from 'src/types'; -import './power-button.css'; - -const getStatusFillColor = (status: ConnectionStatusKind, hover: boolean, isError: boolean): string => { - if (isError && hover) { - return '#21D072'; - } - if (isError) { - return '#40475C'; - } - - switch (status) { - case 'disconnected': - if (hover) { - return '#FFF'; - } - return '#BBB'; - case 'connecting': - return '#FFF'; - case 'disconnecting': - return '#FFF'; - default: - // connected - if (hover) { - return '#E43E3E'; - } - return '#21D072'; - } -}; - -export const PowerButton: FCWithChildren<{ - onClick?: (status: ConnectionStatusKind) => void; - isError?: boolean; - disabled?: boolean; - status: ConnectionStatusKind; - busy?: boolean; -}> = ({ onClick, disabled, status, isError }) => { - const [hover, setHover] = React.useState(false); - - const handleClick = () => { - if (disabled === true) { - return; - } - if (onClick) { - onClick(status); - } - }; - - const statusFillColor = getStatusFillColor(status, hover, Boolean(isError)); - - const getClassName = useCallback(() => { - if (hover) { - switch (status) { - case 'disconnected': - return 'expand'; - default: - return 'contract'; - } - } - if (!hover) { - switch (status) { - case 'connected': - return 'expand'; - default: - return 'contract'; - } - } - return 'contract'; - }, [status, hover]); - - const buttonPulse = () => { - if (status === 'connecting' || status === 'disconnecting') return 'pulse'; - return undefined; - }; - - let statusText: string; - switch (status) { - case 'connected': - statusText = 'stop'; - break; - case 'disconnected': - statusText = 'start'; - break; - default: - statusText = ''; - } - - return ( - !disabled && setHover(true)} - onMouseLeave={() => !disabled && setHover(false)} - > - - - - - - - - - - - - - - - - - - - - - - - {statusText.toUpperCase()} - - - - - - - - - - ); -}; diff --git a/nym-connect/mobile/src/components/PowerButton/power-button.css b/nym-connect/mobile/src/components/PowerButton/power-button.css deleted file mode 100644 index b73d01ca32..0000000000 --- a/nym-connect/mobile/src/components/PowerButton/power-button.css +++ /dev/null @@ -1,72 +0,0 @@ -#ring-expand { - animation-name: rings-expand; - animation-duration: 0.4s; - animation-timing-function: ease-in-out; - animation-play-state: paused; -} - -#ring-one.expand { - opacity: 0.3; - transition: opacity 0.1s ease-in-out; -} - -#ring-two.expand { - opacity: 0.2; - transition: opacity 0.2s ease-in-out; -} - -#ring-three.expand { - opacity: 0.1; - transition: opacity 0.3s ease-in-out; -} - -#ring-four.expand { - opacity: 0.05; - transition: opacity 0.4s ease-in-out; -} - -#ring-one.contract { - opacity: 0; - transition: opacity 0.4s; - transition-delay: 0.1s; -} - -#ring-two.contract { - opacity: 0; - transition: opacity 0.3s; - transition-delay: 0.1s; -} - -#ring-three.contract { - opacity: 0; - transition: opacity 0.1s; - transition-delay: 0.1s; -} - -#ring-four.contract { - opacity: 0; - transition: opacity 0.1s; - transition-delay: 0.1s; -} - -circle, -path, text { - transition: stroke 0.5s, fill 0.5s; -} - -.pulse { - animation-name: pulse; - animation-duration: 0.5s; - animation-iteration-count: infinite; - animation-direction: alternate; -} - -@keyframes pulse { - from { - opacity: 1; - } - - to { - opacity: 0.3; - } -} diff --git a/nym-connect/mobile/src/components/ServiceProviderPopup.tsx b/nym-connect/mobile/src/components/ServiceProviderPopup.tsx deleted file mode 100644 index 660fee4134..0000000000 --- a/nym-connect/mobile/src/components/ServiceProviderPopup.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import React from 'react'; -import { Autocomplete, Box, Dialog, DialogProps, TextField, Typography } from '@mui/material'; -import { Service, ServiceProvider, Services } from '../types/directory'; - -export const ServiceProviderPopup: FCWithChildren< - DialogProps & { services: Services; onServiceProviderChanged: (sp?: ServiceProvider, s?: Service) => void } -> = ({ services, onServiceProviderChanged, ...dialogProps }) => { - const options = services.flatMap((s) => - s.items.map((sp) => ({ id: `${s.id}-${sp.id}`, title: sp.description, service: s, sp })), - ); - return ( - - - // filterOptions.filter((o) => o.title.toLowerCase().includes(inputValue.toLowerCase())) - // } - options={options} - groupBy={(option) => option.service.description} - getOptionLabel={(option) => option.title} - onChange={(event, value) => onServiceProviderChanged(value?.sp, value?.service)} - isOptionEqualToValue={(option, value) => option.id.toLowerCase() === value?.id.toLowerCase()} - renderOption={(props, option) => ( - img': { mr: 2, flexShrink: 0 } }} {...props} fontSize="small"> - - {option.id} - -

{option.title}

-
- )} - renderInput={(params) => } - /> -
- ); -}; diff --git a/nym-connect/mobile/src/components/ServiceProviderSelector.stories.tsx b/nym-connect/mobile/src/components/ServiceProviderSelector.stories.tsx deleted file mode 100644 index c7df76ea4a..0000000000 --- a/nym-connect/mobile/src/components/ServiceProviderSelector.stories.tsx +++ /dev/null @@ -1,342 +0,0 @@ -import * as React from 'react'; -import { ComponentMeta } from '@storybook/react'; -import { Box } from '@mui/material'; -import { ServiceProviderSelector } from './ServiceProviderSelector'; -import { Services } from '../types/directory'; - -export default { - title: 'Components/Service Provider Selector', - component: ServiceProviderSelector, -} as ComponentMeta; - -const width = 240; - -export const Loading = () => ( - - - -); - -const services: Services = JSON.parse(`[ - { - "id": "keybase", - "description": "Keybase", - "items": [ - { - "id": "nym-keybase", - "description": "Nym Keybase Service Provider", - "address": "Entztfv6Uaz2hpYHQJ6JKoaCTpDL5dja18SuQWVJAmmx.Cvhn9rBJw5Ay9wgHcbgCnVg89MPSV5s2muPV2YF1BXYu@Fo4f4SQLdoyoGkFae5TpVhRVoXCF8UiypLVGtGjujVPf", - "gateway": "Fo4f4SQLdoyoGkFae5TpVhRVoXCF8UiypLVGtGjujVPf" - }, - { - "id": "shipyard-keybase-1", - "description": "Nym Keybase Service Provider", - "address": "D55ksecHzY6vAeqk8MCTzCfj2pqwJeKCKZCUUGnwGnn3.FS42vXS5a6GNTb1qk3aVk5mjSiJCAuawbBVyQZZVfhvt@DfNMqQRy6pPkU8Z5rBsxRwzDUzAMXHPFwMhjF16ScZqn", - "gateway": "DfNMqQRy6pPkU8Z5rBsxRwzDUzAMXHPFwMhjF16ScZqn" - }, - { - "id": "shipyard-keybase-2", - "description": "Nym Keybase Service Provider", - "address": "DFdDtW7LNBATxQ4ef3jNbqs3cRE8b9wDZTCctHCQRULa.4AbKiTNVUwYFWHhy98o5pT9dELiUrkXoJQ9wHqPgf6GV@GJqd3ZxpXWSNxTfx7B1pPtswpetH4LnJdFeLeuY5KUuN", - "gateway": "GJqd3ZxpXWSNxTfx7B1pPtswpetH4LnJdFeLeuY5KUuN" - }, - { - "id": "shipyard-keybase-3", - "description": "Nym Keybase Service Provider", - "address": "6Y1HE1jJ92P9yoHer11TR4A2NdZePrLGaBNFf65MnYGe.FwXoh217odQDWNmViqzNX28fauYrjB3PYLrVvpqnQrX4@5vC8spDvw5VDQ8Zvd9fVvBhbUDv9jABR4cXzd4Kh5vz", - "gateway": "5vC8spDvw5VDQ8Zvd9fVvBhbUDv9jABR4cXzd4Kh5vz" - }, - { - "id": "shipyard-keybase-4", - "description": "Nym Keybase Service Provider", - "address": "3zzhLtWvaJgn755MkRckG5aRnoTZich8ASn395iSsTgj.J1R5VuxXbh2eNHiaRbrwbKGXrrEQcHKLdzf8eg9HTB6q@3B7PsbXFuqq6rerYFLw5HPbQb4UmBqAhfWURRovMmWoj", - "gateway": "3B7PsbXFuqq6rerYFLw5HPbQb4UmBqAhfWURRovMmWoj" - }, - { - "id": "shipyard-keybase-5", - "description": "Nym Keybase Service Provider", - "address": "CHuXdZJYQ8xH7ekgN9gAuVtQ7ZikjjHEZY5BSN7yc5mN.29dFvqicKQQQvoX1vup44mspmc249RH5xgLibWMwTYGT@CfWcDJq8QBz6cVAPCYSaLbaJEhVTmHEmyYgQ6C5GdDW9", - "gateway": "CfWcDJq8QBz6cVAPCYSaLbaJEhVTmHEmyYgQ6C5GdDW9" - } - ] - }, - { - "id": "electrum", - "description": "Electrum Wallet", - "items": [ - { - "id": "nym-electrum", - "description": "Nym Electrum Service Provider", - "address": "DpB3cHAchJiNBQi5FrZx2csXb1mrHkpYh9Wzf8Rjsuko.ANNWrvHqMYuertHGHUrZdBntQhpzfbWekB39qez9U2Vx@2BuMSfMW3zpeAjKXyKLhmY4QW1DXurrtSPEJ6CjX3SEh", - "gateway": "2BuMSfMW3zpeAjKXyKLhmY4QW1DXurrtSPEJ6CjX3SEh" - }, - { - "id": "shipyard-electrum-1", - "description": "Nym Electrum Service Provider", - "address": "8Tb73cFQpXCLpgxEA2VSDru2hHrcZ3KQcyMsGbxcTjBp.4x5tu66k8YkHk4tYac1qwEFbNq5WsKiX5kR51q5KKH88@4WgKhJdmUffz4e1o1ftVAGS3HnG56LiNAxA9dmaekrVd", - "gateway": "4WgKhJdmUffz4e1o1ftVAGS3HnG56LiNAxA9dmaekrVd" - }, - { - "id": "shipyard-electrum-2", - "description": "Nym Electrum Service Provider", - "address": "GR6z31MwCsvxHrnvvVN1Cpasd8aQ1giwQqPTZM9dN7VH.5rEiqakSPDrBtKmvpU8Shnhz6gRM85JLoB7AX4h7PJYr@5Ao1J38frnU9Rx5YVeF5BWExcnDTcW8etNe9W2sRASXD", - "gateway": "5Ao1J38frnU9Rx5YVeF5BWExcnDTcW8etNe9W2sRASXD" - } - ] - }, - { - "id": "telegram", - "description": "Telegram", - "items": [ - { - "id": "shipyard-telegram-2", - "description": "Nym Telegram Service Provider", - "address": "C4w6ewbQtoaZEeoaaNw1xVASChqo4WVjNfuYEUFjZxpc.8F1D7rQXf2jGoj1Ken7PiGDM8HS2Ug79wSoc9nZ1iqh1@62F81C9GrHDRja9WCqozemRFSzFPMecY85MbGwn6efve", - "gateway": "62F81C9GrHDRja9WCqozemRFSzFPMecY85MbGwn6efve" - }, - { - "id": "shipyard-telegram-3", - "description": "Nym Telegram Service Provider", - "address": "DStL3BEUZuQZfbij1KAY3BvJh8rC5jpr9mc6AQ6aTLUu.Ax9foYaKfFgX6g8y393GoNpKkKrnDGFGRZwxDv9R7X6M@FQon7UwF5knbUr2jf6jHhmNLbJnMreck1eUcVH59kxYE", - "gateway": "FQon7UwF5knbUr2jf6jHhmNLbJnMreck1eUcVH59kxYE" - }, - { - "id": "shipyard-telegram-4", - "description": "Nym Telegram Service Provider", - "address": "8gRdGTzsDxYzpasRQhsRg59MCgNNhnfag2oFfwwZPXnB.DtDrGz7ScVm4o7sN4K3CYUJveYgz7fcXELBVLNDfMS9Y@3ojQD6V7skM1bSXJX7fVQvscjmcgptzdixQEaAha2ixh", - "gateway": "3ojQD6V7skM1bSXJX7fVQvscjmcgptzdixQEaAha2ixh" - }, - { - "id": "shipyard-telegram-5", - "description": "Nym Telegram Service Provider", - "address": "AR3oEM6Uvmfs6fyddwSehoBUKCFxz7MdFi4z7aahuHuY.3ZKapg9A3Py1PXhyLbCJr8ZbJsEV6NZdN1WJaGGut5tj@EEyq16v63aotPBCepxUpCgAojrNasZ6Hk1PjpRyBAdEp", - "gateway": "EEyq16v63aotPBCepxUpCgAojrNasZ6Hk1PjpRyBAdEp" - }, - { - "id": "shipyard-telegram-6", - "description": "Nym Telegram Service Provider", - "address": "7n1BYhsXSwcr8Qim8AqZTAodqFia4QG6T7CRc1ihQHpv.7o4trpGqu2LHMUiXc3dddgfGET1CFFcAK9gKYoHoSn5e@BTZNB3bkkEePsT14GN8ofVtM1SJae4YLWjpBerrKYfr", - "gateway": "BTZNB3bkkEePsT14GN8ofVtM1SJae4YLWjpBerrKYfr" - }, - { - "id": "shipyard-telegram-7", - "description": "Nym Telegram Service Provider", - "address": "Gv4TWhUKrvJfqh1jBRPGEQrikNZvZse2kS3ZgN9Z2nAZ.7KGPaaqUEum2C59jLvw7f8Ug8a48YuZdjjZu3t4JES4U@C7J8SwZQqjWqhBryyjJxLt7FacVuPTwAmR2otGy53ayi", - "gateway": "C7J8SwZQqjWqhBryyjJxLt7FacVuPTwAmR2otGy53ayi" - }, - { - "id": "shipyard-telegram-8", - "description": "Nym Telegram Service Provider", - "address": "8Mqgp12cpF6FSXMeqzxgFgQXvTSapyNqGAi5wy7ub4ge.7z7PDsiJGiGxGz4p77v5L5fZhXBJ5qNZ8CgJwYNr6H6J", - "gateway": "3zd3wrCK8Dz5TXrcvk5dG5s9EEdf4Ck1v9VgBPMMFVkR" - }, - { - "id": "shipyard-telegram-9", - "description": "Nym Telegram Service Provider", - "address": "F3N5eiPDZcGFC985Go4Mpv8p9uxFD1L3jRUdrLCbrZLm.EyTxWwwTwYpPrJBmc97GLd1LpUAphjptS5y1ed182bGk@GAjhJcrd6f1edaqUkfWCff6zdHoqo756qYrc2TfPuCXJ", - "gateway": "GAjhJcrd6f1edaqUkfWCff6zdHoqo756qYrc2TfPuCXJ" - }, - { - "id": "shipyard-telegram-10", - "description": "Nym Telegram Service Provider", - "address": "G7y7e1nVBr8fmQSzdeAxXnCmmmJb5k8N3E8LBV31KE5g.GRRUCj6t6cCUUjakmTWzidMLiYA7EdCedKnup8osaBC6@AJad2R9virYEYXEsTcicN5y5tyPoixrhhAGsxoESZVnc", - "gateway": "AJad2R9virYEYXEsTcicN5y5tyPoixrhhAGsxoESZVnc" - }, - { - "id": "shipyard-telegram-11", - "description": "Nym Telegram Service Provider", - "address": "2kq9Z7RyDZtb8kxXjyP3ZT8VMWHg6JXFDChGuuNBk7Hw.F5XYbBaGSoF8qAo8faPcaNRPHEq3Y25BDcwESeabUS9S@HaLyPQrhBTq75dnGeBUdYWeFVA2BBn39MgkhEt3VTMMM", - "gateway": "HaLyPQrhBTq75dnGeBUdYWeFVA2BBn39MgkhEt3VTMMM" - }, - { - "id": "shipyard-telegram-12", - "description": "Nym Telegram Service Provider", - "address": "GegdtpNzYj4QCgpih9Kxv7ZVZxmVdxYHsDkiPsbT71XG.E8xtE8mrapjzFtyuziZSrsScAKhwZMH5wNpKWtKfzJ5Y@9Byd9VAtyYMnbVAcqdoQxJnq76XEg2dbxbiF5Aa5Jj9J", - "gateway": "9Byd9VAtyYMnbVAcqdoQxJnq76XEg2dbxbiF5Aa5Jj9J" - }, - { - "id": "shipyard-telegram-13", - "description": "Nym Telegram Service Provider", - "address": "4SsrDQeEtG3mpeD9nN5CDdGaCsxFvNeYMhoviDzNNB9f.GyqG6iK5rBvhe3HXLR11m6ULpf13ATgYvkkidLmteDLs@5EpkkrMFYAM3XcaztXnZwBWquURHSKsyc9JxUCengDFS", - "gateway": "5EpkkrMFYAM3XcaztXnZwBWquURHSKsyc9JxUCengDFS" - }, - { - "id": "shipyard-telegram-14", - "description": "Nym Telegram Service Provider", - "address": "9JoHRu2RrSD1fjbj9NSTASgjv9Szep7Nhd9L2PywxbBi.AZhAUDNX6iH8BqXyR5c7TJuzpwMEvDXrabNLGuRukvVf@9xJM74FwwHhEKKJHihD21QSZnHM2QBRMoFx9Wst6qNBS", - "gateway": "9xJM74FwwHhEKKJHihD21QSZnHM2QBRMoFx9Wst6qNBS" - }, - { - "id": "shipyard-telegram-15", - "description": "Nym Telegram Service Provider", - "address": "3K174ijjXqCkhMDT9xLcqjS4MXk2QsqZt4PdgNcuUrnn.BNnHnQmWoj6Uo6kkS1QkPqsdHaXrcwyR9F6MnnzDkZJL@C7J8SwZQqjWqhBryyjJxLt7FacVuPTwAmR2otGy53ayi", - "gateway": "C7J8SwZQqjWqhBryyjJxLt7FacVuPTwAmR2otGy53ayi" - }, - { - "id": "shipyard-telegram-16", - "description": "Nym Telegram Service Provider", - "address": "BqX5Q3MEcbTnM39hUswQchLW68SrqbhL8K5ucrLmtP39.AWrVsFoVC9s6KjdpcasATmZPA3GtMsUxcfHpAkuNdtFG@Emswx6KXyjRfq1c2k4d4uD2e6nBSbH1biorCZUei8UNS", - "gateway": "Emswx6KXyjRfq1c2k4d4uD2e6nBSbH1biorCZUei8UNS" - }, - { - "id": "shipyard-telegram-17", - "description": "Nym Telegram Service Provider", - "address": "2tQxccgcqdkuUvLqgiEkEN4rNRZ5QknygnKAFcS4gfoe.EVrY5q5sqDqBUbS3wHsRRZhk2MAw1S17hNoH1Bicyv7n@DAGQxdxwAkwjaLjTw1B9vndia4YyFD15qRgcTQxrmkom", - "gateway": "DAGQxdxwAkwjaLjTw1B9vndia4YyFD15qRgcTQxrmkom" - }, - { - "id": "shipyard-telegram-18", - "description": "Nym Telegram Service Provider", - "address": "8YG1rcEauJA814Nd7hSxjNe2UrRwrGsrXTm1Cmd3gRrU.FxYaYqpNN8PciNsySs3zYPrTB1J8AYUu9DBsM2vVDDfF@7EfEESLo71GUvx3UEW79LgTegHUBPUocUzGyJVv6LHog", - "gateway": "7EfEESLo71GUvx3UEW79LgTegHUBPUocUzGyJVv6LHog" - }, - { - "id": "shipyard-telegram-19", - "description": "Nym Telegram Service Provider", - "address": "HPiXADVFLwLQPNpPtyYefzvYntC6tp9UJ5fJZGfkqvDt.2EUUxmeT3AiaUzAcE5SyXRAk8a2JXBkRz4B8McSdkrST@9ACTkYraCqE9jMb6zb6ne8EDQGGhZw5ykNiq9YRUdHTD", - "gateway": "9ACTkYraCqE9jMb6zb6ne8EDQGGhZw5ykNiq9YRUdHTD" - }, - { - "id": "shipyard-telegram-20", - "description": "Nym Telegram Service Provider", - "address": "2QLnEEnTmf2NRWtcQPWBeRcg7Hej5WSPWRWwtTpEEZWF.BheS78ozc8ngvhsXNNnshdJzpoYsmEvhfn3WKUYF5dRU@C2uyokSPoxhku9GexRxEo1e8KPZ7q6e8FXmK3gtY8kkF", - "gateway": "C2uyokSPoxhku9GexRxEo1e8KPZ7q6e8FXmK3gtY8kkF" - }, - { - "id": "shipyard-telegram-21", - "description": "Nym Telegram Service Provider", - "address": "FuBbnwiANfaXZnn683jBapK5XVm5ttgZSykU3vqPSHoD.94MFGv1VcBLTkRwzBDQUkWjvqtZYVBrJg2Q8JGbizcib@CTqYPY8htdAQMXCzRW9SjZzZuqYwSt2iUh6HPaNgmTvK", - "gateway": "CTqYPY8htdAQMXCzRW9SjZzZuqYwSt2iUh6HPaNgmTvK" - }, - { - "id": "shipyard-telegram-22", - "description": "Nym Telegram Service Provider", - "address": "9EbQx5jQznSVbftFom7sqUSHAACrsfvMhrzhaFt4A3SZ.D1FQCirL4YKwfcmtMGvB5Rugt5sAzGEhdSjJ3bHVQRZ@7Zh1Sz5dXpA6s53CbtcdqhQhLqwf4cLynL7KqHKcjrG4", - "gateway": "7Zh1Sz5dXpA6s53CbtcdqhQhLqwf4cLynL7KqHKcjrG4" - }, - { - "id": "shipyard-telegram-24", - "description": "Nym Telegram Service Provider", - "address": "6Umawwvf551VyB3Ko46NgKLqJdTFJeToCM67mrTmM3G.3A4sesBac4KGuMTFjvYBwLpksMJvbMbteGJQgmm4PV4Y@AnnYnEtBjB2a5sHmeRCnBq43qxyHDf95Bqd7cwQyKNLR", - "gateway": "AnnYnEtBjB2a5sHmeRCnBq43qxyHDf95Bqd7cwQyKNLR" - }, - { - "id": "shipyard-telegram-25", - "description": "Nym Telegram Service Provider", - "address": "CDtxTeoyqq83JpV9G8cR5HRHRdMMaVspQsCwH3Qnajt3.F5EHK9HFcdGrE2hqA7bK9AUmkbihujYDhtNNqHKxW765@BDkeNx7JQm5NsQakst9s8htogZXhpTQedFAgZpvsGCqH", - "gateway": "BDkeNx7JQm5NsQakst9s8htogZXhpTQedFAgZpvsGCqH" - }, - { - "id": "shipyard-telegram-26", - "description": "Nym Telegram Service Provider", - "address": "HukZkLG2DoarQEqaoDLuqW1GFf2NSHDUMGBZiyJGRYJD.9GyU8wPsyzcvRjcyk8hiNpTJbXCmq5F3VoVhFBZYuHR3@GsGEZiDBz8SWfHGaK5SDmhfbTEM55v37WCYYcT9wTSxN", - "gateway": "GsGEZiDBz8SWfHGaK5SDmhfbTEM55v37WCYYcT9wTSxN" - }, - { - "id": "shipyard-telegram-27", - "description": "Nym Telegram Service Provider", - "address": "773y8iMVJiRk4dRbjQzkJVbrei4TwkePNE5WTEttt77d.3Mw47C9XZj3oAzk1iSqC5Y36tbBsjtaTtdgaHM3Zsdma@7fiZtNL1RACQTwGrKLBT9nbY77bfwZnX9rqcWqc53qgv", - "gateway": "7fiZtNL1RACQTwGrKLBT9nbY77bfwZnX9rqcWqc53qgv" - }, - { - "id": "shipyard-telegram-28", - "description": "Nym Telegram Service Provider", - "address": "6jQJEorCu7YiP9HdDaMeHxcNhxeNmZ1kpd836GnqLZX.HsJqEmNTszGecsKqFB37i84nBXxqf4ETgrKmKmBvMGHC@FYnDMQzT49ZGM23gVqpTxfih14V6wuedNXirekmt37zE", - "gateway": "FYnDMQzT49ZGM23gVqpTxfih14V6wuedNXirekmt37zE" - }, - { - "id": "shipyard-telegram-29", - "description": "Nym Telegram Service Provider", - "address": "BiCSyovpFMuSnTvF2TdiuZwrytXDrd9AH47ZMcCxscVC.G9YpdicA9BBNoVHDgjWjgt17wv5WYKWcbE3vPJJVpSJD@GAjhJcrd6f1edaqUkfWCff6zdHoqo756qYrc2TfPuCXJ", - "gateway":"GAjhJcrd6f1edaqUkfWCff6zdHoqo756qYrc2TfPuCXJ" - }, - { - "id": "shipyard-telegram-30", - "description": "Nym Telegram Service Provider", - "address": "AQRRAs9oc8QWXAFBs44YhCKUny7AyLsfLy91pwmGgxuf.CWUKoKA1afSKyw5BnFJJg19UDgnaVATupsFhQpyTEBHJ@EBT8jTD8o4tKng2NXrrcrzVhJiBnKpT1bJy5CMeArt2w", - "gateway": "EBT8jTD8o4tKng2NXrrcrzVhJiBnKpT1bJy5CMeArt2w" - }, - { - "id": "shipyard-telegram-31", - "description": "Nym Telegram Service Provider", - "address": "6YqjAZK3Pr1ngiBLcDkotboB5WiN6k6NPpbXvShH4pR5.9Ss6VW3Xbyi8LuxduNNwnXEv9njHCQ2PLSP1UK6tsoa5@42XCK9dMS9m5XJLzQd2dBuwimk6ndZnczhZaV5VPFkQD", - "gateway": "42XCK9dMS9m5XJLzQd2dBuwimk6ndZnczhZaV5VPFkQD" - }, - { - "id": "shipyard-telegram-32", - "description": "Nym Telegram Service Provider", - "address": "EmYWLeybmj86Vzr62vxuZ3T15jwMNHggzK7sQwid96yp.GyaF9WprSr56cxUdGf5TpcUvAjb2VbAr8CVBrmBUYAaw@GL5wESoz4oSbpBaTki9qB9213FGUQXCiRjbzDkhWwoBC", - "gateway": "GL5wESoz4oSbpBaTki9qB9213FGUQXCiRjbzDkhWwoBC" - }, - { - "id": "shipyard-telegram-33", - "description": "Nym Telegram Service Provider", - "address": "4PDb96cck5btTj6G7rsomqwHJsp4qu8uPvFCbwHfjFUx.C5dKbaoakH7egsZvAueRbwLFbmxnQaVMeSr6QTMpuBAA@58ceEFaLJh6zAo3cirzT1BDQm7D3L5acnQrxGH1D6TAY", - "gateway": "58ceEFaLJh6zAo3cirzT1BDQm7D3L5acnQrxGH1D6TAY" - }, - { - "id": "shipyard-telegram-34", - "description": "Nym Telegram Service Provider", - "address": "BeZbeMf9vcpUf368qDd85dtLwXLj4Ee5bsHMB2fUD8uX.HELVbppkwU1jmzUAUrCEbHeJfVciSeo8VGAkbJSpwxsb@ADdHkiTfkpsSt31zVToWW9j3KikH24aLAAwDKtCYE5jY", - "gateway":"ADdHkiTfkpsSt31zVToWW9j3KikH24aLAAwDKtCYE5jY" - }, - { - "id": "shipyard-telegram-35", - "description": "Nym Telegram Service Provider", - "address": "Bp4JRFyf7GB9L9J95AqMPnz9zbGmPnViA5fDXKeNraLJ.D6CTdcjJVxDmH2UQvzXuPWg9Se9xXYe76uDMypXvhzd7@6UjGEeQZK14C5K2kenycTkqt7qRjEHGLgaQx3FWySo3N", - "gateway": "6UjGEeQZK14C5K2kenycTkqt7qRjEHGLgaQx3FWySo3N" - }, - { - "id": "shipyard-telegram-36", - "description": "Nym Telegram Service Provider", - "address": "91h7io6BGhVjbtC7dbbRcScyTJcTfnMsTQZ6aWMVsrWR.Epb4hANXCp8cGEY3wSgawux991ti9Z5Y1FHTMzAKFa6E@DF4TE7V8kJkttMvnoSVGnRFFRt6WYGxxiC2w1XyPQnHe", - "gateway": "DF4TE7V8kJkttMvnoSVGnRFFRt6WYGxxiC2w1XyPQnHe" - }, - { - "id": "shipyard-telegram-37", - "description": "Nym Telegram Service Provider", - "address": "Cy2wuwKpWZ3iWzKU3ZWL1qqcVfJ5Cq85dU7UHVWwv2gc.9AhC9b2zVcLnXLGriMdxjpsWJpq6iAdCavDi63udbL89@678qVUJ21uwxZBhp3r56z7GRf6gMh3NYDHruTegPtgMf", - "gateway": "678qVUJ21uwxZBhp3r56z7GRf6gMh3NYDHruTegPtgMf" - }, - { - "id": "shipyard-telegram-38", - "description": "Nym Telegram Service Provider", - "address": "GgUeUWW1NRSuquZYeZf3WkppE92EQUHJrFjNZtYU1jow.CSEjwrRi4f4uyw7N6L2LPKw2tB8spcMbFu99wHZzFZSj@77TSuVU8d1oXKbPzjec2xh4i3Wj5WwUyy9Lr36sm8gZm", - "gateway": "77TSuVU8d1oXKbPzjec2xh4i3Wj5WwUyy9Lr36sm8gZm" - }, - { - "id": "shipyard-telegram-39", - "description": "Nym Telegram Service Provider", - "address": "kz4zWwSkYiQxqxXFPNcGUByTPQWXascD9RfYsmSxY7n.ajp3SjbBVBjrU9nXpSQXAXzbb6EHJJyhbY6cc1ajayx@BTZNB3bkkEePsT14GN8ofVtM1SJae4YLWjpBerrKYf", - "gateway": "HyS2UZtZX3kQXdazbdE99DhCjBXjbG61LC9QsmXwbxrU" - } - ] - }, - { - "id": "blockstream", - "description": "Blockstream Green", - "items": [ - { - "id": "nym-blockstream", - "description": "Nym Blockstream Green Service Provider", - "address": "GiRjFWrMxt58pEMuusm4yT3RxoMD1MMPrR9M2N4VWRJP.3CNZBPq4vg7v7qozjGjdPMXcvDmkbWPCgbGCjQVw9n6Z@2xU4CBE6QiiYt6EyBXSALwxkNvM7gqJfjHXaMkjiFmYW", - "gateway": "2xU4CBE6QiiYt6EyBXSALwxkNvM7gqJfjHXaMkjiFmYW" - } - ] - } -]`); -export const Loaded = () => ( - - - -); - -export const ServiceAlreadySelected = () => ( - - console.log('New service provider selected: ', serviceProvider)} - /> - -); diff --git a/nym-connect/mobile/src/components/ServiceProviderSelector.tsx b/nym-connect/mobile/src/components/ServiceProviderSelector.tsx deleted file mode 100644 index 741465dac4..0000000000 --- a/nym-connect/mobile/src/components/ServiceProviderSelector.tsx +++ /dev/null @@ -1,147 +0,0 @@ -import React, { useEffect, useMemo } from 'react'; -import { Box, CircularProgress, MenuItem, Stack, TextField, Tooltip, Typography } from '@mui/material'; -import { Service, ServiceProvider, Services } from '../types/directory'; -import { useTauriEvents } from '../utils'; - -type ServiceWithRandomSp = { - id: string; - description: string; - sp: ServiceProvider; -}; - -const defaultServiceValue = { id: '', description: '', items: [] }; - -export const ServiceProviderSelector: FCWithChildren<{ - onChange?: (serviceProvider?: ServiceProvider) => void; - services?: Services; - currentSp?: ServiceProvider; -}> = ({ services, currentSp, onChange }) => { - const [service, setService] = React.useState(defaultServiceValue); - const [serviceProvider, setServiceProvider] = React.useState(currentSp); - const [resetTrigger, setResetTrigger] = React.useState(new Date().toISOString()); - - const handleSelectSp = (newServiceProvider?: ServiceProvider) => { - if (newServiceProvider && newServiceProvider !== currentSp) { - setServiceProvider(newServiceProvider); - onChange?.(newServiceProvider); - } - }; - - // when the user clears local storage, reset the selector - useTauriEvents('help://clear-storage', () => { - setService(defaultServiceValue); - setServiceProvider(undefined); - onChange?.(undefined); - setResetTrigger(new Date().toISOString()); - }); - - useEffect(() => { - if (!serviceProvider && currentSp) { - setServiceProvider(currentSp); - } - }, [currentSp]); - - useEffect(() => { - if (services && serviceProvider) { - // retrieve the service corresponding to this service provider - - const match = services.find((s) => - s.items.some( - ({ id, address, gateway }) => - id === serviceProvider.id && address === serviceProvider.address && gateway === serviceProvider.gateway, - ), - ); - - if (match) { - setService(match); - } - } - }, [serviceProvider, services]); - - if (!services) { - return ( - - theme.palette.common.white}> - - Loading services... - - - ); - } - - const servicesWithRandomSp: ServiceWithRandomSp[] = useMemo( - () => - services.map(({ id, items, description }) => ({ - id, - description, - sp: items[Math.floor(Math.random() * items.length)], - })), - [services, resetTrigger], - ); - - if (!service) return null; - - return ( - - - {servicesWithRandomSp.map(({ id, description, sp }) => ( - handleSelectSp(sp)}> - - - {sp.id} - - - {sp.description} - - - Gateway {sp.gateway.slice(0, 10)}... - - - Provider {sp.address.slice(0, 10)}... - - - } - arrow - placement="top" - > - {description} - - - ))} - - - ); -}; diff --git a/nym-connect/mobile/src/components/ServiceSelector.stories.tsx b/nym-connect/mobile/src/components/ServiceSelector.stories.tsx deleted file mode 100644 index 56be7c19ee..0000000000 --- a/nym-connect/mobile/src/components/ServiceSelector.stories.tsx +++ /dev/null @@ -1,342 +0,0 @@ -import * as React from 'react'; -import { ComponentMeta } from '@storybook/react'; -import { Box } from '@mui/material'; -import { ServiceSelector } from './ServiceSelector'; -import { Services } from '../types/directory'; - -export default { - title: 'Components/Service Selector', - component: ServiceSelector, -} as ComponentMeta; - -const width = 240; - -export const Loading = () => ( - - - -); - -const services: Services = JSON.parse(`[ - { - "id": "keybase", - "description": "Keybase", - "items": [ - { - "id": "nym-keybase", - "description": "Nym Keybase Service Provider", - "address": "Entztfv6Uaz2hpYHQJ6JKoaCTpDL5dja18SuQWVJAmmx.Cvhn9rBJw5Ay9wgHcbgCnVg89MPSV5s2muPV2YF1BXYu@Fo4f4SQLdoyoGkFae5TpVhRVoXCF8UiypLVGtGjujVPf", - "gateway": "Fo4f4SQLdoyoGkFae5TpVhRVoXCF8UiypLVGtGjujVPf" - }, - { - "id": "shipyard-keybase-1", - "description": "Nym Keybase Service Provider", - "address": "D55ksecHzY6vAeqk8MCTzCfj2pqwJeKCKZCUUGnwGnn3.FS42vXS5a6GNTb1qk3aVk5mjSiJCAuawbBVyQZZVfhvt@DfNMqQRy6pPkU8Z5rBsxRwzDUzAMXHPFwMhjF16ScZqn", - "gateway": "DfNMqQRy6pPkU8Z5rBsxRwzDUzAMXHPFwMhjF16ScZqn" - }, - { - "id": "shipyard-keybase-2", - "description": "Nym Keybase Service Provider", - "address": "DFdDtW7LNBATxQ4ef3jNbqs3cRE8b9wDZTCctHCQRULa.4AbKiTNVUwYFWHhy98o5pT9dELiUrkXoJQ9wHqPgf6GV@GJqd3ZxpXWSNxTfx7B1pPtswpetH4LnJdFeLeuY5KUuN", - "gateway": "GJqd3ZxpXWSNxTfx7B1pPtswpetH4LnJdFeLeuY5KUuN" - }, - { - "id": "shipyard-keybase-3", - "description": "Nym Keybase Service Provider", - "address": "6Y1HE1jJ92P9yoHer11TR4A2NdZePrLGaBNFf65MnYGe.FwXoh217odQDWNmViqzNX28fauYrjB3PYLrVvpqnQrX4@5vC8spDvw5VDQ8Zvd9fVvBhbUDv9jABR4cXzd4Kh5vz", - "gateway": "5vC8spDvw5VDQ8Zvd9fVvBhbUDv9jABR4cXzd4Kh5vz" - }, - { - "id": "shipyard-keybase-4", - "description": "Nym Keybase Service Provider", - "address": "3zzhLtWvaJgn755MkRckG5aRnoTZich8ASn395iSsTgj.J1R5VuxXbh2eNHiaRbrwbKGXrrEQcHKLdzf8eg9HTB6q@3B7PsbXFuqq6rerYFLw5HPbQb4UmBqAhfWURRovMmWoj", - "gateway": "3B7PsbXFuqq6rerYFLw5HPbQb4UmBqAhfWURRovMmWoj" - }, - { - "id": "shipyard-keybase-5", - "description": "Nym Keybase Service Provider", - "address": "CHuXdZJYQ8xH7ekgN9gAuVtQ7ZikjjHEZY5BSN7yc5mN.29dFvqicKQQQvoX1vup44mspmc249RH5xgLibWMwTYGT@CfWcDJq8QBz6cVAPCYSaLbaJEhVTmHEmyYgQ6C5GdDW9", - "gateway": "CfWcDJq8QBz6cVAPCYSaLbaJEhVTmHEmyYgQ6C5GdDW9" - } - ] - }, - { - "id": "electrum", - "description": "Electrum Wallet", - "items": [ - { - "id": "nym-electrum", - "description": "Nym Electrum Service Provider", - "address": "DpB3cHAchJiNBQi5FrZx2csXb1mrHkpYh9Wzf8Rjsuko.ANNWrvHqMYuertHGHUrZdBntQhpzfbWekB39qez9U2Vx@2BuMSfMW3zpeAjKXyKLhmY4QW1DXurrtSPEJ6CjX3SEh", - "gateway": "2BuMSfMW3zpeAjKXyKLhmY4QW1DXurrtSPEJ6CjX3SEh" - }, - { - "id": "shipyard-electrum-1", - "description": "Nym Electrum Service Provider", - "address": "8Tb73cFQpXCLpgxEA2VSDru2hHrcZ3KQcyMsGbxcTjBp.4x5tu66k8YkHk4tYac1qwEFbNq5WsKiX5kR51q5KKH88@4WgKhJdmUffz4e1o1ftVAGS3HnG56LiNAxA9dmaekrVd", - "gateway": "4WgKhJdmUffz4e1o1ftVAGS3HnG56LiNAxA9dmaekrVd" - }, - { - "id": "shipyard-electrum-2", - "description": "Nym Electrum Service Provider", - "address": "GR6z31MwCsvxHrnvvVN1Cpasd8aQ1giwQqPTZM9dN7VH.5rEiqakSPDrBtKmvpU8Shnhz6gRM85JLoB7AX4h7PJYr@5Ao1J38frnU9Rx5YVeF5BWExcnDTcW8etNe9W2sRASXD", - "gateway": "5Ao1J38frnU9Rx5YVeF5BWExcnDTcW8etNe9W2sRASXD" - } - ] - }, - { - "id": "telegram", - "description": "Telegram", - "items": [ - { - "id": "shipyard-telegram-2", - "description": "Nym Telegram Service Provider", - "address": "C4w6ewbQtoaZEeoaaNw1xVASChqo4WVjNfuYEUFjZxpc.8F1D7rQXf2jGoj1Ken7PiGDM8HS2Ug79wSoc9nZ1iqh1@62F81C9GrHDRja9WCqozemRFSzFPMecY85MbGwn6efve", - "gateway": "62F81C9GrHDRja9WCqozemRFSzFPMecY85MbGwn6efve" - }, - { - "id": "shipyard-telegram-3", - "description": "Nym Telegram Service Provider", - "address": "DStL3BEUZuQZfbij1KAY3BvJh8rC5jpr9mc6AQ6aTLUu.Ax9foYaKfFgX6g8y393GoNpKkKrnDGFGRZwxDv9R7X6M@FQon7UwF5knbUr2jf6jHhmNLbJnMreck1eUcVH59kxYE", - "gateway": "FQon7UwF5knbUr2jf6jHhmNLbJnMreck1eUcVH59kxYE" - }, - { - "id": "shipyard-telegram-4", - "description": "Nym Telegram Service Provider", - "address": "8gRdGTzsDxYzpasRQhsRg59MCgNNhnfag2oFfwwZPXnB.DtDrGz7ScVm4o7sN4K3CYUJveYgz7fcXELBVLNDfMS9Y@3ojQD6V7skM1bSXJX7fVQvscjmcgptzdixQEaAha2ixh", - "gateway": "3ojQD6V7skM1bSXJX7fVQvscjmcgptzdixQEaAha2ixh" - }, - { - "id": "shipyard-telegram-5", - "description": "Nym Telegram Service Provider", - "address": "AR3oEM6Uvmfs6fyddwSehoBUKCFxz7MdFi4z7aahuHuY.3ZKapg9A3Py1PXhyLbCJr8ZbJsEV6NZdN1WJaGGut5tj@EEyq16v63aotPBCepxUpCgAojrNasZ6Hk1PjpRyBAdEp", - "gateway": "EEyq16v63aotPBCepxUpCgAojrNasZ6Hk1PjpRyBAdEp" - }, - { - "id": "shipyard-telegram-6", - "description": "Nym Telegram Service Provider", - "address": "7n1BYhsXSwcr8Qim8AqZTAodqFia4QG6T7CRc1ihQHpv.7o4trpGqu2LHMUiXc3dddgfGET1CFFcAK9gKYoHoSn5e@BTZNB3bkkEePsT14GN8ofVtM1SJae4YLWjpBerrKYfr", - "gateway": "BTZNB3bkkEePsT14GN8ofVtM1SJae4YLWjpBerrKYfr" - }, - { - "id": "shipyard-telegram-7", - "description": "Nym Telegram Service Provider", - "address": "Gv4TWhUKrvJfqh1jBRPGEQrikNZvZse2kS3ZgN9Z2nAZ.7KGPaaqUEum2C59jLvw7f8Ug8a48YuZdjjZu3t4JES4U@C7J8SwZQqjWqhBryyjJxLt7FacVuPTwAmR2otGy53ayi", - "gateway": "C7J8SwZQqjWqhBryyjJxLt7FacVuPTwAmR2otGy53ayi" - }, - { - "id": "shipyard-telegram-8", - "description": "Nym Telegram Service Provider", - "address": "8Mqgp12cpF6FSXMeqzxgFgQXvTSapyNqGAi5wy7ub4ge.7z7PDsiJGiGxGz4p77v5L5fZhXBJ5qNZ8CgJwYNr6H6J", - "gateway": "3zd3wrCK8Dz5TXrcvk5dG5s9EEdf4Ck1v9VgBPMMFVkR" - }, - { - "id": "shipyard-telegram-9", - "description": "Nym Telegram Service Provider", - "address": "F3N5eiPDZcGFC985Go4Mpv8p9uxFD1L3jRUdrLCbrZLm.EyTxWwwTwYpPrJBmc97GLd1LpUAphjptS5y1ed182bGk@GAjhJcrd6f1edaqUkfWCff6zdHoqo756qYrc2TfPuCXJ", - "gateway": "GAjhJcrd6f1edaqUkfWCff6zdHoqo756qYrc2TfPuCXJ" - }, - { - "id": "shipyard-telegram-10", - "description": "Nym Telegram Service Provider", - "address": "G7y7e1nVBr8fmQSzdeAxXnCmmmJb5k8N3E8LBV31KE5g.GRRUCj6t6cCUUjakmTWzidMLiYA7EdCedKnup8osaBC6@AJad2R9virYEYXEsTcicN5y5tyPoixrhhAGsxoESZVnc", - "gateway": "AJad2R9virYEYXEsTcicN5y5tyPoixrhhAGsxoESZVnc" - }, - { - "id": "shipyard-telegram-11", - "description": "Nym Telegram Service Provider", - "address": "2kq9Z7RyDZtb8kxXjyP3ZT8VMWHg6JXFDChGuuNBk7Hw.F5XYbBaGSoF8qAo8faPcaNRPHEq3Y25BDcwESeabUS9S@HaLyPQrhBTq75dnGeBUdYWeFVA2BBn39MgkhEt3VTMMM", - "gateway": "HaLyPQrhBTq75dnGeBUdYWeFVA2BBn39MgkhEt3VTMMM" - }, - { - "id": "shipyard-telegram-12", - "description": "Nym Telegram Service Provider", - "address": "GegdtpNzYj4QCgpih9Kxv7ZVZxmVdxYHsDkiPsbT71XG.E8xtE8mrapjzFtyuziZSrsScAKhwZMH5wNpKWtKfzJ5Y@9Byd9VAtyYMnbVAcqdoQxJnq76XEg2dbxbiF5Aa5Jj9J", - "gateway": "9Byd9VAtyYMnbVAcqdoQxJnq76XEg2dbxbiF5Aa5Jj9J" - }, - { - "id": "shipyard-telegram-13", - "description": "Nym Telegram Service Provider", - "address": "4SsrDQeEtG3mpeD9nN5CDdGaCsxFvNeYMhoviDzNNB9f.GyqG6iK5rBvhe3HXLR11m6ULpf13ATgYvkkidLmteDLs@5EpkkrMFYAM3XcaztXnZwBWquURHSKsyc9JxUCengDFS", - "gateway": "5EpkkrMFYAM3XcaztXnZwBWquURHSKsyc9JxUCengDFS" - }, - { - "id": "shipyard-telegram-14", - "description": "Nym Telegram Service Provider", - "address": "9JoHRu2RrSD1fjbj9NSTASgjv9Szep7Nhd9L2PywxbBi.AZhAUDNX6iH8BqXyR5c7TJuzpwMEvDXrabNLGuRukvVf@9xJM74FwwHhEKKJHihD21QSZnHM2QBRMoFx9Wst6qNBS", - "gateway": "9xJM74FwwHhEKKJHihD21QSZnHM2QBRMoFx9Wst6qNBS" - }, - { - "id": "shipyard-telegram-15", - "description": "Nym Telegram Service Provider", - "address": "3K174ijjXqCkhMDT9xLcqjS4MXk2QsqZt4PdgNcuUrnn.BNnHnQmWoj6Uo6kkS1QkPqsdHaXrcwyR9F6MnnzDkZJL@C7J8SwZQqjWqhBryyjJxLt7FacVuPTwAmR2otGy53ayi", - "gateway": "C7J8SwZQqjWqhBryyjJxLt7FacVuPTwAmR2otGy53ayi" - }, - { - "id": "shipyard-telegram-16", - "description": "Nym Telegram Service Provider", - "address": "BqX5Q3MEcbTnM39hUswQchLW68SrqbhL8K5ucrLmtP39.AWrVsFoVC9s6KjdpcasATmZPA3GtMsUxcfHpAkuNdtFG@Emswx6KXyjRfq1c2k4d4uD2e6nBSbH1biorCZUei8UNS", - "gateway": "Emswx6KXyjRfq1c2k4d4uD2e6nBSbH1biorCZUei8UNS" - }, - { - "id": "shipyard-telegram-17", - "description": "Nym Telegram Service Provider", - "address": "2tQxccgcqdkuUvLqgiEkEN4rNRZ5QknygnKAFcS4gfoe.EVrY5q5sqDqBUbS3wHsRRZhk2MAw1S17hNoH1Bicyv7n@DAGQxdxwAkwjaLjTw1B9vndia4YyFD15qRgcTQxrmkom", - "gateway": "DAGQxdxwAkwjaLjTw1B9vndia4YyFD15qRgcTQxrmkom" - }, - { - "id": "shipyard-telegram-18", - "description": "Nym Telegram Service Provider", - "address": "8YG1rcEauJA814Nd7hSxjNe2UrRwrGsrXTm1Cmd3gRrU.FxYaYqpNN8PciNsySs3zYPrTB1J8AYUu9DBsM2vVDDfF@7EfEESLo71GUvx3UEW79LgTegHUBPUocUzGyJVv6LHog", - "gateway": "7EfEESLo71GUvx3UEW79LgTegHUBPUocUzGyJVv6LHog" - }, - { - "id": "shipyard-telegram-19", - "description": "Nym Telegram Service Provider", - "address": "HPiXADVFLwLQPNpPtyYefzvYntC6tp9UJ5fJZGfkqvDt.2EUUxmeT3AiaUzAcE5SyXRAk8a2JXBkRz4B8McSdkrST@9ACTkYraCqE9jMb6zb6ne8EDQGGhZw5ykNiq9YRUdHTD", - "gateway": "9ACTkYraCqE9jMb6zb6ne8EDQGGhZw5ykNiq9YRUdHTD" - }, - { - "id": "shipyard-telegram-20", - "description": "Nym Telegram Service Provider", - "address": "2QLnEEnTmf2NRWtcQPWBeRcg7Hej5WSPWRWwtTpEEZWF.BheS78ozc8ngvhsXNNnshdJzpoYsmEvhfn3WKUYF5dRU@C2uyokSPoxhku9GexRxEo1e8KPZ7q6e8FXmK3gtY8kkF", - "gateway": "C2uyokSPoxhku9GexRxEo1e8KPZ7q6e8FXmK3gtY8kkF" - }, - { - "id": "shipyard-telegram-21", - "description": "Nym Telegram Service Provider", - "address": "FuBbnwiANfaXZnn683jBapK5XVm5ttgZSykU3vqPSHoD.94MFGv1VcBLTkRwzBDQUkWjvqtZYVBrJg2Q8JGbizcib@CTqYPY8htdAQMXCzRW9SjZzZuqYwSt2iUh6HPaNgmTvK", - "gateway": "CTqYPY8htdAQMXCzRW9SjZzZuqYwSt2iUh6HPaNgmTvK" - }, - { - "id": "shipyard-telegram-22", - "description": "Nym Telegram Service Provider", - "address": "9EbQx5jQznSVbftFom7sqUSHAACrsfvMhrzhaFt4A3SZ.D1FQCirL4YKwfcmtMGvB5Rugt5sAzGEhdSjJ3bHVQRZ@7Zh1Sz5dXpA6s53CbtcdqhQhLqwf4cLynL7KqHKcjrG4", - "gateway": "7Zh1Sz5dXpA6s53CbtcdqhQhLqwf4cLynL7KqHKcjrG4" - }, - { - "id": "shipyard-telegram-24", - "description": "Nym Telegram Service Provider", - "address": "6Umawwvf551VyB3Ko46NgKLqJdTFJeToCM67mrTmM3G.3A4sesBac4KGuMTFjvYBwLpksMJvbMbteGJQgmm4PV4Y@AnnYnEtBjB2a5sHmeRCnBq43qxyHDf95Bqd7cwQyKNLR", - "gateway": "AnnYnEtBjB2a5sHmeRCnBq43qxyHDf95Bqd7cwQyKNLR" - }, - { - "id": "shipyard-telegram-25", - "description": "Nym Telegram Service Provider", - "address": "CDtxTeoyqq83JpV9G8cR5HRHRdMMaVspQsCwH3Qnajt3.F5EHK9HFcdGrE2hqA7bK9AUmkbihujYDhtNNqHKxW765@BDkeNx7JQm5NsQakst9s8htogZXhpTQedFAgZpvsGCqH", - "gateway": "BDkeNx7JQm5NsQakst9s8htogZXhpTQedFAgZpvsGCqH" - }, - { - "id": "shipyard-telegram-26", - "description": "Nym Telegram Service Provider", - "address": "HukZkLG2DoarQEqaoDLuqW1GFf2NSHDUMGBZiyJGRYJD.9GyU8wPsyzcvRjcyk8hiNpTJbXCmq5F3VoVhFBZYuHR3@GsGEZiDBz8SWfHGaK5SDmhfbTEM55v37WCYYcT9wTSxN", - "gateway": "GsGEZiDBz8SWfHGaK5SDmhfbTEM55v37WCYYcT9wTSxN" - }, - { - "id": "shipyard-telegram-27", - "description": "Nym Telegram Service Provider", - "address": "773y8iMVJiRk4dRbjQzkJVbrei4TwkePNE5WTEttt77d.3Mw47C9XZj3oAzk1iSqC5Y36tbBsjtaTtdgaHM3Zsdma@7fiZtNL1RACQTwGrKLBT9nbY77bfwZnX9rqcWqc53qgv", - "gateway": "7fiZtNL1RACQTwGrKLBT9nbY77bfwZnX9rqcWqc53qgv" - }, - { - "id": "shipyard-telegram-28", - "description": "Nym Telegram Service Provider", - "address": "6jQJEorCu7YiP9HdDaMeHxcNhxeNmZ1kpd836GnqLZX.HsJqEmNTszGecsKqFB37i84nBXxqf4ETgrKmKmBvMGHC@FYnDMQzT49ZGM23gVqpTxfih14V6wuedNXirekmt37zE", - "gateway": "FYnDMQzT49ZGM23gVqpTxfih14V6wuedNXirekmt37zE" - }, - { - "id": "shipyard-telegram-29", - "description": "Nym Telegram Service Provider", - "address": "BiCSyovpFMuSnTvF2TdiuZwrytXDrd9AH47ZMcCxscVC.G9YpdicA9BBNoVHDgjWjgt17wv5WYKWcbE3vPJJVpSJD@GAjhJcrd6f1edaqUkfWCff6zdHoqo756qYrc2TfPuCXJ", - "gateway":"GAjhJcrd6f1edaqUkfWCff6zdHoqo756qYrc2TfPuCXJ" - }, - { - "id": "shipyard-telegram-30", - "description": "Nym Telegram Service Provider", - "address": "AQRRAs9oc8QWXAFBs44YhCKUny7AyLsfLy91pwmGgxuf.CWUKoKA1afSKyw5BnFJJg19UDgnaVATupsFhQpyTEBHJ@EBT8jTD8o4tKng2NXrrcrzVhJiBnKpT1bJy5CMeArt2w", - "gateway": "EBT8jTD8o4tKng2NXrrcrzVhJiBnKpT1bJy5CMeArt2w" - }, - { - "id": "shipyard-telegram-31", - "description": "Nym Telegram Service Provider", - "address": "6YqjAZK3Pr1ngiBLcDkotboB5WiN6k6NPpbXvShH4pR5.9Ss6VW3Xbyi8LuxduNNwnXEv9njHCQ2PLSP1UK6tsoa5@42XCK9dMS9m5XJLzQd2dBuwimk6ndZnczhZaV5VPFkQD", - "gateway": "42XCK9dMS9m5XJLzQd2dBuwimk6ndZnczhZaV5VPFkQD" - }, - { - "id": "shipyard-telegram-32", - "description": "Nym Telegram Service Provider", - "address": "EmYWLeybmj86Vzr62vxuZ3T15jwMNHggzK7sQwid96yp.GyaF9WprSr56cxUdGf5TpcUvAjb2VbAr8CVBrmBUYAaw@GL5wESoz4oSbpBaTki9qB9213FGUQXCiRjbzDkhWwoBC", - "gateway": "GL5wESoz4oSbpBaTki9qB9213FGUQXCiRjbzDkhWwoBC" - }, - { - "id": "shipyard-telegram-33", - "description": "Nym Telegram Service Provider", - "address": "4PDb96cck5btTj6G7rsomqwHJsp4qu8uPvFCbwHfjFUx.C5dKbaoakH7egsZvAueRbwLFbmxnQaVMeSr6QTMpuBAA@58ceEFaLJh6zAo3cirzT1BDQm7D3L5acnQrxGH1D6TAY", - "gateway": "58ceEFaLJh6zAo3cirzT1BDQm7D3L5acnQrxGH1D6TAY" - }, - { - "id": "shipyard-telegram-34", - "description": "Nym Telegram Service Provider", - "address": "BeZbeMf9vcpUf368qDd85dtLwXLj4Ee5bsHMB2fUD8uX.HELVbppkwU1jmzUAUrCEbHeJfVciSeo8VGAkbJSpwxsb@ADdHkiTfkpsSt31zVToWW9j3KikH24aLAAwDKtCYE5jY", - "gateway":"ADdHkiTfkpsSt31zVToWW9j3KikH24aLAAwDKtCYE5jY" - }, - { - "id": "shipyard-telegram-35", - "description": "Nym Telegram Service Provider", - "address": "Bp4JRFyf7GB9L9J95AqMPnz9zbGmPnViA5fDXKeNraLJ.D6CTdcjJVxDmH2UQvzXuPWg9Se9xXYe76uDMypXvhzd7@6UjGEeQZK14C5K2kenycTkqt7qRjEHGLgaQx3FWySo3N", - "gateway": "6UjGEeQZK14C5K2kenycTkqt7qRjEHGLgaQx3FWySo3N" - }, - { - "id": "shipyard-telegram-36", - "description": "Nym Telegram Service Provider", - "address": "91h7io6BGhVjbtC7dbbRcScyTJcTfnMsTQZ6aWMVsrWR.Epb4hANXCp8cGEY3wSgawux991ti9Z5Y1FHTMzAKFa6E@DF4TE7V8kJkttMvnoSVGnRFFRt6WYGxxiC2w1XyPQnHe", - "gateway": "DF4TE7V8kJkttMvnoSVGnRFFRt6WYGxxiC2w1XyPQnHe" - }, - { - "id": "shipyard-telegram-37", - "description": "Nym Telegram Service Provider", - "address": "Cy2wuwKpWZ3iWzKU3ZWL1qqcVfJ5Cq85dU7UHVWwv2gc.9AhC9b2zVcLnXLGriMdxjpsWJpq6iAdCavDi63udbL89@678qVUJ21uwxZBhp3r56z7GRf6gMh3NYDHruTegPtgMf", - "gateway": "678qVUJ21uwxZBhp3r56z7GRf6gMh3NYDHruTegPtgMf" - }, - { - "id": "shipyard-telegram-38", - "description": "Nym Telegram Service Provider", - "address": "GgUeUWW1NRSuquZYeZf3WkppE92EQUHJrFjNZtYU1jow.CSEjwrRi4f4uyw7N6L2LPKw2tB8spcMbFu99wHZzFZSj@77TSuVU8d1oXKbPzjec2xh4i3Wj5WwUyy9Lr36sm8gZm", - "gateway": "77TSuVU8d1oXKbPzjec2xh4i3Wj5WwUyy9Lr36sm8gZm" - }, - { - "id": "shipyard-telegram-39", - "description": "Nym Telegram Service Provider", - "address": "kz4zWwSkYiQxqxXFPNcGUByTPQWXascD9RfYsmSxY7n.ajp3SjbBVBjrU9nXpSQXAXzbb6EHJJyhbY6cc1ajayx@BTZNB3bkkEePsT14GN8ofVtM1SJae4YLWjpBerrKYf", - "gateway": "HyS2UZtZX3kQXdazbdE99DhCjBXjbG61LC9QsmXwbxrU" - } - ] - }, - { - "id": "blockstream", - "description": "Blockstream Green", - "items": [ - { - "id": "nym-blockstream", - "description": "Nym Blockstream Green Service Provider", - "address": "GiRjFWrMxt58pEMuusm4yT3RxoMD1MMPrR9M2N4VWRJP.3CNZBPq4vg7v7qozjGjdPMXcvDmkbWPCgbGCjQVw9n6Z@2xU4CBE6QiiYt6EyBXSALwxkNvM7gqJfjHXaMkjiFmYW", - "gateway": "2xU4CBE6QiiYt6EyBXSALwxkNvM7gqJfjHXaMkjiFmYW" - } - ] - } -]`); -export const Loaded = () => ( - - - -); - -export const ServiceAlreadySelected = () => ( - - console.log('New service provider selected: ', serviceProvider)} - /> - -); diff --git a/nym-connect/mobile/src/components/ServiceSelector.tsx b/nym-connect/mobile/src/components/ServiceSelector.tsx deleted file mode 100644 index 5eb8361d3c..0000000000 --- a/nym-connect/mobile/src/components/ServiceSelector.tsx +++ /dev/null @@ -1,179 +0,0 @@ -import React, { useEffect } from 'react'; -import { - Box, - CircularProgress, - Divider, - FormControl, - InputLabel, - MenuItem, - Select, - Stack, - Typography, -} from '@mui/material'; -import { Service, ServiceProvider, Services } from '../types/directory'; -import { useTauriEvents } from '../utils'; -import { ServiceProviderPopup } from './ServiceProviderPopup'; - -export const ServiceSelector: FCWithChildren<{ - onChange?: (serviceProvider?: ServiceProvider) => void; - services?: Services; - currentSp?: ServiceProvider; -}> = ({ services, currentSp, onChange }) => { - const [service, setService] = React.useState(); - const [serviceProvider, setServiceProvider] = React.useState(currentSp); - const [isPopupVisible, setPopupVisible] = React.useState(false); - - const getService = () => { - if (!services || !currentSp) { - return undefined; - } - return services.find((s) => - s.items.some( - ({ id, address, gateway }) => - id === currentSp.id && address === currentSp.address && gateway === currentSp.gateway, - ), - ); - }; - - useEffect(() => { - if (!service && currentSp) { - setServiceProvider(currentSp); - setService(getService()); - } - }, [currentSp, services]); - - /** - * Gets a random service provider from the currently selected service. - * - * If there is no service selected, or it does not have items, `undefined` is returned. - */ - const getRandomServiceProviderForService = (serviceToUse?: Service): ServiceProvider | undefined => { - if (!serviceToUse?.items.length) { - return undefined; - } - return serviceToUse.items[Math.floor(Math.random() * serviceToUse.items.length)]; - }; - - const handleServiceSelected = React.useCallback( - (newService?: Service) => { - console.log(newService?.id, service?.id); - // if the user has chosen a new service, then pick a random service provider - if (newService?.id !== service?.id) { - const newServiceProvider = getRandomServiceProviderForService(newService); - setServiceProvider(newServiceProvider); - onChange?.(newServiceProvider); - setService(newService); - } - }, - [service], - ); - - // clears the display and fire on change (to trigger upstream storage clearance) - const clearServiceProviderAndFireOnChange = () => { - setService(undefined); - setServiceProvider(undefined); - onChange?.(undefined); - }; - - // when the user clears local storage, reset the selector - useTauriEvents('help://clear-storage', () => { - clearServiceProviderAndFireOnChange(); - }); - - const handleAdvancedSpChange = (newServiceProvider?: ServiceProvider, newService?: Service) => { - setPopupVisible(false); - setService(newService); - setServiceProvider(newServiceProvider); - onChange?.(newServiceProvider); - }; - - const handleNewService = (newServiceId?: string) => { - const newService = (services || []).find((s) => s.id === newServiceId); - setService(newService); - }; - - if (!services) { - return ( - - theme.palette.common.white}> - - Loading services... - - - ); - } - - return ( - - - - Select a service - - - - setPopupVisible(false)} - onServiceProviderChanged={handleAdvancedSpChange} - /> - - ); -}; diff --git a/nym-connect/mobile/src/components/TooltipInfo.tsx b/nym-connect/mobile/src/components/TooltipInfo.tsx deleted file mode 100644 index 64b718d174..0000000000 --- a/nym-connect/mobile/src/components/TooltipInfo.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; -import { Divider, Stack, Typography } from '@mui/material'; -import { ServiceProvider } from 'src/types/directory'; - -export const ServiceProviderInfo = ({ serviceProvider }: { serviceProvider: ServiceProvider }) => ( - - - Connection info - - - - Gateway {serviceProvider.gateway} - - - - Service provider {serviceProvider.address.slice(0, 35)}... - - -); - -export const GatwayWarningInfo = () => ( - - - Connection issue - - - Try disconnecting and connecting again - -); diff --git a/nym-connect/mobile/src/config.ts b/nym-connect/mobile/src/config.ts deleted file mode 100644 index f405ceac15..0000000000 --- a/nym-connect/mobile/src/config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const config = { - DOCS_BASE_URL: 'https://nymtech.net/docs', -}; diff --git a/nym-connect/mobile/src/context/main.tsx b/nym-connect/mobile/src/context/main.tsx deleted file mode 100644 index b999b957a2..0000000000 --- a/nym-connect/mobile/src/context/main.tsx +++ /dev/null @@ -1,211 +0,0 @@ -import React, { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react'; -import { DateTime } from 'luxon'; -import { invoke } from '@tauri-apps/api'; -import { Error } from 'src/types/error'; -import { getVersion } from '@tauri-apps/api/app'; -import { useEvents } from 'src/hooks/events'; -import { UserDefinedGateway, UserDefinedSPAddress } from 'src/types/service-provider'; -import { getItemFromStorage, setItemInStorage } from 'src/utils'; -import { ConnectionStatusKind, GatewayPerformance } from '../types'; -import { ConnectionStatsItem } from '../components/ConnectionStats'; -import { ServiceProvider } from '../types/directory'; - -const FORAGE_GATEWAY_KEY = 'nym-connect-user-gateway'; -const FORAGE_SP_KEY = 'nym-connect-user-sp'; - -type ModeType = 'light' | 'dark'; - -export type TClientContext = { - mode: ModeType; - appVersion?: string; - connectionStatus: ConnectionStatusKind; - connectionStats?: ConnectionStatsItem[]; - connectedSince?: DateTime; - error?: Error; - gatewayPerformance: GatewayPerformance; - selectedProvider?: ServiceProvider; - showInfoModal: boolean; - userDefinedGateway?: UserDefinedGateway; - userDefinedSPAddress: UserDefinedSPAddress; - serviceProviders?: ServiceProvider[]; - setMode: (mode: ModeType) => void; - clearError: () => void; - setConnectionStatus: (connectionStatus: ConnectionStatusKind) => void; - setConnectionStats: (connectionStats: ConnectionStatsItem[] | undefined) => void; - setConnectedSince: (connectedSince: DateTime | undefined) => void; - setShowInfoModal: (show: boolean) => void; - setSerivceProvider: () => void; - startConnecting: () => Promise; - startDisconnecting: () => Promise; - setUserDefinedGateway: React.Dispatch>; - setUserDefinedSPAddress: React.Dispatch>; -}; - -export const ClientContext = createContext({} as TClientContext); - -export const ClientContextProvider: FCWithChildren = ({ children }) => { - const [mode, setMode] = useState('dark'); - const [connectionStatus, setConnectionStatus] = useState(ConnectionStatusKind.connected); - const [connectionStats, setConnectionStats] = useState(); - const [connectedSince, setConnectedSince] = useState(); - const [selectedProvider, setSelectedProvider] = React.useState(); - const [serviceProviders, setServiceProviders] = React.useState(); - const [error, setError] = useState(); - const [appVersion, setAppVersion] = useState(); - const [gatewayPerformance, setGatewayPerformance] = useState('Good'); - const [showInfoModal, setShowInfoModal] = useState(false); - const [userDefinedGateway, setUserDefinedGateway] = useState({ - isActive: false, - gateway: undefined, - }); - const [userDefinedSPAddress, setUserDefinedSPAddress] = useState({ - isActive: false, - address: undefined, - }); - - const getAppVersion = async () => { - const version = await getVersion(); - return version; - }; - - useEffect(() => { - setItemInStorage({ key: FORAGE_GATEWAY_KEY, value: userDefinedGateway }); - }, [userDefinedGateway]); - - useEffect(() => { - setItemInStorage({ key: FORAGE_SP_KEY, value: userDefinedSPAddress }); - }, [userDefinedSPAddress]); - - const initialiseApp = async () => { - const services = await invoke('get_services'); - const AppVersion = await getAppVersion(); - const storedUserDefinedGateway = await getItemFromStorage({ key: FORAGE_GATEWAY_KEY }); - const storedUserDefinedSP = await getItemFromStorage({ key: FORAGE_SP_KEY }); - - setAppVersion(AppVersion); - setServiceProviders(services as ServiceProvider[]); - - if (storedUserDefinedGateway) setUserDefinedGateway(storedUserDefinedGateway); - if (storedUserDefinedSP) setUserDefinedSPAddress(storedUserDefinedSP); - }; - - useEvents({ - onError: (e) => setError(e), - onGatewayPerformanceChange: (performance) => setGatewayPerformance(performance), - onStatusChange: (status) => setConnectionStatus(status), - }); - - useEffect(() => { - initialiseApp(); - }, []); - - useEffect(() => { - // when mounting, load the connection state (needed for the Growth window, that checks the connection state) - (async () => { - const currentStatus: ConnectionStatusKind = await invoke('get_connection_status'); - setConnectionStatus(currentStatus); - })(); - }, []); - - const startConnecting = useCallback(async () => { - try { - await invoke('start_connecting'); - } catch (e) { - setError({ title: 'Could not connect', message: e as string }); - console.log(e); - } - }, []); - - const startDisconnecting = useCallback(async () => { - try { - await invoke('start_disconnecting'); - } catch (e) { - console.log(e); - } - }, []); - - const shouldUseUserGateway = !!userDefinedGateway.gateway && userDefinedGateway.isActive; - const shouldUseUserSP = !!userDefinedSPAddress.address && userDefinedSPAddress.isActive; - - const setServiceProvider = async (newServiceProvider: ServiceProvider) => { - await invoke('set_gateway', { - gateway: shouldUseUserGateway ? userDefinedGateway.gateway : newServiceProvider.gateway, - }); - await invoke('set_service_provider', { - serviceProvider: shouldUseUserSP ? userDefinedSPAddress.address : newServiceProvider.address, - }); - }; - - const getRandomSPFromList = (services: ServiceProvider[]) => { - const randomSelection = services[Math.floor(Math.random() * services.length)]; - return randomSelection; - }; - - const buildServiceProvider = async (serviceProvider: ServiceProvider) => { - const sp = { ...serviceProvider }; - - if (shouldUseUserGateway) sp.gateway = userDefinedGateway.gateway as string; - if (shouldUseUserSP) sp.address = userDefinedSPAddress.address as string; - - return sp; - }; - - const setSerivceProvider = async () => { - if (serviceProviders) { - const randomServiceProvider = getRandomSPFromList(serviceProviders); - const withUserDefinitions = await buildServiceProvider(randomServiceProvider); - await setServiceProvider(withUserDefinitions); - setSelectedProvider(withUserDefinitions); - } - return undefined; - }; - - const clearError = () => setError(undefined); - - const contextValue = useMemo( - () => ({ - mode, - appVersion, - setMode, - error, - clearError, - connectionStatus, - setConnectionStatus, - connectionStats, - showInfoModal, - setConnectionStats, - selectedProvider, - serviceProviders, - connectedSince, - setConnectedSince, - setSerivceProvider, - startConnecting, - startDisconnecting, - gatewayPerformance, - setShowInfoModal, - userDefinedSPAddress, - userDefinedGateway, - setUserDefinedGateway, - setUserDefinedSPAddress, - }), - [ - mode, - appVersion, - error, - showInfoModal, - serviceProviders, - connectedSince, - connectionStatus, - connectionStats, - connectedSince, - gatewayPerformance, - selectedProvider, - userDefinedGateway, - userDefinedSPAddress, - ], - ); - - return {children}; -}; - -export const useClientContext = () => useContext(ClientContext); diff --git a/nym-connect/mobile/src/context/mocks/main.tsx b/nym-connect/mobile/src/context/mocks/main.tsx deleted file mode 100644 index 78028b03f8..0000000000 --- a/nym-connect/mobile/src/context/mocks/main.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React, { useMemo } from 'react'; -import { ConnectionStatusKind } from 'src/types'; -import { ClientContext, TClientContext } from '../main'; - -const mockValues: TClientContext = { - appVersion: 'v1.x.x', - mode: 'dark', - connectionStatus: ConnectionStatusKind.disconnected, - selectedProvider: { id: '1', description: 'Keybase service provider', gateway: 'abc123', address: '123abc' }, - gatewayPerformance: 'Good', - showInfoModal: false, - userDefinedGateway: { isActive: false, gateway: '' }, - userDefinedSPAddress: { isActive: false, address: '' }, - setShowInfoModal: () => {}, - setMode: () => {}, - clearError: () => {}, - setConnectedSince: () => {}, - setConnectionStats: () => {}, - setConnectionStatus: () => {}, - startConnecting: async () => {}, - startDisconnecting: async () => {}, - setSerivceProvider: () => {}, - setUserDefinedGateway: () => {}, - setUserDefinedSPAddress: () => {}, -}; - -export const MockProvider: FCWithChildren<{ - children?: React.ReactNode; - connectionStatus?: ConnectionStatusKind; -}> = ({ connectionStatus = ConnectionStatusKind.disconnected, children }) => { - const value = useMemo(() => ({ ...mockValues, connectionStatus }), [connectionStatus]); - return {children}; -}; diff --git a/nym-connect/mobile/src/fonts/OpenSans-Italic-VariableFont_wdth,wght.ttf b/nym-connect/mobile/src/fonts/OpenSans-Italic-VariableFont_wdth,wght.ttf deleted file mode 100644 index 0fea34ba24..0000000000 Binary files a/nym-connect/mobile/src/fonts/OpenSans-Italic-VariableFont_wdth,wght.ttf and /dev/null differ diff --git a/nym-connect/mobile/src/fonts/OpenSans-VariableFont_wdth,wght.ttf b/nym-connect/mobile/src/fonts/OpenSans-VariableFont_wdth,wght.ttf deleted file mode 100644 index 51dd3c3be2..0000000000 Binary files a/nym-connect/mobile/src/fonts/OpenSans-VariableFont_wdth,wght.ttf and /dev/null differ diff --git a/nym-connect/mobile/src/fonts/fonts.css b/nym-connect/mobile/src/fonts/fonts.css deleted file mode 100644 index bf875e952d..0000000000 --- a/nym-connect/mobile/src/fonts/fonts.css +++ /dev/null @@ -1,6 +0,0 @@ -@font-face { - font-family: 'Open Sans'; - src: url('./OpenSans-VariableFont_wdth,wght.ttf') format('truetype-variations'), - url('./OpenSans-Italic-VariableFont_wdth,wght.ttf') format('truetype-variations'); - font-weight: 100 1000; -} \ No newline at end of file diff --git a/nym-connect/mobile/src/hooks/events.ts b/nym-connect/mobile/src/hooks/events.ts deleted file mode 100644 index 4b2c4fcc55..0000000000 --- a/nym-connect/mobile/src/hooks/events.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { useEffect, useRef } from 'react'; -import { listen, UnlistenFn } from '@tauri-apps/api/event'; -import { ConnectionStatusKind, GatewayPerformance } from 'src/types'; -import { Error } from 'src/types/error'; -import { TauriEvent } from 'src/types/event'; - -const TAURI_EVENT_STATUS_CHANGED = 'app:connection-status-changed'; - -export const useEvents = ({ - onError, - onStatusChange, - onGatewayPerformanceChange, -}: { - onError: (error: Error) => void; - onStatusChange: (status: ConnectionStatusKind) => void; - onGatewayPerformanceChange: (status: GatewayPerformance) => void; -}) => { - const timerId = useRef(); - - useEffect(() => { - const unlisten: UnlistenFn[] = []; - - // TODO: fix typings - listen(TAURI_EVENT_STATUS_CHANGED, (event) => { - const { status } = event.payload as any; - console.log(TAURI_EVENT_STATUS_CHANGED, { status, event }); - onStatusChange(status); - }) - .then((result) => { - unlisten.push(result); - }) - .catch((e) => console.log(e)); - - listen('socks5-event', (e: TauriEvent) => { - console.log(e); - onError(e.payload); - }).then((result) => { - unlisten.push(result); - }); - - listen('socks5-status-event', (e: TauriEvent) => { - if (e.payload.message.includes('slow')) { - onGatewayPerformanceChange('Poor'); - - if (timerId?.current) { - clearTimeout(timerId.current); - } - - timerId.current = setTimeout(() => { - onGatewayPerformanceChange('Good'); - }, 10000); - } - }).then((result) => { - unlisten.push(result); - }); - - listen('socks5-connection-fail-event', (e: TauriEvent) => { - onError({ title: 'Connection failed', message: `${e.payload.message} - Please disconnect and reconnect.` }); - onGatewayPerformanceChange('Poor'); - }).then((result) => { - unlisten.push(result); - }); - - return () => { - unlisten.forEach((unsubscribe) => unsubscribe()); - }; - }, []); -}; diff --git a/nym-connect/mobile/src/index.tsx b/nym-connect/mobile/src/index.tsx deleted file mode 100644 index 996825445d..0000000000 --- a/nym-connect/mobile/src/index.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react'; -import { createRoot } from 'react-dom/client'; -import { ErrorBoundary } from 'react-error-boundary'; -import { BrowserRouter as Router } from 'react-router-dom'; -import { GlobalStyles } from '@mui/material'; -import { ClientContextProvider } from './context/main'; -import { ErrorFallback } from './components/Error'; -import { NymMixnetTheme } from './theme'; -import { AppWindowFrame } from './components/AppWindowFrame'; -import { AppRoutes } from './routes'; - -const elem = document.getElementById('root'); - -if (elem) { - const root = createRoot(elem); - root.render( - - - - - - - - - - - - , - ); -} diff --git a/nym-connect/mobile/src/layouts/ConnectionLayout.tsx b/nym-connect/mobile/src/layouts/ConnectionLayout.tsx deleted file mode 100644 index 300a971e15..0000000000 --- a/nym-connect/mobile/src/layouts/ConnectionLayout.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { Box, Stack } from '@mui/material'; -import React from 'react'; - -export const ConnectionLayout = ({ - TopContent, - ConnectButton, - BottomContent, -}: { - TopContent: React.ReactNode; - ConnectButton: React.ReactNode; - BottomContent: React.ReactNode; -}) => ( - - - {TopContent} - - - {ConnectButton} - - - {BottomContent} - - -); diff --git a/nym-connect/mobile/src/pages/connection/Connected.tsx b/nym-connect/mobile/src/pages/connection/Connected.tsx deleted file mode 100644 index d1f59e55eb..0000000000 --- a/nym-connect/mobile/src/pages/connection/Connected.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import React from 'react'; -import { Box, Stack } from '@mui/material'; -import { DateTime } from 'luxon'; -import { IpAddressAndPortModal } from 'src/components/IpAddressAndPortModal'; -import { ConnectionTimer } from 'src/components/ConntectionTimer'; -import { ConnectionStatus } from 'src/components/ConnectionStatus'; -import { ConnectionStatusKind, GatewayPerformance } from 'src/types'; -import { ConnectionStatsItem } from 'src/components/ConnectionStats'; -import { IpAddressAndPort } from 'src/components/IpAddressAndPort'; -import { ServiceProvider } from 'src/types/directory'; -import { ExperimentalWarning } from 'src/components/ExperimentalWarning'; -import { ConnectionLayout } from 'src/layouts/ConnectionLayout'; -import { PowerButton } from 'src/components/PowerButton/PowerButton'; -import { Error } from 'src/types/error'; -import { InfoModal } from 'src/components/InfoModal'; - -export const Connected: FCWithChildren<{ - error?: Error; - status: ConnectionStatusKind; - showInfoModal: boolean; - gatewayPerformance: GatewayPerformance; - stats: ConnectionStatsItem[]; - ipAddress: string; - port: number; - connectedSince?: DateTime; - busy?: boolean; - isError?: boolean; - serviceProvider?: ServiceProvider; - clearError: () => void; - onConnectClick: (status: ConnectionStatusKind) => void; - closeInfoModal: () => void; -}> = ({ - error, - status, - showInfoModal, - gatewayPerformance, - ipAddress, - port, - connectedSince, - busy, - isError, - serviceProvider, - clearError, - onConnectClick, - closeInfoModal, -}) => ( - <> - {error && } - - - - -
- } - ConnectButton={ - - } - BottomContent={ - - - - - - - - - } - /> - -); diff --git a/nym-connect/mobile/src/pages/connection/Disconnected.tsx b/nym-connect/mobile/src/pages/connection/Disconnected.tsx deleted file mode 100644 index d3937fea24..0000000000 --- a/nym-connect/mobile/src/pages/connection/Disconnected.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import React from 'react'; -import { Stack, Typography } from '@mui/material'; -import { ConnectionStatus } from 'src/components/ConnectionStatus'; -import { ConnectionTimer } from 'src/components/ConntectionTimer'; -import { InfoModal } from 'src/components/InfoModal'; -import { Error } from 'src/types/error'; -import { ExperimentalWarning } from 'src/components/ExperimentalWarning'; -import { ServiceProvider, Services } from 'src/types/directory'; -import { ConnectionStatusKind } from 'src/types'; -import { PowerButton } from 'src/components/PowerButton/PowerButton'; -import { Box } from '@mui/system'; -import { ConnectionLayout } from 'src/layouts/ConnectionLayout'; - -export const Disconnected: FCWithChildren<{ - error?: Error; - status: ConnectionStatusKind; - services?: Services; - busy?: boolean; - isError?: boolean; - serviceProvider?: ServiceProvider; - clearError: () => void; - onConnectClick: (status: ConnectionStatusKind) => void; -}> = ({ status, error, onConnectClick, clearError }) => ( - <> - {error && } - - - - - } - ConnectButton={} - BottomContent={ - - - - You are not protected - - - - - - - } - /> - -); diff --git a/nym-connect/mobile/src/pages/connection/index.tsx b/nym-connect/mobile/src/pages/connection/index.tsx deleted file mode 100644 index 5288517207..0000000000 --- a/nym-connect/mobile/src/pages/connection/index.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import React from 'react'; -import { Stack } from '@mui/material'; -import { forage } from '@tauri-apps/tauri-forage'; -import { DateTime } from 'luxon'; -import { useClientContext } from 'src/context/main'; -import { useTauriEvents } from 'src/utils'; -import { Connected } from './Connected'; -import { Disconnected } from './Disconnected'; - -export const ConnectionPage = () => { - const context = useClientContext(); - const [busy, setBusy] = React.useState(); - - useTauriEvents('help://clear-storage', (_event) => { - console.log('About to clear local storage...'); - // clear local storage - try { - forage.clear()(); - console.log('Local storage cleared'); - } catch (e) { - console.error('Failed to clear local storage', e); - } - }); - - const handleConnectClick = async () => { - const currentStatus = context.connectionStatus; - if (currentStatus === 'connected' || currentStatus === 'disconnected') { - setBusy(true); - // eslint-disable-next-line default-case - switch (currentStatus) { - case 'disconnected': - await context.setSerivceProvider(); - await context.startConnecting(); - context.setConnectedSince(DateTime.now()); - context.setShowInfoModal(true); - break; - case 'connected': - await context.startDisconnecting(); - context.setConnectedSince(undefined); - break; - } - setBusy(false); - } - }; - - const closeInfoModal = () => context.setShowInfoModal(false); - - if (context.connectionStatus === 'connected') - return ( - - - - ); - - return ( - - - - ); -}; diff --git a/nym-connect/mobile/src/pages/menu/Apps.tsx b/nym-connect/mobile/src/pages/menu/Apps.tsx deleted file mode 100644 index e9b9ee71c6..0000000000 --- a/nym-connect/mobile/src/pages/menu/Apps.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { Divider, Typography } from '@mui/material'; -import { Box } from '@mui/system'; - -const appsSchema = { - messagingApps: ['Telegram', 'Keybase'], - wallets: ['Blockstream', 'Electrum'], -}; - -export const CompatibleApps = () => ( - - - Supported apps - - - Messaging apps - - - - {appsSchema.messagingApps.map((app) => ( - - {app} - - ))} - - - - Wallets - - - - {appsSchema.wallets.map((wallet) => ( - - {wallet} - - ))} - - -); diff --git a/nym-connect/mobile/src/pages/menu/Guide.tsx b/nym-connect/mobile/src/pages/menu/Guide.tsx deleted file mode 100644 index 2323d68a82..0000000000 --- a/nym-connect/mobile/src/pages/menu/Guide.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import React, { useState } from 'react'; -import { HelpPage } from 'src/components/HelpPage'; -import Image1 from '../../assets/help-step-one.png'; -import Image2 from '../../assets/help-step-two.png'; -import Image4 from '../../assets/help-step-four.png'; - -export const HelpGuide = () => { - const [step, setStep] = useState(1); - const TOTAL_STEPS = 3; - - if (step === 1) - return ( - setStep(2)} - /> - ); - - if (step === 2) - return ( - setStep(1)} - onNext={() => setStep(3)} - /> - ); - - if (step === 3) - return ( - setStep(2)} - /> - ); - - return null; -}; diff --git a/nym-connect/mobile/src/pages/menu/index.tsx b/nym-connect/mobile/src/pages/menu/index.tsx deleted file mode 100644 index 47840d6668..0000000000 --- a/nym-connect/mobile/src/pages/menu/index.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react'; -import { Apps, HelpOutline, Settings } from '@mui/icons-material'; -import { Stack, Link, List, ListItem, ListItemButton, ListItemIcon, ListItemText, Typography } from '@mui/material'; -import { Link as RouterLink } from 'react-router-dom'; -import { AppVersion } from 'src/components/AppVersion'; - -const menuSchema = [ - { title: 'Supported apps', icon: Apps, path: 'apps' }, - { title: 'How to connect guide', icon: HelpOutline, path: 'guide' }, - { title: 'Settings', icon: Settings, path: 'settings' }, -]; - -export const Menu = () => ( - - - {menuSchema.map((item) => ( - - - - - - {' '} - - - {item.title} - - - - - - ))} - - - -); diff --git a/nym-connect/mobile/src/pages/menu/settings/GatewaySettings.tsx b/nym-connect/mobile/src/pages/menu/settings/GatewaySettings.tsx deleted file mode 100644 index c3fdc9808d..0000000000 --- a/nym-connect/mobile/src/pages/menu/settings/GatewaySettings.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import React, { ChangeEvent, useState } from 'react'; -import { IdentityKeyFormField } from '@nymproject/react/mixnodes/IdentityKeyFormField'; -import { Box, FormControl, FormControlLabel, FormHelperText, Stack, Switch, Typography } from '@mui/material'; -import { useClientContext } from 'src/context/main'; -import { ConnectionStatusKind } from 'src/types'; -import { AppVersion } from 'src/components/AppVersion'; - -export const GatewaySettings = () => { - const { userDefinedGateway, setUserDefinedGateway, connectionStatus } = useClientContext(); - const [gatewayKey, setGatewayKey] = useState(userDefinedGateway?.gateway); - - const handleIsValidGatewayKey = (isValid: boolean) => { - let gateway: string | undefined; - - if (isValid) { - gateway = gatewayKey; - } - - setUserDefinedGateway((current) => ({ ...current, gateway })); - }; - - const handleChange = (e: ChangeEvent) => { - setUserDefinedGateway((current) => ({ ...current, isActive: e.target.checked })); - }; - - return ( - - - - - Select your Gateway - - - Use a gateway of your choice - - - - } - label={userDefinedGateway?.isActive ? 'On' : 'Off'} - /> - {connectionStatus === ConnectionStatusKind.connected && ( - This setting is disabled during an active connection - )} - {userDefinedGateway?.isActive && ( - - )} - - - - - To find a gateway go to{' '} - - explorer.nymtech.net/network-components/gateways - - - - - - - ); -}; diff --git a/nym-connect/mobile/src/pages/menu/settings/ServiceProviderSettings.tsx b/nym-connect/mobile/src/pages/menu/settings/ServiceProviderSettings.tsx deleted file mode 100644 index 61a87debb1..0000000000 --- a/nym-connect/mobile/src/pages/menu/settings/ServiceProviderSettings.tsx +++ /dev/null @@ -1,101 +0,0 @@ -import React, { ChangeEvent } from 'react'; -import { - Autocomplete, - Box, - FormControl, - FormControlLabel, - FormHelperText, - Stack, - Switch, - TextField, - Typography, -} from '@mui/material'; -import { AppVersion } from 'src/components/AppVersion'; -import { ConnectionStatusKind } from 'src/types'; -import { useClientContext } from 'src/context/main'; - -export const ServiceProviderSettings = () => { - const { connectionStatus, serviceProviders, userDefinedSPAddress, setUserDefinedSPAddress } = useClientContext(); - - const toggleOnOff = (e: ChangeEvent) => { - setUserDefinedSPAddress((current) => ({ ...current, isActive: e.target.checked })); - }; - - const handleSelectFromList = (value: string | null) => { - setUserDefinedSPAddress((current) => ({ ...current, address: value ?? undefined })); - }; - - const getSPDescription = (spAddress: string) => { - const match = serviceProviders?.find((sp) => sp.address === spAddress); - - if (match) return match.description; - - return 'N/A'; - }; - - const validateInput = (value: string) => { - setUserDefinedSPAddress((current) => ({ ...current, address: !value.length ? undefined : value })); - }; - - return ( - - - - - Select your Service Provider - - - Pick a service provider from the list or enter your own - - - - } - label={userDefinedSPAddress.isActive ? 'On' : 'Off'} - /> - {connectionStatus === ConnectionStatusKind.connected && ( - This setting is disabled during an active connection - )} - {userDefinedSPAddress.isActive && serviceProviders && ( - sp.address)} - freeSolo - value={userDefinedSPAddress.address || ''} - onChange={(e, value) => handleSelectFromList(value)} - size="small" - renderInput={(params) => ( - validateInput(e.target.value)} - /> - )} - ListboxProps={{ style: { background: 'unset', fontSize: '14px' } }} - /> - )} - - {userDefinedSPAddress.address && userDefinedSPAddress.isActive && ( - - Name of Service Provider - - {getSPDescription(userDefinedSPAddress.address)} - - - )} - - - - - ); -}; diff --git a/nym-connect/mobile/src/routes/index.tsx b/nym-connect/mobile/src/routes/index.tsx deleted file mode 100644 index dd3eec678e..0000000000 --- a/nym-connect/mobile/src/routes/index.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import { Routes, Route } from 'react-router-dom'; -import { ConnectionPage } from 'src/pages/connection'; -import { Menu } from 'src/pages/menu'; -import { CompatibleApps } from 'src/pages/menu/Apps'; -import { HelpGuide } from 'src/pages/menu/Guide'; -import { SettingsMenu } from 'src/pages/menu/settings'; -import { GatewaySettings } from 'src/pages/menu/settings/GatewaySettings'; -import { ServiceProviderSettings } from 'src/pages/menu/settings/ServiceProviderSettings'; - -export const AppRoutes = () => ( - - } /> - - } /> - } /> - } /> - - } /> - } /> - } /> - - - -); diff --git a/nym-connect/mobile/src/stories/AppFlow.stories.tsx b/nym-connect/mobile/src/stories/AppFlow.stories.tsx deleted file mode 100644 index c00cb2aa9e..0000000000 --- a/nym-connect/mobile/src/stories/AppFlow.stories.tsx +++ /dev/null @@ -1,116 +0,0 @@ -import React from 'react'; -import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { Box } from '@mui/material'; -import { DateTime } from 'luxon'; -import { Disconnected } from 'src/pages/connection/Disconnected'; -import { Connected } from 'src/pages/connection/Connected'; -import { ConnectionStatusKind } from 'src/types'; -import { AppWindowFrame } from '../components/AppWindowFrame'; -import { useClientContext } from '../context/main'; -import { Services } from '../types/directory'; - -export default { - title: 'App/Flow', - component: AppWindowFrame, -} as ComponentMeta; - -const width = 240; -const height = 575; - -export const Mock: ComponentStory = () => { - const context = useClientContext(); - const [busy, setBusy] = React.useState(); - const services: Services = [ - { - id: 'keybase', - description: 'Keybase', - items: [ - { - id: 'nym-keybase', - description: 'Nym Keybase Service Provider', - address: '1234.5678', - gateway: 'abcedf', - }, - ], - }, - ]; - const handleConnectClick = React.useCallback(() => { - const oldStatus = context.connectionStatus; - if (oldStatus === 'connected' || oldStatus === 'disconnected') { - setBusy(true); - - // eslint-disable-next-line default-case - switch (oldStatus) { - case 'disconnected': - context.setConnectionStatus(ConnectionStatusKind.connecting); - break; - case 'connected': - context.setConnectionStatus(ConnectionStatusKind.disconnecting); - break; - } - - setTimeout(() => { - // eslint-disable-next-line default-case - switch (oldStatus) { - case 'disconnected': - context.setConnectedSince(DateTime.now()); - context.setConnectionStatus(ConnectionStatusKind.connected); - break; - case 'connected': - context.setConnectionStatus(ConnectionStatusKind.disconnected); - break; - } - setBusy(false); - }, 5000); - } - }, [context.connectionStatus]); - - if ( - context.connectionStatus === ConnectionStatusKind.disconnected || - context.connectionStatus === ConnectionStatusKind.connecting - ) { - return ( - - - {}} - /> - - - ); - } - - return ( - - {}} - gatewayPerformance="Good" - showInfoModal={false} - closeInfoModal={() => undefined} - status={context.connectionStatus} - busy={busy} - onConnectClick={handleConnectClick} - ipAddress="127.0.0.1" - port={1080} - connectedSince={context.connectedSince} - serviceProvider={services[0].items[0]} - stats={[ - { - label: 'in:', - totalBytes: 1024, - rateBytesPerSecond: 1024 * 1024 * 1024 + 10, - }, - { - label: 'out:', - totalBytes: 1024 * 1024 * 1024 * 1024 * 20, - rateBytesPerSecond: 1024 * 1024 + 10, - }, - ]} - /> - - ); -}; diff --git a/nym-connect/mobile/src/stories/AppWindowFrame.stories.tsx b/nym-connect/mobile/src/stories/AppWindowFrame.stories.tsx deleted file mode 100644 index e8fa9a8b6b..0000000000 --- a/nym-connect/mobile/src/stories/AppWindowFrame.stories.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { Box } from '@mui/material'; -import { AppWindowFrame } from '../components/AppWindowFrame'; - -export default { - title: 'App/AppWindowFrame', - component: AppWindowFrame, -} as ComponentMeta; - -export const Default: ComponentStory = () => ( - - - Culpa deserunt cupidatat culpa nisi aute dolore nisi deserunt cillum consequat elit. Nostrud id occaecat - consectetur consectetur excepteur labore consectetur. Laboris tempor consequat qui exercitation adipisicing sunt - cupidatat est. Officia dolore qui eu dolor velit ex ea qui laborum. Mollit ut est sit irure elit ad ut deserunt. - - -); diff --git a/nym-connect/mobile/src/stories/ConnectedLayout.stories.tsx b/nym-connect/mobile/src/stories/ConnectedLayout.stories.tsx deleted file mode 100644 index 426252dc63..0000000000 --- a/nym-connect/mobile/src/stories/ConnectedLayout.stories.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import React from 'react'; -import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { Box } from '@mui/material'; -import { DateTime } from 'luxon'; -import { Connected } from 'src/pages/connection/Connected'; -import { ConnectionStatusKind } from 'src/types'; - -const onClick = () => undefined; - -export default { - title: 'Layouts/ConnectedLayout', - component: Connected, -} as ComponentMeta; - -export const Default: ComponentStory = () => ( - - {}} - gatewayPerformance="Good" - showInfoModal={false} - closeInfoModal={() => undefined} - status={ConnectionStatusKind.connected} - connectedSince={DateTime.now()} - ipAddress="127.0.0.1" - serviceProvider={{ id: 'service 1', description: 'good services', address: 'abc123', gateway: '8910xyz' }} - port={1080} - stats={[ - { - label: 'in:', - totalBytes: 1024, - rateBytesPerSecond: 1024 * 1024 * 1024 + 10, - }, - { - label: 'out:', - totalBytes: 1024 * 1024 * 1024 * 1024 * 20, - rateBytesPerSecond: 1024 * 1024 + 10, - }, - ]} - onConnectClick={onClick} - /> - -); diff --git a/nym-connect/mobile/src/stories/ConnectionButton.stories.tsx b/nym-connect/mobile/src/stories/ConnectionButton.stories.tsx deleted file mode 100644 index 6fcf7530ad..0000000000 --- a/nym-connect/mobile/src/stories/ConnectionButton.stories.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { ConnectionStatusKind } from 'src/types'; -import { ConnectionButton } from '../components/ConnectionButton'; - -export default { - title: 'Components/ConnectionButton', - component: ConnectionButton, -} as ComponentMeta; - -export const Disconnected: ComponentStory = () => ( - -); - -export const Connecting: ComponentStory = () => ( - -); - -export const Connected: ComponentStory = () => ( - -); - -export const Disconnecting: ComponentStory = () => ( - -); diff --git a/nym-connect/mobile/src/stories/ConnectionStats.stories.tsx b/nym-connect/mobile/src/stories/ConnectionStats.stories.tsx deleted file mode 100644 index 7faea66c16..0000000000 --- a/nym-connect/mobile/src/stories/ConnectionStats.stories.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; -import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { ConnectionStats } from '../components/ConnectionStats'; - -export default { - title: 'Components/ConnectionStats', - component: ConnectionStats, -} as ComponentMeta; - -const Template: ComponentStory = (args) => ; - -// 👇 Each story then reuses that template -export const Default = Template.bind({}); -Default.args = { - stats: [ - { - label: 'in:', - totalBytes: 1024, - rateBytesPerSecond: 1024 * 1024 * 1024 + 10, - }, - { - label: 'out:', - totalBytes: 1024 * 1024 * 1024 * 1024 * 20, - rateBytesPerSecond: 1024 * 1024 + 10, - }, - ], -}; diff --git a/nym-connect/mobile/src/stories/ConnectionStatus.stories.tsx b/nym-connect/mobile/src/stories/ConnectionStatus.stories.tsx deleted file mode 100644 index d98e262374..0000000000 --- a/nym-connect/mobile/src/stories/ConnectionStatus.stories.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { DateTime } from 'luxon'; -import { ConnectionStatus } from '../components/ConnectionStatus'; -import { ConnectionStatusKind } from '../types'; - -export default { - title: 'Components/ConnectionStatus', - component: ConnectionStatus, -} as ComponentMeta; - -export const Disconnected: ComponentStory = () => ( - -); - -export const Connecting: ComponentStory = () => ( - -); - -export const Connected: ComponentStory = () => ( - -); - -export const Disconnecting: ComponentStory = () => ( - -); diff --git a/nym-connect/mobile/src/stories/DefaultLayout.stories.tsx b/nym-connect/mobile/src/stories/DefaultLayout.stories.tsx deleted file mode 100644 index 4d1b869a10..0000000000 --- a/nym-connect/mobile/src/stories/DefaultLayout.stories.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import React from 'react'; -import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { Box } from '@mui/material'; -import { Disconnected } from 'src/pages/connection/Disconnected'; -import { ConnectionStatusKind } from '../types'; - -export default { - title: 'Layouts/DefaultLayout', - component: Disconnected, -} as ComponentMeta; - -const onClick = () => undefined; - -export const Default: ComponentStory = () => ( - - {}} - error={undefined} - onConnectClick={onClick} - /> - -); - -export const WithServices: ComponentStory = () => ( - - {}} - error={undefined} - onConnectClick={onClick} - /> - -); diff --git a/nym-connect/mobile/src/stories/Introduction.stories.mdx b/nym-connect/mobile/src/stories/Introduction.stories.mdx deleted file mode 100644 index eb1d51fc24..0000000000 --- a/nym-connect/mobile/src/stories/Introduction.stories.mdx +++ /dev/null @@ -1,7 +0,0 @@ -import { Meta } from '@storybook/addon-docs'; - - - -# nym-connect - -Components for connecting to the Nym mixnet. diff --git a/nym-connect/mobile/src/stories/IpAddressAndPort.stories.tsx b/nym-connect/mobile/src/stories/IpAddressAndPort.stories.tsx deleted file mode 100644 index 943b3a40b4..0000000000 --- a/nym-connect/mobile/src/stories/IpAddressAndPort.stories.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { IpAddressAndPort } from '../components/IpAddressAndPort'; - -export default { - title: 'Components/IpAddressAndPort', - component: IpAddressAndPort, -} as ComponentMeta; - -const Template: ComponentStory = (args) => ; - -// 👇 Each story then reuses that template -export const Default = Template.bind({}); -Default.args = { label: 'Socks5 address', ipAddress: '127.0.0.1', port: 1080 }; diff --git a/nym-connect/mobile/src/stories/PowerButton.stories.tsx b/nym-connect/mobile/src/stories/PowerButton.stories.tsx deleted file mode 100644 index 6cb2896849..0000000000 --- a/nym-connect/mobile/src/stories/PowerButton.stories.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; -import { ComponentMeta, ComponentStory } from '@storybook/react'; -import { PowerButton } from 'src/components/PowerButton/PowerButton'; -import { ConnectionStatusKind } from 'src/types'; - -export default { - title: 'Components/PowerButton', - component: PowerButton, -} as ComponentMeta; - -export const Disconnected: ComponentStory = () => ( - -); - -export const Connecting: ComponentStory = () => ( - -); - -export const Connected: ComponentStory = () => ( - -); - -export const Disconnecting: ComponentStory = () => ( - -); - -export const Disabled: ComponentStory = () => ( - -); diff --git a/nym-connect/mobile/src/theme/index.tsx b/nym-connect/mobile/src/theme/index.tsx deleted file mode 100644 index d307fe46ee..0000000000 --- a/nym-connect/mobile/src/theme/index.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; -import { createTheme, ThemeProvider } from '@mui/material/styles'; -import { CssBaseline } from '@mui/material'; -import { getDesignTokens } from './theme'; -// eslint-disable-next-line import/no-relative-packages -import '../../../../assets/fonts/non-variable/fonts.css'; - -/** - * Provides the theme for Nym Connect by reacting to the light/dark mode choice stored in the app context. - */ -export const NymMixnetTheme: FCWithChildren<{ mode: 'light' | 'dark' }> = ({ children, mode }) => { - const theme = React.useMemo(() => createTheme(getDesignTokens(mode)), [mode]); - return ( - - - {children} - - ); -}; - -export const NymShipyardTheme: FCWithChildren<{ mode?: 'light' | 'dark' }> = ({ children, mode = 'dark' }) => { - const theme = React.useMemo(() => createTheme(getDesignTokens(mode, true)), [mode]); - return ( - - - {children} - - ); -}; diff --git a/nym-connect/mobile/src/theme/mui-theme.d.ts b/nym-connect/mobile/src/theme/mui-theme.d.ts deleted file mode 100644 index 76db4b1a99..0000000000 --- a/nym-connect/mobile/src/theme/mui-theme.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* eslint-disable no-shadow,@typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface */ -import { Theme, ThemeOptions, Palette, PaletteOptions } from '@mui/material/styles'; -import { PaletteMode } from '@mui/material'; - -/** - * If you are unfamiliar with Material UI theming, please read the following first: - * - https://mui.com/customization/theming/ - * - https://mui.com/customization/palette/ - * - https://mui.com/customization/dark-mode/#dark-mode-with-custom-palette - * - * This file adds typings to the theme using Typescript's module augmentation. - * - * Read the following if you are unfamiliar with module augmentation and declaration merging. Then - * look at the recommendations from Material UI docs for implementation: - * - https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation - * - https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-interfaces - * - https://mui.com/customization/palette/#adding-new-colors - * - * - * IMPORTANT: - * - * The type augmentation must match MUI's definitions. So, notice the use of `interface` rather than - * `type Foo = { ... }` - this is necessary to merge the definitions. - */ - -declare module '@mui/material/styles' { - /** - * This interface defines a palette used across Nym for branding - */ - interface NymPalette { - highlight: string; - cta: string; - success: string; - warning: string; - info: string; - fee: string; - background: { light: string; dark: string }; - text: { - light: string; - dark: string; - }; - shipyard: string; - } - - interface NymPaletteVariant { - mode: PaletteMode; - background: { - main: string; - paper: string; - }; - text: { - main: string; - }; - topNav: { - background: string; - }; - shipyard: { - main: string; - }; - } - - /** - * A palette definition only for the Nym Mixnet that extends the Nym palette - */ - interface NymMixnetPalette { - nymMixnet: {}; - } - - interface NymPaletteAndNymMixnetPalette { - nym: NymPalette & NymMixnetPalette; - } - - type NymPaletteAndNymMixnetPaletteOptions = Partial; - - /** - * Add anything not palette related to the theme here - */ - interface NymTheme {} - - /** - * This augments the definitions of the MUI Theme with the Nym theme, as well as - * a partial `ThemeOptions` type used by `createTheme` - * - * IMPORTANT: only add extensions to the interfaces above, do not modify the lines below - */ - interface Theme extends NymTheme {} - interface ThemeOptions extends Partial {} - interface Palette extends NymPaletteAndNymMixnetPalette {} - interface PaletteOptions extends NymPaletteAndNymMixnetPaletteOptions {} -} diff --git a/nym-connect/mobile/src/theme/theme.tsx b/nym-connect/mobile/src/theme/theme.tsx deleted file mode 100644 index 23c8ff8b57..0000000000 --- a/nym-connect/mobile/src/theme/theme.tsx +++ /dev/null @@ -1,284 +0,0 @@ -import { PaletteMode } from '@mui/material'; -import { - createTheme, - NymMixnetPalette, - NymPalette, - NymPaletteVariant, - PaletteOptions, - ThemeOptions, -} from '@mui/material/styles'; - -//----------------------------------------------------------------------------------------------- -// Nym palette type definitions -// - -/** - * The Nym palette. - * - * IMPORTANT: do not export this constant, always use the MUI `useTheme` hook to get the correct - * colours for dark/light mode. - */ -const nymPalette: NymPalette = { - /** emphasises important elements */ - highlight: '#21D072', - cta: '#FB6E4E', - success: '#21D073', - info: '#60D7EF', - warning: '#FFE600', - fee: '#967FF0', - background: { light: '#F4F6F8', dark: '#1D2125' }, - text: { - light: '#F2F2F2', - dark: '#1D2125', - }, - shipyard: '#817FFA', -}; - -const darkMode: NymPaletteVariant = { - mode: 'dark', - background: { - main: '#1D2125', - paper: '#242C3D', - }, - text: { - main: '#F2F2F2', - }, - topNav: { - background: '#111826', - }, - shipyard: { - main: '#817FFA', - }, -}; - -const lightMode: NymPaletteVariant = { - mode: 'light', - background: { - main: '#F2F2F2', - paper: '#FFFFFF', - }, - text: { - main: '#1D2125', - }, - topNav: { - background: '#111826', - }, - shipyard: { - main: '#817FFA', - }, -}; - -/** - * Nym palette specific to the Nym Mixnode - * - * IMPORTANT: do not export this constant, always use the MUI `useTheme` hook to get the correct - * colours for dark/light mode. - */ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const nymMixnetPalette = (variant: NymPaletteVariant): NymMixnetPalette => ({ - nymMixnet: {}, -}); - -//----------------------------------------------------------------------------------------------- -// Nym palettes for light and dark mode -// - -/** - * Map a Nym palette variant onto the MUI palette - */ -const variantToMUIPalette = (variant: NymPaletteVariant): PaletteOptions => ({ - text: { - primary: variant.text.main, - }, - primary: { - main: nymPalette.highlight, - contrastText: '#fff', - }, - secondary: { - main: variant.mode === 'dark' ? nymPalette.background.light : nymPalette.background.dark, - }, - success: { - main: nymPalette.success, - }, - info: { - main: nymPalette.info, - }, - warning: { - main: nymPalette.warning, - }, - background: { - default: variant.background.main, - paper: variant.background.paper, - }, -}); - -/** - * Map a Nym palette variant onto the MUI palette for Shipyard - */ -const variantShipyardToMUIPalette = (variant: NymPaletteVariant): PaletteOptions => ({ - text: { - primary: variant.text.main, - }, - primary: { - main: nymPalette.shipyard, - contrastText: '#fff', - }, - secondary: { - main: variant.mode === 'dark' ? nymPalette.background.light : nymPalette.background.dark, - }, - success: { - main: nymPalette.success, - }, - info: { - main: nymPalette.info, - }, - warning: { - main: nymPalette.warning, - }, - background: { - default: variant.background.main, - paper: variant.background.paper, - }, -}); - -/** - * Returns the Network Explorer palette for light mode. - */ -const createLightModePalette = (): PaletteOptions => ({ - nym: { - ...nymPalette, - ...nymMixnetPalette(lightMode), - }, - ...variantToMUIPalette(lightMode), -}); - -/** - * Returns the Network Explorer palette for dark mode. - */ -const createDarkModePalette = (): PaletteOptions => ({ - nym: { - ...nymPalette, - ...nymMixnetPalette(darkMode), - }, - ...variantToMUIPalette(darkMode), -}); - -/** - * Returns the Shipyard palette for dark mode. - */ -const createShipyardDarkModePalette = (): PaletteOptions => ({ - nym: { - ...nymPalette, - ...nymMixnetPalette(darkMode), - }, - ...variantShipyardToMUIPalette(darkMode), -}); - -/** - * IMPORANT: if you need to get the default MUI theme, use the following - * - * import { createTheme as systemCreateTheme } from '@mui/system'; - * - * // get the MUI system defaults for light mode - * const systemTheme = systemCreateTheme({ palette: { mode: 'light' } }); - * - * - * return { - * // change `primary` to default MUI `success` - * primary: { - * main: systemTheme.palette.success.main, - * }, - * nym: { - * ...nymPalette, - * ...nymMixnetPalette, - * }, - * }; - */ - -//----------------------------------------------------------------------------------------------- -// Nym theme overrides -// - -/** - * Gets the theme options to be passed to `createTheme`. - * - * Based on pattern from https://mui.com/customization/dark-mode/#dark-mode-with-custom-palette. - * - * @param mode The theme mode: 'light' or 'dark' - */ -export const getDesignTokens = (mode: PaletteMode, isShipyard: boolean = false): ThemeOptions => { - let overrides; - if (isShipyard) { - overrides = createShipyardDarkModePalette(); - } else { - overrides = mode === 'light' ? createLightModePalette() : createDarkModePalette(); - } - - // create the palette from user's choice of light or dark mode - const { palette } = createTheme({ - palette: { - mode, - ...overrides, - }, - }); - - // then customise theme and components - return { - palette, - typography: { - fontFamily: [ - 'Open Sans', - 'sans-serif', - 'BlinkMacSystemFont', - 'Roboto', - 'Oxygen', - 'Ubuntu', - 'Helvetica Neue', - ].join(','), - fontSize: 16, - fontWeightRegular: 500, - button: { - textTransform: 'none', - fontWeight: '600', - }, - }, - shape: { - borderRadius: 8, - }, - transitions: { - duration: { - shortest: 150, - shorter: 200, - short: 250, - standard: 300, - complex: 375, - enteringScreen: 225, - leavingScreen: 195, - }, - easing: { - easeIn: 'cubic-bezier(0.4, 0, 1, 1)', - }, - }, - components: { - MuiButton: { - styleOverrides: { - sizeLarge: { - height: 55, - }, - }, - }, - MuiStepIcon: { - styleOverrides: { - root: { - '&.Mui-completed': { - color: nymPalette.success, - }, - '&.Mui-active': { - color: nymPalette.background.dark, - }, - }, - }, - }, - }, - }; -}; diff --git a/nym-connect/mobile/src/types/connection.ts b/nym-connect/mobile/src/types/connection.ts deleted file mode 100644 index 8fb5234477..0000000000 --- a/nym-connect/mobile/src/types/connection.ts +++ /dev/null @@ -1,8 +0,0 @@ -export enum ConnectionStatusKind { - disconnected = 'disconnected', - disconnecting = 'disconnecting', - connected = 'connected', - connecting = 'connecting', -} - -export type GatewayPerformance = 'Good' | 'Poor' | 'VeryPoor'; diff --git a/nym-connect/mobile/src/types/directory.ts b/nym-connect/mobile/src/types/directory.ts deleted file mode 100644 index 55395192a1..0000000000 --- a/nym-connect/mobile/src/types/directory.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface ServiceProvider { - id: string; - description: string; - address: string; - gateway: string; -} - -export interface Service { - id: string; - description: string; - items: ServiceProvider[]; -} - -export type Services = Service[]; diff --git a/nym-connect/mobile/src/types/error.ts b/nym-connect/mobile/src/types/error.ts deleted file mode 100644 index 599b959c39..0000000000 --- a/nym-connect/mobile/src/types/error.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type Error = { - title: string; - message: string; -}; diff --git a/nym-connect/mobile/src/types/event.ts b/nym-connect/mobile/src/types/event.ts deleted file mode 100644 index 66d1e514a6..0000000000 --- a/nym-connect/mobile/src/types/event.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type TauriEvent = { - payload: { - title: string; - message: string; - }; -}; diff --git a/nym-connect/mobile/src/types/gateway.ts b/nym-connect/mobile/src/types/gateway.ts deleted file mode 100644 index 735a3cdb03..0000000000 --- a/nym-connect/mobile/src/types/gateway.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface UserDefinedGateway { - isActive: boolean; - gateway?: string; -} diff --git a/nym-connect/mobile/src/types/index.ts b/nym-connect/mobile/src/types/index.ts deleted file mode 100644 index 6bc150d410..0000000000 --- a/nym-connect/mobile/src/types/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './rust'; -export * from './connection'; diff --git a/nym-connect/mobile/src/types/rust/index.ts b/nym-connect/mobile/src/types/rust/index.ts deleted file mode 100644 index f8efcfe235..0000000000 --- a/nym-connect/mobile/src/types/rust/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './stateparams'; diff --git a/nym-connect/mobile/src/types/rust/stateparams.ts b/nym-connect/mobile/src/types/rust/stateparams.ts deleted file mode 100644 index b7d7032420..0000000000 --- a/nym-connect/mobile/src/types/rust/stateparams.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* eslint-disable camelcase */ -export interface TauriContractStateParams { - minimum_mixnode_pledge: string; - minimum_gateway_pledge: string; - mixnode_rewarded_set_size: number; - mixnode_active_set_size: number; -} diff --git a/nym-connect/mobile/src/types/service-provider.ts b/nym-connect/mobile/src/types/service-provider.ts deleted file mode 100644 index ed370e2755..0000000000 --- a/nym-connect/mobile/src/types/service-provider.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface UserDefinedGateway { - isActive: boolean; - gateway?: string; -} - -export interface UserDefinedSPAddress { - isActive: boolean; - address?: string; -} diff --git a/nym-connect/mobile/src/types/storage.ts b/nym-connect/mobile/src/types/storage.ts deleted file mode 100644 index ca792b65d9..0000000000 --- a/nym-connect/mobile/src/types/storage.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface StorageKeyValue { - key: string; - value: T; -} diff --git a/nym-connect/mobile/src/typings/FC.d.ts b/nym-connect/mobile/src/typings/FC.d.ts deleted file mode 100644 index 08ebdfa298..0000000000 --- a/nym-connect/mobile/src/typings/FC.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare type FCWithChildren

= React.FC>; diff --git a/nym-connect/mobile/src/typings/jpeg.d.ts b/nym-connect/mobile/src/typings/jpeg.d.ts deleted file mode 100644 index af2ed72913..0000000000 --- a/nym-connect/mobile/src/typings/jpeg.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare module '*.jpeg' { - const value: any; - export default value; -} - -declare module '*.jpg' { - const value: any; - export default value; -} diff --git a/nym-connect/mobile/src/typings/json.d.ts b/nym-connect/mobile/src/typings/json.d.ts deleted file mode 100644 index b72dd46ee5..0000000000 --- a/nym-connect/mobile/src/typings/json.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.json' { - const content: any; - export default content; -} diff --git a/nym-connect/mobile/src/typings/png.d.ts b/nym-connect/mobile/src/typings/png.d.ts deleted file mode 100644 index dd84df40a4..0000000000 --- a/nym-connect/mobile/src/typings/png.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.png' { - const content: any; - export default content; -} diff --git a/nym-connect/mobile/src/typings/svg.d.ts b/nym-connect/mobile/src/typings/svg.d.ts deleted file mode 100644 index 091d25e210..0000000000 --- a/nym-connect/mobile/src/typings/svg.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.svg' { - const content: any; - export default content; -} diff --git a/nym-connect/mobile/src/typings/webp.d.ts b/nym-connect/mobile/src/typings/webp.d.ts deleted file mode 100644 index d594a17f53..0000000000 --- a/nym-connect/mobile/src/typings/webp.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.webp' { - const value: any; - export default value; -} diff --git a/nym-connect/mobile/src/typings/yaml.d.ts b/nym-connect/mobile/src/typings/yaml.d.ts deleted file mode 100644 index 4c36d21ec0..0000000000 --- a/nym-connect/mobile/src/typings/yaml.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -declare module '*.yml' { - const content: { [key: string]: any }; - export default content; -} - -declare module '*.yaml' { - const content: { [key: string]: any }; - export default content; -} diff --git a/nym-connect/mobile/src/utils/index.ts b/nym-connect/mobile/src/utils/index.ts deleted file mode 100644 index 04b415c026..0000000000 --- a/nym-connect/mobile/src/utils/index.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { useEffect, useRef } from 'react'; -import { EventName, listen, UnlistenFn, EventCallback } from '@tauri-apps/api/event'; -import { invoke } from '@tauri-apps/api'; -import { forage } from '@tauri-apps/tauri-forage'; -import { StorageKeyValue } from 'src/types/storage'; - -export const useTauriEvents = (event: EventName, handler: EventCallback) => { - const unlisten = useRef(); - - // list for events to clear local storage - useEffect(() => { - listen(event, handler).then((fn) => { - unlisten.current = fn; - }); - - return () => { - if (unlisten.current) { - unlisten.current(); - } - }; - }, []); -}; - -export const toggleLogViewer = async () => { - await invoke('help_log_toggle_window'); -}; - -export async function setItemInStorage({ key, value }: StorageKeyValue) { - try { - await forage.setItem({ - key, - value, - } as any)(); - } catch (e) { - console.warn(e); - } - return undefined; -} - -export const getItemFromStorage = async ({ key }: Pick, 'key'>) => { - try { - const gatewayFromStorage = await forage.getItem({ key })(); - return gatewayFromStorage; - } catch (e) { - console.warn(e); - } - return undefined; -}; diff --git a/nym-connect/mobile/tsconfig.eslint.json b/nym-connect/mobile/tsconfig.eslint.json deleted file mode 100644 index 836be28a14..0000000000 --- a/nym-connect/mobile/tsconfig.eslint.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "jsx": "react-jsx", - "noEmit": true - }, - "include": [ - ".storybook/*.js", - "webpack.*.js", - "src/**/*.js", - "src/**/*.jsx", - "src/**/*.ts", - "src/**/*.tsx", - "src/**/*.stories.*", - ], - "exclude": [ - "node_modules", - "dist" - ] -} diff --git a/nym-connect/mobile/tsconfig.json b/nym-connect/mobile/tsconfig.json deleted file mode 100644 index 585e7203d8..0000000000 --- a/nym-connect/mobile/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "noFallthroughCasesInSwitch": true, - "skipLibCheck": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": false, - "jsx": "react-jsx", - "sourceMap": true, - "baseUrl": ".", - "paths": { - "@assets/*": ["../assets/*"] - } - }, - "exclude": ["node_modules", "dist", "jest.config.js", "webpack.config.js", "webpack.prod.js", "webpack.common.js", "target", "src-tauri"] -} diff --git a/nym-connect/mobile/webpack.common.js b/nym-connect/mobile/webpack.common.js deleted file mode 100644 index c835404dda..0000000000 --- a/nym-connect/mobile/webpack.common.js +++ /dev/null @@ -1,55 +0,0 @@ -const path = require('path'); -const { mergeWithRules } = require('webpack-merge'); -const { webpackCommon } = require('@nymproject/webpack'); - -const entry = { - app: path.resolve(__dirname, 'src/index.tsx'), -}; - -module.exports = mergeWithRules({ - module: { - rules: { - test: 'match', - use: 'replace', - }, - }, -})( - webpackCommon(__dirname, [ - { filename: 'index.html', chunks: ['app'], template: path.resolve(__dirname, 'public/index.html') }, - ]), - { - module: { - rules: [ - { - test: /\.mdx?$/, - use: [ - { - loader: '@mdx-js/loader', - /** @type {import('@mdx-js/loader').Options} */ - options: {}, - }, - ], - }, - { - test: /\.ya?ml$/, - type: 'asset/resource', - use: [ - { - loader: 'yaml-loader', - options: { - asJSON: true, - }, - }, - ], - }, - ], - }, - entry, - output: { - clean: true, - path: path.resolve(__dirname, 'dist'), - filename: '[name].bundle.js', - publicPath: '/', - }, - }, -); diff --git a/nym-connect/mobile/webpack.dev.js b/nym-connect/mobile/webpack.dev.js deleted file mode 100644 index 2358b4de20..0000000000 --- a/nym-connect/mobile/webpack.dev.js +++ /dev/null @@ -1,78 +0,0 @@ -const { mergeWithRules } = require('webpack-merge'); -const webpack = require('webpack'); -const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin'); -const ReactRefreshTypeScript = require('react-refresh-typescript'); -const commonConfig = require('./webpack.common'); - -const config = mergeWithRules({ - module: { - rules: { - test: 'match', - use: 'replace', - }, - }, -})(commonConfig, { - mode: 'development', - devtool: 'inline-source-map', - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/, - options: { - getCustomTransformers: () => ({ - before: [ReactRefreshTypeScript()], - }), - // `ts-loader` does not work with HMR unless `transpileOnly` is used. - // If you need type checking, `ForkTsCheckerWebpackPlugin` is an alternative. - transpileOnly: true, - }, - }, - ], - }, - plugins: [ - new ReactRefreshWebpackPlugin(), - - // this can be included automatically by the dev server, however build mode fails if missing - new webpack.HotModuleReplacementPlugin(), - ], - - // recommended for faster rebuild - optimization: { - runtimeChunk: true, - removeAvailableModules: false, - removeEmptyChunks: false, - splitChunks: false, - }, - - cache: { - type: 'filesystem', - buildDependencies: { - // restart on config change - config: ['./webpack.dev.js'], - }, - }, - - devServer: { - port: 9000, - compress: true, - historyApiFallback: true, - // disable this because on android it makes reloading infinity loop - hot: false, - host: 'local-ipv4', - allowedHosts: 'all', - client: { - overlay: false, - }, - }, -}); - -// Remove WebpackFavicons plugin as it makes FDroid build more -// difficult to configure since webpack-favicons depends on sharp, -// which depends on system library libvips -// As we are building for mobile, this is useless anyway -// TODO do not base deletion on index -config.plugins.splice(2, 1); - -module.exports = config; diff --git a/nym-connect/mobile/webpack.prod.js b/nym-connect/mobile/webpack.prod.js deleted file mode 100644 index df059d4082..0000000000 --- a/nym-connect/mobile/webpack.prod.js +++ /dev/null @@ -1,24 +0,0 @@ -const path = require('path'); -const { default: merge } = require('webpack-merge'); -const common = require('./webpack.common'); - -const entry = { - app: path.resolve(__dirname, 'src/index.tsx'), -}; - -const config = merge(common, { - mode: 'production', - node: { - __dirname: false, - }, - entry, -}); - -// Remove WebpackFavicons plugin as it makes FDroid build more -// difficult to configure since webpack-favicons depends on sharp, -// which depends on system library libvips -// As we are building for mobile, this is useless anyway -// TODO do not base deletion on index -config.plugins.splice(2, 1); - -module.exports = config; diff --git a/nym-wallet/CHANGELOG.md b/nym-wallet/CHANGELOG.md index f0d62aec2d..87928a2574 100644 --- a/nym-wallet/CHANGELOG.md +++ b/nym-wallet/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +## [1.1.27] (2023-08-17) +- release due to schema changes in the contract + + ## [v1.2.6] (2023-07-18) - [wallet] bugfix: don't send funds for pledge decrease simulation ([#3676]) diff --git a/nym-wallet/Cargo.lock b/nym-wallet/Cargo.lock index da53aee71f..72ea6b5683 100644 --- a/nym-wallet/Cargo.lock +++ b/nym-wallet/Cargo.lock @@ -8,6 +8,15 @@ version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -39,9 +48,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", "cipher 0.4.4", @@ -50,12 +59,12 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c" +checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" dependencies = [ "aead", - "aes 0.8.2", + "aes 0.8.3", "cipher 0.4.4", "ctr 0.9.2", "ghash", @@ -75,9 +84,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "86b8f9420f797f2d9e935edf629310eb938a0d839f984e25327f3c7eed22300c" dependencies = [ "memchr", ] @@ -98,37 +107,87 @@ dependencies = [ ] [[package]] -name = "anyhow" -version = "1.0.69" +name = "anstream" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" + +[[package]] +name = "anstyle-parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +dependencies = [ + "anstyle", + "windows-sys 0.48.0", +] + +[[package]] +name = "anyhow" +version = "1.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" [[package]] name = "argon2" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95c2fcf79ad1932ac6269a738109997a83c227c09b75842ae564dc8ede6a861c" +checksum = "b2e554a8638bdc1e4eae9984845306cc95f8a9208ba8d49c3859fd958b46774d" dependencies = [ "base64ct", "blake2 0.10.6", + "cpufeatures", "password-hash", ] [[package]] name = "arrayref" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "async-trait" -version = "0.1.64" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.28", ] [[package]] @@ -138,7 +197,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c3d816ce6f0e2909a96830d6911c2aff044370b1ef92d7f267b43bae5addedd" dependencies = [ "atk-sys", - "bitflags", + "bitflags 1.3.2", "glib", "libc", ] @@ -152,7 +211,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] @@ -188,6 +247,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base16ct" version = "0.1.1" @@ -208,15 +282,15 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] name = "base64ct" -version = "1.0.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bip32" @@ -231,7 +305,7 @@ dependencies = [ "pbkdf2", "rand_core 0.6.4", "ripemd", - "sha2 0.10.6", + "sha2 0.10.7", "subtle 2.4.1", "zeroize", ] @@ -262,6 +336,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + [[package]] name = "bitvec" version = "1.0.1" @@ -312,9 +392,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array 0.14.7", ] @@ -372,14 +452,14 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" dependencies = [ - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] name = "bstr" -version = "1.2.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f0778972c64420fdedc63f09919c8a88bda7b25135357fd25a5d9f3257e832" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", "serde", @@ -387,9 +467,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "byte-tools" @@ -399,9 +479,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" [[package]] name = "byteorder" @@ -424,7 +504,7 @@ version = "0.15.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c76ee391b03d35510d9fa917357c7f1855bd9a6659c95a1b392e33f49b3369bc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-sys-rs", "glib", "libc", @@ -439,7 +519,7 @@ checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8" dependencies = [ "glib-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] @@ -454,11 +534,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -488,11 +569,12 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.11.0" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0357a6402b295ca3a86bc148e84df46c02e41f41fef186bda662557ef6328aa" +checksum = "b40ccee03b5175c18cde8f37e7d2a33bcef6f8ec8f7cc0d81090d1bb380949c9" dependencies = [ "smallvec", + "target-lexicon", ] [[package]] @@ -532,33 +614,41 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.4" +version = "4.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76" +checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd" dependencies = [ - "bitflags", + "clap_builder", "clap_derive", - "clap_lex", - "is-terminal", "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", "strsim", - "termcolor", ] [[package]] name = "clap_complete" -version = "4.1.4" +version = "4.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501ff0a401473ea1d4c3b125ff95506b62c5bc5768d818634195fbb7c4ad5ff4" +checksum = "5fc443334c81a804575546c5a8a79b4913b50e28d69232903604cada1de817ce" dependencies = [ "clap", ] [[package]] name = "clap_complete_fig" -version = "4.1.1" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63a06158a72dbb088f864887b4409fd22600ba379f3cee3040f842234cc5c2d0" +checksum = "99fee1d30a51305a6c2ed3fc5709be3c8af626c9c958e04dd9ae94e27bcbce9f" dependencies = [ "clap", "clap_complete", @@ -566,25 +656,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.1.0" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ "heck 0.4.1", - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.28", ] [[package]] name = "clap_lex" -version = "0.3.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" -dependencies = [ - "os_str_bytes", -] +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" [[package]] name = "cocoa" @@ -592,7 +678,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "cocoa-foundation", "core-foundation", @@ -604,11 +690,11 @@ dependencies = [ [[package]] name = "cocoa-foundation" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" +checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "core-foundation", "core-graphics-types", @@ -624,25 +710,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] -name = "colored" -version = "1.9.3" +name = "colorchoice" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "colored" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f741c91823341bebf717d4c71bda820630ce065443b58bd1b7451af008355" dependencies = [ - "atty", + "is-terminal", "lazy_static", "winapi", ] [[package]] name = "colored" -version = "2.0.0" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ - "atty", + "is-terminal", "lazy_static", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -657,9 +749,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "convert_case" @@ -679,9 +771,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "core-graphics" @@ -689,7 +781,7 @@ version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-graphics-types", "foreign-types", @@ -698,13 +790,12 @@ dependencies = [ [[package]] name = "core-graphics-types" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" +checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", - "foreign-types", "libc", ] @@ -742,9 +833,9 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d076a08ec01ed23c4396aca98ec73a38fa1fee5f310465add52b4108181c7a8" +checksum = "7e272708a9745dad8b591ef8a718571512130f2b39b33e3d7a27c558e3069394" dependencies = [ "digest 0.10.7", "ed25519-zebra", @@ -755,11 +846,11 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec361f3c09d7b41221948fc17be9b3c96cb58e55a02f82da36f888a651f2584" +checksum = "296db6a3caca5283425ae0cf347f4e46999ba3f6620dbea8939a0e00347831ce" dependencies = [ - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -783,7 +874,7 @@ checksum = "2bfa39422f0d9f1c9a6fd3711573258495314dfa3aae738ea825ecd9964bc659" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -802,15 +893,15 @@ dependencies = [ "schemars", "serde", "serde-json-wasm", - "sha2 0.10.6", + "sha2 0.10.7", "thiserror", ] [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -826,9 +917,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ "cfg-if", "crossbeam-utils", @@ -836,9 +927,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -912,17 +1003,17 @@ dependencies = [ "proc-macro2", "quote", "smallvec", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "cssparser-macros" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 1.0.107", + "syn 2.0.28", ] [[package]] @@ -941,7 +1032,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -962,12 +1053,6 @@ dependencies = [ "cipher 0.4.4", ] -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - [[package]] name = "curve25519-dalek" version = "3.2.0" @@ -1030,7 +1115,7 @@ dependencies = [ "cosmwasm-std", "cw2", "schemars", - "semver 1.0.16", + "semver 1.0.18", "serde", "thiserror", ] @@ -1111,7 +1196,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -1122,7 +1207,7 @@ checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -1137,14 +1222,20 @@ dependencies = [ [[package]] name = "der" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", ] +[[package]] +name = "deranged" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" + [[package]] name = "derivative" version = "2.2.0" @@ -1153,7 +1244,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -1165,8 +1256,8 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", - "syn 1.0.107", + "rustc_version", + "syn 1.0.109", ] [[package]] @@ -1193,7 +1284,7 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.3", + "block-buffer 0.10.4", "const-oid", "crypto-common", "subtle 2.4.1", @@ -1269,36 +1360,36 @@ checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" [[package]] name = "dotenvy" -version = "0.15.6" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d8c417d7a8cb362e0c37e5d815f5eb7c37f79ff93707329d5a194e42e54ca0" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dtoa" -version = "0.4.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dtoa-short" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03329ae10e79ede66c9ce4dc930aa8599043b0743008548680f25b91502d6" +checksum = "dbaceec3c6e4211c79e7b1800fb9680527106beb2f9c51904a3210c03a448c74" dependencies = [ "dtoa", ] [[package]] name = "dunce" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "dyn-clone" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60" +checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" [[package]] name = "ecdsa" @@ -1318,7 +1409,7 @@ version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "der 0.7.7", + "der 0.7.8", "digest 0.10.7", "elliptic-curve 0.13.5", "rfc6979 0.4.0", @@ -1337,9 +1428,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb04eee5d9d907f29e80ee6b0e78f7e2c82342c63e3580d8c4f69d9d5aad963" +checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ "pkcs8 0.10.2", "signature 2.1.0", @@ -1379,7 +1470,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", - "hashbrown", + "hashbrown 0.12.3", "hex", "rand_core 0.6.4", "serde", @@ -1389,9 +1480,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" @@ -1458,13 +1549,13 @@ dependencies = [ [[package]] name = "enum-iterator-derive" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "828de45d0ca18782232dfb8f3ea9cc428e8ced380eb26a520baaacfc70de39ce" +checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.28", ] [[package]] @@ -1481,14 +1572,20 @@ dependencies = [ ] [[package]] -name = "errno" -version = "0.2.8" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" dependencies = [ "errno-dragonfly", "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -1513,20 +1610,26 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.8.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + +[[package]] +name = "fdeflate" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" dependencies = [ - "instant", + "simd-adler32", ] [[package]] name = "fern" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd7b0849075e79ee9a1836df22c717d1eba30451796fdc631b04565dd11e2a" +checksum = "d9f0c14694cbd524c8720dd69b0e3179344f04ebb5f90f2e4a440c6ea3b2f1ee" dependencies = [ - "colored 1.9.3", + "colored 1.9.4", "log", ] @@ -1562,31 +1665,31 @@ dependencies = [ [[package]] name = "field-offset" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e1c54951450cbd39f3dbcf1005ac413b49487dabf18a720ad2383eccfeffb92" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" dependencies = [ "memoffset", - "rustc_version 0.3.3", + "rustc_version", ] [[package]] name = "filetime" -version = "0.2.20" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys 0.45.0", + "redox_syscall 0.3.5", + "windows-sys 0.48.0", ] [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", "miniz_oxide", @@ -1625,9 +1728,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -1656,9 +1759,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -1671,9 +1774,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -1681,15 +1784,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -1698,38 +1801,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.28", ] [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -1758,7 +1861,7 @@ version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6e05c1f572ab0e1f15be94217f0dc29088c248b14f792a5ff0af0d84bcda9e8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "gdk-pixbuf", "gdk-sys", @@ -1774,7 +1877,7 @@ version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad38dd9cc8b099cceecdf41375bb6d481b1b5a7cd5cd603e10a69a9383f8619a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gdk-pixbuf-sys", "gio", "glib", @@ -1791,7 +1894,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] @@ -1808,7 +1911,7 @@ dependencies = [ "libc", "pango-sys", "pkg-config", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] @@ -1820,21 +1923,21 @@ dependencies = [ "gdk-sys", "glib-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", "x11", ] [[package]] name = "generator" -version = "0.7.2" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266041a359dfa931b370ef684cceb84b166beb14f7f0421f4a6a3d0c446d12e" +checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" dependencies = [ "cc", "libc", "log", "rustversion", - "windows 0.39.0", + "windows 0.48.0", ] [[package]] @@ -1892,7 +1995,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -1905,13 +2008,19 @@ dependencies = [ "polyval", ] +[[package]] +name = "gimli" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" + [[package]] name = "gio" version = "0.15.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68fdbc90312d462781a395f7a16d96a2b379bb6ef8cd6310a2df272771c4283b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-channel", "futures-core", "futures-io", @@ -1931,7 +2040,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", "winapi", ] @@ -1941,7 +2050,7 @@ version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0155506aab710a86160ddb504a480d2964d7ab5b9e62419be69e0032bc5931c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "libgit2-sys", "log", @@ -1954,7 +2063,7 @@ version = "0.15.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb0306fbad0ab5428b0ca674a23893db909a98582969c9b537be4ced78c505d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "futures-channel", "futures-core", "futures-executor", @@ -1970,9 +2079,9 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.15.11" +version = "0.15.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a68131a662b04931e71891fb14aaf65ee4b44d08e8abc10f49e77418c86c64" +checksum = "10c6ae9f6fa26f4fb2ac16b528d138d971ead56141de489f8111e259b9df3c4a" dependencies = [ "anyhow", "heck 0.4.1", @@ -1980,7 +2089,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -1990,7 +2099,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4" dependencies = [ "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] @@ -2001,9 +2110,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ "aho-corasick", "bstr", @@ -2020,7 +2129,7 @@ checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a" dependencies = [ "glib-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] @@ -2064,7 +2173,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92e3004a2d5d6d8b5057d2b57b3712c9529b62e82c77f25c1fecde1fd5c23bd0" dependencies = [ "atk", - "bitflags", + "bitflags 1.3.2", "cairo-rs", "field-offset", "futures-channel", @@ -2095,28 +2204,28 @@ dependencies = [ "gobject-sys", "libc", "pango-sys", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] name = "gtk3-macros" -version = "0.15.4" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f518afe90c23fba585b2d7697856f9e6a7bbc62f65588035e66f6afb01a2e9" +checksum = "684c0456c086e8e7e9af73ec5b84e35938df394712054550e81558d21c44ab0d" dependencies = [ "anyhow", "proc-macro-crate", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "h2" -version = "0.3.15" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -2124,7 +2233,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -2154,6 +2263,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "headers" version = "0.3.8" @@ -2161,7 +2276,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ "base64 0.13.1", - "bitflags", + "bitflags 1.3.2", "bytes", "headers-core", "http", @@ -2205,18 +2320,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -2270,18 +2376,18 @@ dependencies = [ "markup5ever", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", - "itoa 1.0.5", + "itoa 1.0.9", ] [[package]] @@ -2309,9 +2415,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -2340,9 +2446,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.24" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -2353,9 +2459,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.5", + "itoa 1.0.9", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -2430,11 +2536,10 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] @@ -2458,9 +2563,9 @@ dependencies = [ [[package]] name = "image" -version = "0.24.5" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b7ea949b537b0fd0af141fff8c77690f2ce96f4f41f042ccb6c69c6c965945" +checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" dependencies = [ "bytemuck", "byteorder", @@ -2477,15 +2582,25 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + [[package]] name = "infer" version = "0.7.0" @@ -2513,32 +2628,21 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "io-lifetimes" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" -dependencies = [ - "libc", - "windows-sys 0.45.0", -] - [[package]] name = "ipnet" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.3" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", + "hermit-abi 0.3.2", "rustix", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -2558,9 +2662,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "javascriptcore-rs" @@ -2568,7 +2672,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf053e7843f2812ff03ef5afe34bb9c06ffee120385caad4f6b9967fcd37d41c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "glib", "javascriptcore-rs-sys", ] @@ -2607,18 +2711,18 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -2643,7 +2747,7 @@ dependencies = [ "cfg-if", "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] @@ -2656,7 +2760,7 @@ dependencies = [ "ecdsa 0.16.8", "elliptic-curve 0.13.5", "once_cell", - "sha2 0.10.6", + "sha2 0.10.7", "signature 2.1.0", ] @@ -2686,9 +2790,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.146" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libgit2-sys" @@ -2710,9 +2814,9 @@ checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "libz-sys" -version = "1.1.8" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ "cc", "libc", @@ -2731,9 +2835,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.1.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" [[package]] name = "lioness" @@ -2749,9 +2853,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -2759,11 +2863,10 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ - "cfg-if", "serde", ] @@ -2817,7 +2920,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] @@ -2834,18 +2937,18 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" -version = "0.6.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minisign-verify" @@ -2855,23 +2958,23 @@ checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", + "simd-adler32", ] [[package]] name = "mio" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -2898,7 +3001,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" dependencies = [ - "bitflags", + "bitflags 1.3.2", "jni-sys", "ndk-sys", "num_enum", @@ -2932,15 +3035,6 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" -[[package]] -name = "nom8" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" -dependencies = [ - "memchr", -] - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -2959,7 +3053,7 @@ checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -2985,9 +3079,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", "libm", @@ -2995,33 +3089,33 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] [[package]] name = "num_enum" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d829733185c1ca374f17e52b762f24f535ec625d2cc1f070e34c8a9068f341b" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2be1598bf1c313dcdd12092e3f1920f463462525a21b7b4e11b4168353d0123e" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -3122,7 +3216,7 @@ dependencies = [ "log", "nym-network-defaults", "serde", - "toml 0.7.4", + "toml 0.7.6", "url", ] @@ -3240,6 +3334,7 @@ dependencies = [ "dotenvy", "hex-literal", "once_cell", + "schemars", "serde", "thiserror", "url", @@ -3318,9 +3413,12 @@ dependencies = [ "async-trait", "base64 0.13.1", "bip39", - "colored 2.0.0", + "colored 2.0.4", "cosmrs", "cosmwasm-std", + "cw-controllers", + "cw-utils", + "cw2", "cw3", "cw4", "eyre", @@ -3351,6 +3449,7 @@ dependencies = [ "thiserror", "tokio", "url", + "wasmtimer", "zeroize", ] @@ -3402,13 +3501,13 @@ dependencies = [ [[package]] name = "nym_wallet" -version = "1.2.6" +version = "1.2.7" dependencies = [ "async-trait", "base64 0.13.1", "bip39", "cfg-if", - "colored 2.0.0", + "colored 2.0.4", "cosmrs", "cosmwasm-std", "dirs 4.0.0", @@ -3491,10 +3590,19 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.17.0" +name = "object" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -3520,11 +3628,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.45" +version = "0.10.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" +checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "foreign-types", "libc", @@ -3535,13 +3643,13 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.28", ] [[package]] @@ -3552,20 +3660,19 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.26.0+1.1.1u" +version = "111.27.0+1.1.1v" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efc62c9f12b22b8f5208c23a7200a442b2e5999f8bdf80233852122b5a4f6f37" +checksum = "06e8f197c82d7511c5b014030c9b1efeda40d7d5f99d23b4ceed3524a5e63f02" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.80" +version = "0.9.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" +checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" dependencies = [ - "autocfg", "cc", "libc", "openssl-src", @@ -3579,12 +3686,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "os_str_bytes" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" - [[package]] name = "overload" version = "0.1.1" @@ -3606,7 +3707,7 @@ version = "0.15.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22e4045548659aee5313bde6c582b0d83a627b7904dd20dc2d9ef0895d414e4f" dependencies = [ - "bitflags", + "bitflags 1.3.2", "glib", "libc", "once_cell", @@ -3622,7 +3723,7 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] @@ -3637,15 +3738,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.3.5", "smallvec", - "windows-sys 0.45.0", + "windows-targets", ] [[package]] @@ -3661,9 +3762,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pathdiff" @@ -3721,15 +3822,15 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.5.5" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028accff104c4e513bad663bbcd2ad7cfd5304144404c31ed0a77ac103d00660" +checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" dependencies = [ "thiserror", "ucd-trie", @@ -3737,9 +3838,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.5.5" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ac3922aac69a40733080f53c1ce7f91dcf57e1a5f6c52f421fadec7fbdc4b69" +checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853" dependencies = [ "pest", "pest_generator", @@ -3747,26 +3848,26 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.5.5" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06646e185566b5961b4058dd107e0a7f56e77c3f484549fb119867773c0f202" +checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.28", ] [[package]] name = "pest_meta" -version = "2.5.5" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f60b2ba541577e2a0c307c8f39d1439108120eb7903adeb6497fa880c59616" +checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" dependencies = [ "once_cell", "pest", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] @@ -3832,7 +3933,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -3846,7 +3947,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -3869,29 +3970,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.28", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" [[package]] name = "pin-utils" @@ -3915,24 +4016,24 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.7", + "der 0.7.8", "spki 0.7.2", ] [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plist" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5329b8f106a176ab0dce4aae5da86bfcb139bb74fb00882859e03745011f3635" +checksum = "bdc0001cfea3db57a2e24bc0d818e9e20e554b5f97fabb9bc231dc240269ae06" dependencies = [ - "base64 0.13.1", - "indexmap", + "base64 0.21.2", + "indexmap 1.9.3", "line-wrap", "quick-xml", "serde", @@ -3941,21 +4042,22 @@ dependencies = [ [[package]] name = "png" -version = "0.17.7" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" +checksum = "59871cc5b6cce7eaccca5a802b4173377a1c2ba90654246789a8fa2334426d11" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crc32fast", + "fdeflate", "flate2", "miniz_oxide", ] [[package]] name = "polyval" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" dependencies = [ "cfg-if", "cpufeatures", @@ -3987,12 +4089,12 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit 0.18.1", + "toml_edit", ] [[package]] @@ -4004,7 +4106,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", "version_check", ] @@ -4027,9 +4129,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -4054,7 +4156,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -4080,18 +4182,18 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quick-xml" -version = "0.26.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd" +checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.26" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] @@ -4195,12 +4297,9 @@ dependencies = [ [[package]] name = "raw-window-handle" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" -dependencies = [ - "cty", -] +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "redox_syscall" @@ -4208,7 +4307,16 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", ] [[package]] @@ -4218,19 +4326,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom 0.2.10", - "redox_syscall", + "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.7.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-automata 0.3.6", + "regex-syntax 0.7.4", ] [[package]] @@ -4239,31 +4348,39 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "regex-syntax", + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.7.4", ] [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "regex-syntax" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "reqwest" -version = "0.11.14" +version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" +checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ - "base64 0.21.0", + "base64 0.21.2", "bytes", "encoding_rs", "futures-core", @@ -4364,13 +4481,10 @@ dependencies = [ ] [[package]] -name = "rustc_version" -version = "0.3.3" +name = "rustc-demangle" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc_version" @@ -4378,21 +4492,20 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.16", + "semver 1.0.18", ] [[package]] name = "rustix" -version = "0.36.8" +version = "0.38.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" +checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" dependencies = [ - "bitflags", + "bitflags 2.4.0", "errno", - "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -4422,15 +4535,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safemem" @@ -4449,21 +4562,21 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "schemars" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" +checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" dependencies = [ "dyn-clone", - "indexmap", + "indexmap 1.9.3", "schemars_derive", "serde", "serde_json", @@ -4471,14 +4584,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" +checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -4489,9 +4602,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -4524,7 +4637,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct 0.2.0", - "der 0.7.7", + "der 0.7.8", "generic-array 0.14.7", "pkcs8 0.10.2", "subtle 2.4.1", @@ -4533,11 +4646,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.8.2" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -4546,9 +4659,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.8.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -4560,7 +4673,7 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cssparser", "derive_more", "fxhash", @@ -4585,9 +4698,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" dependencies = [ "serde", ] @@ -4603,9 +4716,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.160" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" +checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" dependencies = [ "serde_derive", ] @@ -4621,22 +4734,22 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.160" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" +checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.28", ] [[package]] @@ -4647,36 +4760,36 @@ checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "serde_json" -version = "1.0.93" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" dependencies = [ - "itoa 1.0.5", + "itoa 1.0.9", "ryu", "serde", ] [[package]] name = "serde_repr" -version = "0.1.10" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a5ec9fa74a20ebbe5d9ac23dac1fc96ba0ecfe9f50f2843b52e537b10fbcb4e" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.28", ] [[package]] name = "serde_spanned" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ "serde", ] @@ -4688,7 +4801,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.5", + "itoa 1.0.9", "ryu", "serde", ] @@ -4712,7 +4825,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -4734,7 +4847,7 @@ checksum = "74064874e9f6a15f04c1f3cb627902d0e6b410abbf36668afa873c61889f1763" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -4773,9 +4886,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", @@ -4820,6 +4933,12 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "siphasher" version = "0.3.10" @@ -4828,36 +4947,46 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "slab" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", ] +[[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "soup2" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2b4d76501d8ba387cf0fefbe055c3e0a59891d09f0f995ae4e4b16f6b60f3c0" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gio", "glib", "libc", @@ -4871,7 +5000,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "009ef427103fcb17f802871647a7fa6c60cbb654b4c4e4c0ac60a31c5f6dc9cf" dependencies = [ - "bitflags", + "bitflags 1.3.2", "gio-sys", "glib-sys", "gobject-sys", @@ -4926,7 +5055,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.7", + "der 0.7.8", ] [[package]] @@ -4946,9 +5075,9 @@ dependencies = [ [[package]] name = "string_cache" -version = "0.8.4" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213494b7a2b503146286049378ce02b482200519accc31872ee8be91fa820a08" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", @@ -4995,7 +5124,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -5027,9 +5156,9 @@ checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", @@ -5038,27 +5167,15 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.15" +version = "2.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.107", - "unicode-xid", -] - [[package]] name = "system-deps" version = "5.0.0" @@ -5074,14 +5191,14 @@ dependencies = [ [[package]] name = "system-deps" -version = "6.0.3" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2955b1fe31e1fa2fbd1976b71cc69a606d7d4da16f6de3333d0c92d51419aeff" +checksum = "30c2de8a4d8f4b823d634affc9cd2a74ec98c53a756f317e529a48046cbf71f3" dependencies = [ - "cfg-expr 0.11.0", + "cfg-expr 0.15.4", "heck 0.4.1", "pkg-config", - "toml 0.5.11", + "toml 0.7.6", "version-compare 0.1.1", ] @@ -5091,7 +5208,7 @@ version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac8e6399427c8494f9849b58694754d7cc741293348a6836b6c8d2c5aa82d8e6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "cc", "cocoa", @@ -5125,7 +5242,7 @@ dependencies = [ "scopeguard", "serde", "unicode-segmentation", - "uuid 1.3.0", + "uuid 1.4.1", "windows 0.39.0", "windows-implement", "x11-dl", @@ -5139,15 +5256,21 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" dependencies = [ "filetime", "libc", "xattr", ] +[[package]] +name = "target-lexicon" +version = "0.12.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" + [[package]] name = "tauri" version = "1.2.3" @@ -5178,7 +5301,7 @@ dependencies = [ "raw-window-handle", "regex", "rfd", - "semver 1.0.16", + "semver 1.0.18", "serde", "serde_json", "serde_repr", @@ -5194,7 +5317,7 @@ dependencies = [ "time", "tokio", "url", - "uuid 1.3.0", + "uuid 1.4.1", "webkit2gtk", "webview2-com", "windows 0.39.0", @@ -5211,7 +5334,7 @@ dependencies = [ "cargo_toml", "heck 0.4.1", "json-patch", - "semver 1.0.16", + "semver 1.0.18", "serde_json", "tauri-utils", "winres", @@ -5232,14 +5355,14 @@ dependencies = [ "proc-macro2", "quote", "regex", - "semver 1.0.16", + "semver 1.0.18", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.7", "tauri-utils", "thiserror", "time", - "uuid 1.3.0", + "uuid 1.4.1", "walkdir", ] @@ -5252,7 +5375,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", "tauri-codegen", "tauri-utils", ] @@ -5272,7 +5395,7 @@ dependencies = [ "serde_json", "tauri-utils", "thiserror", - "uuid 1.3.0", + "uuid 1.4.1", "webview2-com", "windows 0.39.0", ] @@ -5290,7 +5413,7 @@ dependencies = [ "raw-window-handle", "tauri-runtime", "tauri-utils", - "uuid 1.3.0", + "uuid 1.4.1", "webkit2gtk", "webview2-com", "windows 0.39.0", @@ -5315,7 +5438,7 @@ dependencies = [ "phf 0.10.1", "proc-macro2", "quote", - "semver 1.0.16", + "semver 1.0.18", "serde", "serde_json", "serde_with", @@ -5327,16 +5450,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.3.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" dependencies = [ "cfg-if", "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "redox_syscall 0.3.5", + "rustix", + "windows-sys 0.48.0", ] [[package]] @@ -5347,7 +5469,7 @@ checksum = "3f0a7d05cf78524782337f8edd55cbc578d159a16ad4affe2135c92f7dbac7f0" dependencies = [ "bytes", "digest 0.10.7", - "ed25519 2.2.1", + "ed25519 2.2.2", "ed25519-consensus", "flex-error", "futures", @@ -5361,7 +5483,7 @@ dependencies = [ "serde_bytes", "serde_json", "serde_repr", - "sha2 0.10.6", + "sha2 0.10.7", "signature 2.1.0", "subtle 2.4.1", "subtle-encoding", @@ -5419,7 +5541,7 @@ dependencies = [ "hyper-rustls", "peg", "pin-project", - "semver 1.0.16", + "semver 1.0.18", "serde", "serde_bytes", "serde_json", @@ -5465,22 +5587,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.28", ] [[package]] @@ -5495,11 +5617,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.17" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" dependencies = [ - "itoa 1.0.5", + "deranged", + "itoa 1.0.9", "libc", "num_threads", "serde", @@ -5509,15 +5632,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.6" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" dependencies = [ "time-core", ] @@ -5539,33 +5662,32 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.25.0" +version = "1.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +checksum = "40de3a2ba249dcb097e01be5e67a5ff53cf250397715a071a81543e8a832a920" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.3", "tokio-macros", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.28", ] [[package]] @@ -5591,9 +5713,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -5614,52 +5736,35 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" dependencies = [ "serde", "serde_spanned", - "toml_datetime 0.6.2", - "toml_edit 0.19.10", + "toml_datetime", + "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.5.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" - -[[package]] -name = "toml_datetime" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.18.1" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap", - "nom8", - "toml_datetime 0.5.1", -] - -[[package]] -name = "toml_edit" -version = "0.19.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" -dependencies = [ - "indexmap", + "indexmap 2.0.0", "serde", "serde_spanned", - "toml_datetime 0.6.2", + "toml_datetime", "winnow", ] @@ -5683,20 +5788,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.28", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", "valuable", @@ -5715,9 +5820,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ "matchers", "nu-ansi-term", @@ -5765,7 +5870,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", "termcolor", ] @@ -5777,21 +5882,21 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "unicode-bidi" -version = "0.3.10" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -5808,17 +5913,11 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - [[package]] name = "universal-hash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3160b73c9a19f7e2939a2fdad446c57c1bbbbf4d919d3213ff1267a580d8b5" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", "subtle 2.4.1", @@ -5832,9 +5931,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22fe195a4f217c25b25cb5058ced57059824a678474874038dc88d211bf508d3" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna", @@ -5848,6 +5947,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" version = "0.8.2" @@ -5856,9 +5961,9 @@ checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" [[package]] name = "uuid" -version = "1.3.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ "getrandom 0.2.10", ] @@ -5886,7 +5991,7 @@ dependencies = [ "enum-iterator", "getset", "git2", - "rustc_version 0.4.0", + "rustc_version", "rustversion", "thiserror", "time", @@ -5912,22 +6017,20 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -5945,9 +6048,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -5955,24 +6058,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.28", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.33" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -5982,9 +6085,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5992,28 +6095,42 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.28", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "wasmtimer" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f656cd8858a5164932d8a90f936700860976ec21eb00e0fe2aa8cab13f6b4cf" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "slab", + "wasm-bindgen", +] [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -6025,7 +6142,7 @@ version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8f859735e4a452aeb28c6c56a852967a8a76c8eb1cc32dbf931ad28a13d6370" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cairo-rs", "gdk", "gdk-sys", @@ -6050,7 +6167,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d76ca6ecc47aeba01ec61e480139dda143796abcae6f83bcddf50d6b5b1dcf3" dependencies = [ "atk-sys", - "bitflags", + "bitflags 1.3.2", "cairo-sys-rs", "gdk-pixbuf-sys", "gdk-sys", @@ -6063,7 +6180,7 @@ dependencies = [ "pango-sys", "pkg-config", "soup2-sys", - "system-deps 6.0.3", + "system-deps 6.1.1", ] [[package]] @@ -6105,7 +6222,7 @@ checksum = "eaebe196c01691db62e9e4ca52c5ef1e4fd837dcae27dae3ada599b5a8fd05ac" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -6181,6 +6298,15 @@ dependencies = [ "windows_x86_64_msvc 0.39.0", ] +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-bindgen" version = "0.39.0" @@ -6197,7 +6323,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba01f98f509cb5dc05f4e5fc95e535f78260f15fea8fe1a8abdd08f774f1cee7" dependencies = [ - "syn 1.0.107", + "syn 1.0.109", "windows-tokens", ] @@ -6213,22 +6339,13 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm 0.42.1", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.1", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -6237,29 +6354,14 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.1", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", -] - -[[package]] -name = "windows-targets" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm 0.48.0", "windows_aarch64_msvc 0.48.0", @@ -6278,9 +6380,9 @@ checksum = "f838de2fe15fe6bac988e74b798f26499a8b21a9d97edec321e79b28d1d7f597" [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" @@ -6302,9 +6404,9 @@ checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" @@ -6326,9 +6428,9 @@ checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" @@ -6350,9 +6452,9 @@ checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" @@ -6374,9 +6476,9 @@ checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" @@ -6386,9 +6488,9 @@ checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" @@ -6410,9 +6512,9 @@ checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" @@ -6422,9 +6524,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "5504cc7644f4b593cbc05c4a55bf9bd4e94b867c3c0bd440934174d50482427d" dependencies = [ "memchr", ] @@ -6473,7 +6575,7 @@ dependencies = [ "once_cell", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.7", "soup2", "tao", "thiserror", @@ -6528,9 +6630,9 @@ dependencies = [ [[package]] name = "xattr" -version = "0.2.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", ] @@ -6547,21 +6649,20 @@ dependencies = [ [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", - "synstructure", + "syn 2.0.28", ] [[package]] name = "zip" -version = "0.6.4" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0445d0fbc924bb93539b4316c11afb121ea39296f99a3c4c9edad09e3658cdef" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ "byteorder", "crc32fast", diff --git a/nym-wallet/nym-wallet-types/src/network/qa.rs b/nym-wallet/nym-wallet-types/src/network/qa.rs index d333d71067..1c1ca33ae8 100644 --- a/nym-wallet/nym-wallet-types/src/network/qa.rs +++ b/nym-wallet/nym-wallet-types/src/network/qa.rs @@ -3,6 +3,8 @@ use nym_network_defaults::{ChainDetails, DenomDetails, NymContracts, ValidatorDe // -- Chain details -- +pub(crate) const NETWORK_NAME: &str = "qa"; + pub(crate) const BECH32_PREFIX: &str = "n"; pub(crate) const MIX_DENOM: DenomDetails = DenomDetails::new("unym", "nym", 6); pub(crate) const STAKE_DENOM: DenomDetails = DenomDetails::new("unyx", "nyx", 6); @@ -37,6 +39,7 @@ pub(crate) fn validators() -> Vec { pub(crate) fn network_details() -> nym_network_defaults::NymNetworkDetails { nym_network_defaults::NymNetworkDetails { + network_name: NETWORK_NAME.into(), chain_details: ChainDetails { bech32_account_prefix: BECH32_PREFIX.to_string(), mix_denom: MIX_DENOM.into(), diff --git a/nym-wallet/nym-wallet-types/src/network/sandbox.rs b/nym-wallet/nym-wallet-types/src/network/sandbox.rs index aefbcc73b3..4c241248c7 100644 --- a/nym-wallet/nym-wallet-types/src/network/sandbox.rs +++ b/nym-wallet/nym-wallet-types/src/network/sandbox.rs @@ -3,31 +3,39 @@ use nym_network_defaults::{ChainDetails, DenomDetails, NymContracts, ValidatorDe // -- Chain details -- -pub(crate) const BECH32_PREFIX: &str = "nymt"; -pub(crate) const MIX_DENOM: DenomDetails = DenomDetails::new("unymt", "nymt", 6); -pub(crate) const STAKE_DENOM: DenomDetails = DenomDetails::new("unyxt", "nyxt", 6); +pub(crate) const NETWORK_NAME: &str = "sandbox"; + +pub(crate) const BECH32_PREFIX: &str = "n"; +pub(crate) const MIX_DENOM: DenomDetails = DenomDetails::new("unym", "nym", 6); +pub(crate) const STAKE_DENOM: DenomDetails = DenomDetails::new("unyx", "nyx", 6); // -- Contract addresses -- -pub(crate) const MIXNET_CONTRACT_ADDRESS: &str = "nymt1ghd753shjuwexxywmgs4xz7x2q732vcnstz02j"; -pub(crate) const VESTING_CONTRACT_ADDRESS: &str = "nymt14ejqjyq8um4p3xfqj74yld5waqljf88fn549lh"; +pub(crate) const MIXNET_CONTRACT_ADDRESS: &str = + "n1xr3rq8yvd7qplsw5yx90ftsr2zdhg4e9z60h5duusgxpv72hud3sjkxkav"; +pub(crate) const VESTING_CONTRACT_ADDRESS: &str = + "n1unyuj8qnmygvzuex3dwmg9yzt9alhvyeat0uu0jedg2wj33efl5qackslz"; pub(crate) const COCONUT_BANDWIDTH_CONTRACT_ADDRESS: &str = - "nymt1nz0r0au8aj6dc00wmm3ufy4g4k86rjzlgq608r"; -pub(crate) const GROUP_CONTRACT_ADDRESS: &str = "nymt1k8re7jwz6rnnwrktnejdwkwnncte7ek7kk6fvg"; -pub(crate) const MULTISIG_CONTRACT_ADDRESS: &str = "nymt1k8re7jwz6rnnwrktnejdwkwnncte7ek7kk6fvg"; -pub(crate) const COCONUT_DKG_CONTRACT_ADDRESS: &str = "nymt1k8re7jwz6rnnwrktnejdwkwnncte7ek7kk6fvg"; + "n16a32stm6kknhq5cc8rx77elr66pygf2hfszw7wvpq746x3uffylqkjar4l"; +pub(crate) const GROUP_CONTRACT_ADDRESS: &str = + "n1pd7kfgvr5tpcv0xnlv46c4jsq9jg2r799xxrcwqdm4l2jhq2pjwqrmz5ju"; +pub(crate) const MULTISIG_CONTRACT_ADDRESS: &str = + "n14ph4e660eyqz0j36zlkaey4zgzexm5twkmjlqaequxr2cjm9eprqsmad6k"; +pub(crate) const COCONUT_DKG_CONTRACT_ADDRESS: &str = + "n1ahg0erc2fs6xx3j5m8sfx3ryuzdjh6kf6qm9plsf865fltekyrfsesac6a"; // -- Constructor functions -- pub(crate) fn validators() -> Vec { vec![ValidatorDetails::new( - "https://sandbox-validator.nymtech.net", - Some("https://sandbox-validator.nymtech.net/api"), + "https://sandbox-validator1.nymtech.net", + Some("https://sandbox-nym-api1.nymtech.net/api"), )] } pub(crate) fn network_details() -> nym_network_defaults::NymNetworkDetails { nym_network_defaults::NymNetworkDetails { + network_name: NETWORK_NAME.into(), chain_details: ChainDetails { bech32_account_prefix: BECH32_PREFIX.to_string(), mix_denom: MIX_DENOM.into(), diff --git a/nym-wallet/package.json b/nym-wallet/package.json index e93b887fcf..e91c500678 100644 --- a/nym-wallet/package.json +++ b/nym-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@nymproject/nym-wallet-app", - "version": "1.2.6", + "version": "1.2.7", "main": "index.js", "license": "MIT", "scripts": { diff --git a/nym-wallet/src-tauri/Cargo.toml b/nym-wallet/src-tauri/Cargo.toml index 8c96f181f1..2297a1ac90 100644 --- a/nym-wallet/src-tauri/Cargo.toml +++ b/nym-wallet/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym_wallet" -version = "1.2.6" +version = "1.2.7" description = "Nym Native Wallet" authors = ["Nym Technologies SA"] license = "" @@ -32,7 +32,7 @@ itertools = "0.10" log = { version = "0.4", features = ["serde"] } once_cell = "1.7.2" pretty_env_logger = "0.4" -reqwest = {version = "0.11.9", features = ["json"] } +reqwest = {version = "0.11.18", features = ["json"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" serde_repr = "0.1" @@ -51,9 +51,7 @@ zeroize = { version = "1.5", features = ["zeroize_derive", "serde"] } cosmwasm-std = "1.3.0" cosmrs = "=0.14.0" -nym-validator-client = { path = "../../common/client-libs/validator-client", features = [ - "signing", "http-client" -] } +nym-validator-client = { path = "../../common/client-libs/validator-client" } nym-crypto = { path = "../../common/crypto", features = ["asymmetric"] } nym-contracts-common = { path = "../../common/cosmwasm-smart-contracts/contracts-common" } nym-mixnet-contract-common = { path = "../../common/cosmwasm-smart-contracts/mixnet-contract" } diff --git a/nym-wallet/src-tauri/src/error.rs b/nym-wallet/src-tauri/src/error.rs index 3d9374c22a..7f542d257c 100644 --- a/nym-wallet/src-tauri/src/error.rs +++ b/nym-wallet/src-tauri/src/error.rs @@ -196,11 +196,6 @@ impl From for BackendError { impl From for BackendError { fn from(e: ValidatorClientError) -> Self { - match e { - ValidatorClientError::NymAPIError { source } => source.into(), - ValidatorClientError::MalformedUrlProvided(e) => e.into(), - ValidatorClientError::NyxdError(e) => e.into(), - ValidatorClientError::NoAPIUrlAvailable => TypesError::NoNymApiUrlConfigured.into(), - } + TypesError::from(e).into() } } diff --git a/nym-wallet/src-tauri/src/operations/helpers.rs b/nym-wallet/src-tauri/src/operations/helpers.rs index 57fcb5d1bb..35dacbb190 100644 --- a/nym-wallet/src-tauri/src/operations/helpers.rs +++ b/nym-wallet/src-tauri/src/operations/helpers.rs @@ -12,10 +12,10 @@ use nym_mixnet_contract_common::{ construct_mixnode_bonding_sign_payload, Gateway, GatewayBondingPayload, MixNode, MixNodeCostParams, SignableGatewayBondingMsg, SignableMixNodeBondingMsg, }; +use nym_validator_client::nyxd::contract_traits::{MixnetQueryClient, NymContractsProvider}; use nym_validator_client::nyxd::error::NyxdError; -use nym_validator_client::nyxd::traits::MixnetQueryClient; -use nym_validator_client::nyxd::{Coin, DirectSigningNyxdClient}; -use nym_validator_client::Client; +use nym_validator_client::nyxd::Coin; +use nym_validator_client::DirectSigningHttpRpcValidatorClient; // define this as a separate trait for mocking purposes #[async_trait] @@ -26,15 +26,20 @@ pub(crate) trait AddressAndNonceProvider { } #[async_trait] -impl AddressAndNonceProvider for Client { +impl AddressAndNonceProvider for DirectSigningHttpRpcValidatorClient { async fn get_signing_nonce(&self) -> Result { - self.nyxd.get_signing_nonce(self.nyxd.address()).await + self.nyxd.get_signing_nonce(&self.nyxd.address()).await } fn vesting_contract_address(&self) -> Addr { // the call to unchecked is fine here as we're converting directly from `AccountId` // which must have been a valid bech32 address - Addr::unchecked(self.nyxd.vesting_contract_address().as_ref()) + Addr::unchecked( + self.nyxd + .vesting_contract_address() + .expect("unknown vesting contract address") + .as_ref(), + ) } fn cw_address(&self) -> Addr { diff --git a/nym-wallet/src-tauri/src/operations/mixnet/account.rs b/nym-wallet/src-tauri/src/operations/mixnet/account.rs index 07f939ce95..4060b1e810 100644 --- a/nym-wallet/src-tauri/src/operations/mixnet/account.rs +++ b/nym-wallet/src-tauri/src/operations/mixnet/account.rs @@ -9,9 +9,10 @@ use cosmrs::bip32::DerivationPath; use itertools::Itertools; use nym_config::defaults::{NymNetworkDetails, COSMOS_DERIVATION_PATH}; use nym_types::account::{Account, AccountEntry, Balance}; +use nym_validator_client::nyxd::CosmWasmClient; use nym_validator_client::signing::direct_wallet::DirectSecp256k1HdWallet; use nym_validator_client::signing::AccountData; -use nym_validator_client::{nyxd::DirectSigningNyxdClient, Client}; +use nym_validator_client::DirectSigningHttpRpcValidatorClient; use nym_wallet_types::network::Network as WalletNetwork; use std::collections::HashMap; use strum::IntoEnumIterator; @@ -35,7 +36,7 @@ pub async fn get_balance(state: tauri::State<'_, WalletState>) -> Result { @@ -251,7 +252,7 @@ fn create_clients( default_api_urls: &HashMap, config: &Config, mnemonic: &Mnemonic, -) -> Result)>, BackendError> { +) -> Result, BackendError> { let mut clients = Vec::new(); for network in WalletNetwork::iter() { let nyxd_url = if let Some(url) = config.get_selected_validator_nyxd_url(network) { @@ -285,10 +286,10 @@ fn create_clients( .with_vesting_contract(Some(config.get_vesting_contract_address(network).as_ref())); let config = nym_validator_client::Config::try_from_nym_network_details(&network_details)? - .with_urls(nyxd_url, api_url); + .with_urls(nyxd_url, api_url) + .with_simulated_gas_multiplier(CUSTOM_SIMULATED_GAS_MULTIPLIER); - let mut client = nym_validator_client::Client::new_signing(config, mnemonic.clone())?; - client.set_nyxd_simulated_gas_multiplier(CUSTOM_SIMULATED_GAS_MULTIPLIER); + let client = nym_validator_client::Client::new_signing(config, mnemonic.clone())?; clients.push((network, client)); } Ok(clients) diff --git a/nym-wallet/src-tauri/src/operations/mixnet/admin.rs b/nym-wallet/src-tauri/src/operations/mixnet/admin.rs index d8824e41d8..2670ff360c 100644 --- a/nym-wallet/src-tauri/src/operations/mixnet/admin.rs +++ b/nym-wallet/src-tauri/src/operations/mixnet/admin.rs @@ -5,7 +5,7 @@ use crate::error::BackendError; use crate::state::WalletState; use nym_mixnet_contract_common::ContractStateParams; use nym_types::transaction::TransactionExecuteResult; -use nym_validator_client::nyxd::traits::{MixnetQueryClient, MixnetSigningClient}; +use nym_validator_client::nyxd::contract_traits::{MixnetQueryClient, MixnetSigningClient}; use nym_validator_client::nyxd::Fee; use nym_wallet_types::admin::TauriContractStateParams; diff --git a/nym-wallet/src-tauri/src/operations/mixnet/bond.rs b/nym-wallet/src-tauri/src/operations/mixnet/bond.rs index 4acd1aecfc..896b62175a 100644 --- a/nym-wallet/src-tauri/src/operations/mixnet/bond.rs +++ b/nym-wallet/src-tauri/src/operations/mixnet/bond.rs @@ -14,7 +14,7 @@ use nym_types::currency::DecCoin; use nym_types::gateway::GatewayBond; use nym_types::mixnode::{MixNodeCostParams, MixNodeDetails}; use nym_types::transaction::TransactionExecuteResult; -use nym_validator_client::nyxd::traits::{MixnetQueryClient, MixnetSigningClient}; +use nym_validator_client::nyxd::contract_traits::{MixnetQueryClient, MixnetSigningClient}; use nym_validator_client::nyxd::Fee; use serde::{Deserialize, Serialize}; use std::cmp::Ordering; @@ -337,7 +337,10 @@ pub async fn get_mixnode_avg_uptime( log::info!(">>> Get mixnode bond details"); let guard = state.read().await; let client = guard.current_client()?; - let res = client.nyxd.get_owned_mixnode(client.nyxd.address()).await?; + let res = client + .nyxd + .get_owned_mixnode(&client.nyxd.address()) + .await?; match res.mixnode_details { Some(details) => { @@ -363,7 +366,10 @@ pub async fn mixnode_bond_details( log::info!(">>> Get mixnode bond details"); let guard = state.read().await; let client = guard.current_client()?; - let res = client.nyxd.get_owned_mixnode(client.nyxd.address()).await?; + let res = client + .nyxd + .get_owned_mixnode(&client.nyxd.address()) + .await?; let details = res .mixnode_details .map(|details| { @@ -391,7 +397,10 @@ pub async fn gateway_bond_details( log::info!(">>> Get gateway bond details"); let guard = state.read().await; let client = guard.current_client()?; - let bond = client.nyxd.get_owned_gateway(client.nyxd.address()).await?; + let bond = client + .nyxd + .get_owned_gateway(&client.nyxd.address()) + .await?; let res = bond .gateway .map(|bond| { diff --git a/nym-wallet/src-tauri/src/operations/mixnet/delegate.rs b/nym-wallet/src-tauri/src/operations/mixnet/delegate.rs index 8a4a82e158..18bd72551f 100644 --- a/nym-wallet/src-tauri/src/operations/mixnet/delegate.rs +++ b/nym-wallet/src-tauri/src/operations/mixnet/delegate.rs @@ -13,7 +13,9 @@ use nym_types::deprecated::{ use nym_types::mixnode::MixNodeCostParams; use nym_types::pending_events::PendingEpochEvent; use nym_types::transaction::TransactionExecuteResult; -use nym_validator_client::nyxd::traits::{MixnetQueryClient, MixnetSigningClient}; +use nym_validator_client::nyxd::contract_traits::{ + MixnetQueryClient, MixnetSigningClient, NymContractsProvider, PagedMixnetQueryClient, +}; use nym_validator_client::nyxd::Fee; #[tauri::command] @@ -25,7 +27,7 @@ pub async fn get_pending_delegation_events( let reg = guard.registered_coins()?; let client = guard.current_client()?; - let events = client.get_all_nyxd_pending_epoch_events().await?; + let events = client.nyxd.get_all_pending_epoch_events().await?; let converted = events .into_iter() .map(|e| PendingEpochEvent::try_from_mixnet_contract(e, reg)) @@ -156,10 +158,13 @@ pub async fn get_all_mix_delegations( let address = client.nyxd.address(); let network = guard.current_network(); let base_mix_denom = network.base_mix_denom().to_string(); - let vesting_contract = client.nyxd.vesting_contract_address(); + let vesting_contract = client + .nyxd + .vesting_contract_address() + .expect("vesting contract address is not available"); log::info!(" >>> Get delegations"); - let delegations = client.get_all_delegator_delegations(address).await?; + let delegations = client.nyxd.get_all_delegator_delegations(&address).await?; log::info!(" <<< {} delegations", delegations.len()); let pending_events_for_account = get_pending_delegation_events(state.clone()).await?; @@ -185,7 +190,11 @@ pub async fn get_all_mix_delegations( d.amount ); - let mixnode = client.get_mixnode_details(d.mix_id).await?.mixnode_details; + let mixnode = client + .nyxd + .get_mixnode_details(d.mix_id) + .await? + .mixnode_details; let accumulated_by_operator = mixnode .as_ref() @@ -214,7 +223,7 @@ pub async fn get_all_mix_delegations( log::trace!(" >>> Get accumulated rewards: address = {}", address); let pending_reward = client .nyxd - .get_pending_delegator_reward(address, d.mix_id, d.proxy.clone()) + .get_pending_delegator_reward(&address, d.mix_id, d.proxy.clone()) .await?; let accumulated_rewards = match &pending_reward.amount_earned { diff --git a/nym-wallet/src-tauri/src/operations/mixnet/interval.rs b/nym-wallet/src-tauri/src/operations/mixnet/interval.rs index e18fa1e44a..05151d8a53 100644 --- a/nym-wallet/src-tauri/src/operations/mixnet/interval.rs +++ b/nym-wallet/src-tauri/src/operations/mixnet/interval.rs @@ -5,7 +5,7 @@ use crate::error::BackendError; use crate::nyxd_client; use crate::state::WalletState; use nym_types::pending_events::{PendingEpochEvent, PendingIntervalEvent}; -use nym_validator_client::nyxd::traits::MixnetQueryClient; +use nym_validator_client::nyxd::contract_traits::{MixnetQueryClient, PagedMixnetQueryClient}; use nym_wallet_types::interval::Interval; #[tauri::command] @@ -26,7 +26,7 @@ pub async fn get_pending_epoch_events( let guard = state.read().await; let reg = guard.registered_coins()?; let client = guard.current_client()?; - let res = client.get_all_nyxd_pending_epoch_events().await?; + let res = client.nyxd.get_all_pending_epoch_events().await?; log::info!("<<< got = {:?} events", res.len()); @@ -46,7 +46,7 @@ pub async fn get_pending_interval_events( let guard = state.read().await; let reg = guard.registered_coins()?; let client = guard.current_client()?; - let res = client.get_all_nyxd_pending_interval_events().await?; + let res = client.nyxd.get_all_pending_interval_events().await?; log::info!("<<< got = {:?} events", res.len()); diff --git a/nym-wallet/src-tauri/src/operations/mixnet/rewards.rs b/nym-wallet/src-tauri/src/operations/mixnet/rewards.rs index 62ef534d02..266295c6e1 100644 --- a/nym-wallet/src-tauri/src/operations/mixnet/rewards.rs +++ b/nym-wallet/src-tauri/src/operations/mixnet/rewards.rs @@ -3,7 +3,9 @@ use crate::state::WalletState; use crate::vesting::rewards::vesting_claim_delegator_reward; use nym_mixnet_contract_common::{MixId, RewardingParams}; use nym_types::transaction::TransactionExecuteResult; -use nym_validator_client::nyxd::traits::{MixnetQueryClient, MixnetSigningClient}; +use nym_validator_client::nyxd::contract_traits::{ + MixnetQueryClient, MixnetSigningClient, NymContractsProvider, PagedMixnetQueryClient, +}; use nym_validator_client::nyxd::Fee; #[tauri::command] @@ -64,13 +66,21 @@ pub async fn claim_locked_and_unlocked_delegator_reward( log::trace!(">>> Get delegations: mix_id = {}", mix_id); let address = client.nyxd.address(); - let delegations = client.get_all_delegator_delegations(address).await?; + let delegations = client.nyxd.get_all_delegator_delegations(&address).await?; log::trace!("<<< {} delegations", delegations.len()); - let vesting_contract = client.nyxd.vesting_contract_address().to_string(); - let liquid_delegation = client.get_delegation_details(mix_id, address, None).await?; + let vesting_contract = client + .nyxd + .vesting_contract_address() + .expect("vesting contract address is not available") + .to_string(); + let liquid_delegation = client + .nyxd + .get_delegation_details(mix_id, &address, None) + .await?; let vesting_delegation = client - .get_delegation_details(mix_id, address, Some(vesting_contract)) + .nyxd + .get_delegation_details(mix_id, &address, Some(vesting_contract)) .await?; drop(guard); diff --git a/nym-wallet/src-tauri/src/operations/signatures/sign.rs b/nym-wallet/src-tauri/src/operations/signatures/sign.rs index 24da5a0ca1..c494bc5b4f 100644 --- a/nym-wallet/src-tauri/src/operations/signatures/sign.rs +++ b/nym-wallet/src-tauri/src/operations/signatures/sign.rs @@ -4,6 +4,7 @@ use cosmrs::crypto::secp256k1::{Signature, VerifyingKey}; use cosmrs::crypto::PublicKey; use cosmrs::AccountId; use k256::ecdsa::signature::Verifier; +use nym_validator_client::nyxd::CosmWasmClient; use nym_validator_client::signing::signer::OfflineSigner; use serde::Serialize; use serde_json::json; @@ -23,15 +24,16 @@ pub async fn sign( ) -> Result { let guard = state.read().await; let client = guard.current_client()?; - let wallet = client.nyxd.signer(); - let derived_accounts = wallet.try_derive_accounts()?; + let derived_accounts = client.nyxd.get_accounts()?; let account = derived_accounts.first().ok_or_else(|| { log::error!(">>> Unable to derive account"); BackendError::SignatureError("unable to derive account".to_string()) })?; log::info!("<<< Signing message"); - let signature = wallet.sign_raw_with_account(account, message.as_bytes())?; + let signature = client + .nyxd + .sign_raw_with_account(account, message.as_bytes())?; let output = SignatureOutputJson { account_id: account.address().to_string(), public_key: account.public_key(), @@ -49,14 +51,10 @@ async fn get_pubkey_from_account_address( log::info!("Getting public key for address {} from chain...", address); let guard = state.read().await; let client = guard.current_client()?; - let account = client - .nyxd - .get_account_details(address) - .await? - .ok_or_else(|| { - log::error!("No account associated with address {}", address); - BackendError::SignatureError(format!("No account associated with address {address}")) - })?; + let account = client.nyxd.get_account(address).await?.ok_or_else(|| { + log::error!("No account associated with address {}", address); + BackendError::SignatureError(format!("No account associated with address {address}")) + })?; let base_account = account.try_get_base_account()?; base_account.pubkey.ok_or_else(|| { @@ -116,7 +114,7 @@ pub async fn verify( // get public key from current account address let guard = state.read().await; let client = guard.current_client()?; - let address = client.nyxd.address(); + let address = &client.nyxd.address(); get_pubkey_from_account_address(address, &state).await? } }; diff --git a/nym-wallet/src-tauri/src/operations/simulate/admin.rs b/nym-wallet/src-tauri/src/operations/simulate/admin.rs index f47b44e454..1884c7472e 100644 --- a/nym-wallet/src-tauri/src/operations/simulate/admin.rs +++ b/nym-wallet/src-tauri/src/operations/simulate/admin.rs @@ -5,6 +5,7 @@ use crate::error::BackendError; use crate::operations::simulate::FeeDetails; use crate::WalletState; use nym_mixnet_contract_common::{ContractStateParams, ExecuteMsg}; +use nym_validator_client::nyxd::contract_traits::NymContractsProvider; use nym_wallet_types::admin::TauriContractStateParams; #[tauri::command] @@ -18,7 +19,10 @@ pub async fn simulate_update_contract_settings( params.try_convert_to_mixnet_contract_params(reg)?; let client = guard.current_client()?; - let mixnet_contract = client.nyxd.mixnet_contract_address(); + let mixnet_contract = client + .nyxd + .mixnet_contract_address() + .expect("mixnet contract address is not available"); let msg = client.nyxd.wrap_contract_execute_message( mixnet_contract, diff --git a/nym-wallet/src-tauri/src/operations/simulate/mixnet.rs b/nym-wallet/src-tauri/src/operations/simulate/mixnet.rs index 332f0eeb43..11d360ef71 100644 --- a/nym-wallet/src-tauri/src/operations/simulate/mixnet.rs +++ b/nym-wallet/src-tauri/src/operations/simulate/mixnet.rs @@ -11,6 +11,7 @@ use nym_mixnet_contract_common::{ExecuteMsg, Gateway, MixId, MixNode}; use nym_mixnet_contract_common::{GatewayConfigUpdate, MixNodeConfigUpdate}; use nym_types::currency::DecCoin; use nym_types::mixnode::MixNodeCostParams; +use nym_validator_client::nyxd::contract_traits::NymContractsProvider; async fn simulate_mixnet_operation( msg: ExecuteMsg, @@ -28,7 +29,10 @@ async fn simulate_mixnet_operation( }; let client = guard.current_client()?; - let mixnet_contract = client.nyxd.mixnet_contract_address(); + let mixnet_contract = client + .nyxd + .mixnet_contract_address() + .expect("mixnet contract address is not available"); let msg = client .nyxd diff --git a/nym-wallet/src-tauri/src/operations/simulate/vesting.rs b/nym-wallet/src-tauri/src/operations/simulate/vesting.rs index 79e40ec792..b225aa9ff3 100644 --- a/nym-wallet/src-tauri/src/operations/simulate/vesting.rs +++ b/nym-wallet/src-tauri/src/operations/simulate/vesting.rs @@ -11,6 +11,7 @@ use nym_mixnet_contract_common::{Gateway, MixId, MixNode}; use nym_mixnet_contract_common::{GatewayConfigUpdate, MixNodeConfigUpdate}; use nym_types::currency::DecCoin; use nym_types::mixnode::MixNodeCostParams; +use nym_validator_client::nyxd::contract_traits::NymContractsProvider; use nym_vesting_contract_common::ExecuteMsg; async fn simulate_vesting_operation( @@ -29,7 +30,10 @@ async fn simulate_vesting_operation( }; let client = guard.current_client()?; - let vesting_contract = client.nyxd.vesting_contract_address(); + let vesting_contract = client + .nyxd + .vesting_contract_address() + .expect("vesting contract address is not available"); let msg = client .nyxd diff --git a/nym-wallet/src-tauri/src/operations/vesting/bond.rs b/nym-wallet/src-tauri/src/operations/vesting/bond.rs index f2077e5694..8e47953109 100644 --- a/nym-wallet/src-tauri/src/operations/vesting/bond.rs +++ b/nym-wallet/src-tauri/src/operations/vesting/bond.rs @@ -10,7 +10,7 @@ use nym_mixnet_contract_common::{GatewayConfigUpdate, MixNodeConfigUpdate}; use nym_types::currency::DecCoin; use nym_types::mixnode::MixNodeCostParams; use nym_types::transaction::TransactionExecuteResult; -use nym_validator_client::nyxd::{traits::VestingSigningClient, Fee}; +use nym_validator_client::nyxd::{contract_traits::VestingSigningClient, Fee}; use std::cmp::Ordering; #[tauri::command] diff --git a/nym-wallet/src-tauri/src/operations/vesting/delegate.rs b/nym-wallet/src-tauri/src/operations/vesting/delegate.rs index ff7c33710f..64ac3ed736 100644 --- a/nym-wallet/src-tauri/src/operations/vesting/delegate.rs +++ b/nym-wallet/src-tauri/src/operations/vesting/delegate.rs @@ -6,7 +6,7 @@ use crate::state::WalletState; use nym_mixnet_contract_common::MixId; use nym_types::currency::DecCoin; use nym_types::transaction::TransactionExecuteResult; -use nym_validator_client::nyxd::{traits::VestingSigningClient, Fee}; +use nym_validator_client::nyxd::{contract_traits::VestingSigningClient, Fee}; #[tauri::command] pub async fn vesting_delegate_to_mixnode( diff --git a/nym-wallet/src-tauri/src/operations/vesting/queries.rs b/nym-wallet/src-tauri/src/operations/vesting/queries.rs index a24e26d001..f3377d5ed5 100644 --- a/nym-wallet/src-tauri/src/operations/vesting/queries.rs +++ b/nym-wallet/src-tauri/src/operations/vesting/queries.rs @@ -8,7 +8,7 @@ use cosmwasm_std::Timestamp; use nym_types::currency::DecCoin; use nym_types::vesting::VestingAccountInfo; use nym_types::vesting::{OriginalVestingResponse, PledgeData}; -use nym_validator_client::nyxd::traits::VestingQueryClient; +use nym_validator_client::nyxd::contract_traits::VestingQueryClient; use nym_vesting_contract_common::Period; #[tauri::command] diff --git a/nym-wallet/src-tauri/src/operations/vesting/rewards.rs b/nym-wallet/src-tauri/src/operations/vesting/rewards.rs index dbedb302e3..d990b2c1c5 100644 --- a/nym-wallet/src-tauri/src/operations/vesting/rewards.rs +++ b/nym-wallet/src-tauri/src/operations/vesting/rewards.rs @@ -5,7 +5,7 @@ use crate::error::BackendError; use crate::state::WalletState; use nym_mixnet_contract_common::MixId; use nym_types::transaction::TransactionExecuteResult; -use nym_validator_client::nyxd::traits::VestingSigningClient; +use nym_validator_client::nyxd::contract_traits::VestingSigningClient; use nym_validator_client::nyxd::Fee; #[tauri::command] diff --git a/nym-wallet/src-tauri/src/state.rs b/nym-wallet/src-tauri/src/state.rs index bfc2d85cb6..5fd4485e18 100644 --- a/nym-wallet/src-tauri/src/state.rs +++ b/nym-wallet/src-tauri/src/state.rs @@ -8,10 +8,8 @@ use log::warn; use nym_types::currency::{DecCoin, Denom, RegisteredCoins}; use nym_types::fees::FeeDetails; use nym_validator_client::nyxd::cosmwasm_client::types::SimulateResponse; -use nym_validator_client::nyxd::{ - AccountId as CosmosAccountId, Coin, DirectSigningNyxdClient, Fee, -}; -use nym_validator_client::Client; +use nym_validator_client::nyxd::{AccountId as CosmosAccountId, Coin, Fee, SigningCosmWasmClient}; +use nym_validator_client::DirectSigningHttpRpcValidatorClient; use nym_wallet_types::network::Network; use nym_wallet_types::network_config; use once_cell::sync::Lazy; @@ -67,7 +65,7 @@ impl WalletState { #[derive(Default)] pub struct WalletStateInner { config: config::Config, - signing_clients: HashMap>, + signing_clients: HashMap, current_network: Network, // All the accounts the we get from decrypting the wallet. We hold on to these for being able to @@ -181,7 +179,7 @@ impl WalletStateInner { // this MUST succeed as we just used it before let client = self.current_client()?; let gas_price = client.nyxd.gas_price().clone(); - let gas_adjustment = client.nyxd.gas_adjustment(); + let gas_adjustment = client.nyxd.simulated_gas_multiplier(); let res = SimulateResult::new(simulate_response.gas_info, gas_price, gas_adjustment); @@ -196,7 +194,7 @@ impl WalletStateInner { pub fn client( &self, network: Network, - ) -> Result<&Client, BackendError> { + ) -> Result<&DirectSigningHttpRpcValidatorClient, BackendError> { self.signing_clients .get(&network) .ok_or(BackendError::ClientNotInitialized) @@ -205,13 +203,13 @@ impl WalletStateInner { pub fn client_mut( &mut self, network: Network, - ) -> Result<&mut Client, BackendError> { + ) -> Result<&mut DirectSigningHttpRpcValidatorClient, BackendError> { self.signing_clients .get_mut(&network) .ok_or(BackendError::ClientNotInitialized) } - pub fn current_client(&self) -> Result<&Client, BackendError> { + pub fn current_client(&self) -> Result<&DirectSigningHttpRpcValidatorClient, BackendError> { self.signing_clients .get(&self.current_network) .ok_or(BackendError::ClientNotInitialized) @@ -220,7 +218,7 @@ impl WalletStateInner { #[allow(unused)] pub fn current_client_mut( &mut self, - ) -> Result<&mut Client, BackendError> { + ) -> Result<&mut DirectSigningHttpRpcValidatorClient, BackendError> { self.signing_clients .get_mut(&self.current_network) .ok_or(BackendError::ClientNotInitialized) @@ -240,7 +238,7 @@ impl WalletStateInner { Ok(self.config.save_to_files()?) } - pub fn add_client(&mut self, network: Network, client: Client) { + pub fn add_client(&mut self, network: Network, client: DirectSigningHttpRpcValidatorClient) { self.signing_clients.insert(network, client); } diff --git a/nym-wallet/src-tauri/src/utils.rs b/nym-wallet/src-tauri/src/utils.rs index 579ccc5add..2a340cc5dd 100644 --- a/nym-wallet/src-tauri/src/utils.rs +++ b/nym-wallet/src-tauri/src/utils.rs @@ -8,7 +8,7 @@ use cosmwasm_std::Decimal; use nym_mixnet_contract_common::{IdentityKey, MixId, Percent}; use nym_types::currency::DecCoin; use nym_types::mixnode::MixNodeCostParams; -use nym_validator_client::nyxd::traits::MixnetQueryClient; +use nym_validator_client::nyxd::contract_traits::MixnetQueryClient; use nym_wallet_types::app::AppEnv; fn get_env_as_option(key: &str) -> Option { @@ -30,7 +30,7 @@ pub fn get_env() -> AppEnv { #[tauri::command] pub async fn owns_mixnode(state: tauri::State<'_, WalletState>) -> Result { Ok(nyxd_client!(state) - .get_owned_mixnode(nyxd_client!(state).address()) + .get_owned_mixnode(&nyxd_client!(state).address()) .await? .mixnode_details .is_some()) @@ -39,7 +39,7 @@ pub async fn owns_mixnode(state: tauri::State<'_, WalletState>) -> Result) -> Result { Ok(nyxd_client!(state) - .get_owned_gateway(nyxd_client!(state).address()) + .get_owned_gateway(&nyxd_client!(state).address()) .await? .gateway .is_some()) diff --git a/nym-wallet/src-tauri/tauri.conf.json b/nym-wallet/src-tauri/tauri.conf.json index 2986866ccb..2660030fb3 100644 --- a/nym-wallet/src-tauri/tauri.conf.json +++ b/nym-wallet/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "package": { "productName": "nym-wallet", - "version": "1.2.6" + "version": "1.2.7" }, "build": { "distDir": "../dist", diff --git a/package.json b/package.json index 523db5363f..a18fc8c35a 100644 --- a/package.json +++ b/package.json @@ -37,4 +37,4 @@ "lerna": "^6.6.2", "npm-run-all": "^4.1.5" } -} +} \ No newline at end of file diff --git a/sdk/lib/socks5-listener/Cargo.lock b/sdk/lib/socks5-listener/Cargo.lock deleted file mode 100644 index 3fc8b34151..0000000000 --- a/sdk/lib/socks5-listener/Cargo.lock +++ /dev/null @@ -1,5331 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aead" -version = "0.5.2" -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", -] - -[[package]] -name = "aes" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" -dependencies = [ - "cfg-if", - "cipher 0.4.4", - "cpufeatures", -] - -[[package]] -name = "ahash" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" -dependencies = [ - "getrandom 0.2.9", - "once_cell", - "version_check", -] - -[[package]] -name = "aho-corasick" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" -dependencies = [ - "memchr", -] - -[[package]] -name = "android_log-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27f0fc03f560e1aebde41c2398b691cb98b5ea5996a6184a7a67bbbb77448969" - -[[package]] -name = "android_logger" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fa490e751f3878eb9accb9f18988eca52c2337ce000a8bf31ef50d4c723ca9e" -dependencies = [ - "android_log-sys", - "env_logger 0.10.0", - "log", - "once_cell", -] - -[[package]] -name = "anstream" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is-terminal", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" - -[[package]] -name = "anstyle-parse" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" -dependencies = [ - "windows-sys 0.48.0", -] - -[[package]] -name = "anstyle-wincon" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" -dependencies = [ - "anstyle", - "windows-sys 0.48.0", -] - -[[package]] -name = "anyhow" -version = "1.0.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" - -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" - -[[package]] -name = "async-trait" -version = "0.1.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - -[[package]] -name = "atoi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616896e05fc0e2649463a93a15183c6a16bf03413a7af88ef1285ddedfa9cda5" -dependencies = [ - "num-traits", -] - -[[package]] -name = "atoi" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e" -dependencies = [ - "num-traits", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bip32" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "873faa4363bfc54c36a48321da034c92a0645a363eed34d948683ffc1706e37f" -dependencies = [ - "bs58", - "hmac 0.11.0", - "k256", - "once_cell", - "pbkdf2", - "rand_core 0.6.4", - "ripemd160", - "sha2 0.9.9", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "bip39" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" -dependencies = [ - "bitcoin_hashes", - "rand 0.8.5", - "rand_core 0.6.4", - "serde", - "unicode-normalization", - "zeroize", -] - -[[package]] -name = "bitcoin_hashes" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "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 = "blake3" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", - "digest 0.10.6", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "block-padding", - "generic-array 0.14.7", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "bls12_381" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54757888b09a69be70b5ec303e382a74227392086ba808cb01eeca29233a2397" -dependencies = [ - "digest 0.9.0", - "ff 0.10.1", - "group 0.10.0", - "pairing 0.20.0", - "rand_core 0.6.4", - "subtle 2.4.1", -] - -[[package]] -name = "bls12_381" -version = "0.6.0" -source = "git+https://github.com/jstuczyn/bls12_381?branch=gt-serialisation#10fb6f700bfda17c8475af3bfd31e3fec15f2278" -dependencies = [ - "digest 0.9.0", - "ff 0.11.1", - "group 0.11.0", - "pairing 0.21.0", - "rand_core 0.6.4", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" -dependencies = [ - "sha2 0.9.9", -] - -[[package]] -name = "bumpalo" -version = "3.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" - -[[package]] -name = "cc" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" -dependencies = [ - "jobserver", -] - -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - -[[package]] -name = "cfg-if" -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 = "chacha20" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" -dependencies = [ - "cfg-if", - "cipher 0.4.4", - "cpufeatures", -] - -[[package]] -name = "chacha20poly1305" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" -dependencies = [ - "aead", - "chacha20", - "cipher 0.4.4", - "poly1305", - "zeroize", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", - "zeroize", -] - -[[package]] -name = "clap" -version = "4.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d21f9bf1b425d2968943631ec91202fe5e837264063503708b83013f8fc938" -dependencies = [ - "clap_builder", - "clap_derive", - "once_cell", -] - -[[package]] -name = "clap_builder" -version = "4.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914c8c79fb560f238ef6429439a30023c862f7a28e688c58f7203f12b29970bd" -dependencies = [ - "anstream", - "anstyle", - "bitflags", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_complete" -version = "4.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36774babb166352bb4f7b9cb16f781ffa3439d2a8f12cd31bea85a38c888fea3" -dependencies = [ - "clap", -] - -[[package]] -name = "clap_complete_fig" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3af28956330989baa428ed4d3471b853715d445c62de21b67292e22cf8a41fa" -dependencies = [ - "clap", - "clap_complete", -] - -[[package]] -name = "clap_derive" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.15", -] - -[[package]] -name = "clap_lex" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "colored" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" -dependencies = [ - "atty", - "lazy_static", - "winapi", -] - -[[package]] -name = "combine" -version = "4.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" -dependencies = [ - "bytes", - "memchr", -] - -[[package]] -name = "const-oid" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" - -[[package]] -name = "constant_time_eq" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" - -[[package]] -name = "core-foundation" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - -[[package]] -name = "cosmos-sdk-proto" -version = "0.12.3" -source = "git+https://github.com/neacsu/cosmos-rust?branch=neacsu/feegrant_support#f63ded63ec13e753ebe8bdafe9dc503df265d67d" -dependencies = [ - "prost", - "prost-types", - "tendermint-proto", -] - -[[package]] -name = "cosmrs" -version = "0.7.1" -source = "git+https://github.com/neacsu/cosmos-rust?branch=neacsu/feegrant_support#f63ded63ec13e753ebe8bdafe9dc503df265d67d" -dependencies = [ - "bip32", - "cosmos-sdk-proto", - "ecdsa", - "eyre", - "getrandom 0.2.9", - "k256", - "prost", - "prost-types", - "rand_core 0.6.4", - "serde", - "serde_json", - "subtle-encoding", - "tendermint", - "tendermint-rpc", - "thiserror", -] - -[[package]] -name = "cosmwasm-crypto" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970d1d705862179b5d7a233ae36f02f21c4ec1b8075fe60c77fc5b43471331fa" -dependencies = [ - "digest 0.9.0", - "ed25519-zebra", - "k256", - "rand_core 0.6.4", - "thiserror", -] - -[[package]] -name = "cosmwasm-derive" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b36e527620a2a3e00e46b6e731ab6c9b68d11069c986f7d7be8eba79ef081a4" -dependencies = [ - "syn 1.0.109", -] - -[[package]] -name = "cosmwasm-std" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875994993c2082a6fcd406937bf0fca21c349e4a624f3810253a14fa83a3a195" -dependencies = [ - "base64 0.13.1", - "cosmwasm-crypto", - "cosmwasm-derive", - "forward_ref", - "schemars", - "serde", - "serde-json-wasm", - "thiserror", - "uint", -] - -[[package]] -name = "cpufeatures" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" -dependencies = [ - "libc", -] - -[[package]] -name = "crc" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" -dependencies = [ - "crc-catalog 1.1.1", -] - -[[package]] -name = "crc" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" -dependencies = [ - "crc-catalog 2.2.0", -] - -[[package]] -name = "crc-catalog" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" - -[[package]] -name = "crc-catalog" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" -dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-queue" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-bigint" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array 0.14.7", - "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 = "ct-logs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" -dependencies = [ - "sct 0.6.1", -] - -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[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", -] - -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "cw-storage-plus" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "648b1507290bbc03a8d88463d7cd9b04b1fa0155e5eef366c4fa052b9caaac7a" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", -] - -[[package]] -name = "cw-utils" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbaecb78c8e8abfd6b4258c7f4fbeb5c49a5e45ee4d910d3240ee8e1d714e1b" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "cw2" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cf4639517490dd36b333bbd6c4fbd92e325fd0acf4683b41753bc5eb63bfc1" -dependencies = [ - "cosmwasm-std", - "cw-storage-plus", - "schemars", - "serde", -] - -[[package]] -name = "cw3" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe19462a7f644ba60c19d3443cb90d00c50d9b6b3b0a3a7fca93df8261af979b" -dependencies = [ - "cosmwasm-std", - "cw-utils", - "schemars", - "serde", -] - -[[package]] -name = "cw4" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0acc3549d5ce11c6901b3a676f2e2628684722197054d97cd0101ea174ed5cbd" -dependencies = [ - "cosmwasm-std", - "cw-storage-plus", - "schemars", - "serde", -] - -[[package]] -name = "dashmap" -version = "5.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" -dependencies = [ - "cfg-if", - "hashbrown 0.12.3", - "lock_api", - "once_cell", - "parking_lot_core 0.9.7", -] - -[[package]] -name = "der" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" -dependencies = [ - "const-oid", -] - -[[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", -] - -[[package]] -name = "digest" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" -dependencies = [ - "block-buffer 0.10.4", - "crypto-common", - "subtle 2.4.1", -] - -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys 0.3.7", -] - -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys 0.4.1", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - -[[package]] -name = "dotenv" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" - -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - -[[package]] -name = "dyn-clone" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" - -[[package]] -name = "ecdsa" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" -dependencies = [ - "der", - "elliptic-curve", - "rfc6979", - "signature", -] - -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "ed25519-zebra" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" -dependencies = [ - "curve25519-dalek", - "hashbrown 0.12.3", - "hex", - "rand_core 0.6.4", - "serde", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "either" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" - -[[package]] -name = "elliptic-curve" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" -dependencies = [ - "base16ct", - "crypto-bigint", - "der", - "ff 0.11.1", - "generic-array 0.14.7", - "group 0.11.0", - "rand_core 0.6.4", - "sec1", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "encoding_rs" -version = "0.8.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "enum-iterator" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a0ac4aeb3a18f92eaf09c6bb9b3ac30ff61ca95514fc58cbead1c9a6bf5401" -dependencies = [ - "enum-iterator-derive", -] - -[[package]] -name = "enum-iterator-derive" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - -[[package]] -name = "env_logger" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -dependencies = [ - "atty", - "humantime 1.3.0", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "env_logger" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "errno" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "ext-trait" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d772df1c1a777963712fb68e014235e80863d6a91a85c4e06ba2d16243a310e5" -dependencies = [ - "ext-trait-proc_macros", -] - -[[package]] -name = "ext-trait-proc_macros" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab7934152eaf26aa5aa9f7371408ad5af4c31357073c9e84c3b9d7f11ad639a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "extension-traits" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a296e5a895621edf9fa8329c83aa1cb69a964643e36cf54d8d7a69b789089537" -dependencies = [ - "ext-trait", -] - -[[package]] -name = "eyre" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" -dependencies = [ - "indenter", - "once_cell", -] - -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - -[[package]] -name = "ff" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f40b2dcd8bc322217a5f6559ae5f9e9d1de202a2ecee2e9eafcbece7562a4f" -dependencies = [ - "rand_core 0.6.4", - "subtle 2.4.1", -] - -[[package]] -name = "ff" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" -dependencies = [ - "rand_core 0.6.4", - "subtle 2.4.1", -] - -[[package]] -name = "flate2" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "flex-error" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" -dependencies = [ - "eyre", - "paste", -] - -[[package]] -name = "flume" -version = "0.10.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" -dependencies = [ - "futures-core", - "futures-sink", - "pin-project", - "spin 0.9.8", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "forward_ref" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futures" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" - -[[package]] -name = "futures-executor" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-intrusive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5" -dependencies = [ - "futures-core", - "lock_api", - "parking_lot", -] - -[[package]] -name = "futures-io" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" - -[[package]] -name = "futures-macro" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - -[[package]] -name = "futures-sink" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" - -[[package]] -name = "futures-task" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" - -[[package]] -name = "futures-util" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "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.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "serde", - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "getrandom" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "getset" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ghost" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e77ac7b51b8e6313251737fcef4b1c01a2ea102bde68415b62c0ee9268fec357" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - -[[package]] -name = "git2" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0155506aab710a86160ddb504a480d2964d7ab5b9e62419be69e0032bc5931c" -dependencies = [ - "bitflags", - "libc", - "libgit2-sys", - "log", - "url", -] - -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "group" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c363a5301b8f153d80747126a04b3c82073b9fe3130571a9d170cacdeaf7912" -dependencies = [ - "byteorder", - "ff 0.10.1", - "rand_core 0.6.4", - "subtle 2.4.1", -] - -[[package]] -name = "group" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" -dependencies = [ - "byteorder", - "ff 0.11.1", - "rand_core 0.6.4", - "subtle 2.4.1", -] - -[[package]] -name = "h2" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "handlebars" -version = "3.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4498fc115fa7d34de968184e473529abb40eeb6be8bc5f7faba3d08c316cb3e3" -dependencies = [ - "log", - "pest", - "pest_derive", - "quick-error 2.0.1", - "serde", - "serde_json", -] - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashlink" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf" -dependencies = [ - "hashbrown 0.11.2", -] - -[[package]] -name = "hashlink" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69fe1fcf8b4278d860ad0548329f892a3631fb63f82574df68275f34cdbe0ffa" -dependencies = [ - "hashbrown 0.12.3", -] - -[[package]] -name = "headers" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" -dependencies = [ - "base64 0.13.1", - "bitflags", - "bytes", - "headers-core", - "http", - "httpdate", - "mime", - "sha1", -] - -[[package]] -name = "headers-core" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" -dependencies = [ - "http", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hex-literal" -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 = "hkdf" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" -dependencies = [ - "hmac 0.12.1", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.6", -] - -[[package]] -name = "http" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" - -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error 1.2.3", -] - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "humantime-serde" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c" -dependencies = [ - "humantime 2.1.0", - "serde", -] - -[[package]] -name = "hyper" -version = "0.14.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-proxy" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc" -dependencies = [ - "bytes", - "futures", - "headers", - "http", - "hyper", - "hyper-rustls", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.22.0", - "tower-service", - "webpki 0.21.4", -] - -[[package]] -name = "hyper-rustls" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" -dependencies = [ - "ct-logs", - "futures-util", - "hyper", - "log", - "rustls 0.19.1", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.22.0", - "webpki 0.21.4", - "webpki-roots 0.21.1", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "idna" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indenter" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "input_buffer" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f97967975f448f1a7ddb12b0bc41069d09ed6a1c161a92687e057325db35d413" -dependencies = [ - "bytes", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "inventory" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb5160c60ba1e809707918ee329adb99d222888155835c6feedba19f6c3fd4" -dependencies = [ - "ctor", - "ghost", - "inventory-impl", -] - -[[package]] -name = "inventory-impl" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e41b53715c6f0c4be49510bb82dee2c1e51c8586d885abe65396e82ed518548" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" -dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "ipnet" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" - -[[package]] -name = "is-terminal" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" -dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", - "windows-sys 0.48.0", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" - -[[package]] -name = "jni" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" -dependencies = [ - "cesu8", - "cfg-if", - "combine", - "jni-sys", - "log", - "thiserror", - "walkdir", - "windows-sys 0.45.0", -] - -[[package]] -name = "jni-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" - -[[package]] -name = "jobserver" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "k256" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "sec1", - "sha2 0.9.9", - "sha3", -] - -[[package]] -name = "keccak" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" -dependencies = [ - "cpufeatures", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.144" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" - -[[package]] -name = "libgit2-sys" -version = "0.13.5+1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e5ea06c26926f1002dd553fded6cfcdc9784c1f60feeb58368b4d9b07b6dba" -dependencies = [ - "cc", - "libc", - "libz-sys", - "pkg-config", -] - -[[package]] -name = "libm" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" - -[[package]] -name = "libsqlite3-sys" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "898745e570c7d0453cc1fbc4a701eb6c662ed54e8fec8b7d14be137ebeeb9d14" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "libz-sys" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "linux-raw-sys" -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 = "lock_api" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "macro_rules_attribute" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea1bd89c00ca5cf70d924bdaa5baea9eabf4709489ce9e71f2f559ed04edd862" -dependencies = [ - "macro_rules_attribute-proc_macro", - "paste", -] - -[[package]] -name = "macro_rules_attribute-proc_macro" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8dd856d451cc0da70e2ef2ce95a18e39a93b7558bedf10201ad28503f918568" - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memoffset" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" -dependencies = [ - "autocfg", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" -dependencies = [ - "libc", - "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", -] - -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "num-traits" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" -dependencies = [ - "hermit-abi 0.2.6", - "libc", -] - -[[package]] -name = "nym-api-requests" -version = "0.1.0" -dependencies = [ - "bs58", - "cosmrs", - "cosmwasm-std", - "getset", - "nym-coconut-interface", - "nym-mixnet-contract-common", - "schemars", - "serde", -] - -[[package]] -name = "nym-bandwidth-controller" -version = "0.1.0" -dependencies = [ - "bip39", - "nym-coconut-interface", - "nym-credential-storage", - "nym-credentials", - "nym-crypto", - "nym-network-defaults", - "nym-validator-client", - "rand 0.7.3", - "thiserror", - "url", -] - -[[package]] -name = "nym-bin-common" -version = "0.5.0" -dependencies = [ - "atty", - "clap", - "clap_complete", - "clap_complete_fig", - "log", - "pretty_env_logger", - "semver 0.11.0", - "serde", - "vergen", -] - -[[package]] -name = "nym-client-core" -version = "1.1.14" -dependencies = [ - "async-trait", - "dashmap", - "dirs 4.0.0", - "futures", - "gloo-timers", - "humantime-serde", - "log", - "nym-bandwidth-controller", - "nym-config", - "nym-credential-storage", - "nym-crypto", - "nym-gateway-client", - "nym-gateway-requests", - "nym-network-defaults", - "nym-nonexhaustive-delayqueue", - "nym-pemstore", - "nym-sphinx", - "nym-task", - "nym-topology", - "nym-validator-client", - "rand 0.7.3", - "serde", - "serde_json", - "sqlx 0.6.3", - "tap", - "thiserror", - "time", - "tokio", - "tokio-stream", - "tokio-tungstenite", - "tungstenite", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-timer", - "wasm-utils", - "zeroize", -] - -[[package]] -name = "nym-coconut" -version = "0.5.0" -dependencies = [ - "bls12_381 0.6.0", - "bs58", - "digest 0.9.0", - "ff 0.11.1", - "getrandom 0.2.9", - "group 0.11.0", - "itertools", - "nym-dkg", - "nym-pemstore", - "rand 0.8.5", - "serde", - "serde_derive", - "sha2 0.9.9", - "thiserror", -] - -[[package]] -name = "nym-coconut-bandwidth-contract-common" -version = "0.1.0" -dependencies = [ - "cosmwasm-std", - "nym-multisig-contract-common", - "schemars", - "serde", -] - -[[package]] -name = "nym-coconut-dkg-common" -version = "0.1.0" -dependencies = [ - "cosmwasm-std", - "cw-utils", - "nym-contracts-common", - "nym-multisig-contract-common", - "schemars", - "serde", -] - -[[package]] -name = "nym-coconut-interface" -version = "0.1.0" -dependencies = [ - "bs58", - "getset", - "nym-coconut", - "serde", - "thiserror", -] - -[[package]] -name = "nym-config" -version = "0.1.0" -dependencies = [ - "dirs 5.0.1", - "handlebars", - "log", - "nym-network-defaults", - "serde", - "toml 0.7.4", - "url", -] - -[[package]] -name = "nym-contracts-common" -version = "0.4.0" -dependencies = [ - "bs58", - "cosmwasm-std", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "nym-credential-storage" -version = "0.1.0" -dependencies = [ - "async-trait", - "log", - "sqlx 0.5.13", - "thiserror", - "tokio", -] - -[[package]] -name = "nym-credentials" -version = "0.1.0" -dependencies = [ - "bls12_381 0.5.0", - "cosmrs", - "nym-api-requests", - "nym-coconut-interface", - "nym-crypto", - "nym-validator-client", - "thiserror", -] - -[[package]] -name = "nym-crypto" -version = "0.3.0" -dependencies = [ - "aes 0.8.2", - "blake3", - "bs58", - "cipher 0.4.4", - "ctr 0.9.2", - "digest 0.10.6", - "ed25519-dalek", - "generic-array 0.14.7", - "hkdf 0.12.3", - "hmac 0.12.1", - "nym-pemstore", - "nym-sphinx-types", - "rand 0.7.3", - "subtle-encoding", - "thiserror", - "x25519-dalek", - "zeroize", -] - -[[package]] -name = "nym-dkg" -version = "0.1.0" -dependencies = [ - "bitvec", - "bls12_381 0.6.0", - "bs58", - "ff 0.11.1", - "group 0.11.0", - "lazy_static", - "nym-pemstore", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_core 0.6.4", - "serde", - "serde_derive", - "sha2 0.9.9", - "thiserror", - "zeroize", -] - -[[package]] -name = "nym-gateway-client" -version = "0.1.0" -dependencies = [ - "futures", - "getrandom 0.2.9", - "log", - "nym-bandwidth-controller", - "nym-coconut-interface", - "nym-credential-storage", - "nym-crypto", - "nym-gateway-requests", - "nym-network-defaults", - "nym-pemstore", - "nym-sphinx", - "nym-task", - "nym-validator-client", - "rand 0.7.3", - "serde", - "thiserror", - "tokio", - "tokio-stream", - "tokio-tungstenite", - "tungstenite", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-timer", - "wasm-utils", -] - -[[package]] -name = "nym-gateway-requests" -version = "0.1.0" -dependencies = [ - "bs58", - "futures", - "generic-array 0.14.7", - "log", - "nym-coconut-interface", - "nym-credentials", - "nym-crypto", - "nym-pemstore", - "nym-sphinx", - "rand 0.7.3", - "serde", - "serde_json", - "thiserror", - "tungstenite", - "zeroize", -] - -[[package]] -name = "nym-group-contract-common" -version = "0.1.0" -dependencies = [ - "cw4", - "schemars", - "serde", -] - -[[package]] -name = "nym-mixnet-contract-common" -version = "0.5.0" -dependencies = [ - "bs58", - "cosmwasm-std", - "humantime-serde", - "log", - "nym-contracts-common", - "schemars", - "serde", - "serde-json-wasm", - "serde_repr", - "thiserror", - "time", -] - -[[package]] -name = "nym-multisig-contract-common" -version = "0.1.0" -dependencies = [ - "cosmwasm-std", - "cw-utils", - "cw3", - "cw4", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "nym-name-service-common" -version = "0.1.0" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", -] - -[[package]] -name = "nym-network-defaults" -version = "0.1.0" -dependencies = [ - "cfg-if", - "dotenvy", - "hex-literal", - "once_cell", - "serde", - "thiserror", - "url", -] - -[[package]] -name = "nym-nonexhaustive-delayqueue" -version = "0.1.0" -dependencies = [ - "futures-core", - "slab", - "tokio", - "tokio-stream", - "tokio-util", - "wasm-timer", -] - -[[package]] -name = "nym-ordered-buffer" -version = "0.1.0" -dependencies = [ - "log", - "thiserror", -] - -[[package]] -name = "nym-outfox" -version = "0.1.0" -dependencies = [ - "blake3", - "chacha20", - "chacha20poly1305", - "curve25519-dalek", - "getrandom 0.2.9", - "rayon", - "sphinx-packet 0.1.0 (git+https://github.com/nymtech/sphinx.git)", - "thiserror", - "zeroize", -] - -[[package]] -name = "nym-pemstore" -version = "0.2.0" -dependencies = [ - "pem", -] - -[[package]] -name = "nym-service-provider-directory-common" -version = "0.1.0" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", -] - -[[package]] -name = "nym-service-providers-common" -version = "0.1.0" -dependencies = [ - "async-trait", - "log", - "nym-bin-common", - "nym-sphinx-anonymous-replies", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "nym-socks5-client-core" -version = "0.1.0" -dependencies = [ - "dirs 4.0.0", - "futures", - "log", - "nym-bandwidth-controller", - "nym-client-core", - "nym-config", - "nym-credential-storage", - "nym-network-defaults", - "nym-service-providers-common", - "nym-socks5-proxy-helpers", - "nym-socks5-requests", - "nym-sphinx", - "nym-task", - "nym-validator-client", - "pin-project", - "rand 0.7.3", - "serde", - "tap", - "thiserror", - "tokio", -] - -[[package]] -name = "nym-socks5-listener" -version = "0.1.0" -dependencies = [ - "android_logger", - "anyhow", - "futures", - "jni", - "lazy_static", - "log", - "nym-client-core", - "nym-config", - "nym-credential-storage", - "nym-crypto", - "nym-socks5-client-core", - "openssl", - "rand 0.7.3", - "safer-ffi", - "tokio", -] - -[[package]] -name = "nym-socks5-proxy-helpers" -version = "0.1.0" -dependencies = [ - "bytes", - "futures", - "log", - "nym-ordered-buffer", - "nym-socks5-requests", - "nym-task", - "tokio", - "tokio-util", -] - -[[package]] -name = "nym-socks5-requests" -version = "0.1.0" -dependencies = [ - "nym-service-providers-common", - "nym-sphinx-addressing", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "nym-sphinx" -version = "0.1.0" -dependencies = [ - "log", - "nym-crypto", - "nym-outfox", - "nym-sphinx-acknowledgements", - "nym-sphinx-addressing", - "nym-sphinx-anonymous-replies", - "nym-sphinx-chunking", - "nym-sphinx-cover", - "nym-sphinx-forwarding", - "nym-sphinx-framing", - "nym-sphinx-params", - "nym-sphinx-routing", - "nym-sphinx-types", - "nym-topology", - "rand 0.7.3", - "rand_distr", - "thiserror", - "tokio", -] - -[[package]] -name = "nym-sphinx-acknowledgements" -version = "0.1.0" -dependencies = [ - "nym-crypto", - "nym-pemstore", - "nym-sphinx-addressing", - "nym-sphinx-params", - "nym-sphinx-types", - "nym-topology", - "rand 0.7.3", - "thiserror", - "zeroize", -] - -[[package]] -name = "nym-sphinx-addressing" -version = "0.1.0" -dependencies = [ - "nym-crypto", - "nym-sphinx-types", - "serde", - "thiserror", -] - -[[package]] -name = "nym-sphinx-anonymous-replies" -version = "0.1.0" -dependencies = [ - "bs58", - "nym-crypto", - "nym-sphinx-addressing", - "nym-sphinx-params", - "nym-sphinx-types", - "nym-topology", - "rand 0.7.3", - "serde", - "thiserror", - "wasm-bindgen", -] - -[[package]] -name = "nym-sphinx-chunking" -version = "0.1.0" -dependencies = [ - "log", - "nym-sphinx-addressing", - "nym-sphinx-params", - "nym-sphinx-types", - "rand 0.7.3", - "thiserror", -] - -[[package]] -name = "nym-sphinx-cover" -version = "0.1.0" -dependencies = [ - "nym-crypto", - "nym-sphinx-acknowledgements", - "nym-sphinx-addressing", - "nym-sphinx-chunking", - "nym-sphinx-forwarding", - "nym-sphinx-params", - "nym-sphinx-types", - "nym-topology", - "rand 0.7.3", - "thiserror", -] - -[[package]] -name = "nym-sphinx-forwarding" -version = "0.1.0" -dependencies = [ - "nym-outfox", - "nym-sphinx-addressing", - "nym-sphinx-params", - "nym-sphinx-types", -] - -[[package]] -name = "nym-sphinx-framing" -version = "0.1.0" -dependencies = [ - "bytes", - "nym-sphinx-params", - "nym-sphinx-types", - "thiserror", - "tokio-util", -] - -[[package]] -name = "nym-sphinx-params" -version = "0.1.0" -dependencies = [ - "nym-crypto", - "nym-sphinx-types", - "serde", - "thiserror", -] - -[[package]] -name = "nym-sphinx-routing" -version = "0.1.0" -dependencies = [ - "nym-sphinx-addressing", - "nym-sphinx-types", - "thiserror", -] - -[[package]] -name = "nym-sphinx-types" -version = "0.2.0" -dependencies = [ - "sphinx-packet 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nym-task" -version = "0.1.0" -dependencies = [ - "futures", - "log", - "thiserror", - "tokio", - "wasm-bindgen", - "wasm-bindgen-futures", -] - -[[package]] -name = "nym-topology" -version = "0.1.0" -dependencies = [ - "async-trait", - "bs58", - "log", - "nym-bin-common", - "nym-crypto", - "nym-mixnet-contract-common", - "nym-sphinx-addressing", - "nym-sphinx-routing", - "nym-sphinx-types", - "rand 0.7.3", - "thiserror", -] - -[[package]] -name = "nym-validator-client" -version = "0.1.0" -dependencies = [ - "async-trait", - "base64 0.13.1", - "bip39", - "colored", - "cosmrs", - "cosmwasm-std", - "cw3", - "cw4", - "eyre", - "flate2", - "futures", - "itertools", - "log", - "nym-api-requests", - "nym-coconut-bandwidth-contract-common", - "nym-coconut-dkg-common", - "nym-coconut-interface", - "nym-config", - "nym-contracts-common", - "nym-group-contract-common", - "nym-mixnet-contract-common", - "nym-multisig-contract-common", - "nym-name-service-common", - "nym-network-defaults", - "nym-service-provider-directory-common", - "nym-vesting-contract", - "nym-vesting-contract-common", - "prost", - "reqwest", - "serde", - "serde_json", - "sha2 0.9.9", - "thiserror", - "tokio", - "url", - "zeroize", -] - -[[package]] -name = "nym-vesting-contract" -version = "1.4.0" -dependencies = [ - "cosmwasm-derive", - "cosmwasm-std", - "cw-storage-plus", - "cw2", - "nym-contracts-common", - "nym-mixnet-contract-common", - "nym-vesting-contract-common", - "schemars", - "semver 1.0.17", - "serde", - "thiserror", - "vergen", -] - -[[package]] -name = "nym-vesting-contract-common" -version = "0.6.0" -dependencies = [ - "cosmwasm-std", - "nym-contracts-common", - "nym-mixnet-contract-common", - "schemars", - "serde", -] - -[[package]] -name = "once_cell" -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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "openssl" -version = "0.10.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-src" -version = "111.25.3+1.1.1t" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924757a6a226bf60da5f7dd0311a34d2b52283dd82ddeb103208ddc66362f80c" -dependencies = [ - "cc", -] - -[[package]] -name = "openssl-sys" -version = "0.9.87" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" -dependencies = [ - "cc", - "libc", - "openssl-src", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "pairing" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de9d09263c9966e8196fe0380c9dbbc7ea114b5cf371ba29004bc1f9c6db7f3" -dependencies = [ - "group 0.10.0", -] - -[[package]] -name = "pairing" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2e415e349a3006dd7d9482cdab1c980a845bed1377777d768cb693a44540b42" -dependencies = [ - "group 0.11.0", -] - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "windows-sys 0.45.0", -] - -[[package]] -name = "paste" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" - -[[package]] -name = "pbkdf2" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05894bce6a1ba4be299d0c5f29563e08af2bc18bb7d48313113bed71e904739" -dependencies = [ - "crypto-mac 0.11.1", -] - -[[package]] -name = "peg" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07c0b841ea54f523f7aa556956fbd293bcbe06f2e67d2eb732b7278aaf1d166a" -dependencies = [ - "peg-macros", - "peg-runtime", -] - -[[package]] -name = "peg-macros" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aa52829b8decbef693af90202711348ab001456803ba2a98eb4ec8fb70844c" -dependencies = [ - "peg-runtime", - "proc-macro2", - "quote", -] - -[[package]] -name = "peg-runtime" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c719dcf55f09a3a7e764c6649ab594c18a177e3599c467983cdf644bfc0a4088" - -[[package]] -name = "pem" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd56cbd21fea48d0c440b41cd69c589faacade08c992d9a54e471b79d0fd13eb" -dependencies = [ - "base64 0.13.1", - "once_cell", - "regex", -] - -[[package]] -name = "percent-encoding" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" - -[[package]] -name = "pest" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" -dependencies = [ - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pest_derive" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn 2.0.15", -] - -[[package]] -name = "pest_meta" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" -dependencies = [ - "once_cell", - "pest", - "sha2 0.10.6", -] - -[[package]] -name = "pin-project" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs8" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" -dependencies = [ - "der", - "spki", - "zeroize", -] - -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "poly1305" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" -dependencies = [ - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "pretty_env_logger" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d" -dependencies = [ - "env_logger 0.7.1", - "log", -] - -[[package]] -name = "prettyplease" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" -dependencies = [ - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "prost" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-derive" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "prost-types" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" -dependencies = [ - "bytes", - "prost", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - -[[package]] -name = "quote" -version = "1.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.9", -] - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rayon" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "num_cpus", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom 0.2.9", - "redox_syscall 0.2.16", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" - -[[package]] -name = "reqwest" -version = "0.11.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" -dependencies = [ - "base64 0.21.0", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - -[[package]] -name = "rfc6979" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" -dependencies = [ - "crypto-bigint", - "hmac 0.11.0", - "zeroize", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted", - "web-sys", - "winapi", -] - -[[package]] -name = "ripemd160" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.17", -] - -[[package]] -name = "rustix" -version = "0.37.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.1", - "log", - "ring", - "sct 0.6.1", - "webpki 0.21.4", -] - -[[package]] -name = "rustls" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" -dependencies = [ - "log", - "ring", - "sct 0.7.0", - "webpki 0.22.0", -] - -[[package]] -name = "rustls-native-certs" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" -dependencies = [ - "openssl-probe", - "rustls 0.19.1", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" -dependencies = [ - "base64 0.21.0", -] - -[[package]] -name = "rustversion" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" - -[[package]] -name = "ryu" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" - -[[package]] -name = "safer-ffi" -version = "0.1.0-rc1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7270b08a2af50909969cfc28a239cfdda9ab1b3df74749b265c46956183e5bf7" -dependencies = [ - "inventory", - "libc", - "macro_rules_attribute", - "paste", - "safer_ffi-proc_macros", - "scopeguard", - "uninit", - "unwind_safe", - "with_builtin_macros", -] - -[[package]] -name = "safer_ffi-proc_macros" -version = "0.1.0-rc1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1438fb328c52f5148ea02a317603efd802f2cd6eb9e721adfd51b94bb55d9ddb" -dependencies = [ - "macro_rules_attribute", - "prettyplease", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" -dependencies = [ - "windows-sys 0.42.0", -] - -[[package]] -name = "schemars" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" -dependencies = [ - "dyn-clone", - "indexmap", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 1.0.109", -] - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "sct" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "sec1" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" -dependencies = [ - "der", - "generic-array 0.14.7", - "pkcs8", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "security-framework" -version = "2.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - -[[package]] -name = "serde" -version = "1.0.163" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-json-wasm" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479b4dbc401ca13ee8ce902851b834893251404c4f3c65370a49e047a6be09a5" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_bytes" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.163" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - -[[package]] -name = "serde_derive_internals" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "serde_json" -version = "1.0.96" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_repr" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - -[[package]] -name = "serde_spanned" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sha1" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.6", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sha2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.6", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug 0.3.0", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" -dependencies = [ - "digest 0.9.0", - "rand_core 0.6.4", -] - -[[package]] -name = "slab" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" - -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] - -[[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", - "bs58", - "byteorder", - "chacha", - "curve25519-dalek", - "digest 0.9.0", - "hkdf 0.11.0", - "hmac 0.11.0", - "lioness", - "log", - "rand 0.7.3", - "rand_distr", - "sha2 0.9.9", - "subtle 2.4.1", -] - -[[package]] -name = "sphinx-packet" -version = "0.1.0" -source = "git+https://github.com/nymtech/sphinx.git#ca107d94360cdf8bbfbdb12fe5320ed74f80e40c" -dependencies = [ - "aes 0.7.5", - "arrayref", - "blake2", - "bs58", - "byteorder", - "chacha", - "curve25519-dalek", - "digest 0.9.0", - "hkdf 0.11.0", - "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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] - -[[package]] -name = "spki" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "sqlformat" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b7922be017ee70900be125523f38bdd644f4f06a1b16e8fa5a8ee8c34bffd4" -dependencies = [ - "itertools", - "nom", - "unicode_categories", -] - -[[package]] -name = "sqlformat" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" -dependencies = [ - "itertools", - "nom", - "unicode_categories", -] - -[[package]] -name = "sqlx" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551873805652ba0d912fec5bbb0f8b4cdd96baf8e2ebf5970e5671092966019b" -dependencies = [ - "sqlx-core 0.5.13", - "sqlx-macros 0.5.13", -] - -[[package]] -name = "sqlx" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8de3b03a925878ed54a954f621e64bf55a3c1bd29652d0d1a17830405350188" -dependencies = [ - "sqlx-core 0.6.3", - "sqlx-macros 0.6.3", -] - -[[package]] -name = "sqlx-core" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48c61941ccf5ddcada342cd59e3e5173b007c509e1e8e990dafc830294d9dc5" -dependencies = [ - "ahash", - "atoi 0.4.0", - "bitflags", - "byteorder", - "bytes", - "crc 2.1.0", - "crossbeam-queue", - "either", - "event-listener", - "flume", - "futures-channel", - "futures-core", - "futures-executor", - "futures-intrusive", - "futures-util", - "hashlink 0.7.0", - "hex", - "indexmap", - "itoa", - "libc", - "libsqlite3-sys", - "log", - "memchr", - "once_cell", - "paste", - "percent-encoding", - "rustls 0.19.1", - "sha2 0.10.6", - "smallvec", - "sqlformat 0.1.8", - "sqlx-rt 0.5.13", - "stringprep", - "thiserror", - "tokio-stream", - "url", - "webpki 0.21.4", - "webpki-roots 0.21.1", -] - -[[package]] -name = "sqlx-core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029" -dependencies = [ - "ahash", - "atoi 1.0.0", - "bitflags", - "byteorder", - "bytes", - "crc 3.0.1", - "crossbeam-queue", - "dotenvy", - "either", - "event-listener", - "flume", - "futures-channel", - "futures-core", - "futures-executor", - "futures-intrusive", - "futures-util", - "hashlink 0.8.1", - "hex", - "indexmap", - "itoa", - "libc", - "libsqlite3-sys", - "log", - "memchr", - "once_cell", - "paste", - "percent-encoding", - "rustls 0.20.8", - "rustls-pemfile", - "sha2 0.10.6", - "smallvec", - "sqlformat 0.2.1", - "sqlx-rt 0.6.3", - "stringprep", - "thiserror", - "tokio-stream", - "url", - "webpki-roots 0.22.6", -] - -[[package]] -name = "sqlx-macros" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0fba2b0cae21fc00fe6046f8baa4c7fcb49e379f0f592b04696607f69ed2e1" -dependencies = [ - "dotenv", - "either", - "heck", - "once_cell", - "proc-macro2", - "quote", - "sha2 0.10.6", - "sqlx-core 0.5.13", - "sqlx-rt 0.5.13", - "syn 1.0.109", - "url", -] - -[[package]] -name = "sqlx-macros" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9966e64ae989e7e575b19d7265cb79d7fc3cbbdf179835cb0d716f294c2049c9" -dependencies = [ - "dotenvy", - "either", - "heck", - "once_cell", - "proc-macro2", - "quote", - "sha2 0.10.6", - "sqlx-core 0.6.3", - "sqlx-rt 0.6.3", - "syn 1.0.109", - "url", -] - -[[package]] -name = "sqlx-rt" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4db708cd3e459078f85f39f96a00960bd841f66ee2a669e90bf36907f5a79aae" -dependencies = [ - "once_cell", - "tokio", - "tokio-rustls 0.22.0", -] - -[[package]] -name = "sqlx-rt" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "804d3f245f894e61b1e6263c84b23ca675d96753b5abfd5cc8597d86806e8024" -dependencies = [ - "once_cell", - "tokio", - "tokio-rustls 0.23.4", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "stringprep" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] -name = "subtle-encoding" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" -dependencies = [ - "zeroize", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" -dependencies = [ - "cfg-if", - "fastrand", - "redox_syscall 0.3.5", - "rustix", - "windows-sys 0.45.0", -] - -[[package]] -name = "tendermint" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ca881fa4dedd2b46334f13be7fbc8cc1549ba4be5a833fe4e73d1a1baaf7949" -dependencies = [ - "async-trait", - "bytes", - "ed25519", - "ed25519-dalek", - "flex-error", - "futures", - "k256", - "num-traits", - "once_cell", - "prost", - "prost-types", - "ripemd160", - "serde", - "serde_bytes", - "serde_json", - "serde_repr", - "sha2 0.9.9", - "signature", - "subtle 2.4.1", - "subtle-encoding", - "tendermint-proto", - "time", - "zeroize", -] - -[[package]] -name = "tendermint-config" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6c56ee93f4e9b7e7daba86d171f44572e91b741084384d0ae00df7991873dfd" -dependencies = [ - "flex-error", - "serde", - "serde_json", - "tendermint", - "toml 0.5.11", - "url", -] - -[[package]] -name = "tendermint-proto" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71f925d74903f4abbdc4af0110635a307b3cb05b175fdff4a7247c14a4d0874" -dependencies = [ - "bytes", - "flex-error", - "num-derive", - "num-traits", - "prost", - "prost-types", - "serde", - "serde_bytes", - "subtle-encoding", - "time", -] - -[[package]] -name = "tendermint-rpc" -version = "0.23.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13e63f57ee05a1e927887191c76d1b139de9fa40c180b9f8727ee44377242a6" -dependencies = [ - "async-trait", - "bytes", - "flex-error", - "futures", - "getrandom 0.2.9", - "http", - "hyper", - "hyper-proxy", - "hyper-rustls", - "peg", - "pin-project", - "serde", - "serde_bytes", - "serde_json", - "subtle-encoding", - "tendermint", - "tendermint-config", - "tendermint-proto", - "thiserror", - "time", - "tokio", - "tracing", - "url", - "uuid", - "walkdir", -] - -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - -[[package]] -name = "time" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" -dependencies = [ - "itoa", - "js-sys", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" - -[[package]] -name = "time-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" -dependencies = [ - "time-core", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" -dependencies = [ - "autocfg", - "bytes", - "libc", - "mio", - "num_cpus", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-macros" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" -dependencies = [ - "rustls 0.19.1", - "tokio", - "webpki 0.21.4", -] - -[[package]] -name = "tokio-rustls" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls 0.20.8", - "tokio", - "webpki 0.22.0", -] - -[[package]] -name = "tokio-stream" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", - "tokio-util", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e96bb520beab540ab664bd5a9cfeaa1fcd846fa68c830b42e2c8963071251d2" -dependencies = [ - "futures-util", - "log", - "pin-project", - "tokio", - "tungstenite", -] - -[[package]] -name = "tokio-util" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "slab", - "tokio", - "tracing", -] - -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.19.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" -dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" - -[[package]] -name = "tungstenite" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe8dada8c1a3aeca77d6b51a4f1314e0f4b8e438b7b1b71e3ddaca8080e4093" -dependencies = [ - "base64 0.13.1", - "byteorder", - "bytes", - "http", - "httparse", - "input_buffer", - "log", - "rand 0.8.5", - "sha-1", - "thiserror", - "url", - "utf-8", -] - -[[package]] -name = "typenum" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "ucd-trie" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" - -[[package]] -name = "uint" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - -[[package]] -name = "unicode-ident" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" - -[[package]] -name = "unicode_categories" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" - -[[package]] -name = "uninit" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e130f2ed46ca5d8ec13c7ff95836827f92f5f5f37fd2b2bf16f33c408d98bb6" -dependencies = [ - "extension-traits", -] - -[[package]] -name = "universal-hash" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3160b73c9a19f7e2939a2fdad446c57c1bbbbf4d919d3213ff1267a580d8b5" -dependencies = [ - "crypto-common", - "subtle 2.4.1", -] - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "unwind_safe" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0976c77def3f1f75c4ef892a292c31c0bbe9e3d0702c63044d7c76db298171a3" - -[[package]] -name = "url" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "vergen" -version = "7.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447f9238a4553957277b3ee09d80babeae0811f1b3baefb093de1c0448437a37" -dependencies = [ - "anyhow", - "cfg-if", - "enum-iterator", - "getset", - "git2", - "rustc_version", - "rustversion", - "thiserror", - "time", -] - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "walkdir" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 1.0.109", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" - -[[package]] -name = "wasm-timer" -version = "0.2.5" -source = "git+https://github.com/mmsinclair/wasm-timer?rev=b9d1a54ad514c2f230a026afe0dde341e98cd7b6#b9d1a54ad514c2f230a026afe0dde341e98cd7b6" -dependencies = [ - "futures", - "js-sys", - "parking_lot", - "pin-utils", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "wasm-utils" -version = "0.1.0" -dependencies = [ - "futures", - "getrandom 0.2.9", - "js-sys", - "tungstenite", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "web-sys" -version = "0.3.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" -dependencies = [ - "webpki 0.21.4", -] - -[[package]] -name = "webpki-roots" -version = "0.22.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki 0.22.0", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-targets" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" -dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" - -[[package]] -name = "winnow" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" -dependencies = [ - "winapi", -] - -[[package]] -name = "with_builtin_macros" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a59d55032495429b87f9d69954c6c8602e4d3f3e0a747a12dea6b0b23de685da" -dependencies = [ - "with_builtin_macros-proc_macros", -] - -[[package]] -name = "with_builtin_macros-proc_macros" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15bd7679c15e22924f53aee34d4e448c45b674feb6129689af88593e129f8f42" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "x25519-dalek" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" -dependencies = [ - "curve25519-dalek", - "rand_core 0.5.1", - "zeroize", -] - -[[package]] -name = "zeroize" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] diff --git a/sdk/lib/socks5-listener/Cargo.toml b/sdk/lib/socks5-listener/Cargo.toml index 793b9bd7dc..fe2ff08134 100644 --- a/sdk/lib/socks5-listener/Cargo.toml +++ b/sdk/lib/socks5-listener/Cargo.toml @@ -18,7 +18,7 @@ codegen-units = 1 [dependencies] anyhow = { workspace = true } -futures = "0.3" +futures = { workspace = true } lazy_static = "1.4.0" nym-bin-common = { path = "../../../common/bin-common"} nym-client-core = { path = "../../../common/client-core", default-features = false } @@ -26,7 +26,7 @@ nym-config-common = { path = "../../../common/config", package = "nym-config" } nym-credential-storage = { path = "../../../common/credential-storage" } nym-crypto = { path = "../../../common/crypto" } nym-socks5-client-core = { path = "../../../common/socks5-client-core", default-features = false } -openssl = { version = "0.10", features = ["vendored"] } +openssl = { version = "^0.10.55", features = ["vendored"] } serde = { workspace = true } tokio = { workspace = true, features = ["sync", "time"] } log = "0.4.17" diff --git a/sdk/rust/nym-sdk/Cargo.toml b/sdk/rust/nym-sdk/Cargo.toml index d4b2d16b5b..e2b5d86d7e 100644 --- a/sdk/rust/nym-sdk/Cargo.toml +++ b/sdk/rust/nym-sdk/Cargo.toml @@ -21,18 +21,18 @@ nym-topology = { path = "../../../common/topology" } nym-socks5-client-core = { path = "../../../common/socks5-client-core" } nym-validator-client = { path = "../../../common/client-libs/validator-client", features = ["http-client"] } -futures = "0.3" +futures = { workspace = true } log = { workspace = true } rand = { version = "0.7.3" } tap = "1.0.1" -thiserror = "1.0.38" -url = "2.2" +thiserror = { workspace = true } +url = { workspace = true } toml = "0.5.10" [dev-dependencies] dotenvy = { workspace = true } pretty_env_logger = "0.4.0" -reqwest = { version = "0.11", features = ["json", "socks"] } +reqwest = { workspace = true, features = ["json", "socks"] } thiserror = { workspace = true } tokio = { version = "1", features = ["full"] } nym-bin-common = { path = "../../../common/bin-common" } diff --git a/sdk/rust/nym-sdk/src/bandwidth/client.rs b/sdk/rust/nym-sdk/src/bandwidth/client.rs index 3be519bf49..7171282a71 100644 --- a/sdk/rust/nym-sdk/src/bandwidth/client.rs +++ b/sdk/rust/nym-sdk/src/bandwidth/client.rs @@ -6,9 +6,8 @@ use nym_bandwidth_controller::acquire::state::State; use nym_credential_storage::storage::Storage; use nym_credentials::coconut::bandwidth::BandwidthVoucher; use nym_network_defaults::NymNetworkDetails; -use nym_validator_client::nyxd::{Coin, SigningNyxdClient}; -use nym_validator_client::signing::direct_wallet::DirectSecp256k1HdWallet; -use nym_validator_client::{Client, Config}; +use nym_validator_client::nyxd::Coin; +use nym_validator_client::{nyxd, DirectSigningHttpRpcNyxdClient}; /// The serialized version of the yet untransformed bandwidth voucher. It can be used to complete /// the acquirement process of a bandwidth credential. @@ -22,7 +21,7 @@ pub type VoucherBlob = Vec; /// client. pub struct BandwidthAcquireClient<'a, St: Storage> { network_details: NymNetworkDetails, - client: Client>, + client: DirectSigningHttpRpcNyxdClient, storage: &'a St, } @@ -36,8 +35,14 @@ where mnemonic: String, storage: &'a St, ) -> Result { - let config = Config::try_from_nym_network_details(&network_details)?; - let client = nym_validator_client::Client::new_signing(config, mnemonic.parse()?)?; + let nyxd_url = network_details.endpoints[0].nyxd_url.as_str(); + let config = nyxd::Config::try_from_nym_network_details(&network_details)?; + + let client = DirectSigningHttpRpcNyxdClient::connect_with_mnemonic( + config, + nyxd_url, + mnemonic.parse()?, + )?; Ok(Self { network_details, client, @@ -51,7 +56,7 @@ where /// associated bandwidth credential, using [`Self::recover`]. pub async fn acquire(&self, amount: u128) -> Result<()> { let amount = Coin::new(amount, &self.network_details.chain_details.mix_denom.base); - let state = nym_bandwidth_controller::acquire::deposit(&self.client.nyxd, amount).await?; + let state = nym_bandwidth_controller::acquire::deposit(&self.client, amount).await?; nym_bandwidth_controller::acquire::get_credential(&state, &self.client, self.storage) .await .map_err(|reason| Error::UnconvertedDeposit { diff --git a/sdk/rust/nym-sdk/src/error.rs b/sdk/rust/nym-sdk/src/error.rs index 6d4196e491..e88368b19a 100644 --- a/sdk/rust/nym-sdk/src/error.rs +++ b/sdk/rust/nym-sdk/src/error.rs @@ -1,3 +1,4 @@ +use nym_validator_client::nyxd::error::NyxdError; use std::path::PathBuf; /// Top-level Error enum for the mixnet client and its relevant types. @@ -46,7 +47,7 @@ pub enum Error { DisabledCredentialsMode, #[error("bad validator details: {0}")] - BadValidatorDetails(#[from] nym_validator_client::ValidatorClientError), + BadValidatorDetails(#[from] NyxdError), #[error("socks5 configuration set: {}, but expected to be {}", set, !set)] Socks5Config { set: bool }, diff --git a/sdk/rust/nym-sdk/src/mixnet/client.rs b/sdk/rust/nym-sdk/src/mixnet/client.rs index 4340b79174..215305f408 100644 --- a/sdk/rust/nym-sdk/src/mixnet/client.rs +++ b/sdk/rust/nym-sdk/src/mixnet/client.rs @@ -24,8 +24,7 @@ use nym_network_defaults::NymNetworkDetails; use nym_socks5_client_core::config::Socks5; use nym_task::manager::TaskStatus; use nym_topology::provider_trait::TopologyProvider; -use nym_validator_client::nyxd::QueryNyxdClient; -use nym_validator_client::Client; +use nym_validator_client::{nyxd, QueryHttpRpcNyxdClient}; use std::path::Path; use std::path::PathBuf; use url::Url; @@ -214,7 +213,7 @@ where /// In the case of enabled credentials, a client instance responsible for querying the state of the /// dkg and coconut contracts - dkg_query_client: Option>, + dkg_query_client: Option, /// Alternative provider of network topology used for constructing sphinx packets. custom_topology_provider: Option>, @@ -244,10 +243,12 @@ where ) -> Result> { // don't create dkg client for the bandwidth controller if credentials are disabled let dkg_query_client = if config.enabled_credentials_mode { - let client_config = nym_validator_client::Config::try_from_nym_network_details( - &config.network_details, + let client_config = + nyxd::Config::try_from_nym_network_details(&config.network_details)?; + let client = QueryHttpRpcNyxdClient::connect( + client_config, + config.network_details.endpoints[0].nyxd_url.as_str(), )?; - let client = nym_validator_client::Client::new_query(client_config)?; Some(client) } else { None @@ -323,7 +324,7 @@ where // this will perform necessary key and details load and optional store let _init_result = nym_client_core::init::setup_gateway( - &gateway_setup, + gateway_setup, self.storage.key_store(), self.storage.gateway_details_store(), !self.config.key_mode.is_keep(), diff --git a/service-providers/network-requester/Cargo.toml b/service-providers/network-requester/Cargo.toml index d1d7367d85..713552f812 100644 --- a/service-providers/network-requester/Cargo.toml +++ b/service-providers/network-requester/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "nym-network-requester" -version = "1.1.24" +version = "1.1.25" authors.workspace = true edition.workspace = true rust-version = "1.65" @@ -15,7 +15,7 @@ async-trait = { workspace = true } bs58 = "0.4.0" clap = {version = "4.0", features = ["cargo", "derive"]} dirs = "4.0" -futures = "0.3.24" +futures = { workspace = true } humantime-serde = "1.1.1" ipnetwork = "0.20.0" lazy_static = { workspace = true } @@ -24,7 +24,7 @@ pretty_env_logger = "0.4.0" publicsuffix = "1.5" # Can't update this until bip updates to support newer idna version rand = "0.7.3" regex = "1.8.4" -reqwest = { version = "0.11.11", features = ["json"] } +reqwest = { workspace = true, features = ["json"] } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } sqlx = { version = "0.6.1", features = ["runtime-tokio-rustls", "chrono"]} diff --git a/service-providers/network-requester/src/cli/init.rs b/service-providers/network-requester/src/cli/init.rs index cea6253803..a1eb89f518 100644 --- a/service-providers/network-requester/src/cli/init.rs +++ b/service-providers/network-requester/src/cli/init.rs @@ -149,14 +149,15 @@ pub(crate) async fn execute(args: &Init) -> Result<(), NetworkRequesterError> { let details_store = OnDiskGatewayDetails::new(&config.storage_paths.common_paths.gateway_details); let init_details = nym_client_core::init::setup_gateway( - &gateway_setup, + gateway_setup, &key_store, &details_store, register_gateway, Some(&config.base.client.nym_api_urls), ) .await - .tap_err(|err| eprintln!("Failed to setup gateway\nError: {err}"))?; + .tap_err(|err| eprintln!("Failed to setup gateway\nError: {err}"))? + .details; let config_save_location = config.default_location(); config.save_to_default_location().tap_err(|_| { diff --git a/service-providers/network-statistics/Cargo.toml b/service-providers/network-statistics/Cargo.toml index 7c0138ca8f..8c5d7784f0 100644 --- a/service-providers/network-statistics/Cargo.toml +++ b/service-providers/network-statistics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-network-statistics" -version = "1.1.24" +version = "1.1.25" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/tools/nym-cli/Cargo.toml b/tools/nym-cli/Cargo.toml index 9f3c0d6a2a..a693b9aa12 100644 --- a/tools/nym-cli/Cargo.toml +++ b/tools/nym-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nym-cli" -version = "1.1.24" +version = "1.1.25" authors.workspace = true edition = "2021" diff --git a/tools/nym-cli/src/validator/mixnet/operators/name/mod.rs b/tools/nym-cli/src/validator/mixnet/operators/name/mod.rs index d7873a9839..5ab1f3dcba 100644 --- a/tools/nym-cli/src/validator/mixnet/operators/name/mod.rs +++ b/tools/nym-cli/src/validator/mixnet/operators/name/mod.rs @@ -23,6 +23,14 @@ pub(crate) async fn execute( }; res }, + nym_cli_commands::validator::mixnet::operators::name::MixnetOperatorsNameCommands::CreateNameRegisterPayload(args) => { + let res = nym_cli_commands::validator::mixnet::operators::name::register_sign_payload::create_payload(args, create_signing_client(global_args, network_details)?).await; + match res { + Ok(_) => (), + Err(_) => println!("Failed to create payload") + }; + res + } }; Ok(res?) } diff --git a/yarn.lock b/yarn.lock index 178152e2f1..10f93b7eaf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17413,7 +17413,7 @@ prop-types@^15.0.0, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2, object-assign "^4.1.1" react-is "^16.13.1" -property-expr@^2.0.4: +property-expr@^2.0.4, property-expr@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/property-expr/-/property-expr-2.0.5.tgz#278bdb15308ae16af3e3b9640024524f4dc02cb4" integrity sha512-IJUkICM5dP5znhCckHSv30Q4b5/JA5enCtkRHYaOVOAocnH/1BQEYTC5NMfT3AVl/iXKdr3aqQbQn9DxyWknwA== @@ -20018,6 +20018,11 @@ timers-ext@^0.1.7: es5-ext "~0.10.46" next-tick "1" +tiny-case@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tiny-case/-/tiny-case-1.0.3.tgz#d980d66bc72b5d5a9ca86fb7c9ffdb9c898ddd03" + integrity sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q== + tiny-warning@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" @@ -21786,6 +21791,16 @@ yup@^0.32.9: property-expr "^2.0.4" toposort "^2.0.2" +yup@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/yup/-/yup-1.2.0.tgz#9e51af0c63bdfc9be0fdc6c10aa0710899d8aff6" + integrity sha512-PPqYKSAXjpRCgLgLKVGPA33v5c/WgEx3wi6NFjIiegz90zSwyMpvTFp/uGcVnnbx6to28pgnzp/q8ih3QRjLMQ== + dependencies: + property-expr "^2.0.5" + tiny-case "^1.0.3" + toposort "^2.0.2" + type-fest "^2.19.0" + zod@^3.21.4: version "3.21.4" resolved "https://registry.yarnpkg.com/zod/-/zod-3.21.4.tgz#10882231d992519f0a10b5dd58a38c9dabbb64db"